git.iko.soy/typeable/nixpkgs
on master help sign in
flatpak: 1.6.3 → 1.8.1

Changes: * https://github.com/flatpak/flatpak/releases/tag/1.7.1 * https://github.com/flatpak/flatpak/releases/tag/1.7.2 * https://github.com/flatpak/flatpak/releases/tag/1.7.3 * https://github.com/flatpak/flatpak/releases/tag/1.8.0 * https://github.com/flatpak/flatpak/releases/tag/1.8.1 Commits: https://github.com/flatpak/flatpak/compare/1.6.3...1.7.1 https://github.com/flatpak/flatpak/compare/1.7.1...1.8.1 Notable packaging changes: * Flatpak now ships a sysusers.d file for allowing systemd to create the required users. https://github.com/flatpak/flatpak/commit/4df019063b962d17a378fb92d073f8ceb6a6ca62 * Completion support for fish shell * If an app has filesystem access, the host /lib is accessible as /run/host/lib, etc. * New filesystem permission "host-etc" and "host-os" give access to system /usr and /etc. https://github.com/flatpak/flatpak/commit/fe2536b8441858e3b22f6780dca64a516ee4e48c * We now always expose the host timezone data, allowing us the expose the host /etc/localtime in a way that works better, fixing several apps that had timezone issues. https://github.com/flatpak/flatpak/commit/dc4e198766d91aa8871c276b9ed8d7f3ba003822 * We now ship a systemd unit (not installed by default) to automatically detect plugged in usb sticks with sideload repos. * By default we no longer install the gdm env.d file, as the systemd generators work better https://github.com/flatpak/flatpak/commit/7c3a85bf4337874719324a03cc5875708c84ee85 * Use variant-schema-compiler for some GVariant code https://github.com/flatpak/flatpak/pull/3366 * zstd compression for oci deltas: https://github.com/flatpak/flatpak/commit/bfa71e208a3672d965f560fd5250787d9b933493 Additionally: * Remove glibcLocales which is not used since 1.4 bump because glibc contains a locale archive with C.UTF-8 https://github.com/NixOS/nixpkgs/commit/1728bc8d22ffe5e340dfb7cf3a8627f3638f5616 * Stop using aliases for docbook-xsl-nons and pkg-config packages * Stop using autoreconfHook, the autogen.sh script contains some extra that are necessary when building from git. * Increase disk space for installed tests, they were running out. * Enable building developer documentation.

commit98710d255298ebc6a347edcf5aa9c4a39000f671 authorJan Tojnar <jtojnar@gmail.com> dateFri 24 Jul 2020, 09:04 (6 years ago) parent8d53e88
3 files changed+62−24
nixos/modules/services/desktops/flatpak.nix+1 pkgs/development/libraries/flatpak/default.nix+42−12 pkgs/development/libraries/flatpak/fix-test-paths.patch+19−12
nixos/modules/services/desktops/flatpak.nix+1
@@ -42,6 +42,7 @@ in {
4242 # It has been possible since https://github.com/flatpak/flatpak/releases/tag/1.3.2
4343 # to build a SELinux policy module.
4444
45+ # TODO: use sysusers.d
4546 users.users.flatpak = {
4647 description = "Flatpak system helper";
4748 group = "flatpak";
pkgs/development/libraries/flatpak/default.nix+42−12
@@ -1,21 +1,23 @@
11{ stdenv
22, fetchurl
3−, autoreconfHook
3+, fetchpatch
4+, autoconf
5+, automake
6+, libtool
47, docbook_xml_dtd_412
58, docbook_xml_dtd_42
69, docbook_xml_dtd_43
7−, docbook_xsl
10+, docbook-xsl-nons
811, which
912, libxml2
1013, gobject-introspection
1114, gtk-doc
1215, intltool
1316, libxslt
14−, pkgconfig
17+, pkg-config
1518, xmlto
1619, appstream-glib
1720, substituteAll
18−, glibcLocales
1921, yacc
2022, xdg-dbus-proxy
2123, p11-kit
@@ -39,6 +41,7 @@
3941, nixosTests
4042, libsoup
4143, lzma
44+, zstd
4245, ostree
4346, polkit
4447, python3
@@ -54,14 +57,14 @@
5457
5558stdenv.mkDerivation rec {
5659 pname = "flatpak";
57− version = "1.6.3";
60+ version = "1.8.1";
5861
5962 # TODO: split out lib once we figure out what to do with triggerdir
60− outputs = [ "out" "dev" "man" "doc" "installedTests" ];
63+ outputs = [ "out" "dev" "man" "doc" "devdoc" "installedTests" ];
6164
6265 src = fetchurl {
6366 url = "https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
64− sha256 = "17s8nqdxd4xdy7ag9bw06adxccha78jmlsa3zpqnl3qh92pg0hji";
67+ sha256 = "ZpFLZvmmQHk4bMCXpAoZ+oQZVo33+0VvLkB/D3asnq0=";
6568 };
6669
6770 patches = [
@@ -69,7 +72,7 @@ stdenv.mkDerivation rec {
6972 # https://github.com/flatpak/flatpak/issues/1460
7073 (substituteAll {
7174 src = ./fix-test-paths.patch;
72− inherit coreutils gettext glibcLocales socat gtk3;
75+ inherit coreutils gettext socat gtk3;
7376 smi = shared-mime-info;
7477 dfu = desktop-file-utils;
7578 hicolorIconTheme = hicolor-icon-theme;
@@ -101,21 +104,31 @@ stdenv.mkDerivation rec {
101104
102105 # But we want the GDK_PIXBUF_MODULE_FILE from the wrapper affect the icon validator.
103106 ./validate-icon-pixbuf.patch
107+
108+ # Fix `flatpak/test-oci-registry@{user,system}.wrap.test` installed tests.
109+ # https://github.com/flatpak/flatpak/pull/3762
110+ (fetchpatch {
111+ url = "https://github.com/flatpak/flatpak/commit/c1447dadecd50f384b6d11dac18b014245267d00.patch";
112+ sha256 = "UAA/wGr8/aMbx5MV+8Ilro2kgKkx2QOn88lDUjCgeDA=";
113+ })
104114 ];
105115
106116 nativeBuildInputs = [
107− autoreconfHook
117+ autoconf
118+ automake
119+ libtool
108120 libxml2
121+ # TODO: replace with docbook_xml_dtd_45 https://github.com/flatpak/flatpak/pull/3760
109122 docbook_xml_dtd_412
110123 docbook_xml_dtd_42
111124 docbook_xml_dtd_43
112− docbook_xsl
125+ docbook-xsl-nons
113126 which
114127 gobject-introspection
115128 gtk-doc
116129 intltool
117130 libxslt
118− pkgconfig
131+ pkg-config
119132 xmlto
120133 appstream-glib
121134 yacc
@@ -134,6 +147,7 @@ stdenv.mkDerivation rec {
134147 libseccomp
135148 libsoup
136149 lzma
150+ # zstd # TODO: broken paths in .pc file
137151 polkit
138152 python3
139153 systemd
@@ -166,6 +180,7 @@ stdenv.mkDerivation rec {
166180 "--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy"
167181 "--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d"
168182 "--localstatedir=/var"
183+ "--enable-gtk-doc"
169184 "--enable-installed-tests"
170185 ];
171186
@@ -174,9 +189,24 @@ stdenv.mkDerivation rec {
174189 "installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/flatpak"
175190 ];
176191
177− postPatch = ''
192+ postPatch = let
193+ vsc-py = python3.withPackages (pp: [
194+ pp.pyparsing
195+ ]);
196+ in ''
178197 patchShebangs buildutil
179198 patchShebangs tests
199+ PATH=${stdenv.lib.makeBinPath [vsc-py]}:$PATH patchShebangs --build variant-schema-compiler/variant-schema-compiler
200+ '';
201+
202+ preConfigure = ''
203+ # TODO: remove the condition once autogen.sh is shipped in the tarball
204+ # https://github.com/flatpak/flatpak/pull/3761
205+ if [[ -f autogen.sh ]]; then
206+ NOCONFIGURE=1 ./autogen.sh
207+ else
208+ autoreconf --install --force --verbose
209+ fi
180210 '';
181211
182212 passthru = {
pkgs/development/libraries/flatpak/fix-test-paths.patch+19−12
@@ -1,5 +1,5 @@
11diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c
2−index 5de89d62..bf6bdb52 100644
2+index 43fd0563..4067bd36 100644
33--- a/app/flatpak-builtins-build-export.c
44+++ b/app/flatpak-builtins-build-export.c
55@@ -458,7 +458,7 @@ validate_desktop_file (GFile *desktop_file,
@@ -12,10 +12,10 @@ index 5de89d62..bf6bdb52 100644
1212 {
1313 if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
1414diff --git a/tests/libtest.sh b/tests/libtest.sh
15−index e64be49f..a9a53e12 100644
15+index acb2095b..b361da16 100644
1616--- a/tests/libtest.sh
1717+++ b/tests/libtest.sh
18−@@ -367,7 +367,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
18+@@ -431,7 +431,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
1919 # running installed-tests: assume we know what we're doing
2020 _flatpak_bwrap_works=true
2121 elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
@@ -24,7 +24,7 @@ index e64be49f..a9a53e12 100644
2424 _flatpak_bwrap_works=false
2525 else
2626 _flatpak_bwrap_works=true
27−@@ -440,7 +440,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
27+@@ -504,7 +504,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
2828 export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
2929 DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
3030
@@ -33,7 +33,7 @@ index e64be49f..a9a53e12 100644
3333 assert_not_reached "Failed to start dbus-daemon"
3434 fi
3535
36−@@ -449,7 +449,7 @@ gdb_bt () {
36+@@ -519,7 +519,7 @@ commit_to_path () {
3737 }
3838
3939 cleanup () {
@@ -43,10 +43,10 @@ index e64be49f..a9a53e12 100644
4343 fusermount -u $XDG_RUNTIME_DIR/doc || :
4444 kill $(jobs -p) &> /dev/null || true
4545diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
46−index e51e21a6..7d39efb5 100755
46+index 612f914f..4b890da2 100755
4747--- a/tests/make-test-app.sh
4848+++ b/tests/make-test-app.sh
49−@@ -149,13 +149,13 @@ msgid "Hello world"
49+@@ -151,13 +151,13 @@ msgid "Hello world"
5050 msgstr "Hallo Welt"
5151 EOF
5252 mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES
@@ -63,10 +63,10 @@ index e51e21a6..7d39efb5 100755
6363 flatpak build-finish ${DIR}
6464 mkdir -p repos
6565diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh
66−index 5d2c309b..cf61a3cf 100755
66+index af289625..7db51c17 100755
6767--- a/tests/make-test-runtime.sh
6868+++ b/tests/make-test-runtime.sh
69−@@ -25,9 +25,10 @@ EOF
69+@@ -28,9 +28,10 @@ EOF
7070
7171 # On Debian derivatives, /usr/sbin and /sbin aren't in ordinary users'
7272 # PATHs, but ldconfig is kept in /sbin
@@ -78,7 +78,7 @@ index 5d2c309b..cf61a3cf 100755
7878 mkdir -p ${DIR}/usr/bin
7979 mkdir -p ${DIR}/usr/lib
8080 ln -s ../lib ${DIR}/usr/lib64
81−@@ -37,48 +38,24 @@ if test -f /sbin/ldconfig.real; then
81+@@ -40,40 +41,17 @@ if test -f /sbin/ldconfig.real; then
8282 else
8383 cp `which ldconfig` ${DIR}/usr/bin
8484 fi
@@ -129,11 +129,18 @@ index 5d2c309b..cf61a3cf 100755
129129 done
130130 ln -s bash ${DIR}/usr/bin/sh
131131
132+@@ -84,11 +62,13 @@ echo "Hello world, from a runtime$EXTRA"
133+ EOF
134+ chmod a+x ${DIR}/usr/bin/runtime_hello.sh
135+
132136-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but
133137-# the real en_US locale is often not available, because its in the
134138-# local archive.
135139-mkdir -p ${DIR}/usr/lib/locale/
136140-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US
141++# We do not copy C.UTF8 locale because it is in locale archive and
142++# that is already copied with glibc.
143++
137144+mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store
138145+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
139146+find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths
@@ -142,10 +149,10 @@ index 5d2c309b..cf61a3cf 100755
142149 if [ x$COLLECTION_ID != x ]; then
143150 collection_args=--collection-id=${COLLECTION_ID}
144151diff --git a/tests/testlibrary.c b/tests/testlibrary.c
145−index 44ae28e3..76bf619f 100644
152+index 509ce6cc..6a333c9c 100644
146153--- a/tests/testlibrary.c
147154+++ b/tests/testlibrary.c
148−@@ -1343,7 +1343,7 @@ check_bwrap_support (void)
155+@@ -1399,7 +1399,7 @@ check_bwrap_support (void)
149156 {
150157 gint exit_code = 0;
151158 char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net",