Gentoo Archives: gentoo-commits

From: Erik Mackdanz <stasibear@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lxcfs/files/, sys-fs/lxcfs/
Date: Tue, 11 Oct 2016 03:39:28
Message-Id: 1476157114.ff7322fad07652b900900d7a0edb1e95892951bf.stasibear@gentoo
1 commit: ff7322fad07652b900900d7a0edb1e95892951bf
2 Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 11 03:38:34 2016 +0000
4 Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 11 03:38:34 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff7322fa
7
8 sys-fs/lxcfs: Bump to 2.0.4
9
10 Package-Manager: portage-2.3.1
11
12 sys-fs/lxcfs/Manifest | 1 +
13 .../lxcfs/files/lxcfs-2.0.4-fusermount-path.patch | 11 ++++
14 sys-fs/lxcfs/files/lxcfs-2.0.4.initd | 27 ++++++++
15 sys-fs/lxcfs/lxcfs-2.0.4.ebuild | 71 ++++++++++++++++++++++
16 4 files changed, 110 insertions(+)
17
18 diff --git a/sys-fs/lxcfs/Manifest b/sys-fs/lxcfs/Manifest
19 index b8b1bc2..16a455d 100644
20 --- a/sys-fs/lxcfs/Manifest
21 +++ b/sys-fs/lxcfs/Manifest
22 @@ -4,3 +4,4 @@ DIST lxcfs-2.0.0_beta2.tar.gz 44421 SHA256 4eacbbb51031ebd0776f050d7279b2076f7b4
23 DIST lxcfs-2.0.1.tar.gz 49004 SHA256 4731a4d6939e32f3503560ee953e840d16e6abbb4fc7993c92cc1179e40d4f84 SHA512 3801a1d643b1f4478e702f615c8f9f9bc7070272ef2cca6c22d944a680f6829f0b14b7d193cc5c046f9f1a0a258bd5de68456d884a00d48f0f2639c66975cb23 WHIRLPOOL cbbad76d61a05dbb4750cd8218e1946d6b8b2e798f0a4071c6e706ee6d88a0e36dd9fcc8664c9cb0e3f8bdbac9ba6c548ce0a0829a4bf79d0965f18ee207bb90
24 DIST lxcfs-2.0.2.tar.gz 49185 SHA256 f3e9c7d53f25c2e71745dbef4c1b96d301fac12cb041329f3bbe438d7d7a4eda SHA512 358ea0d56d02a45cf93799663e067dc14fa6056f63b9047a7c7691ff0ff0ea44312be19baa0438887708de0fe85e10599e6c0178fbcbe483a6aaa56318c46fdd WHIRLPOOL 590ca502c2f72016b58d7fdb43db94ee1fa6f1af5fe9bd7d3b33d0f97fbff766b5adb22356d12f53601f070acb48d7645faa25128168094c8d42db9b39fa0263
25 DIST lxcfs-2.0.3.tar.gz 51078 SHA256 742a6cc463dc66179c334ebca4c3276888ef27a564e5e47212b60c655a811a72 SHA512 14caa2d6598529610ef6bd4c1d6f4d4598e8dc1378a3ee35ea7a1582c11150c896facc80216e67526384995891d9cc1244796860b790ecfc8bf735cc2cd80923 WHIRLPOOL f2de2438e4e521db5135ca81daceccdc1d3820907de9d37842c9bafa112cc416774cb2efe27b815cecccc26e55617c7eb9f5d076df5423ab354747605fa90643
26 +DIST lxcfs-2.0.4.tar.gz 52639 SHA256 9af8199dba2837542ede6e50489100220472241e4b355b685e66c9a72bbcf81a SHA512 1c701fbd60799a1f7ad7e809c2e52ef0d26ed44e96c2c0376d3c4eb203aafb99ddcaff015f3fa8cc9c1219449210f6bf93844cc568de3a9f55cb8801328cec90 WHIRLPOOL 1ac966bab786b00a236225e1856c46fa9d419e42853edcd1181fc3f43d54becb60435fa0679a6a0f838a5edeb920205e3baa734118a4b5d9587e547fd63e3704
27
28 diff --git a/sys-fs/lxcfs/files/lxcfs-2.0.4-fusermount-path.patch b/sys-fs/lxcfs/files/lxcfs-2.0.4-fusermount-path.patch
29 new file mode 100644
30 index 00000000..61d3494
31 --- /dev/null
32 +++ b/sys-fs/lxcfs/files/lxcfs-2.0.4-fusermount-path.patch
33 @@ -0,0 +1,11 @@
34 +--- /config/init/systemd/lxcfs.service.orig 2016-07-11 01:18:57.688074437 +0000
35 ++++ /config/init/systemd/lxcfs.service 2016-07-11 01:19:48.516477185 +0000
36 +@@ -7,7 +7,7 @@
37 + ExecStart=/usr/bin/lxcfs /var/lib/lxcfs/
38 + KillMode=process
39 + Restart=on-failure
40 +-ExecStopPost=-/bin/fusermount -u /var/lib/lxcfs
41 ++ExecStopPost=-/usr/bin/fusermount -u /var/lib/lxcfs
42 + Delegate=yes
43 +
44 + [Install]
45
46 diff --git a/sys-fs/lxcfs/files/lxcfs-2.0.4.initd b/sys-fs/lxcfs/files/lxcfs-2.0.4.initd
47 new file mode 100644
48 index 00000000..7436eee
49 --- /dev/null
50 +++ b/sys-fs/lxcfs/files/lxcfs-2.0.4.initd
51 @@ -0,0 +1,27 @@
52 +#!/sbin/openrc-run
53 +# Copyright 1999-2016 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +# $Id$
56 +
57 +DAEMON=/usr/bin/lxcfs
58 +PIDFILE=/run/lxcfs.pid
59 +
60 +start() {
61 + ebegin "Starting lxcfs"
62 +
63 + start-stop-daemon --start \
64 + --pidfile ${PIDFILE} \
65 + --exec ${DAEMON} \
66 + --background \
67 + --make-pidfile \
68 + -- \
69 + -f -o allow_other /var/lib/lxcfs
70 +
71 + eend $?
72 +}
73 +
74 +stop() {
75 + ebegin "Stopping lxcfs"
76 + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
77 + eend $?
78 +}
79
80 diff --git a/sys-fs/lxcfs/lxcfs-2.0.4.ebuild b/sys-fs/lxcfs/lxcfs-2.0.4.ebuild
81 new file mode 100644
82 index 00000000..39c20c4
83 --- /dev/null
84 +++ b/sys-fs/lxcfs/lxcfs-2.0.4.ebuild
85 @@ -0,0 +1,71 @@
86 +# Copyright 1999-2016 Gentoo Foundation
87 +# Distributed under the terms of the GNU General Public License v2
88 +# $Id$
89 +
90 +EAPI=6
91 +
92 +inherit systemd vcs-snapshot versionator
93 +DESCRIPTION="FUSE filesystem for LXC"
94 +HOMEPAGE="https://linuxcontainers.org/lxcfs/introduction/"
95 +LICENSE="Apache-2.0"
96 +SLOT="0"
97 +
98 +if [[ ${PV} == "9999" ]] ; then
99 + EGIT_REPO_URI="https://github.com/lxc/lxcfs.git"
100 + EGIT_BRANCH="master"
101 + inherit git-r3
102 + SRC_URI=""
103 + KEYWORDS=""
104 +else
105 + # e.g. upstream is 2.0.0.beta2, we want 2.0.0_beta2
106 + UPSTREAM_PV=$(replace_version_separator 3 '.' )
107 + SRC_URI="https://github.com/lxc/lxcfs/archive/${PN}-${UPSTREAM_PV}.tar.gz -> ${P}.tar.gz"
108 + KEYWORDS="~amd64"
109 +fi
110 +
111 +IUSE="pam"
112 +
113 +# Omit all dbus. Upstream appears to require it because systemd, but
114 +# lxcfs makes no direct use of dbus.
115 +RDEPEND="
116 + dev-libs/glib:2
117 + sys-fs/fuse
118 + virtual/pam
119 +"
120 +DEPEND="
121 + sys-apps/help2man
122 + ${RDEPEND}
123 +"
124 +PATCHES="${FILESDIR}/${P}-fusermount-path.patch"
125 +
126 +src_prepare() {
127 + default
128 + ./bootstrap.sh || die "Failed to bootstrap configure files"
129 +}
130 +
131 +src_configure() {
132 + use pam || pamflag="--with-pamdir=none"
133 +
134 + # Without the localstatedir the filesystem isn't mounted correctly
135 + econf --localstatedir=/var ${pamflag}
136 +}
137 +
138 +# Test suite fails for me
139 +# src_test() {
140 +# emake tests
141 +# tests/main.sh || die "Tests failed"
142 +# }
143 +
144 +src_install() {
145 + default
146 + dodir /var/lib/lxcfs
147 + newinitd "${FILESDIR}"/${P}.initd lxcfs
148 + systemd_dounit config/init/systemd/lxcfs.service
149 +}
150 +
151 +pkg_preinst() {
152 + # In an upgrade situation merging /var/lib/lxcfs (an empty dir)
153 + # fails because that is a live mountpoint when the service is
154 + # running. It's unnecessary anyway so skip the action.
155 + [[ -d ${ROOT}/var/lib/lxcfs ]] && rm -rf ${D}/var
156 +}