From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZXVX-0007iq-EN for guix-patches@gnu.org; Wed, 19 Dec 2018 03:47:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZXVT-0002C8-1p for guix-patches@gnu.org; Wed, 19 Dec 2018 03:47:11 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49708) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZXVN-0002A1-Pi for guix-patches@gnu.org; Wed, 19 Dec 2018 03:47:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZXVN-00024s-Js for guix-patches@gnu.org; Wed, 19 Dec 2018 03:47:01 -0500 Subject: [bug#33792] [PATCH] gnu: Add flatpak. Resent-Message-ID: Date: Wed, 19 Dec 2018 09:46:28 +0100 From: Rutger Helling Message-ID: <20181219094628.408c4421@mykolab.com> In-Reply-To: <20181218204528.607a25e5@lepiller.eu> References: <20181218161249.7b6efcb7@mykolab.com> <20181218190153.24b76a7d@scratchpost.org> <20181218204528.607a25e5@lepiller.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/mNyraFZP4mA.dgYXR1zt0=E"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 33792@debbugs.gnu.org --Sig_/mNyraFZP4mA.dgYXR1zt0=E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable @Julien The patch already uses the system bubblewrap, see the --with-system-bubblewrap argument. @Danny Thanks for sharing your work! Unfortunately it fixed neither the documentation nor the tests for me. I think the source might have changed too much. The "--with-xml-catalog" argument no longer exists and the tests still error on trying to copy something. I don't think the rest is necessary. I got both GIMP and Firefox=20 nightly working. Make sure you use the --user parameter though, or you'll need root. For the record, this is how I got Firefox running: $ flatpak remote-add --user --if-not-exists flathub https://flathub.org/rep= o/flathub.flatpakrepo=20 $ flatpak install --user --from https://firefox-flatpak.mojefedora.cz/org.m= ozilla.FirefoxNightly.flatpakref $ flatpak run org.mozilla.FirefoxNightly/x86_64/master OK to push? On Tue, 18 Dec 2018 20:45:35 +0100 Julien Lepiller wrote: > Le Tue, 18 Dec 2018 19:01:53 +0100, > Danny Milosavljevic a =C3=A9crit : >=20 > > Hi Rutger, > >=20 > > On Tue, 18 Dec 2018 16:12:49 +0100 > > Rutger Helling wrote: > > =20 > > > this patch adds Flatpak. =20 > >=20 > > Try > >=20 > > (string-append "--with-xml-catalog=3D" > > (assoc-ref %build-inputs "docbook-xml") > > "/xml/dtd/docbook/catalog.xml")) > >=20 > > and > >=20 > > (add-before 'configure 'fix-docbook > > (lambda* (#:key inputs #:allow-other-keys) > > (substitute* "configure" > > ;; The configure check is overzealous about making > > sure that ;; things are in place -- it uses the xmlcatalog tool to > > make ;; sure that docbook-xsl is available, but this tool can only > > ;; look in one catalog file, unlike the > > $XML_CATALOG_FILES ;; variable that Guix defines. Fool the test by > > using the ;; docbook-xsl catalog explicitly and get on with life. > > (("\"\\$XML_CATALOG_FILE\" \ > > \"http://docbook.sourceforge.net/release/xsl/") > > (string-append (car (find-files (assoc-ref inputs > > "docbook-xsl") "^catalog.xml$")) > > " > > \"http://docbook.sourceforge.net/release/xsl/"))) #t)) > >=20 > > Also, try patching the tests like this: > >=20 > > (add-after 'unpack 'patch-/var/tmp > > (lambda _ > > (substitute* '("tests/libtest.sh" > > "tests/test-run.sh" > > "tests/testlibrary.c" > > "buildutil/tap-test" > > ; ./common/flatpak-dir.c > > ; ./common/flatpak-run.c > > ) > > (("/var/tmp") "/tmp")) > > (substitute* "tests/libtest.sh" > > (("/usr/bin/") "") > > (("/bin/") "")) > > #t)) > >=20 > > Also, in an earlier iteration I needed the following, but if it > > works without, then fine! > >=20 > > (add-before 'check 'set-environment-up > > (lambda _ > > ;(mkdir-p "/tmp/b") > > (setenv "HOME" "/tmp") > > ;; Note: needs xattr support. > > (setenv "TMPDIR" "/tmp") > > ;;; TODO /dev/fuse > > (mkdir-p "/tmp/ldconfig.d") > > (call-with-output-file "/tmp/ldconfig.d/ldconfig" > > (lambda (port) > > (display "#!/bin/sh\nexit 0\n" port))) > > (chmod "/tmp/ldconfig.d/ldconfig" #o755) > > (setenv "PATH" (string-append > > "/tmp/ldconfig.d:" (getenv "PATH"))) #t))))) > >=20 > > Additional inputs may be needed. I had those: > >=20 > > (inputs > > `(("appstream-glib" ,appstream-glib) > > ("attr" ,attr) > > ("fuse" ,fuse) > > ("glib" ,glib) > > ("gpgme" ,gpgme) > > ("json-glib" ,json-glib) > > ("libarchive" ,libarchive) > > ("libcap" ,libcap) > > ("libseccomp" ,libseccomp) > > ("libsoup" ,libsoup) > > ("libxml2" ,libxml2) > > ("libxau" ,libxau) > > ("nettle" ,nettle) > > ("libostree" ,libostree) > > ("polkit" ,polkit))) > > (native-inputs > > `(("autoconf" ,autoconf) > > ("automake" ,automake) > > ("dbus" ,dbus) ; for the tests > > ("docbook-xml" ,docbook-xml-4.1.2) > > ("docbook-xsl" ,docbook-xsl) > > ("fuse" ,fuse) ; for the tests > > ("gettext-minimal" ,gettext-minimal) > > ;("git" ,git) > > ("glib" ,glib "bin") > > ("gnupg" ,gnupg) > > ("gobject-introspection" ,gobject-introspection) > > ("gtk-doc" ,gtk-doc) > > ("libtool" ,libtool) > > ("pkg-config" ,pkg-config) > > ("which" ,which) > > ("libglnx" ,(origin > > (method git-fetch) > > (uri (git-reference > > (url "https://github.com/GNOME/libglnx.git") > > (commit > > "6f1ee5db1400b13a9a0fa0b2274ae34e8710c1aa"))) (sha256 > > (base32 > > "137329m4lm3ssmxyyr1cin0xmlpsz4kfk26ydq6i4zf7qz81n64s"))= )) > > ("bubblewrap" ,(origin > > (method url-fetch) > > (uri (string-append > > "https://github.com/projectatomic/bubblewrap/archive/" > > "v0.2.0.tar.gz")) > >=20 > > (sha256 > > (base32 > > "17796rqhp5wn3q2lspgqbyk7nk1ixns9m2kgw82j2h2yfyi15mjh")))) = =20 >=20 > Just so you know, we already have a bubblewrap package. Maybe you can > use it instead of bundling the sources? >=20 > > ("xmltproc" ,libxslt))) > > (home-page "https://www.flatpak.org/") > > (synopsis "Flatpak") > > (description "Flatpak") > > (license license:lgpl2.1+))) > >=20 > > And I fiddled with libglnx: > >=20 > > (lambda* (#:key inputs #:allow-other-keys) > > (use-modules (system repl debug)) > > (set! terminal-width (lambda () 1000000)) > > (delete-file-recursively "libglnx") > > (copy-recursively (assoc-ref inputs "libglnx") > > "libglnx") (delete-file-recursively "bsdiff") > > ;(symlink "bsdiff-4.3-endsley" "bsdiff") > > (copy-recursively (assoc-ref inputs "bsdiff") "bsdiff") > > (setenv "NOCONFIGURE" "1") > > (invoke "sh" "autogen.sh")))))) > >=20 > > If it works without, your version may be fine as is. I just wanted > > to share the parts I already had to try. =20 >=20 --Sig_/mNyraFZP4mA.dgYXR1zt0=E Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEAVThuRzJ2e93ZI3n86cn20T8yjYFAlwaBWQACgkQ86cn20T8 yjZT3Af/WcC1OHAneKj+JxmDg6pG+ioLriW2tnwPQ0iYeGYuYPOU8c4EE8572p46 bcrIaTMes2Rhn+7xFg9IOdjEa/6z86pWykpuShtswEQNcniSV+KGqfpFS6B6zToT YUkQcUXxApZ9ZradCaZMQ+m10AVqjXP6lVHdEDudrHl+6IOj2H2fs9YmaP5XU5Et zQ72cPH+yQ21Q/KQ5RC0Lj5Sn918l3C4UgIRaG9EPlferg5FRtyifUNcNkdOphwj C/JXXibb0CSVOSwlBUsQTbZeul23RoNl87+Cj83AHFUl+ONR4m3cBNPWphB+cP2j RKYAjwI4xQirdbJ9F/UM1CO1GGkGyw== =s+Je -----END PGP SIGNATURE----- --Sig_/mNyraFZP4mA.dgYXR1zt0=E--