summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2018-10-02 14:43:46 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-10-04 09:31:19 -0400
commitf7738717b864f4d7a454034092c66bf95061bfcf (patch)
treecf6e5f70be9a90f41c77e1917548cb7aaf8007f8
parenta49ca99d063bce9158c7094279cf498dfbfe0455 (diff)
downloadmeta-virtualization-f7738717b864f4d7a454034092c66bf95061bfcf.tar.gz
lxcfs: move recipe from meta-overc to here
This recipe was originally written and included in meta-overc as it was used by the overc framework so we implemented it there to sort out the kinks. Since this package is not specific to the OverC framework and people may be interested in including it in their images without having any interest in the OverC framework we are moving this recipe here, alongside lxc and other container related recipes. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch47
-rw-r--r--recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch27
-rw-r--r--recipes-containers/lxcfs/lxcfs_3.0.1.bb25
3 files changed, 99 insertions, 0 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
new file mode 100644
index 00000000..14228d65
--- /dev/null
+++ b/recipes-containers/lxcfs/files/systemd-allow-for-distinct-build-directory.patch
@@ -0,0 +1,47 @@
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
13Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
14---
15 config/init/systemd/Makefile.am | 2 +-
16 config/init/systemd/Makefile.in | 2 +-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/config/init/systemd/Makefile.am b/config/init/systemd/Makefile.am
20index 79e96f5..d6933f9 100644
21--- a/config/init/systemd/Makefile.am
22+++ b/config/init/systemd/Makefile.am
23@@ -5,7 +5,7 @@ SYSTEMD_UNIT_DIR = /lib/systemd/system
24
25 install-systemd: lxcfs.service
26 $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
27- $(INSTALL_DATA) lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
28+ $(INSTALL_DATA) $(srcdir)/lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
29
30 uninstall-systemd:
31 rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/lxcfs.service
32diff --git a/config/init/systemd/Makefile.in b/config/init/systemd/Makefile.in
33index d433e8a..430190c 100644
34--- a/config/init/systemd/Makefile.in
35+++ b/config/init/systemd/Makefile.in
36@@ -450,7 +450,7 @@ uninstall-am: uninstall-local
37
38 @INIT_SCRIPT_SYSTEMD_TRUE@install-systemd: lxcfs.service
39 @INIT_SCRIPT_SYSTEMD_TRUE@ $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
40-@INIT_SCRIPT_SYSTEMD_TRUE@ $(INSTALL_DATA) lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
41+@INIT_SCRIPT_SYSTEMD_TRUE@ $(INSTALL_DATA) $(srcdir)/lxcfs.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
42
43 @INIT_SCRIPT_SYSTEMD_TRUE@uninstall-systemd:
44 @INIT_SCRIPT_SYSTEMD_TRUE@ rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/lxcfs.service
45--
462.7.4
47
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
new file mode 100644
index 00000000..5e5673ac
--- /dev/null
+++ b/recipes-containers/lxcfs/files/systemd-ensure-var-lib-lxcfs-exists.patch
@@ -0,0 +1,27 @@
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
8Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
9---
10 config/init/systemd/lxcfs.service | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/config/init/systemd/lxcfs.service b/config/init/systemd/lxcfs.service
14index 95e3ee9..d887203 100644
15--- a/config/init/systemd/lxcfs.service
16+++ b/config/init/systemd/lxcfs.service
17@@ -5,6 +5,7 @@ Before=lxc.service
18 Documentation=man:lxcfs(1)
19
20 [Service]
21+ExecStartPre=-/bin/mkdir /var/lib/lxcfs
22 ExecStart=/usr/bin/lxcfs /var/lib/lxcfs/
23 KillMode=process
24 Restart=on-failure
25--
262.7.4
27
diff --git a/recipes-containers/lxcfs/lxcfs_3.0.1.bb b/recipes-containers/lxcfs/lxcfs_3.0.1.bb
new file mode 100644
index 00000000..576027fd
--- /dev/null
+++ b/recipes-containers/lxcfs/lxcfs_3.0.1.bb
@@ -0,0 +1,25 @@
1SUMMARY = "LXCFS is a userspace filesystem created to avoid kernel limitations"
2LICENSE = "Apache-2.0"
3
4inherit autotools pkgconfig systemd
5
6SRC_URI = " \
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"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
13SRC_URI[md5sum] = "fa49872fc45846125455199a2cce18f1"
14SRC_URI[sha256sum] = "016c317f13392bebccba338511f537332fb2fdbaf62a5f6d77307b38a348f41f"
15
16DEPENDS += "fuse"
17RDEPENDS_${PN} += "fuse"
18
19FILES_${PN} += "${datadir}/lxc/config/common.conf.d/*"
20
21CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN='false // No help2man //'"
22EXTRA_OECONF += "--with-distro=unknown --with-init-script=${VIRTUAL-RUNTIME_init_manager}"
23
24SYSTEMD_PACKAGES = "${PN}"
25SYSTEMD_SERVICE_${PN} = "lxcfs.service"