summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-02-26 18:02:51 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-02-26 18:02:51 +0000
commit5b9d5ccebabbe7f607ef8e702f95b993d3f7fea5 (patch)
treededd4917a33e4457432c32f2954688ff353138dd /app-emulation
parentOld. (diff)
downloadgentoo-2-5b9d5ccebabbe7f607ef8e702f95b993d3f7fea5.tar.gz
gentoo-2-5b9d5ccebabbe7f607ef8e702f95b993d3f7fea5.tar.bz2
gentoo-2-5b9d5ccebabbe7f607ef8e702f95b993d3f7fea5.zip
Version bump; update warnings (configuration is now back to 0.7.2 syntax); make sure the init script logs warnings, as otherwise you'll never know what's going on.
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/lxc/ChangeLog12
-rw-r--r--app-emulation/lxc/files/lxc.initd6
-rw-r--r--app-emulation/lxc/lxc-0.7.4.ebuild119
3 files changed, 132 insertions, 5 deletions
diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog
index b0c10091e6e8..e30c16140736 100644
--- a/app-emulation/lxc/ChangeLog
+++ b/app-emulation/lxc/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-emulation/lxc
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.19 2010/11/22 10:48:32 flameeyes Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.20 2011/02/26 18:02:51 flameeyes Exp $
+
+*lxc-0.7.4 (26 Feb 2011)
+
+ 26 Feb 2011; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.4.ebuild,
+ files/lxc.initd:
+ Version bump; update warnings (configuration is now back to 0.7.2 syntax);
+ make sure the init script logs warnings, as otherwise you'll never know
+ what's going on.
22 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.7.3-r1.ebuild:
Add a postinst note about the new location, since upstream provides no
diff --git a/app-emulation/lxc/files/lxc.initd b/app-emulation/lxc/files/lxc.initd
index 78acc1400a3e..86bae5f75762 100644
--- a/app-emulation/lxc/files/lxc.initd
+++ b/app-emulation/lxc/files/lxc.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 2010-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd,v 1.2 2010/08/01 21:13:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd,v 1.3 2011/02/26 18:02:51 flameeyes Exp $
CONTAINER=${SVCNAME#*.}
CONFIGFILE=${CONFIGFILE:-/etc/lxc/${CONTAINER}.conf}
@@ -75,7 +75,7 @@ start() {
esac
ebegin "Starting ${CONTAINER}"
- ${setarch} lxc-start -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
+ ${setarch} lxc-start -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
sleep 0.5
# lxc-start -d will _always_ report a correct startup, even if it
diff --git a/app-emulation/lxc/lxc-0.7.4.ebuild b/app-emulation/lxc/lxc-0.7.4.ebuild
new file mode 100644
index 000000000000..d55ea276bed7
--- /dev/null
+++ b/app-emulation/lxc/lxc-0.7.4.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.7.4.ebuild,v 1.1 2011/02/26 18:02:51 flameeyes Exp $
+
+EAPI="2"
+
+MY_P="${P/_/-}"
+
+inherit eutils linux-info versionator base
+
+DESCRIPTION="LinuX Containers userspace utilities"
+HOMEPAGE="http://lxc.sourceforge.net/"
+SRC_URI="http://lxc.sourceforge.net/download/lxc/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="doc examples vanilla"
+
+RDEPEND="sys-libs/libcap"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-sgml-utils )
+ >=sys-kernel/linux-headers-2.6.29"
+
+# For init script, so protect with vanilla, they are not strictly
+# needed.
+RDEPEND="${RDEPEND}
+ vanilla? (
+ sys-apps/util-linux
+ app-misc/pax-utils
+ )"
+
+CONFIG_CHECK="~CGROUPS
+ ~CGROUP_NS ~CPUSETS ~CGROUP_CPUACCT
+ ~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
+ ~CGROUP_SCHED
+
+ ~NAMESPACES
+ ~IPC_NS ~USER_NS ~PID_NS
+
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~CGROUP_FREEZER
+ ~UTS_NS ~NET_NS
+ ~VETH ~MACVLAN"
+
+ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
+
+ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
+
+ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
+ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
+
+ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --bindir=/usr/sbin \
+ --docdir=/usr/share/doc/${PF} \
+ --with-config-path=/etc/lxc \
+ --with-rootfs-path=/usr/lib/lxc/rootfs \
+ --with-linuxdir="${KERNEL_DIR}" \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ || die "configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ dodoc AUTHORS CONTRIBUTING MAINTAINERS \
+ NEWS TODO README doc/FAQ.txt || die "dodoc failed"
+
+ # If the documentation is going to be rebuilt, the Makefiles will
+ # install the man pages themselves; if we're not going to, we
+ # still need to install them, as they are provided with the
+ # tarball in recent versions.
+ if ! use doc; then
+ doman doc/*.{1,5,7} || die
+ fi
+
+ rm -r "${D}"/usr/sbin/lxc-{setcap,ls} \
+ "${D}"/usr/share/man/man1/lxc-ls.1 \
+ || die "unable to remove extraenous content"
+
+ keepdir /etc/lxc /usr/lib/lxc/rootfs
+
+ find "${D}" -name '*.la' -delete
+
+ use vanilla && return 0
+
+ # Gentoo-specific additions!
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ keepdir /var/log/lxc
+}
+
+pkg_postinst() {
+ if ! use vanilla; then
+ elog "There is an init script provided with the package now; no documentation"
+ elog "is currently available though, so please check out /etc/init.d/lxc ."
+ elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
+ elog "to start the container defined into /etc/lxc/configname.conf ."
+ elog "For further information about LXC development see"
+ elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
+ elog ""
+ fi
+ ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
+ ewarn "and previous versions. This means you'll have to use syntax like the following"
+ ewarn ""
+ ewarn " lxc.rootfs = /container"
+ ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
+ ewarn ""
+ ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
+ ewarn "will need sys-apps/yum or dev-util/debootstrap."
+}