summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-08-03 15:18:33 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-08-24 01:38:21 +0000
commit4ecc9488d1df262c70e784dabfcf8329ba8fa60c (patch)
treedf66f1b7f8b93b8a9db2896f324426c6eca542fe
parent6b10588476e7d54819d955cf38bd2f80be17bb7c (diff)
downloadmeta-virtualization-4ecc9488d1df262c70e784dabfcf8329ba8fa60c.tar.gz
lxcfs: update to 5.0.4 and convert to meson
This is a large update to lxcfs, that includes a move to meson as the build backend. We drop a couple of uneeded patches, and add a new meson specific one as the detection of pid_* functions is failing. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch49
-rw-r--r--recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch26
-rw-r--r--recipes-containers/lxcfs/lxcfs/0001-meson.build-force-pid-open-send_signal-detection.patch38
-rw-r--r--recipes-containers/lxcfs/lxcfs_5.0.4.bb (renamed from recipes-containers/lxcfs/lxcfs_4.0.7.bb)15
4 files changed, 45 insertions, 83 deletions
diff --git a/recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch b/recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch
deleted file mode 100644
index 4d93cc3e..00000000
--- a/recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 66a71fbf94020651880f1dbb6e4663d93391b47c Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Mon, 10 Sep 2018 13:14:07 -0400
4Subject: [PATCH] systemd: allow for distinct build directory
5
6The Makefile.am is currently written in a way that doesn't allow for a
7distinct build directory. As such we get the error:
8
9 install: cannot stat 'lxcfs.service': No such file or directory
10
11Make use of $(srcdir) to correct this.
12
13Upstream-Status: Inappropriate [embedded specific]
14
15Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
16---
17 config/init/systemd/Makefile.am | 2 +-
18 config/init/systemd/Makefile.in | 2 +-
19 2 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/config/init/systemd/Makefile.am b/config/init/systemd/Makefile.am
22index 79e96f5..d6933f9 100644
23--- a/config/init/systemd/Makefile.am
24+++ b/config/init/systemd/Makefile.am
25@@ -5,7 +5,7 @@ SYSTEMD_UNIT_DIR = /lib/systemd/system
26
27 install-systemd: lxcfs.service
28 $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
29- $(INSTALL_DATA) lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
30+ $(INSTALL_DATA) $(srcdir)/lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
31
32 uninstall-systemd:
33 rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/lxcfs.service
34diff --git a/config/init/systemd/Makefile.in b/config/init/systemd/Makefile.in
35index d433e8a..430190c 100644
36--- a/config/init/systemd/Makefile.in
37+++ b/config/init/systemd/Makefile.in
38@@ -450,7 +450,7 @@ uninstall-am: uninstall-local
39
40 @INIT_SCRIPT_SYSTEMD_TRUE@install-systemd: lxcfs.service
41 @INIT_SCRIPT_SYSTEMD_TRUE@ $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
42-@INIT_SCRIPT_SYSTEMD_TRUE@ $(INSTALL_DATA) lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
43+@INIT_SCRIPT_SYSTEMD_TRUE@ $(INSTALL_DATA) $(srcdir)/lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
44
45 @INIT_SCRIPT_SYSTEMD_TRUE@uninstall-systemd:
46 @INIT_SCRIPT_SYSTEMD_TRUE@ rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/lxcfs.service
47--
482.7.4
49
diff --git a/recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch b/recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch
deleted file mode 100644
index 9f6f338d..00000000
--- a/recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 89bf4b64e810e174068e7861490e6d6ab2d14854 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Mon, 10 Sep 2018 15:01:54 -0400
4Subject: [PATCH] systemd: ensure /var/lib/lxcfs exists
5
6If the directory doesn't exist the service will fail to start.
7
8Upstream-Status: Inappropriate [embedded specific]
9
10Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
11---
12 config/init/systemd/lxcfs.service | 1 +
13 1 file changed, 1 insertion(+)
14
15Index: lxcfs-4.0.7/config/init/systemd/lxcfs.service
16===================================================================
17--- lxcfs-4.0.7.orig/config/init/systemd/lxcfs.service
18+++ lxcfs-4.0.7/config/init/systemd/lxcfs.service
19@@ -5,6 +5,7 @@
20 Documentation=man:lxcfs(1)
21
22 [Service]
23+ExecStartPre=-/bin/mkdir /var/lib/lxcfs
24 ExecStart=/usr/bin/lxcfs /usr/local/var/lib/lxcfs
25 KillMode=process
26 Restart=on-failure
diff --git a/recipes-containers/lxcfs/lxcfs/0001-meson.build-force-pid-open-send_signal-detection.patch b/recipes-containers/lxcfs/lxcfs/0001-meson.build-force-pid-open-send_signal-detection.patch
new file mode 100644
index 00000000..5f21a956
--- /dev/null
+++ b/recipes-containers/lxcfs/lxcfs/0001-meson.build-force-pid-open-send_signal-detection.patch
@@ -0,0 +1,38 @@
1From 65fcb73cdef34609f28461424672551a6e65327e Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Thu, 3 Aug 2023 15:01:42 +0000
4Subject: [PATCH] meson.build: force pid open/send_signal detection
5
6meson is not correctly detecting that our cross build environment
7has the pid* definitions, which leads to compile errors when internal
8definitions conflict:
9
10 lxcfs-5.0.4/src/utils.h:45:19: error: static declaration of 'pidfd_open' follows non-static declaration
11
12We could possibly generate a meson.cross file, and specify it via
13--cross-file, but we can just force the detection to 'true' as we
14don't have to support configurations without the functionality.
15
16Upstream-Status: Inappropriate [OE-Specific]
17
18Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
19---
20 meson.build | 2 ++
21 1 file changed, 2 insertions(+)
22
23diff --git a/meson.build b/meson.build
24index a0289ad..9480c30 100644
25--- a/meson.build
26+++ b/meson.build
27@@ -143,6 +143,8 @@ foreach ident: [
28 ]
29 have = cc.has_function(ident[0], prefix: ident[1], args: '-D_GNU_SOURCE')
30 conf.set10('HAVE_' + ident[0].to_upper(), have)
31+ conf.set10('HAVE_PIDFD_OPEN', true)
32+ conf.set10('HAVE_PIDFD_SEND_SIGNAL', true)
33 endforeach
34
35 fuse_version = get_option('fuse-version')
36--
372.39.2
38
diff --git a/recipes-containers/lxcfs/lxcfs_4.0.7.bb b/recipes-containers/lxcfs/lxcfs_5.0.4.bb
index 364f9200..73ed97a7 100644
--- a/recipes-containers/lxcfs/lxcfs_4.0.7.bb
+++ b/recipes-containers/lxcfs/lxcfs_5.0.4.bb
@@ -1,26 +1,25 @@
1SUMMARY = "LXCFS is a userspace filesystem created to avoid kernel limitations" 1SUMMARY = "LXCFS is a userspace filesystem created to avoid kernel limitations"
2LICENSE = "LGPL-2.1-or-later" 2LICENSE = "LGPL-2.1-or-later"
3 3
4inherit autotools pkgconfig systemd 4inherit meson pkgconfig systemd
5 5
6SRC_URI = " \ 6SRC_URI = " \
7 https://linuxcontainers.org/downloads/lxcfs/lxcfs-${PV}.tar.gz \ 7 https://linuxcontainers.org/downloads/lxcfs/lxcfs-${PV}.tar.gz \
8 file://systemd-allow-for-distinct-build-directory.patch \
9 file://systemd-ensure-var-lib-lxcfs-exists.patch \
10 file://0001-bindings-fix-build-with-newer-linux-libc-headers.patch \ 8 file://0001-bindings-fix-build-with-newer-linux-libc-headers.patch \
9 file://0001-meson.build-force-pid-open-send_signal-detection.patch \
11" 10"
12 11
13LIC_FILES_CHKSUM = "file://COPYING;md5=29ae50a788f33f663405488bc61eecb1" 12LIC_FILES_CHKSUM = "file://COPYING;md5=29ae50a788f33f663405488bc61eecb1"
14SRC_URI[md5sum] = "9d963976207fb0ca4701428ae0587aeb" 13SRC_URI[md5sum] = "00a6632e094d0a2f2308c8365ac91912"
15SRC_URI[sha256sum] = "3f28e2f4b04c0090aaf88b72666505f0313768a5254dd48a14c43cf78c543ec8" 14SRC_URI[sha256sum] = "c2b361edc881d5ca8fa2cd3260a4999b8f87afce8d937be2160e5cf0b482c52f"
16 15
17DEPENDS += "fuse" 16DEPENDS += "fuse python3-jinja2-native help2man-native systemd"
18RDEPENDS:${PN} += "fuse" 17RDEPENDS:${PN} += "fuse"
19 18
20FILES:${PN} += "${datadir}/lxc/config/common.conf.d/*" 19FILES:${PN} += "${datadir}/lxc/config/common.conf.d/*"
21 20
22CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN='false // No help2man //'" 21# help2man doesn't work, so we disable docs
23EXTRA_OECONF += "--with-distro=unknown --with-init-script=${VIRTUAL-RUNTIME_init_manager}" 22EXTRA_OEMESON += "-Dinit-script=${VIRTUAL-RUNTIME_init_manager} -Ddocs=false"
24 23
25SYSTEMD_PACKAGES = "${PN}" 24SYSTEMD_PACKAGES = "${PN}"
26SYSTEMD_SERVICE:${PN} = "lxcfs.service" 25SYSTEMD_SERVICE:${PN} = "lxcfs.service"