commit lxc for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lxc for openSUSE:Factory checked in at 2022-10-23 16:33:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lxc (Old) and /work/SRC/openSUSE:Factory/.lxc.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "lxc" Sun Oct 23 16:33:12 2022 rev:102 rq:1030582 version:4.0.12 Changes: -------- --- /work/SRC/openSUSE:Factory/lxc/lxc.changes 2022-06-23 10:25:00.851788483 +0200 +++ /work/SRC/openSUSE:Factory/.lxc.new.2275/lxc.changes 2022-10-23 16:33:25.343303364 +0200 @@ -2 +2,12 @@ -Wed Jun 22 04:40:50 UTC 2022 - Aleksa Sarai <asarai@suse.com> +Wed Oct 19 13:05:52 UTC 2022 - Johannes Kastl <kastl@b1-systems.de> + +- re-enable FORTIFY_SOURCE=3 +- add patch 0001-Backport-Commit-build-detect-where-struct-mount_attr.patch + This patch backports the fix from + https://github.com/lxc/lxc/pull/4179/commits/c1115e1503bf955c97f4cf3b925a6a9... + The patch fixes the code so builds are no longer failing + due to gcc errors -Werror=implicit-function-declaration and + -Werror=incompatible-pointer-types + +------------------------------------------------------------------- +Wed Oct 19 00:07:07 UTC 2022 - Aleksa Sarai <asarai@suse.com> @@ -4,0 +16,5 @@ + +------------------------------------------------------------------- +Sun Sep 25 17:09:12 UTC 2022 - Johannes Kastl <kastl@b1-systems.de> + +- fix build by using FORTIFY_SOURCE=2 New: ---- 0001-Backport-Commit-build-detect-where-struct-mount_attr.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxc.spec ++++++ --- /var/tmp/diff_new_pack.j1dHp3/_old 2022-10-23 16:33:25.875304670 +0200 +++ /var/tmp/diff_new_pack.j1dHp3/_new 2022-10-23 16:33:25.883304690 +0200 @@ -47,6 +47,7 @@ Source3: lxc-createconfig.in Source90: openSUSE-apparmor.conf Source91: missing_setuid.txt.in +Patch0: 0001-Backport-Commit-build-detect-where-struct-mount_attr.patch BuildRequires: automake BuildRequires: gcc BuildRequires: libapparmor-devel @@ -127,6 +128,7 @@ %prep %setup +%patch0 -p1 %build ./autogen.sh ++++++ 0001-Backport-Commit-build-detect-where-struct-mount_attr.patch ++++++ From fa03a307595e37b6e313d8d9ca9a0ad2d20d38a8 Mon Sep 17 00:00:00 2001 From: Christian Brauner <brauner@kernel.org> Date: Tue, 9 Aug 2022 16:14:25 +0200 Subject: [PATCH] Backport Commit 'build: detect where struct mount_attr is declared' Fixes: #4176 Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com> Signed-off-by: Johannes Kastl <kastl@b1-systems.de> --- src/lxc/conf.c | 6 +++--- src/lxc/conf.h | 2 +- src/lxc/mount_utils.c | 6 +++--- src/lxc/syscall_wrappers.h | 12 ++++++++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index c1ce717bf..e198a5ff3 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2885,7 +2885,7 @@ static int __lxc_idmapped_mounts_child(struct lxc_handler *handler, FILE *f) struct lxc_mount_options opts = {}; int dfd_from; const char *source_relative, *target_relative; - struct lxc_mount_attr attr = {}; + struct mount_attr attr = {}; ret = parse_lxc_mount_attrs(&opts, mntent.mnt_opts); if (ret < 0) @@ -3005,7 +3005,7 @@ static int __lxc_idmapped_mounts_child(struct lxc_handler *handler, FILE *f) /* Set propagation mount options. */ if (opts.attr.propagation) { - attr = (struct lxc_mount_attr) { + attr = (struct mount_attr) { .propagation = opts.attr.propagation, }; @@ -4109,7 +4109,7 @@ int lxc_idmapped_mounts_parent(struct lxc_handler *handler) for (;;) { __do_close int fd_from = -EBADF, fd_userns = -EBADF; - struct lxc_mount_attr attr = {}; + struct mount_attr attr = {}; struct lxc_mount_options opts = {}; ssize_t ret; diff --git a/src/lxc/conf.h b/src/lxc/conf.h index ccf59b47e..1c58026d9 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -216,7 +216,7 @@ struct lxc_mount_options { unsigned long mnt_flags; unsigned long prop_flags; char *data; - struct lxc_mount_attr attr; + struct mount_attr attr; char *raw_options; }; diff --git a/src/lxc/mount_utils.c b/src/lxc/mount_utils.c index bba75f933..88dd73ee3 100644 --- a/src/lxc/mount_utils.c +++ b/src/lxc/mount_utils.c @@ -31,7 +31,7 @@ lxc_log_define(mount_utils, lxc); * setting in @attr_set, but must also specify MOUNT_ATTR__ATIME in the * @attr_clr field. */ -static inline void set_atime(struct lxc_mount_attr *attr) +static inline void set_atime(struct mount_attr *attr) { switch (attr->attr_set & MOUNT_ATTR__ATIME) { case MOUNT_ATTR_RELATIME: @@ -272,7 +272,7 @@ int create_detached_idmapped_mount(const char *path, int userns_fd, { __do_close int fd_tree_from = -EBADF; unsigned int open_tree_flags = OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC; - struct lxc_mount_attr attr = { + struct mount_attr attr = { .attr_set = MOUNT_ATTR_IDMAP | attr_set, .attr_clr = attr_clr, .userns_fd = userns_fd, @@ -335,7 +335,7 @@ int __fd_bind_mount(int dfd_from, const char *path_from, __u64 o_flags_from, __u64 attr_clr, __u64 propagation, int userns_fd, bool recursive) { - struct lxc_mount_attr attr = { + struct mount_attr attr = { .attr_set = attr_set, .attr_clr = attr_clr, .propagation = propagation, diff --git a/src/lxc/syscall_wrappers.h b/src/lxc/syscall_wrappers.h index a5e98b565..c8a7d0c7b 100644 --- a/src/lxc/syscall_wrappers.h +++ b/src/lxc/syscall_wrappers.h @@ -18,6 +18,12 @@ #include "macro.h" #include "syscall_numbers.h" +#if HAVE_STRUCT_MOUNT_ATTR +#include <sys/mount.h> +#elif HAVE_UAPI_STRUCT_MOUNT_ATTR +#include <linux/mount.h> +#endif + #ifdef HAVE_LINUX_MEMFD_H #include <linux/memfd.h> #endif @@ -210,16 +216,18 @@ extern int fsmount(int fs_fd, unsigned int flags, unsigned int attr_flags); /* * mount_setattr() */ -struct lxc_mount_attr { +#if !HAVE_STRUCT_MOUNT_ATTR && !HAVE_UAPI_STRUCT_MOUNT_ATTR +struct mount_attr { __u64 attr_set; __u64 attr_clr; __u64 propagation; __u64 userns_fd; }; +#endif #if !HAVE_MOUNT_SETATTR static inline int mount_setattr(int dfd, const char *path, unsigned int flags, - struct lxc_mount_attr *attr, size_t size) + struct mount_attr *attr, size_t size) { return syscall(__NR_mount_setattr, dfd, path, flags, attr, size); } -- 2.38.0
participants (1)
-
Source-Sync