-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
netsurf: 3.5 → 3.9 #65360
netsurf: 3.5 → 3.9 #65360
Conversation
While this PR does work for building the gtk version of netsurf, the framebuffer version does not render pages for me. I have made some changes over here to this PR which simplify (or maybe overly abstract*) the expression. I tested uilib = {gtk,gtk3,framebuffer} and all work for me. It would be nice if you could test it too, if you want to test the framebuffer version build netsurf.browser without overriding and then run Which brings me to the resulting binaries have the suffix {fb,gtk,gtk3}. It seems like other distributions symlink @samueldr do you want to incorporate my changes into this PR or prefer I make a PR after this gets merged? * It would be nice to eventually make |
Ooh, glossed over your commit and it does look good. It at least looks like it has better handling of the ca bundle. I will look at it more in details tomorrow or during the week-end. Why is the ca bundle patch only applied for GTK builds?
Well, I see the patch is for the gtk frontend in the code; is there an equivalent patch for framebuffer (would it even be needed?). And thanks for the invocation for the sixel (framebuffer) variant, this'll end up being useful. |
You guessed right. All though I am not sure why, framebuffer is able to connect to HTTPS sites without any patches applied.
No problem, happy to help. |
Oh, one thing though I'm not sure about the ca-bundle patch; it assumes one wants the global I see some other derivations are built to embed the path of the |
Hmmm diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 3163be16d..143a1041b 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -200,15 +200,11 @@ static nserror set_defaults(struct nsoption_s *defaults)
nsoption_setnull_charp(downloads_directory, strdup(fname));
}
- /* default path to certificates */
- nsoption_setnull_charp(ca_path, strdup("/etc/ssl/certs"));
-
if ((nsoption_charp(cookie_file) == NULL) ||
(nsoption_charp(cookie_jar) == NULL) ||
(nsoption_charp(url_file) == NULL) ||
(nsoption_charp(hotlist_path) == NULL) ||
- (nsoption_charp(downloads_directory) == NULL) ||
- (nsoption_charp(ca_path) == NULL)) {
+ (nsoption_charp(downloads_directory) == NULL)) {
NSLOG(netsurf, INFO,
"Failed initialising default resource paths");
return NSERROR_BAD_PARAMETER; Testing with https://badssl.com/ seems to indicate that it works as expected that way. Still looking into it and will try to get in touch with upstream to see if it makes sense to drop the default, considering this is how EDIT: here's an strace showing it indeed looks to the
|
For completion's sake, it looks like the framebuffer interface just stops loading resources on SSL failure. Additionally, only the beos GUI sets the value of |
Additional CAs added through
Considering the documentation for it states, "The framebuffer frontend is not a replacement for full native ports. It lacks functionality and flexibility compared to such implementations." How it acts versus how the GTK version acts might be purposeful design decisions though this is speculation on my part. Probably best to talk to upstream about it. |
Ah! Then I wouldn't think it would work with the self-contained option. It's likely more right to set it to the well-known configuration folder. Though, I further think that unsetting everything and relying on the intrinsic defaults in curl is the better solution. I am getting in touch with upstream to see what they think, and if I'm missing something.
That was purely informational :). I was basically stating that using the framebuffer version with https is not unsafe, as it will not load pages when the validation fails. In this case it's important since it has the better behaviour of using the intrinsic defaults of curl instead of setting options when initializing. |
I will update with the accepted-by-upstream patch. This means that we can decisively drop the nixos-specific wrapper with |
Nice, thank you for talking to upstream about it. Have you had a chance to look at the other changes? |
f1706c4
to
d53399e
Compare
I started looking at your changes. There's a bunch of good, there's some reformatting, and some questionable bits. Since Nix has lazy evaluation, using the following has no advantage. { stdenv, gtk2 ? null }:
let
available = x: x != null;
gtk2Support = uilib == "gtk";
in
assert gtk2Support -> all available [gtk2 /* ... */];
stdenv.mkDerivation rec {
buildInputs = [
/* ... */
]
++ optional (gtk2Support) gtk2
;
}
Additionally, the Similarly, switching between I'll import the definitely good stuff from your changes, but will not import those that change the behaviour just yet... instead I want to merge this one (with cleanups) faster, and then work a bit more on the netsurf infra in another PR, with you if you're interested. Using |
Also fixes native build inputs
In the last changes, I have included some of the changes from S-NA@ff11007, though I also verified almost every assumptions about the build system. Things that were removed were simply not present in the source of netsurf, or not required for gtk and framebuffer to work. The next steps, which I think should be handled in a new PR, is to rework the "public-facing" bits, the bits under the |
Thank you for the information and looking through my changes. Indeed some of my changes were not optimal, it was mostly cobbled together at the last minute. Just noticed I had a typo in Sounds good with the off putting the public-facing bits for later. Hopefully this lands in master soon, currently what is in there is completely unusable for me. |
@S-NA can you validate that the current state is good? I'm pretty sure it is, I verified with sixel, and with gtk(2). If it is, then I'll merge. Thanks for looking into it! (A non-member can use the Review Changes feature of GitHub. In the NixOS organization, and especially the Nixpkgs project, it is encouraged that external reviewers leave a review when they are knowledgeable on the specifics. This helps other maintainers that do not have the domain specific knowledge in making a decision about the changes. |
And, yeah, I saw |
Good point about the fingerprinting aspect. Considering that, best to leave it to the default. I can confirm the current state builds and everything is working nicely. |
Motivation for this change
Updates netsurf and related libraries.
The default config for netsurf (framebuffer) wasn't tested, I can't get it to work, in the previous iteration either. The gtk ui, though works fine.
tip:
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)cc @fgaz @S-NA