flatpak: 1.14.10 -> 1.16.0
Diff: https://github.com/flatpak/flatpak/compare/1.14.10...1.16.0 Changelog: https://github.com/flatpak/flatpak/releases/tag/1.16.0
This commit is contained in:
@@ -27,7 +27,10 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [
|
||||||
|
cfg.package
|
||||||
|
pkgs.fuse3
|
||||||
|
];
|
||||||
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
|
diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
|
||||||
index 5dd7629e..ddc71a4c 100644
|
index 31e94384..2c297551 100644
|
||||||
--- a/session-helper/flatpak-session-helper.c
|
--- a/session-helper/flatpak-session-helper.c
|
||||||
+++ b/session-helper/flatpak-session-helper.c
|
+++ b/session-helper/flatpak-session-helper.c
|
||||||
@@ -693,7 +693,7 @@ start_p11_kit_server (const char *flatpak_dir)
|
@@ -698,7 +698,7 @@ start_p11_kit_server (const char *flatpak_dir)
|
||||||
g_auto(GStrv) stdout_lines = NULL;
|
g_auto(GStrv) stdout_lines = NULL;
|
||||||
int i;
|
int i;
|
||||||
char *p11_argv[] = {
|
const char * const p11_argv[] = {
|
||||||
- "p11-kit", "server",
|
- "p11-kit", "server",
|
||||||
+ "@p11kit@", "server",
|
+ "@p11kit@", "server",
|
||||||
/* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
|
/* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
|
||||||
* this flag. This is good, because those earlier versions did not properly daemonize and caused
|
* this flag. This is good, because those earlier versions did not properly daemonize and caused
|
||||||
* the spawn_sync to hang forever, waiting for the pipe to close.
|
* the spawn_sync to hang forever, waiting for the pipe to close.
|
||||||
@@ -836,7 +836,7 @@ main (int argc,
|
@@ -852,8 +852,7 @@ main (int argc,
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (g_find_program_in_path ("p11-kit"))
|
- pk11_program = g_find_program_in_path ("p11-kit");
|
||||||
|
- if (pk11_program)
|
||||||
+ if (TRUE)
|
+ if (TRUE)
|
||||||
start_p11_kit_server (flatpak_dir);
|
start_p11_kit_server (flatpak_dir);
|
||||||
else
|
else
|
||||||
g_debug ("p11-kit not found");
|
g_info ("p11-kit not found");
|
||||||
|
|||||||
+123
-141
@@ -1,33 +1,28 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchurl,
|
|
||||||
fetchpatch,
|
|
||||||
runCommand,
|
|
||||||
appstream,
|
appstream,
|
||||||
autoreconfHook,
|
|
||||||
bison,
|
bison,
|
||||||
bubblewrap,
|
bubblewrap,
|
||||||
buildPackages,
|
|
||||||
bzip2,
|
bzip2,
|
||||||
coreutils,
|
coreutils,
|
||||||
curl,
|
curl,
|
||||||
dbus,
|
|
||||||
dconf,
|
dconf,
|
||||||
desktop-file-utils,
|
desktop-file-utils,
|
||||||
docbook_xml_dtd_45,
|
|
||||||
docbook-xsl-nons,
|
docbook-xsl-nons,
|
||||||
|
docbook_xml_dtd_45,
|
||||||
|
fetchurl,
|
||||||
fuse3,
|
fuse3,
|
||||||
|
gdk-pixbuf,
|
||||||
gettext,
|
gettext,
|
||||||
glib,
|
glib,
|
||||||
glib-networking,
|
glib-networking,
|
||||||
gobject-introspection,
|
gobject-introspection,
|
||||||
gpgme,
|
gpgme,
|
||||||
gsettings-desktop-schemas,
|
gsettings-desktop-schemas,
|
||||||
gtk3,
|
|
||||||
gtk-doc,
|
gtk-doc,
|
||||||
|
gtk3,
|
||||||
hicolor-icon-theme,
|
hicolor-icon-theme,
|
||||||
intltool,
|
|
||||||
json-glib,
|
json-glib,
|
||||||
libarchive,
|
libarchive,
|
||||||
libcap,
|
libcap,
|
||||||
@@ -35,50 +30,60 @@
|
|||||||
libseccomp,
|
libseccomp,
|
||||||
libxml2,
|
libxml2,
|
||||||
libxslt,
|
libxslt,
|
||||||
|
malcontent,
|
||||||
|
meson,
|
||||||
|
ninja,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
nixosTests,
|
|
||||||
nixos-icons,
|
nixos-icons,
|
||||||
ostree,
|
ostree,
|
||||||
p11-kit,
|
p11-kit,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
polkit,
|
polkit,
|
||||||
pkgsCross,
|
|
||||||
python3,
|
python3,
|
||||||
|
runCommand,
|
||||||
shared-mime-info,
|
shared-mime-info,
|
||||||
socat,
|
socat,
|
||||||
substituteAll,
|
substituteAll,
|
||||||
systemd,
|
systemd,
|
||||||
testers,
|
testers,
|
||||||
valgrind,
|
valgrind,
|
||||||
which,
|
validatePkgConfig,
|
||||||
|
wayland,
|
||||||
|
wayland-protocols,
|
||||||
|
wayland-scanner,
|
||||||
wrapGAppsNoGuiHook,
|
wrapGAppsNoGuiHook,
|
||||||
xdg-dbus-proxy,
|
xdg-dbus-proxy,
|
||||||
xmlto,
|
xmlto,
|
||||||
xorg,
|
xorg,
|
||||||
xz,
|
|
||||||
zstd,
|
zstd,
|
||||||
|
withAutoSideloading ? false,
|
||||||
|
withDocbookDocs ? true,
|
||||||
withGtkDoc ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
|
withGtkDoc ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
|
||||||
|
withMan ? true,
|
||||||
|
withSELinuxModule ? false,
|
||||||
|
withSystemd ? true,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "flatpak";
|
pname = "flatpak";
|
||||||
version = "1.14.10";
|
version = "1.16.0";
|
||||||
|
|
||||||
# TODO: split out lib once we figure out what to do with triggerdir
|
# TODO: split out lib once we figure out what to do with triggerdir
|
||||||
outputs = [
|
outputs =
|
||||||
"out"
|
[
|
||||||
"dev"
|
"out"
|
||||||
"man"
|
"dev"
|
||||||
"doc"
|
]
|
||||||
"devdoc"
|
++ lib.optionals (withDocbookDocs || withGtkDoc) [
|
||||||
"installedTests"
|
"devdoc"
|
||||||
];
|
"doc"
|
||||||
|
]
|
||||||
separateDebugInfo = true;
|
++ lib.optional finalAttrs.doCheck "installedTests"
|
||||||
|
++ lib.optional withMan "man";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/flatpak/flatpak/releases/download/${finalAttrs.version}/flatpak-${finalAttrs.version}.tar.xz";
|
url = "https://github.com/flatpak/flatpak/releases/download/${finalAttrs.version}/flatpak-${finalAttrs.version}.tar.xz";
|
||||||
hash = "sha256-a73HkIEnNQrYWkpH1wKSyi9MRul3sysf0jHCpxnYIc0=";
|
hash = "sha256-ywrFZa3LYhJ8bRHtUO5wRNaoNvppw1Sy9LZAoiv6Syo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@@ -89,98 +94,98 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
inherit
|
inherit
|
||||||
coreutils
|
coreutils
|
||||||
gettext
|
gettext
|
||||||
socat
|
|
||||||
gtk3
|
gtk3
|
||||||
|
socat
|
||||||
;
|
;
|
||||||
smi = shared-mime-info;
|
|
||||||
dfu = desktop-file-utils;
|
dfu = desktop-file-utils;
|
||||||
hicolorIconTheme = hicolor-icon-theme;
|
hicolorIconTheme = hicolor-icon-theme;
|
||||||
|
smi = shared-mime-info;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Hardcode paths used by Flatpak itself.
|
# Hardcode paths used by Flatpak itself.
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./fix-paths.patch;
|
src = ./fix-paths.patch;
|
||||||
p11kit = "${p11-kit.bin}/bin/p11-kit";
|
p11kit = lib.getExe p11-kit;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Allow gtk-doc to find schemas using XML_CATALOG_FILES environment variable.
|
|
||||||
# Patch taken from gtk-doc expression.
|
|
||||||
./respect-xml-catalog-files-var.patch
|
|
||||||
|
|
||||||
# Nix environment hacks should not leak into the apps.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/53441
|
|
||||||
./unset-env-vars.patch
|
|
||||||
|
|
||||||
# Use flatpak from PATH to avoid references to `/nix/store` in `/desktop` files.
|
# Use flatpak from PATH to avoid references to `/nix/store` in `/desktop` files.
|
||||||
# Applications containing `DBusActivatable` entries should be able to find the flatpak binary.
|
# Applications containing `DBusActivatable` entries should be able to find the flatpak binary.
|
||||||
# https://github.com/NixOS/nixpkgs/issues/138956
|
# https://github.com/NixOS/nixpkgs/issues/138956
|
||||||
./binary-path.patch
|
./binary-path.patch
|
||||||
|
|
||||||
# The icon validator needs to access the gdk-pixbuf loaders in the Nix store
|
|
||||||
# and cannot bind FHS paths since those are not available on NixOS.
|
|
||||||
finalAttrs.passthru.icon-validator-patch
|
|
||||||
|
|
||||||
# Try mounting fonts and icons from NixOS locations if FHS locations don't exist.
|
# Try mounting fonts and icons from NixOS locations if FHS locations don't exist.
|
||||||
# https://github.com/NixOS/nixpkgs/issues/119433
|
# https://github.com/NixOS/nixpkgs/issues/119433
|
||||||
./fix-fonts-icons.patch
|
./fix-fonts-icons.patch
|
||||||
|
|
||||||
# TODO: Remove when updating to 1.16
|
# Nix environment hacks should not leak into the apps.
|
||||||
# Ensure flatpak uses the system's zoneinfo from $TZDIR
|
# https://github.com/NixOS/nixpkgs/issues/53441
|
||||||
# https://github.com/NixOS/nixpkgs/issues/238386
|
./unset-env-vars.patch
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/flatpak/flatpak/pull/5850/commits/a8a35bf4d9fc3d76e1a5049a6a591faec04a42fd.patch";
|
# The icon validator needs to access the gdk-pixbuf loaders in the Nix store
|
||||||
hash = "sha256-JqkPbnzgZNZq/mplZqohhHFdjRrvYFjE4C02pI3feBo=";
|
# and cannot bind FHS paths since those are not available on NixOS.
|
||||||
})
|
finalAttrs.passthru.icon-validator-patch
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/flatpak/flatpak/pull/5850/commits/5ea13b09612215559081c27b60df4fb720cb08d5.patch";
|
|
||||||
hash = "sha256-BWbyQ2en3RtN4Ec5n62CULAhvywlQLhcl3Fmd4fsR1s=";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/flatpak/flatpak/pull/5850/commits/7c8a81f08908019bbf69358de199748a9bcb29e3.patch";
|
|
||||||
hash = "sha256-RiG2jPmG+Igskxv8oQquOUYsG4srgdMXWe34ojMXslo=";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
# Fixup shebangs in some scripts
|
||||||
autoreconfHook
|
#
|
||||||
libxml2
|
# Don't prefix the already absolute `man` directory with the install prefix
|
||||||
docbook_xml_dtd_45
|
postPatch = ''
|
||||||
docbook-xsl-nons
|
patchShebangs buildutil/ tests/
|
||||||
which
|
patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler
|
||||||
gobject-introspection
|
|
||||||
gtk-doc
|
|
||||||
intltool
|
|
||||||
libxslt
|
|
||||||
pkg-config
|
|
||||||
xmlto
|
|
||||||
bison
|
|
||||||
wrapGAppsNoGuiHook
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
substituteInPlace doc/meson.build \
|
||||||
appstream
|
--replace-fail '$MESON_INSTALL_DESTDIR_PREFIX/@1@/@2@' '@1@/@2@'
|
||||||
bubblewrap
|
'';
|
||||||
bzip2
|
|
||||||
curl
|
strictDeps = true;
|
||||||
dbus
|
|
||||||
dconf
|
nativeBuildInputs =
|
||||||
gpgme
|
[
|
||||||
json-glib
|
(python3.pythonOnBuildForHost.withPackages (p: [ p.pyparsing ]))
|
||||||
libarchive
|
bison
|
||||||
libcap
|
gobject-introspection
|
||||||
libseccomp
|
meson
|
||||||
libxml2
|
ninja
|
||||||
xz
|
pkg-config
|
||||||
zstd
|
validatePkgConfig
|
||||||
polkit
|
wrapGAppsNoGuiHook
|
||||||
python3
|
]
|
||||||
systemd
|
++ lib.optional withGtkDoc gtk-doc
|
||||||
xorg.libXau
|
++ lib.optional withMan libxslt
|
||||||
fuse3
|
++ lib.optional withSELinuxModule bzip2
|
||||||
gsettings-desktop-schemas
|
++ lib.optionals withDocbookDocs [
|
||||||
glib-networking
|
docbook-xsl-nons
|
||||||
librsvg # for flatpak-validate-icon
|
docbook_xml_dtd_45
|
||||||
] ++ lib.optionals withGtkDoc [ gtk-doc ];
|
xmlto
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[
|
||||||
|
appstream
|
||||||
|
curl
|
||||||
|
dconf
|
||||||
|
fuse3
|
||||||
|
gdk-pixbuf
|
||||||
|
glib-networking
|
||||||
|
gpgme
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
json-glib
|
||||||
|
libarchive
|
||||||
|
libcap
|
||||||
|
librsvg # for flatpak-validate-icon
|
||||||
|
libseccomp
|
||||||
|
libxml2
|
||||||
|
malcontent
|
||||||
|
polkit
|
||||||
|
python3
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
wayland-scanner
|
||||||
|
xorg.libXau
|
||||||
|
zstd
|
||||||
|
]
|
||||||
|
++ lib.optional withGtkDoc gtk-doc
|
||||||
|
++ lib.optional withSystemd systemd;
|
||||||
|
|
||||||
# Required by flatpak.pc
|
# Required by flatpak.pc
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@@ -188,51 +193,29 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
ostree
|
ostree
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ valgrind ];
|
mesonFlags = [
|
||||||
|
(lib.mesonBool "auto_sideloading" withAutoSideloading)
|
||||||
|
(lib.mesonBool "installed_tests" finalAttrs.finalPackage.doCheck)
|
||||||
|
(lib.mesonBool "tests" finalAttrs.finalPackage.doCheck)
|
||||||
|
(lib.mesonEnable "selinux_module" withSELinuxModule)
|
||||||
|
(lib.mesonOption "dbus_config_dir" (placeholder "out" + "/share/dbus-1/system.d"))
|
||||||
|
(lib.mesonOption "profile_dir" (placeholder "out" + "/etc/profile.d"))
|
||||||
|
(lib.mesonOption "system_bubblewrap" (lib.getExe bubblewrap))
|
||||||
|
(lib.mesonOption "system_dbus_proxy" (lib.getExe xdg-dbus-proxy))
|
||||||
|
(lib.mesonOption "system_fusermount" "/run/wrappers/bin/fusermount3")
|
||||||
|
(lib.mesonOption "system_install_dir" "/var/lib/flatpak")
|
||||||
|
];
|
||||||
|
|
||||||
# TODO: some issues with temporary files
|
nativeCheckInputs = [
|
||||||
|
polkit
|
||||||
|
socat
|
||||||
|
valgrind
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO: Many issues with temporary files, FHS environments, timeouts, and our current patches
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
NIX_LDFLAGS = "-lpthread";
|
separateDebugInfo = true;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--with-curl"
|
|
||||||
"--with-system-bubblewrap=${lib.getExe bubblewrap}"
|
|
||||||
"--with-system-dbus-proxy=${lib.getExe xdg-dbus-proxy}"
|
|
||||||
"--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d"
|
|
||||||
"--with-profile-dir=${placeholder "out"}/etc/profile.d"
|
|
||||||
"--localstatedir=/var"
|
|
||||||
"--sysconfdir=/etc"
|
|
||||||
"--enable-gtk-doc=${if withGtkDoc then "yes" else "no"}"
|
|
||||||
"--enable-installed-tests"
|
|
||||||
"--enable-selinux-module=no"
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [
|
|
||||||
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/flatpak"
|
|
||||||
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/flatpak"
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch =
|
|
||||||
let
|
|
||||||
vsc-py = python3.pythonOnBuildForHost.withPackages (pp: [ pp.pyparsing ]);
|
|
||||||
in
|
|
||||||
''
|
|
||||||
patchShebangs buildutil
|
|
||||||
patchShebangs tests
|
|
||||||
PATH=${lib.makeBinPath [ vsc-py ]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler
|
|
||||||
|
|
||||||
substituteInPlace configure.ac \
|
|
||||||
--replace-fail '$BWRAP --' ${
|
|
||||||
lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $BWRAP --")
|
|
||||||
} \
|
|
||||||
--replace-fail '$DBUS_PROXY --' ${
|
|
||||||
lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $DBUS_PROXY --")
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
icon-validator-patch = substituteAll {
|
icon-validator-patch = substituteAll {
|
||||||
@@ -240,12 +223,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
inherit (builtins) storeDir;
|
inherit (builtins) storeDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
updateScript = nix-update-script { };
|
|
||||||
|
|
||||||
tests = {
|
tests = {
|
||||||
cross = pkgsCross.aarch64-multiplatform.flatpak;
|
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
||||||
|
|
||||||
installedTests = nixosTests.installed-tests.flatpak;
|
|
||||||
|
|
||||||
validate-icon = runCommand "test-icon-validation" { } ''
|
validate-icon = runCommand "test-icon-validation" { } ''
|
||||||
${finalAttrs.finalPackage}/libexec/flatpak-validate-icon \
|
${finalAttrs.finalPackage}/libexec/flatpak-validate-icon \
|
||||||
@@ -257,6 +236,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
version = testers.testVersion { package = finalAttrs.finalPackage; };
|
version = testers.testVersion { package = finalAttrs.finalPackage; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateScript = nix-update-script { };
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@@ -267,5 +248,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
maintainers = with lib.maintainers; [ getchoo ];
|
maintainers = with lib.maintainers; [ getchoo ];
|
||||||
mainProgram = "flatpak";
|
mainProgram = "flatpak";
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
pkgConfigModules = [ "flatpak" ];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
diff --git a/acinclude.m4 b/acinclude.m4
|
|
||||||
index 92ec3985..b3fccf1d 100644
|
|
||||||
--- a/acinclude.m4
|
|
||||||
+++ b/acinclude.m4
|
|
||||||
@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
|
||||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
|
||||||
- if $jh_found_xmlcatalog && \
|
|
||||||
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
|
||||||
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
|
|
||||||
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
|
|
||||||
AC_MSG_RESULT([found])
|
|
||||||
ifelse([$3],,,[$3
|
|
||||||
])dnl
|
|
||||||
Reference in New Issue
Block a user