commit:     90b61eec7b3a7507c25d743cc6e769f9d116b05b
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu May 14 15:51:05 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri May 15 05:20:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90b61eec

sys-fs/lxcfs: bump to 4.0.3

Closes: https://bugs.gentoo.org/698722
Closes: https://bugs.gentoo.org/712802

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-fs/lxcfs/Manifest                |  1 +
 sys-fs/lxcfs/files/lxcfs-4.0.0.confd |  7 +++++
 sys-fs/lxcfs/files/lxcfs-4.0.0.initd | 26 ++++++++++++++++++
 sys-fs/lxcfs/lxcfs-4.0.3.ebuild      | 53 ++++++++++++++++++++++++++++++++++++
 4 files changed, 87 insertions(+)

diff --git a/sys-fs/lxcfs/Manifest b/sys-fs/lxcfs/Manifest
index 19f83ee280e..699568b0724 100644
--- a/sys-fs/lxcfs/Manifest
+++ b/sys-fs/lxcfs/Manifest
@@ -1 +1,2 @@
 DIST lxcfs-3.0.3.tar.gz 49824 BLAKE2B 
02e3a0a6f4fd515924c5f038f00d664ef347c9b685e6561334b460e0ce0ce5580aca67f33df56b44b9cdafa4953f4f92843662f3516e1c923f9242388b17dbc6
 SHA512 
d994e1dd85f499eba2847d33870281a4bcaf4466e2c8f7acb065f4f3d5688b93b775c486bc6db571e64d09a3567710b0c816e12555ffb3e3e50f81bc7f5f6be6
+DIST lxcfs-4.0.3.tar.gz 100719 BLAKE2B 
24371b921ad635f97c51ac8406c949e81330ae358b0166c2af295cb1f630594bb72da802aad41971c11303f393fd05bc9f1b109bd4da4953db2c3bb7e5189315
 SHA512 
0aaedfe826d982b9464dfb60fb57c58e34ea6022b8503bc858538b6634dc7d0845f65832d6f814043dbc0677f887e1b559549a8f3865c755970c6b47ba65eb2b

diff --git a/sys-fs/lxcfs/files/lxcfs-4.0.0.confd 
b/sys-fs/lxcfs/files/lxcfs-4.0.0.confd
new file mode 100644
index 00000000000..ba443ee4b1f
--- /dev/null
+++ b/sys-fs/lxcfs/files/lxcfs-4.0.0.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/lxcfs: config file for /etc/init.d/lxcfs
+
+# lxcfs options:
+# -l == calculate container load average instead of displaying host load 
average
+# -u == don't display swap usage to containers
+
+LXCFS_OPTS="-l -u"

diff --git a/sys-fs/lxcfs/files/lxcfs-4.0.0.initd 
b/sys-fs/lxcfs/files/lxcfs-4.0.0.initd
new file mode 100644
index 00000000000..d9368e4f28c
--- /dev/null
+++ b/sys-fs/lxcfs/files/lxcfs-4.0.0.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/bin/lxcfs
+PIDFILE=/run/lxcfs.pid
+
+start() {
+       ebegin "Starting lxcfs."
+       /sbin/modprobe -q fuse
+       install -d /var/lib/lxcfs
+       start-stop-daemon --start \
+                       --pidfile ${PIDFILE} \
+                       --exec ${DAEMON} \
+                       --background \
+                       --make-pidfile \
+                       -- ${LXCFS_OPTS} \
+                       /var/lib/lxcfs
+       eend ${?}
+}
+
+stop() {
+       ebegin "Stopping lxcfs."
+       start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+       eend ${?}
+}

diff --git a/sys-fs/lxcfs/lxcfs-4.0.3.ebuild b/sys-fs/lxcfs/lxcfs-4.0.3.ebuild
new file mode 100644
index 00000000000..1e51a567378
--- /dev/null
+++ b/sys-fs/lxcfs/lxcfs-4.0.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="FUSE filesystem for LXC"
+HOMEPAGE="https://linuxcontainers.org/lxcfs/introduction/ 
https://github.com/lxc/lxcfs/";
+SRC_URI="https://github.com/lxc/lxcfs/archive/${P}.tar.gz";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# Omit all dbus.  Upstream appears to require it because systemd, but
+# lxcfs makes no direct use of dbus.
+RDEPEND="
+       dev-libs/glib:2
+       sys-fs/fuse:0
+"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-apps/help2man"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_prepare() {
+       default
+       ./bootstrap.sh || die "Failed to bootstrap configure files"
+}
+
+src_configure() {
+       # Without the localstatedir the filesystem isn't mounted correctly
+       econf --localstatedir=/var
+}
+
+src_test() {
+       emake tests
+       tests/main.sh || die "Tests failed"
+}
+
+src_install() {
+       default
+
+       dodir /var/lib/lxcfs
+       keepdir /var/lib/lxcfs
+
+       newconfd "${FILESDIR}"/lxcfs-4.0.0.confd lxcfs
+       newinitd "${FILESDIR}"/lxcfs-4.0.0.initd lxcfs
+       systemd_dounit config/init/systemd/lxcfs.service
+}

Reply via email to