From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZJw9-0008Q8-4G for guix-patches@gnu.org; Tue, 18 Dec 2018 13:17:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZJhw-0001PG-9O for guix-patches@gnu.org; Tue, 18 Dec 2018 13:03:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49395) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZJhu-0001Jo-8l for guix-patches@gnu.org; Tue, 18 Dec 2018 13:03:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZJhu-0003Hb-0o for guix-patches@gnu.org; Tue, 18 Dec 2018 13:03:02 -0500 Subject: [bug#33792] [PATCH] gnu: Add flatpak. Resent-Message-ID: Date: Tue, 18 Dec 2018 19:01:53 +0100 From: Danny Milosavljevic Message-ID: <20181218190153.24b76a7d@scratchpost.org> In-Reply-To: <20181218161249.7b6efcb7@mykolab.com> References: <20181218161249.7b6efcb7@mykolab.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/7t56t=u3iQ85eQ1CBCwYLAI"; 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: Rutger Helling Cc: 33792@debbugs.gnu.org --Sig_/7t56t=u3iQ85eQ1CBCwYLAI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Rutger, On Tue, 18 Dec 2018 16:12:49 +0100 Rutger Helling wrote: > this patch adds Flatpak. Try (string-append "--with-xml-catalog=3D" (assoc-ref %build-inputs "docbook-xml") "/xml/dtd/docbook/catalog.xml")) and (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/x= sl/"))) #t)) Also, try patching the tests like this: (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)) Also, in an earlier iteration I needed the following, but if it works witho= ut, then fine! (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))))) Additional inputs may be needed. I had those: (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/ar= chive/" "v0.2.0.tar.gz")) (sha256 (base32 "17796rqhp5wn3q2lspgqbyk7nk1ixns9m2kgw82j2h2yfyi15mjh")))) ("xmltproc" ,libxslt))) (home-page "https://www.flatpak.org/") (synopsis "Flatpak") (description "Flatpak") (license license:lgpl2.1+))) And I fiddled with libglnx: (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")))))) If it works without, your version may be fine as is. I just wanted to share the parts I already had to try. --Sig_/7t56t=u3iQ85eQ1CBCwYLAI Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwZNhEACgkQ5xo1VCww uqU4Egf/Umqt91+I1AF6w0hGzrG+k3YmyNL4bGhz786QOy3MoCwJvvab0eNerIFP lASgjDCBzmQ7rXtJEVTsuQD9mHRCAI//FDuyiqOoH50sRQ5fdRfB0pd2Q426iPcZ KSXlY68kdTdK0nAZf8Q8wWQPY04Gc+7/8Hw/sZrYWEGp4K+xInTay3/6rZOXOuiJ wjHxsXN5iSn+I2jhqqSnyGiR0p4ECbanDDEyknl9xwfPRHe0ywMB59Frp9KwTeCw JHfUukaFZQJ5+h1CEYWw7IytYFWSNA+Wjn8uR6JEjzTHQ+XjpoI7M2D6Eaqkq+LR Ol/lfbeVNOYf+KbH4hdUPSS3xUrl8g== =ikgQ -----END PGP SIGNATURE----- --Sig_/7t56t=u3iQ85eQ1CBCwYLAI--