-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chromium: Add ungoogled flag to enable ungoogled-chromium patches #51195
Conversation
Is there a succinct way to fetch a list of patch urls? There are ~167 patches. |
You could maybe adapt nixpkgs/pkgs/tools/misc/grub/default.nix Line 20 in 8a2bf13
Or an inspired idea. There could be better examples in nixpkgs btw. |
It's also possible to fetch the patch directory at once, and override |
I grepped with
debian/patches/ dir. So I suppose patches does automatically traverse through the subdirs.
Though in this case, some of the patches are specific to ubuntu/debian/opensuse (https://github.com/Eloston/ungoogled-chromium/tree/master/patches), where not all the patches should be applied. |
pkgs/top-level/all-packages.nix
Outdated
@@ -16120,6 +16120,8 @@ with pkgs; | |||
|
|||
chromiumDev = lowPrio (chromium.override { channel = "dev"; }); | |||
|
|||
chromiumUngoogled = lowPrio (chromium.override { ungoogled = true; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should let hydra build yet another chromium. The build takes quiet long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I haven't tested building it though, which will take a very long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should before we merge a feature like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you intend to keep this up-to-date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I add chromiumUnstable
back to all-packages.nix, let Borg build it once (or if Borg could build with an override), then remove it. Since the patches are fetched instead of vendored/hardcoded, to keep them up-to-date I just have to update the git rev and sha256.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ofborg has a time limit of one hour. Chromium takes 10 hours or more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I will bite the bullet and compile chromium + ungoogled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option to prevent massive 10 hour build is to take the binary from https://github.com/Eloston/ungoogled-chromium#software-repositories (AUR) and do patchELF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option to prevent massive 10 hour build is to take the binary from https://github.com/Eloston/ungoogled-chromium#software-repositories (AUR) and do patchELF.
I feel like I saw @srhb discuss this somewhere (apologies in advance if not)
) ++ optional ungoogled | ||
(fetchgit { | ||
url = "https://github.com/Eloston/ungoogled-chromium.git"; | ||
rev = "46bbd9f6686dd1ee2fa67ac94ddd618d0ae56d3b"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use release tags from here? https://github.com/Eloston/ungoogled-chromium/releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
IMO this requires too much maintenance in the long term. Chromium updates a lot and each option has to be rebuilt with new updates. This also should not be too hard to do with an overlay:
|
(I have a WIP binary version which should require far less maintenance, will push once tested) |
Superseded by #51266 (maybe I will put the source version on NUR later) |
I'd like to resume work on this approach. It seems to me, that ungoogled-chromium is pretty maintainable (and actively maintained, e.g. we probably could already build current stable with this PR ungoogled-software/ungoogled-chromium#618) Long term, I'd even consider building Nix' chromium with the ungoogled patch set by default, because I imagine that most people running Hopefully the maintenance burden could be reduced to a minimum by integrating
Additionally, |
@rht I can do chromium builds in 1-2 h, so if you want me to try a build, feel free to reopen this. |
There are other variants, such as the inox-patchset, bromite, iridium, I'd say choosing ungoogled-chromium by default over the other requires a consensus. |
On my working branch, master...bendlas:chromium-ungoogled, I have added ungoogled-chromium sources to the auto-updater, integrated ungoogled-chromium into the build process and worked through a couple of fixes, some of which should be interesting for the regular chromium build as well. Got it working pretty far:
|
I found https://aur.archlinux.org/packages/ungoogled-chromium/?comments=all&O=0&PP=10 at the comment
to the
error message. |
Added some more commits. Now the build fails at
I suspect, this is due to linking with
passing
passing I'll give it a final shot to compile with |
no dice :-( |
@bendlas what are the remaining possible permutations of the build flags x dependencies? (Excluding harfbuzz and freetype since they are vendored in the source anyway). |
Haven't kept track, sorry ... I just kept fixing build errors, but I don't know exactly what to do with the Btw, if you want to work on this, I recommend building it with |
Is there still work being done to this? I am still very interested in ungoogled-chromium. |
Since you asked: I've tried rebasing my branch and updating to the latest ungoogled release: master...bendlas:chromium-ungoogled Still got early linker errors with lld. If you want take a look, asking around with chromium folks might be helpful. Here is the build log, building with lld, similar to arch: https://gist.github.com/bendlas/9b5d5444dcb57cf6f1b95469a9763a0f |
I actually got the branch to run now master...bendlas:chromium-ungoogled In the meantime, if you want to have a look, I put the build here https://bendlas.cachix.org/ |
The ungoogled-chromium is available in Nixpkgs. Thanks to @squalus. I'm closing this. |
Motivation for this change
Apply patches from https://github.com/Eloston/ungoogled-chromium.
(Only one of the patches is applied for now for testing purpose)Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)