-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
zen-browser: init at 1.0.2-b.4 #363992
base: master
Are you sure you want to change the base?
zen-browser: init at 1.0.2-b.4 #363992
Conversation
I will need to fix the update script to update surfer and firefox. |
The PR had not only had technical issues, but project management issues inherent to upstream as well. As such, drafting until a consensus amongst committees/security/buildMozillaMach folks can be reached. |
@ofborg build zen-browser |
I mean it's in beta so there will be only small big changes but the Firefox version was rolled back because of half of the browser broke due to new apis in FF 133. |
This was the reason because It took two hours for a single build and my machine and I need to sleep. |
I will keep this in draft until it's fully stable. |
# To the person reading this wondering what is going on here, this is what | ||
# happens when a build process relies on Git. Normally you would use `fetchgit` | ||
# with `leaveDotGit = true`, however that leads to reproducibility issues, so | ||
# instead we create our own Git repo with a single commit. | ||
# | ||
# `surfer` (the build tool made for zen-browser) uses git to read the latest | ||
# HEAD commit, `git apply`, and likely a few other operations. |
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.
Looking at Surfer's code, it seems to be quite simple just to patch out the Git usages, even being able to contribute most (if not all) of these fixes upstream. Can we try that?
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.
Yeah I could look at doing that.
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.
There are a lot of git uses though: https://github.com/search?q=repo%3Azen-browser%2Fsurfer+%27git%27&type=code
I have NodeJS experience and could sumit a patch to use isomorphic-git instead to remove the git dependency if that would be helpful. Never mind, it doesn't support some git commands that are needed.
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.
There are a lot of git uses though
Most of them are not relevant to us, so we can ignore them. On a cursory glance, I count three that we'd want to patch:
- https://github.com/zen-browser/surfer/blob/ecd6b650f0234402976dde7e775d42aec6568406/src/commands/patches/git-patch.ts#L16-L18
- https://github.com/zen-browser/surfer/blob/ecd6b650f0234402976dde7e775d42aec6568406/src/commands/build.ts#L34
- https://github.com/zen-browser/surfer/blob/ecd6b650f0234402976dde7e775d42aec6568406/src/commands/download/addon.ts#L223-L230 (if Zen even uses addons)
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've just worked on two patches that patch the addon one and the changeset in build. But I am having a bit of trouble of patching the git patch one as that uses the patches from zen browser and applies it directly to the engine.
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.
Unless a. use IFD which is against nixpkgs or b. include every patch in diretory. it turns out that this is not IFD if it was it would ofborg would eval error + gh actions.
Working on darwin support, but a lot of libraries used that are linux based, is there an easier route of finding out what is using a linux thing directly. |
You would need to provide an example of a library in question, the error you run into, and why you think it's needed on Darwin. |
You could run |
But I can't build on my linux as it's not powerful enough, but I can with my darwin so I don't know what is using what.
|
5094a94
to
66629b1
Compare
72a2d56
to
8f31186
Compare
8f31186
to
10078c9
Compare
I think this is about the a.20 that got rolled back in a.21. The FF version only got updated for the beta release ~two weeks after. |
Hm, there wasn't any major security issues while in 21. There where some medium security issues, but those updates really did break up how firefox handles a lot of their UI components and while transitioning from alpha -> beta. So it's reasonable it may had taken a bit more of time, but now we have developed a more efficient and stable way of handling these firefox updates. But I woudnt call it a "major security failure", specially knowing we are reaching to the stable versions soon |
There were multiple known security vulnerabilities in Firefox 133 at the point Zen rolled back to 132 and remained there for almost two weeks, one of which was high severity. As discussed in #347222, that just falls below the standards we consider acceptable for browser forks, and which the ones we ship like LibreWolf have managed to keep up with so far. I can understand if Zen doesn’t have the resources to keep up with new upstream versions in a timely fashion, but downstream forks that can’t get releases out within ~3 days of upstream security fixes are not something we can ship to users in good conscience. The question is not so much which security vulnerabilities were being shipped to end users in practice – although clearly there was at least one that Mozilla considered to be serious – but the fact that even if there had been extremely serious issues it doesn’t seem like Zen would have been equipped to protect their users in that period. At a minimum I think the version that rolled back to the Firefox version with known vulnerabilities should have contained a prominent notice in the release notes that it was known to be insecure and linked to the upstream advisories. That way users and downstream distributors would at least be aware of that (and we could have e.g. marked it with |
@matthewpi is now credited .
I mean that could work but the problem I run into is using an update script to update the browser in less than 72hrs.
I haven't found the root cause because I am working on getting darwin builds working.
Just to note I am note I am keeping this draft until stable or they improve their security but most likely stable would be better as hopefully security improves I have let @mr-cheff know in discord about this and to reflect on this. |
Wait, does brave, vivaldi, opera, etc release chromium updates without properly testing it for at least a week? Such big updates can break so many things, they must have insane developers |
They have normal developers doing testing on beta versions, incremental rollouts, backporting of security patches and rollbacks as their day to day job. |
Yes, the only real way to keep up with browser vendors and not put users at risk is to develop and test on development versions significantly in advance of them being released, so that you can cut a well‐tested release in a timely fashion after upstream does. (And with Chromium I guess there’s also a larger ecosystem of third parties backporting security fixes to earlier versions, e.g. Qt. Firefox ESR gets similar support and would significantly reduce the frequency of churn, but I guess it wouldn’t be acceptable for Zen.) |
Oh, so they get their updates in advance? I might need to take a look into that, that sounds like a good thing to do |
Oh wow, this actually opened my eyes a lot. Ill be changing stable releases to RC, so I can test builds 1 week before actual release (https://archive.mozilla.org/pub/firefox/candidates/) Thanks a lot! I coudnt had learned this if it wasnt for this convo |
Ideally you’d want to keep up to date with the upstream Mercurial (soon to be Git?) development version of Firefox and create release branches when they do, so that even by the time an upstream release candidate is cut you’ve already had time to adapt to the changes and get some testing of the result (say, by offering nightly builds to users). |
Thanks a lot! Ill look into it more in depth |
I heard about Firefox switching to git, is that still happen or not cause I heard at nov 2023 they were going to start switching in 6 months, but I don't know any progress has been done? |
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 do the .patch
files do?
They are just code that applies in the |
sed -i 's/x86_64-pc-linux/aarch64-linux-gnu/g' ./configs/linux/mozconfig | ||
# eme/widevine must be disabled on arm64 (thx google) | ||
sed -i '/--enable-eme/s/^/# /' ./configs/common/mozconfig |
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 can just set exoirt SURFER_COMPAT="arm64"
at build 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.
This is going to be migrated soon to buildMozillaMach
as discussed with @emilazy in this comment and surfer is no longer going to be used.
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's weird, you don't build zen the same way you build firefox. But I dont know anything about nix so don't listen to me. I do want to state we are moving from beta
to release
branches, so you may want to update that
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 do want to state we are moving from
beta
torelease
branches, so you may want to update that
I will update the source when the time that zen browser has a release tag for release
as we use a tag system in src here
Seems like they're taking steps to the right direction, am I wrong?
|
But still doesn't make the fact they left it for 12 days instead of 48-72 hrs or less respondent as requested by the firefox/ |
I don't fully agree: it's clear that the developer didn't know about keeping their patches up-to-date with the nightly builds, and it's also clear that once it was shown that releasing on top of an outdated Firefox was both unacceptable and avoidable, they took steps towards making sure it won't happen again. This seems to have been a learning experience for the zen-browser developer, and it shouldn't disqualify zen-browser from inclusion in nixpkgs, as long as the new process holds up. Whether it does remains to be seen. |
I think there is still a lot of work to do like moving to |
It has definitively been a learning experience for me haha. I didn't know RC builds even existed before. Updating Firefox, getting it tested for one week and release on the same day is... so easy now. And all thanks to this thread! Ill 100% keep maintaining updates like this. For example, twilight branch (https://github.com/zen-browser/desktop/actions/runs/12757747570) is already on Firefox 134.0.1! All im saying is, please give it another chance 🙏🏽, maybe keep an eye for the next 3 Firefox releases (they do one release per month) so I can truly prove myself? |
Sorry I have been ignoring it for the past weeks, I've been working insanely hard at startups and haven't gotten the change to switch to No hate to you @mauro-balades but it's just that nixpkgs has a very big security policy from @mweinelt (Maintainer of Firefox package in nixpkgs) to follow according, the fact you did leave it for 12 days when nixpkgs wasn't notified this reintroduces security vulnerabilities to mark it accordingly with |
Hmm, I don't remember removing those releases... But uhh, how is release from b3 to B4 a security issue? Even stable software has breaking updates that need fix Edit: I remember now, there aren't release notes because of that one time they got backed out. But idk man, if you are going to keep me held because and alpha product was doing a ground breaking update AND wasn't using RC builds (which we now do) that's up to you, I stopped caring. At this point you are just forcing users to download third party packages to install zen, and I don't know what's worse |
Hello, Discaimer : I am not a maintainer I am just giving my thought on the situation I understand the Security and maintenance concerne that @Eveeifyeve and emilazy have but I think that we can put zen at try. I propose that we monitor zen for 4 months so we can see 3 full Firefox releases (I can do it if you want ) . If we didn't found any security issue after this periode and that the llvm closure size issue is resolve we could consider that zen as "lean from it's mistake" and is safe to merge (when the mr is ready). |
Yeah well, im not going to stop people from using it. So ill be recommending https://github.com/0xc000022070/zen-browser-flake in the meantime |
This pr will still be able to be used in flakes via:
I will try to update this pr but can't guarantee it will be updated to latest. |
https://zen-browser.app/
Closes #327982
NOTE: This package takes quite a lot of resources to build. It took me an hour maybe two on my machine (3200g), This is not a package you want to compile yourself if you can avoid it.
If anyone wants to be added as a maintainer to this package, please leave a comment and I will add you.
Followup from PR #347222 that got reverted because of this comment: #347222 (comment) I want to make sure this pr is okay to go on nixpkgs the right way instead of reverting.
I will add myself as a maintainer once I have my darwin stuff sorted.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.