git.iko.soy/typeable/nixpkgs
on master help sign in
flatpak: 1.2.4 -> 1.4.2

* Regenerated all patches for 1.4.2 and resolved any conflicts. * fix-test-paths.patch doesn't copy the whole locale archive because we have C.UTF8 now. * nixos/flatpak creates a Flatpak system helper user Change introduced in 1.3.2. Changes: See https://github.com/flatpak/flatpak/releases/tag/1.3.1 through 1.4.2.

commit1728bc8d22ffe5e340dfb7cf3a8627f3638f5616 authorworldofpeace <worldofpeace@protonmail.ch> dateMon 22 Jul 2019, 15:35 (7 years ago) parent37c22b4
9 files changed+56−33
nixos/modules/services/desktops/flatpak.nix+8 pkgs/development/libraries/flatpak/bubblewrap-paths.patch+2−2 pkgs/development/libraries/flatpak/default.nix+4−4 pkgs/development/libraries/flatpak/fix-paths.patch+4−2 pkgs/development/libraries/flatpak/fix-test-paths.patch+18−11 pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch+3−1 pkgs/development/libraries/flatpak/unset-env-vars.patch+3−1 pkgs/development/libraries/flatpak/use-flatpak-from-path.patch+12−10 pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch+2−2
nixos/modules/services/desktops/flatpak.nix+8
@@ -38,5 +38,13 @@ in {
3838 "$HOME/.local/share/flatpak/exports"
3939 "/var/lib/flatpak/exports"
4040 ];
41+
42+ users.users.flatpak = {
43+ description = "Flatpak system helper";
44+ group = "flatpak";
45+ isSystemUser = true;
46+ };
47+
48+ users.groups.flatpak = { };
4149 };
4250}
pkgs/development/libraries/flatpak/bubblewrap-paths.patch+2−2
@@ -1,8 +1,8 @@
11diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
2−index 6e23d9f2..8c621ec4 100644
2+index 9e885070..d02eeb8c 100644
33--- a/icon-validator/validate-icon.c
44+++ b/icon-validator/validate-icon.c
5−@@ -149,8 +149,8 @@ rerun_in_sandbox (const char *arg_width,
5+@@ -156,8 +156,8 @@ rerun_in_sandbox (const char *arg_width,
66 "--unshare-ipc",
77 "--unshare-net",
88 "--unshare-pid",
pkgs/development/libraries/flatpak/default.nix+4−4
@@ -1,18 +1,18 @@
11{ stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2
22, gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit
3−, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme
3+, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme, fuse
44, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, gnome3, gsettings-desktop-schemas, librsvg }:
55
66stdenv.mkDerivation rec {
77 pname = "flatpak";
8− version = "1.2.4";
8+ version = "1.4.2";
99
1010 # TODO: split out lib once we figure out what to do with triggerdir
1111 outputs = [ "out" "man" "doc" "installedTests" ];
1212
1313 src = fetchurl {
1414 url = "https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
15− sha256 = "1qf3ys84fzv11z6f6li59rxjdjbyrv7cyi9539k73r9i9pckjr8v";
15+ sha256 = "08nmpp26mgv0vp3mlwk97rnp0j7i108h4hr9nllja19sjxnrlygj";
1616 };
1717
1818 patches = [
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
4343
4444 buildInputs = [
4545 bubblewrap bzip2 dbus gnome3.dconf glib gpgme json-glib libarchive libcap libseccomp
46− libsoup lzma ostree polkit python3 systemd xorg.libXau
46+ libsoup lzma ostree polkit python3 systemd xorg.libXau fuse
4747 gsettings-desktop-schemas glib-networking
4848 librsvg # for flatpak-validate-icon
4949 ];
pkgs/development/libraries/flatpak/fix-paths.patch+4−2
@@ -1,6 +1,8 @@
1+diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
2+index 5dd7629e..ddc71a4c 100644
13--- a/session-helper/flatpak-session-helper.c
24+++ b/session-helper/flatpak-session-helper.c
3−@@ -624,7 +624,7 @@
5+@@ -693,7 +693,7 @@ start_p11_kit_server (const char *flatpak_dir)
46 g_auto(GStrv) stdout_lines = NULL;
57 int i;
68 char *p11_argv[] = {
@@ -9,7 +11,7 @@
911 /* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
1012 * this flag. This is good, because those earlier versions did not properly daemonize and caused
1113 * the spawn_sync to hang forever, waiting for the pipe to close.
12−@@ -770,7 +770,7 @@
14+@@ -836,7 +836,7 @@ main (int argc,
1315 exit (1);
1416 }
1517
pkgs/development/libraries/flatpak/fix-test-paths.patch+18−11
@@ -1,6 +1,8 @@
1+diff --git a/tests/libtest.sh b/tests/libtest.sh
2+index 46bcefb3..0134425e 100644
13--- a/tests/libtest.sh
24+++ b/tests/libtest.sh
3−@@ -328,7 +328,7 @@
5+@@ -352,7 +352,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
46 # running installed-tests: assume we know what we're doing
57 _flatpak_bwrap_works=true
68 elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
@@ -9,7 +11,7 @@
911 _flatpak_bwrap_works=false
1012 else
1113 _flatpak_bwrap_works=true
12−@@ -309,12 +309,12 @@
14+@@ -426,12 +426,12 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
1315 export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
1416 DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
1517
@@ -24,9 +26,11 @@
2426 gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
2527 fusermount -u $XDG_RUNTIME_DIR/doc || :
2628 if test -n "${TEST_SKIP_CLEANUP:-}"; then
29+diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
30+index 0a0a28f1..16fd51fe 100755
2731--- a/tests/make-test-app.sh
2832+++ b/tests/make-test-app.sh
29−@@ -114,13 +114,13 @@ msgid "Hello world"
33+@@ -129,13 +129,13 @@ msgid "Hello world"
3034 msgstr "Hallo Welt"
3135 EOF
3236 mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES
@@ -42,9 +46,11 @@
4246
4347 flatpak build-finish ${DIR}
4448 mkdir -p repos
49+diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh
50+index 57899b75..9236996f 100755
4551--- a/tests/make-test-runtime.sh
4652+++ b/tests/make-test-runtime.sh
47−@@ -26,6 +26,7 @@
53+@@ -28,6 +28,7 @@ EOF
4854 PATH="$PATH:/usr/sbin:/sbin"
4955
5056 # Add bash and dependencies
@@ -52,7 +58,7 @@
5258 mkdir -p ${DIR}/usr/bin
5359 mkdir -p ${DIR}/usr/lib
5460 ln -s ../lib ${DIR}/usr/lib64
55−@@ -35,48 +36,27 @@
61+@@ -37,48 +38,23 @@ if test -f /sbin/ldconfig.real; then
5662 else
5763 cp `which ldconfig` ${DIR}/usr/bin
5864 fi
@@ -105,21 +111,20 @@
105111-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but
106112-# the real en_US locale is often not available, because its in the
107113-# local archive.
114+-mkdir -p ${DIR}/usr/lib/locale/
115+-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US
108116+mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store
109117+chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed
110118+find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths
111119+find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets
112−+
113−+# We copy the whole locale archive because we do not have C.UTF8 locale
114− mkdir -p ${DIR}/usr/lib/locale/
115−-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US
116−+cp @glibcLocales@/lib/locale/locale-archive ${DIR}/usr/lib/locale/locale-archive
117120
118121 if [ x$COLLECTION_ID != x ]; then
119122 collection_args=--collection-id=${COLLECTION_ID}
123+diff --git a/tests/testlibrary.c b/tests/testlibrary.c
124+index f2773dc8..3af9026f 100644
120125--- a/tests/testlibrary.c
121126+++ b/tests/testlibrary.c
122−@@ -584,7 +584,7 @@
127+@@ -1053,7 +1053,7 @@ check_bwrap_support (void)
123128 {
124129 gint exit_code = 0;
125130 char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net",
@@ -128,6 +133,8 @@
128133 g_autofree char *argv_str = g_strjoinv (" ", argv);
129134 g_test_message ("Spawning %s", argv_str);
130135 g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error);
136+diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger
137+index 711cfab2..10c220ec 100755
131138--- a/triggers/gtk-icon-cache.trigger
132139+++ b/triggers/gtk-icon-cache.trigger
133140@@ -1,7 +1,7 @@
pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch+3−1
@@ -1,6 +1,8 @@
1+diff --git a/acinclude.m4 b/acinclude.m4
2+index 92ec3985..b3fccf1d 100644
13--- a/acinclude.m4
24+++ b/acinclude.m4
3−@@ -40,8 +40,8 @@
5+@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
46 [
57 AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
68 AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
pkgs/development/libraries/flatpak/unset-env-vars.patch+3−1
@@ -1,6 +1,8 @@
1+diff --git a/common/flatpak-run.c b/common/flatpak-run.c
2+index 8d52d3a5..81700183 100644
13--- a/common/flatpak-run.c
24+++ b/common/flatpak-run.c
3−@@ -1192,6 +1192,7 @@ static const ExportData default_exports[] = {
5+@@ -1232,6 +1232,7 @@ static const ExportData default_exports[] = {
46 {"PERLLIB", NULL},
57 {"PERL5LIB", NULL},
68 {"XCURSOR_PATH", NULL},
pkgs/development/libraries/flatpak/use-flatpak-from-path.patch+12−10
@@ -1,6 +1,8 @@
1+diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
2+index 8f9dc66c..d3ab6e5f 100644
13--- a/common/flatpak-dir.c
24+++ b/common/flatpak-dir.c
3−@@ -5758,7 +5758,7 @@ export_desktop_file (const char *app,
5+@@ -6701,7 +6701,7 @@ export_desktop_file (const char *app,
46
57 new_exec = g_string_new ("");
68 g_string_append_printf (new_exec,
@@ -9,7 +11,7 @@
911 escaped_branch,
1012 escaped_arch);
1113
12−@@ -6935,8 +6935,8 @@ flatpak_dir_deploy (FlatpakDir *self,
14+@@ -7891,8 +7891,8 @@ flatpak_dir_deploy (FlatpakDir *self,
1315 error))
1416 return FALSE;
1517
@@ -21,28 +23,28 @@
2123 G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
2224 return FALSE;
2325diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh
24−index 6937b041..01f8add7 100755
26+index dff17f33..a9857adc 100755
2527--- a/tests/test-bundle.sh
2628+++ b/tests/test-bundle.sh
2729@@ -59,7 +59,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
2830 assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export
2931 assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
3032 # Ensure Exec key is rewritten
31−-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
32−+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
33+-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
34++assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
3335 assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
3436 assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
3537
3638diff --git a/tests/test-run.sh b/tests/test-run.sh
37−index 9d83d82e..234e4ec6 100755
39+index 233df9ad..76e0b23b 100644
3840--- a/tests/test-run.sh
3941+++ b/tests/test-run.sh
40−@@ -42,7 +42,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
41− assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export
42+@@ -45,7 +45,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files
43+ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/export
4244 assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
4345 # Ensure Exec key is rewritten
44−-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
45−+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
46+-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
47++assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
4648 assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
4749 assert_not_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/dont-export.png
4850 assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch+2−2
@@ -1,8 +1,8 @@
11diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
2−index 6e23d9f2..f0659a78 100644
2+index 9e885070..44fea035 100644
33--- a/icon-validator/validate-icon.c
44+++ b/icon-validator/validate-icon.c
5−@@ -193,6 +193,8 @@ rerun_in_sandbox (const char *arg_width,
5+@@ -200,6 +200,8 @@ rerun_in_sandbox (const char *arg_width,
66 add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL);
77 if (g_getenv ("G_MESSAGES_PREFIXED"))
88 add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL);