From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZLJe-0000Px-6a for guix-patches@gnu.org; Tue, 18 Dec 2018 14:46:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZLJa-0001U7-SX for guix-patches@gnu.org; Tue, 18 Dec 2018 14:46:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49473) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZLJa-0001SP-LA for guix-patches@gnu.org; Tue, 18 Dec 2018 14:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZLJa-0001JJ-Fi for guix-patches@gnu.org; Tue, 18 Dec 2018 14:46:02 -0500 Subject: [bug#33792] [PATCH] gnu: Add flatpak. Resent-Message-ID: Date: Tue, 18 Dec 2018 20:45:35 +0100 From: Julien Lepiller Message-ID: <20181218204528.607a25e5@lepiller.eu> In-Reply-To: <20181218190153.24b76a7d@scratchpost.org> References: <20181218161249.7b6efcb7@mykolab.com> <20181218190153.24b76a7d@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Danny Milosavljevic Cc: 33792@debbugs.gnu.org, Rutger Helling Le Tue, 18 Dec 2018 19:01:53 +0100, Danny Milosavljevic a =C3=A9crit : > 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")))) Just so you know, we already have a bubblewrap package. Maybe you can use it instead of bundling the sources? > ("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.