From: Danny Milosavljevic <dannym@scratchpost.org>
To: Rutger Helling <rhelling@mykolab.com>
Cc: 33792@debbugs.gnu.org
Subject: [bug#33792] [PATCH] gnu: Add flatpak.
Date: Tue, 18 Dec 2018 19:01:53 +0100 [thread overview]
Message-ID: <20181218190153.24b76a7d@scratchpost.org> (raw)
In-Reply-To: <20181218161249.7b6efcb7@mykolab.com>
[-- Attachment #1: Type: text/plain, Size: 5139 bytes --]
Hi Rutger,
On Tue, 18 Dec 2018 16:12:49 +0100
Rutger Helling <rhelling@mykolab.com> wrote:
> this patch adds Flatpak.
Try
(string-append "--with-xml-catalog="
(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/xsl/")))
#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 without, 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/archive/"
"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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-12-18 18:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 15:12 [bug#33792] [PATCH] gnu: Add flatpak Rutger Helling
2018-12-18 18:01 ` Danny Milosavljevic [this message]
2018-12-18 19:45 ` Julien Lepiller
2018-12-19 8:46 ` Rutger Helling
2018-12-19 23:38 ` Danny Milosavljevic
2018-12-20 7:37 ` bug#33792: " Rutger Helling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218190153.24b76a7d@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=33792@debbugs.gnu.org \
--cc=rhelling@mykolab.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).