summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciek Borzecki2021-09-21 13:28:32 +0200
committerMaciek Borzecki2021-09-21 13:28:32 +0200
commit955b2637a72b2a89aa8eaf896c82571c1ebd965f (patch)
tree0e746aa4772866e9d6d5a9844a005b0be56f3983
parentce56527583a1014c16ea35ce1d410c26727eb3af (diff)
downloadaur-955b2637a72b2a89aa8eaf896c82571c1ebd965f.tar.gz
upgpkg: snapd 2.52-2
Cherry pick glib 2.70 compatibility patch from upstream. Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch58
-rw-r--r--PKGBUILD6
3 files changed, 65 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ef9b1ac5bdd2..7ca88742f324 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = snapd
pkgdesc = Service and tools for management of snap packages.
pkgver = 2.52
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/snapcore/snapd
install = snapd.install
arch = x86_64
@@ -28,6 +28,8 @@ pkgbase = snapd
options = !strip
options = emptydirs
source = snapd-2.52.tar.xz::https://github.com/snapcore/snapd/releases/download/2.52/snapd_2.52.vendor.tar.xz
+ source = 0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch
sha256sums = a686a071251f8853c5c6789023091510332a49063334c9af29d48b066f8726c4
+ sha256sums = fb2bece54758fd167b4e7d8df71786a204617ccbed241457ee30d27ab0048f77
pkgname = snapd
diff --git a/0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch b/0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch
new file mode 100644
index 000000000000..e34e1e72947d
--- /dev/null
+++ b/0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch
@@ -0,0 +1,58 @@
+From 243900000f145eddc6b6bf1546400a9556bb2762 Mon Sep 17 00:00:00 2001
+Message-Id: <243900000f145eddc6b6bf1546400a9556bb2762.1632223485.git.maciej.zenon.borzecki@canonical.com>
+From: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
+Date: Tue, 27 Jul 2021 09:46:29 +0200
+Subject: [PATCH] cmd/libsnap-confine-private: g_spawn_check_exit_status is
+ deprecated since glib 2.69
+
+With https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1967 the
+g_spawn_check_exit_status call is flagged as deprecated now. This also broke in
+F35 mass rebuild in Rawhide:
+
+make[1]: Leaving directory '/builddir/build/BUILD/snapd-2.51/cmd'
+libsnap-confine-private/test-utils.c: In function 'rm_rf_tmp':
+libsnap-confine-private/test-utils.c:63:9: error: 'g_spawn_check_exit_status' is deprecated: Use 'g_spawn_check_wait_status' instead [-Werror=deprecated-declarations]
+ 63 | g_assert_true(g_spawn_check_exit_status(exit_status, NULL));
+ | ^~~~~~~~~~~~~
+In file included from /usr/include/glib-2.0/glib.h:81,
+ from libsnap-confine-private/test-utils.c:24:
+/usr/include/glib-2.0/glib/gspawn.h:280:10: note: declared here
+ 280 | gboolean g_spawn_check_exit_status (gint wait_status,
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~
+cc1: all warnings being treated as errors
+make[1]: *** [Makefile:2705: libsnap-confine-private/libsnap_confine_private_unit_tests-test-utils.o] Error 1
+make[1]: *** Waiting for unfinished jobs....
+
+Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
+---
+ cmd/libsnap-confine-private/test-utils.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/cmd/libsnap-confine-private/test-utils.c b/cmd/libsnap-confine-private/test-utils.c
+index c3e17a18d91b32da04f5febc802926942011ca9c..5cf4eb53de693ad17294c5eede3bd05339395878 100644
+--- a/cmd/libsnap-confine-private/test-utils.c
++++ b/cmd/libsnap-confine-private/test-utils.c
+@@ -23,6 +23,11 @@
+
+ #include <glib.h>
+
++#if !GLIB_CHECK_VERSION(2, 69, 0)
++// g_spawn_check_exit_status is considered deprecated since 2.69
++#define g_spawn_check_wait_status(x, y) (g_spawn_check_exit_status (x, y))
++#endif
++
+ void rm_rf_tmp(const char *dir)
+ {
+ // Sanity check, don't remove anything that's not in the temporary
+@@ -60,7 +65,7 @@ void rm_rf_tmp(const char *dir)
+ (working_directory, argv, envp, flags, child_setup,
+ user_data, standard_output, standard_error, &exit_status,
+ &error));
+- g_assert_true(g_spawn_check_exit_status(exit_status, NULL));
++ g_assert_true(g_spawn_check_wait_status(exit_status, NULL));
+ if (error != NULL) {
+ g_test_message("cannot remove temporary directory: %s\n",
+ error->message);
+--
+2.33.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 491bab217925..80a0808f5f0e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ depends=('squashfs-tools' 'libseccomp' 'libsystemd' 'apparmor')
optdepends=('bash-completion: bash completion support'
'xdg-desktop-portal: desktop integration')
pkgver=2.52
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="https://github.com/snapcore/snapd"
license=('GPL3')
@@ -19,8 +19,10 @@ options=('!strip' 'emptydirs')
install=snapd.install
source=(
"$pkgname-$pkgver.tar.xz::https://github.com/snapcore/${pkgname}/releases/download/${pkgver}/${pkgname}_${pkgver}.vendor.tar.xz"
+ "0001-cmd-libsnap-confine-private-g_spawn_check_exit_statu.patch"
)
-sha256sums=('a686a071251f8853c5c6789023091510332a49063334c9af29d48b066f8726c4')
+sha256sums=('a686a071251f8853c5c6789023091510332a49063334c9af29d48b066f8726c4'
+ 'fb2bece54758fd167b4e7d8df71786a204617ccbed241457ee30d27ab0048f77')
_gourl=github.com/snapcore/snapd