unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
@ 2021-08-09 14:14 Andrew Whatson
  2021-09-28  2:26 ` John Kehayias via Guix-patches via
  2021-10-25 19:13 ` bug#49957: " Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Whatson @ 2021-08-09 14:14 UTC (permalink / raw)
  To: 49957; +Cc: Andrew Whatson

Flatpak has a soft dependency on p11-kit, which was configured without
knowledge of the system-wide CA certificate store.  This caused some
flatpak apps to fail with ERR_CERT_AUTHORITY_INVALID errors.

* gnu/packages/tls.scm (p11-kit): Configure with
/etc/ssl/certs/ca-certificates.crt as a trusted path.
---
 gnu/packages/tls.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index d98a724b5f..4af95e2798 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -143,7 +143,7 @@ in intelligent transportation networks.")
      `(("libffi" ,libffi)
        ("libtasn1" ,libtasn1)))
     (arguments
-     `(#:configure-flags '("--without-trust-paths")
+     `(#:configure-flags '("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt")
        #:phases (modify-phases %standard-phases
                   (add-before 'check 'prepare-tests
                     (lambda _
-- 
2.32.0





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
  2021-08-09 14:14 [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps Andrew Whatson
@ 2021-09-28  2:26 ` John Kehayias via Guix-patches via
  2021-09-28  5:07   ` John Kehayias via Guix-patches via
  2021-10-25 19:13 ` bug#49957: " Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: John Kehayias via Guix-patches via @ 2021-09-28  2:26 UTC (permalink / raw)
  To: 49957@debbugs.gnu.org

Interestingly, I just hit this issue after moving to core-updates-frozen. Not sure what caused it now, p11-kit nor flatpak has changed, but must be something between them.

Unfortunately, this would cause a huge rebuild from what I can tell, so I tried --with-graft and it didn't seem to make a difference. Also, p11-kit is now out of date, with the latest version being 0.24.0.

So, perhaps this could make its way into core-updates-frozen with the upcoming world rebuild coming? https://bugs.gnu.org/50860 Also wanted to note that this change would match what nix does with p11-kit for the same reason.

Open to other suggestions, hoping to not break flatpak in core-updates-frozen.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
  2021-09-28  2:26 ` John Kehayias via Guix-patches via
@ 2021-09-28  5:07   ` John Kehayias via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: John Kehayias via Guix-patches via @ 2021-09-28  5:07 UTC (permalink / raw)
  To: 49957@debbugs.gnu.org; +Cc: Andrew Whatson

For the record, I'm using the beta of Flatpak (installs fine with --with-source transformation), version 1.11.3.

Also, I found a workaround by manually killing the p11-kit server and running a new one that I built with this patch and updated to the latest version. In case this helps anyone, I ran with the parameters Flatpak tries to launch:

p11-kit server --sh -n /run/user/1000/.flatpak-helper/pkcs11-flatpak-#### --provider p11-kit-trust.so "pkcs11:model=p11-kit-trust?write-protected=yes"

where the -n argument #### came from trying to run a Flatpak app and seeing it fail not finding the p11-kit server at that socket. Probably you can do this more easily by forcing Flatpak when it first runs to use the fixed p11-kit version (through a patch in Flatpak or some environment setting? or what the system starts?). But with p11-kit server already running for me, this did the trick for testing.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#49957: [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
  2021-08-09 14:14 [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps Andrew Whatson
  2021-09-28  2:26 ` John Kehayias via Guix-patches via
@ 2021-10-25 19:13 ` Ludovic Courtès
  2021-10-25 19:33   ` [bug#49957] " John Kehayias via Guix-patches via
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-10-25 19:13 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: John Kehayias, 49957-done

Hi,

Andrew Whatson <whatson@gmail.com> skribis:

> Flatpak has a soft dependency on p11-kit, which was configured without
> knowledge of the system-wide CA certificate store.  This caused some
> flatpak apps to fail with ERR_CERT_AUTHORITY_INVALID errors.
>
> * gnu/packages/tls.scm (p11-kit): Configure with
> /etc/ssl/certs/ca-certificates.crt as a trusted path.

I pushed a similar fix on ‘master’ based on John’s patch as
b4d29851e412c6f4fea5b2d98160258b9768dee3.

We might as well update the default p11-kit though?  (Somehow I was
assuming it had many dependents, but it only has 80+.)

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
  2021-10-25 19:13 ` bug#49957: " Ludovic Courtès
@ 2021-10-25 19:33   ` John Kehayias via Guix-patches via
  2021-10-27 14:27     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: John Kehayias via Guix-patches via @ 2021-10-25 19:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Andrew Whatson, 49957-done

Hi Ludo’ and Andrew,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, October 25th, 2021 at 3:13 PM, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi,
>
> Andrew Whatson whatson@gmail.com skribis:
>
> > Flatpak has a soft dependency on p11-kit, which was configured without
> > knowledge of the system-wide CA certificate store. This caused some
> > flatpak apps to fail with ERR_CERT_AUTHORITY_INVALID errors.
> >
> > -   gnu/packages/tls.scm (p11-kit): Configure with
> >     /etc/ssl/certs/ca-certificates.crt as a trusted path.
>
> I pushed a similar fix on ‘master’ based on John’s patch as
> b4d29851e412c6f4fea5b2d98160258b9768dee3.
>
> We might as well update the default p11-kit though? (Somehow I was
> assuming it had many dependents, but it only has 80+.)
>

Flatpak's dependency doesn't show up on a guix refresh --list-dependents p11-kit, as it comes through some other package somehow (I never looked how exactly). But I guess that is more "using" than needing to build against? Wondering if there are some hidden runtime cases to look out for. (Probably more relevant when thinking of changing that configure flag?)

For this bug, the fixes that I wrote did need a cleaning out of previous Flatpaks (checking how you launch Flatpak apps as our previous version put the full store path in .desktop files) as p11-kit gets started in some indirect way. I think via D-Bus and its portal, but the system p11-kit could be used instead of the fixed version. I made sure to remove previous Flatpak installs from my profile and did a restart to be sure. Noting here for completeness.

John




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps
  2021-10-25 19:33   ` [bug#49957] " John Kehayias via Guix-patches via
@ 2021-10-27 14:27     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2021-10-27 14:27 UTC (permalink / raw)
  To: John Kehayias; +Cc: Andrew Whatson, 49957-done

Hi,

John Kehayias <john.kehayias@protonmail.com> skribis:

> Flatpak's dependency doesn't show up on a guix refresh
> --list-dependents p11-kit, as it comes through some other package
> somehow (I never looked how exactly). But I guess that is more "using"
> than needing to build against? Wondering if there are some hidden
> runtime cases to look out for. (Probably more relevant when thinking
> of changing that configure flag?)

‘guix refresh -l’ doesn’t list all the dependents, only the “contour”:

--8<---------------cut here---------------start------------->8---
$ guix refresh -l p11-kit@0.23
Building the following 40 packages would ensure 81 dependent packages are rebuilt: inxi@3.3.07-1 autofs@5.1.8 network-manager-openvpn@1.8.12 network-manager-vpnc@1.2.6 eolie@0.9.101 gramps@5.1.4 glimpse@0.2.0 openttd@1.11.2 gimp-fourier@0.4.3-2 gimp-resynthesizer@2.0.3 gmic-qt-gimp@2.9.7 rapid-photo-downloader@0.9.18 entangle@3.0 gnome-todo@3.28.1 geary@3.34.1 chatty@0.1.17 shotwell@0.30.12 rhythmbox@3.4.4 gnome-photos@3.34.2 claws-mail@4.0.0 seahorse@3.36.2 network-manager-openconnect@1.2.6 evolution@3.34.2 gnome-music@3.34.5 gnome-tweaks@3.34.1 lxde@0.99.2 caja-extensions@1.24.1 spacefm@1.0.6 xfce@4.16.0 vinagre@3.22.0 liferea@1.13.4 remmina@1.4.20 arc-theme@20201013 gnome-shell-extension-gsconnect@33 numix-gtk-theme@2.6.7 gnome@3.34.5 mate@1.24.1 surf@2.1 midori@9.0 eid-mw@5.0.28
--8<---------------cut here---------------end--------------->8---

To see them all, try this:

  guix graph -t reverse-package p11-kit@0.23 | xdot -

HTH,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-27 15:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 14:14 [bug#49957] [PATCH] gnu: p11-kit: Fix certificate errors from flatpak apps Andrew Whatson
2021-09-28  2:26 ` John Kehayias via Guix-patches via
2021-09-28  5:07   ` John Kehayias via Guix-patches via
2021-10-25 19:13 ` bug#49957: " Ludovic Courtès
2021-10-25 19:33   ` [bug#49957] " John Kehayias via Guix-patches via
2021-10-27 14:27     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).