public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/betagarden:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
@ 2014-06-08  8:45 Justin Lecher
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2014-06-08  8:45 UTC (permalink / raw
  To: gentoo-commits

commit:     c23bc69c9cb9a3d2aacf0462f78b90676ba1e743
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  8 08:45:43 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun  8 08:45:43 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=c23bc69c

app-emulation/lxc: Drop installation of non existing TODO file; import tree changes

Package-Manager: portage-2.2.10

---
 app-emulation/lxc/ChangeLog            |   6 +-
 app-emulation/lxc/files/lxc.initd.2    | 132 +++++++++++++++++++++++++++++++++
 app-emulation/lxc/files/lxc_at.service |  12 +++
 app-emulation/lxc/lxc-9999.ebuild      | 109 +++++++++++++++++----------
 app-emulation/lxc/metadata.xml         |  10 +++
 5 files changed, 229 insertions(+), 40 deletions(-)

diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog
index 73ba9fd..e6e8494 100644
--- a/app-emulation/lxc/ChangeLog
+++ b/app-emulation/lxc/ChangeLog
@@ -1,7 +1,11 @@
 # ChangeLog for app-emulation/lxc
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  08 Jun 2014; Justin Lecher <jlec@gentoo.org> lxc-9999.ebuild,
+  +files/lxc.initd.2, +files/lxc_at.service, metadata.xml:
+  Drop installation of non existing TODO file; import tree changes
+
 *lxc-9999 (25 Dec 2013)
 
   25 Dec 2013; Justin Lecher <jlec@gentoo.org> +lxc-9999.ebuild, +metadata.xml:

diff --git a/app-emulation/lxc/files/lxc.initd.2 b/app-emulation/lxc/files/lxc.initd.2
new file mode 100644
index 0000000..554019a
--- /dev/null
+++ b/app-emulation/lxc/files/lxc.initd.2
@@ -0,0 +1,132 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.6 2012/11/14 02:15:10 flameeyes Exp $
+
+CONTAINER=${SVCNAME#*.}
+
+lxc_get_configfile() {
+	if [ -f "/etc/lxc/${CONTAINER}.conf" ]; then
+		echo "/etc/lxc/${CONTAINER}.conf"
+	elif [ -f "/etc/lxc/${CONTAINER}/config" ]; then
+		echo "/etc/lxc/${CONTAINER}/config"
+	else
+		eerror "Unable to find a suitable configuration file."
+		eerror "If you set up the container in a non-standard"
+		eerror "location, please set the CONFIGFILE variable."
+		return 1
+	fi
+}
+
+[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
+
+lxc_get_var() {
+	awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
+}
+
+checkconfig() {
+	if [ ${CONTAINER} = ${SVCNAME} ]; then
+		eerror "You have to create an init script for each container:"
+		eerror " ln -s lxc /etc/init.d/lxc.container"
+		return 1
+	fi
+
+	# no need to output anything, the function takes care of that.
+	[ -z "${CONFIGFILE}" ] && return 1
+
+	utsname=$(lxc_get_var lxc.utsname)
+	if [ ${CONTAINER} != ${utsname} ]; then
+	    eerror "You should use the same name for the service and the"
+	    eerror "container. Right now the container is called ${utsname}"
+	    return 1
+	fi
+}
+
+depend() {
+	# be quiet, since we have to run depend() also for the
+	# non-muxed init script, unfortunately.
+	checkconfig 2>/dev/null || return 0
+
+	config ${CONFIGFILE}
+	need localmount
+
+	# find out which network interface the container is linked to,
+	# and then require that to be enabled, so that the
+	# dependencies are correct.
+	netif=$(lxc_get_var lxc.network.link)
+
+	# when the network type is set to phys, we can make use of a
+	# network service (for instance to set it up before we disable
+	# the net_admin capability), but we might also not set it up
+	# at all on the host and leave the net_admin capable service
+	# to take care of it.
+	nettype=$(lxc_get_var lxc.network.type)
+
+	if [ -n "${netif}" ]; then
+	    case "${nettype}" in
+		phys)	use net.${netif} ;;
+		*)	need net.${netif} ;;
+	    esac
+	fi
+}
+
+start() {
+	checkconfig || return 1
+	rm /var/log/lxc/${CONTAINER}.log
+
+	rootpath=$(lxc_get_var lxc.rootfs)
+
+	# Check the format of our init and the chroot's init, to see
+	# if we have to use linux32 or linux64; always use setarch
+	# when required, as that makes it easier to deal with
+	# x32-based containers.
+	case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
+		EM_X86_64)	setarch=linux64;;
+		EM_386)		setarch=linux32;;
+	esac
+
+	ebegin "Starting ${CONTAINER}"
+	env -i ${setarch} $(type -p 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
+	# failed, so rather than trust that, check that the cgroup exists.
+	[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
+	eend $?
+}
+
+stop() {
+	checkconfig || return 1
+
+
+	if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
+	    ewarn "${CONTAINER} doesn't seem to be started."
+	    return 0
+	fi
+
+	init_pid=$(lxc-info -n ${CONTAINER} --pid | awk '{ print $2 }')
+
+	if [ "${init_pid}" = "-1" ]; then
+	    ewarn "${CONTAINER} doesn't seem to be running."
+	    return 0
+	fi
+
+	ebegin "Shutting down system in ${CONTAINER}"
+	kill -PWR ${init_pid}
+	eend $?
+
+	TIMEOUT=${TIMEOUT:-30}
+	i=0
+	while [ -n "$(pgrep -P ${init_pid})" -a $i -lt ${TIMEOUT} ]; do
+		sleep 1
+		i=$(expr $i + 1)
+	done
+
+	if [ -n "${missingprocs}" ]; then
+		ewarn "Something failed to properly shut down in ${CONTAINER}"
+	fi
+
+	ebegin "Stopping ${CONTAINER}"
+	lxc-stop -n ${CONTAINER}
+	eend $?
+}

diff --git a/app-emulation/lxc/files/lxc_at.service b/app-emulation/lxc/files/lxc_at.service
new file mode 100644
index 0000000..1ef4497
--- /dev/null
+++ b/app-emulation/lxc/files/lxc_at.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Linux Container %I
+After=network.target
+
+[Service]
+Restart=always
+ExecStart=/usr/sbin/lxc-start -n %i
+ExecReload=/usr/sbin/lxc-restart -n %i
+ExecStop=/usr/sbin/lxc-stop -n %i
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-emulation/lxc/lxc-9999.ebuild b/app-emulation/lxc/lxc-9999.ebuild
index 0f2cdcd..5adf1b5 100644
--- a/app-emulation/lxc/lxc-9999.ebuild
+++ b/app-emulation/lxc/lxc-9999.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0-r1.ebuild,v 1.3 2013/09/10 05:22:55 maekke Exp $
 
 EAPI=5
 
-AUTOTOOLS_AUTORECONF=true
-AUTOTOOLS_IN_SOURCE_BUILD=1
+MY_P="${P/_/-}"
+PYTHON_COMPAT=( python{3_2,3_3,3_4} )
 
-inherit autotools-utils eutils git-2 linux-info versionator flag-o-matic
+inherit autotools distutils-r1 eutils git-r3 linux-info versionator flag-o-matic systemd
 
 DESCRIPTION="LinuX Containers userspace utilities"
 HOMEPAGE="http://lxc.sourceforge.net/"
@@ -17,18 +17,22 @@ EGIT_REPO_URI="https://github.com/lxc/lxc.git"
 LICENSE="LGPL-3"
 SLOT="0"
 KEYWORDS=""
-IUSE="examples"
+IUSE="doc examples lua python seccomp"
 
-RDEPEND="sys-libs/libcap"
+RDEPEND="
+	net-libs/gnutls
+	sys-libs/libcap
+	lua? ( >=dev-lang/lua-5.1 )
+	python? ( ${PYTHON_DEPS} )
+	seccomp? ( sys-libs/libseccomp )"
 
 DEPEND="${RDEPEND}
-	app-text/docbook-sgml-utils
+	doc? ( app-text/docbook-sgml-utils )
 	>=sys-kernel/linux-headers-3.2"
 
 RDEPEND="${RDEPEND}
 	sys-apps/util-linux
 	app-misc/pax-utils
-	>=sys-apps/openrc-0.9.9.1
 	virtual/awk"
 
 CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
@@ -54,8 +58,6 @@ CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
 	~!GRKERNSEC_CHROOT_CAPS
 "
 
-#S="${WORKDIR}/${MY_P}"
-
 ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES:	needed for pts inside container"
 
 ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER:	needed to freeze containers"
@@ -76,45 +78,64 @@ ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT	some GRSEC features
 ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD	some GRSEC features make LXC unusable see postinst notes"
 ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS	some GRSEC features make LXC unusable see postinst notes"
 
-DOCS=(AUTHORS CONTRIBUTING MAINTAINERS TODO README doc/FAQ.txt)
+DOCS=( AUTHORS CONTRIBUTING MAINTAINERS README doc/FAQ.txt )
 
-src_prepare() {
-	sed \
-		-e "/PKG_CHECK_MODULES/s:python3:python-3.3:g" \
-		-i configure.ac || die
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
-	autotools-utils_src_prepare
+src_prepare() {
+	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
+	if [[ -n ${BACKPORTS} ]]; then
+		epatch "${WORKDIR}"/patches/*
+	fi
+	if use python; then
+		python_setup
+		# We will handle python on our own
+		echo > "${S}/src/python-${PN}/Makefile.am";
+	fi
+
+	eautoreconf
 }
 
 src_configure() {
 	append-flags -fno-strict-aliasing
 
-	local myeconfargs=(
-		--localstatedir=/var
-		--bindir=/usr/sbin
-		--docdir=/usr/share/doc/${PF}
-		--disable-rpath
-		--enable-doc
-		--with-config-path=/etc/lxc
-		--with-rootfs-path=/usr/lib/lxc/rootfs
-		--with-log-path=/var/log/lxc
-		--with-distro=gentoo
-		--disable-apparmor
-		--disable-selinux
-		--disable-lua
-		--enable-python
-#		--enable-seccomp
-		--disable-seccomp
-		$(use_enable examples)
-		)
-	autotools-utils_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 \
+		$(use_enable doc) \
+		--disable-apparmor \
+		$(use_enable examples) \
+		$(use_enable lua) \
+		$(use_enable python)
+}
+
+python_compile() {
+	distutils-r1_python_compile build_ext -I ../ -L ../${PN}
+}
+
+src_compile() {
+	default
+
+	if use python; then
+		pushd "${S}/src/python-${PN}" > /dev/null
+		distutils-r1_src_compile
+		popd > /dev/null
+	fi
 }
 
-_src_install() {
+src_install() {
 	default
 
-#	rm -r "${D}"/usr/sbin/lxc-setcap \
-#		|| die "unable to remove lxc-setcap"
+	if use python; then
+		pushd "${S}/src/python-lxc" > /dev/null
+		# Unset DOCS. This has been handled by the default target
+		unset DOCS
+		distutils-r1_src_install
+		popd > /dev/null
+	fi
 
 	keepdir /etc/lxc /usr/lib/lxc/rootfs /var/log/lxc
 
@@ -122,7 +143,17 @@ _src_install() {
 
 	# Gentoo-specific additions!
 	newinitd "${FILESDIR}/${PN}.initd.2" ${PN}
-	keepdir /var/log/lxc
+	# lxc-devsetup script
+	exeinto /usr/libexec/${PN}
+	doexe config/init/systemd/${PN}-devsetup
+	# Use that script with the systemd service (Similar to upstream
+	# Makefile.am
+	cp "${FILESDIR}"/${PN}_at.service ${PN}_at.service
+	sed -i \
+		"/Restart=always/a ExecStartPre=/usr/libexec/${PN}/${PN}-devsetup" \
+		${PN}_at.service \
+		|| die "Failed to add ${PN}-devsetup to the systemd service file"
+	systemd_newunit ${PN}_at.service "lxc@.service"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/lxc/metadata.xml b/app-emulation/lxc/metadata.xml
index a759be0..7b3a2fe 100644
--- a/app-emulation/lxc/metadata.xml
+++ b/app-emulation/lxc/metadata.xml
@@ -4,4 +4,14 @@
   <maintainer>
     <email>maintainer-wanted@gentoo.org</email>
   </maintainer>
+  <use>
+    <flag name="seccomp">Use seccomp syscall filters using <pkg>sys-libs/libseccomp</pkg></flag>
+    <flag name="vanilla">
+      Avoid adding Gentoo Linux-specific modifications, which include
+      the custom init script. This is present as a flag to avoid
+      forcing dependencies over users that might not want have them
+      around as they use LXC in contexts where the init script is not
+      useful.
+    </flag>
+  </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/betagarden:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
@ 2020-03-27  1:09 Sebastian Pipping
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Pipping @ 2020-03-27  1:09 UTC (permalink / raw
  To: gentoo-commits

commit:     e38f5eda660d26f01dfbfdedf645f3af05a7aeab
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 27 00:30:28 2020 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Fri Mar 27 01:09:13 2020 +0000
URL:        https://gitweb.gentoo.org/proj/betagarden.git/commit/?id=e38f5eda

app-emulation/lxc: Remove due to dead PYTHON_COMPAT

Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>

 app-emulation/lxc/ChangeLog                        |  17 --
 .../lxc/files/lxc-9999-bash-completion.patch       |  39 -----
 app-emulation/lxc/files/lxc.initd.3                | 136 ---------------
 app-emulation/lxc/files/lxc_at.service             |  12 --
 app-emulation/lxc/lxc-9999.ebuild                  | 183 ---------------------
 app-emulation/lxc/metadata.xml                     |  13 --
 6 files changed, 400 deletions(-)

diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog
deleted file mode 100644
index e843b97..0000000
--- a/app-emulation/lxc/ChangeLog
+++ /dev/null
@@ -1,17 +0,0 @@
-# ChangeLog for app-emulation/lxc
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-
-  18 Nov 2014; Justin Lecher <jlec@gentoo.org> lxc-9999.ebuild,
-  +files/lxc-9999-bash-completion.patch, -files/lxc.initd.2,
-  +files/lxc.initd.3, metadata.xml:
-  Import tree changes
-
-  08 Jun 2014; Justin Lecher <jlec@gentoo.org> lxc-9999.ebuild,
-  +files/lxc.initd.2, +files/lxc_at.service, metadata.xml:
-  Drop installation of non existing TODO file; import tree changes
-
-*lxc-9999 (25 Dec 2013)
-
-  25 Dec 2013; Justin Lecher <jlec@gentoo.org> +lxc-9999.ebuild, +metadata.xml:
-  Live ebuild
-

diff --git a/app-emulation/lxc/files/lxc-9999-bash-completion.patch b/app-emulation/lxc/files/lxc-9999-bash-completion.patch
deleted file mode 100644
index 942c12f..0000000
--- a/app-emulation/lxc/files/lxc-9999-bash-completion.patch
+++ /dev/null
@@ -1,39 +0,0 @@
- config/bash/Makefile.am | 8 ++++----
- config/bash/lxc.in      | 2 --
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/config/bash/Makefile.am b/config/bash/Makefile.am
-index b1768c9..3fbbe8e 100644
---- a/config/bash/Makefile.am
-+++ b/config/bash/Makefile.am
-@@ -2,12 +2,12 @@ EXTRA_DIST = lxc
- 
- if ENABLE_BASH
- install-bash:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
--	$(INSTALL_DATA) lxc $(DESTDIR)$(sysconfdir)/bash_completion.d/
-+	$(MKDIR_P) $(DESTDIR)$(datarootdir)/bash-completion/completions/
-+	$(INSTALL_DATA) lxc $(DESTDIR)$(datarootdir)/bash-completion/completions/
- 
- uninstall-bash:
--	rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/lxc
--	rmdir $(DESTDIR)$(sysconfdir)/bash_completion.d/ || :
-+	rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/lxc
-+	rmdir $(DESTDIR)$(datarootdir)/bash-completion/ || :
- 
- install-data-local: install-bash
- uninstall-local: uninstall-bash
-diff --git a/config/bash/lxc.in b/config/bash/lxc.in
-index 18fd48f..8fff725 100644
---- a/config/bash/lxc.in
-+++ b/config/bash/lxc.in
-@@ -1,4 +1,3 @@
--have lxc-start && {
-     _lxc_names() {
-         COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
-     }
-@@ -100,4 +99,3 @@ have lxc-start && {
- 
-     complete -o default -F _lxc-generic-o lxc-clone
-     complete -o default -F _lxc-generic-o lxc-start-ephemeral
--}

diff --git a/app-emulation/lxc/files/lxc.initd.3 b/app-emulation/lxc/files/lxc.initd.3
deleted file mode 100644
index 463710b..0000000
--- a/app-emulation/lxc/files/lxc.initd.3
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-CONTAINER=${SVCNAME#*.}
-
-lxc_get_configfile() {
-	if [ -f "/etc/lxc/${CONTAINER}.conf" ]; then
-		echo "/etc/lxc/${CONTAINER}.conf"
-	elif [ -f "/etc/lxc/${CONTAINER}/config" ]; then
-		echo "/etc/lxc/${CONTAINER}/config"
-	else
-		eerror "Unable to find a suitable configuration file."
-		eerror "If you set up the container in a non-standard"
-		eerror "location, please set the CONFIGFILE variable."
-		return 1
-	fi
-}
-
-[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
-
-lxc_get_var() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
-}
-
-lxc_get_net_link_type() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
-		$1 == "lxc.network.type" {_type=$2;}
-		$1 == "lxc.network.link" {_link=$2;}
-		{if(_link != "" && _type != ""){
-			printf("%s:%s\n", _link, _type );
-			_link=""; _type="";
-		}; }' <${CONFIGFILE}
-}
-
-checkconfig() {
-	if [ ${CONTAINER} = ${SVCNAME} ]; then
-		eerror "You have to create an init script for each container:"
-		eerror " ln -s lxc /etc/init.d/lxc.container"
-		return 1
-	fi
-
-	# no need to output anything, the function takes care of that.
-	[ -z "${CONFIGFILE}" ] && return 1
-
-	utsname=$(lxc_get_var lxc.utsname)
-	if [ ${CONTAINER} != ${utsname} ]; then
-	    eerror "You should use the same name for the service and the"
-	    eerror "container. Right now the container is called ${utsname}"
-	    return 1
-	fi
-}
-
-depend() {
-	# be quiet, since we have to run depend() also for the
-	# non-muxed init script, unfortunately.
-	checkconfig 2>/dev/null || return 0
-
-	config ${CONFIGFILE}
-	need localmount
-
-	local _x _if
-	for _x in $(lxc_get_net_link_type); do
-		_if=${_x%:*}
-		case "${_x##*:}" in
-			# when the network type is set to phys, we can make use of a
-			# network service (for instance to set it up before we disable
-			# the net_admin capability), but we might also not set it up
-			# at all on the host and leave the net_admin capable service
-			# to take care of it.
-			phys)	use net.${_if} ;;
-			*)	need net.${_if} ;;
-		esac
-	done
-}
-
-start() {
-	checkconfig || return 1
-	rm /var/log/lxc/${CONTAINER}.log
-
-	rootpath=$(lxc_get_var lxc.rootfs)
-
-	# Check the format of our init and the chroot's init, to see
-	# if we have to use linux32 or linux64; always use setarch
-	# when required, as that makes it easier to deal with
-	# x32-based containers.
-	case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
-		EM_X86_64)	setarch=linux64;;
-		EM_386)		setarch=linux32;;
-	esac
-
-	ebegin "Starting ${CONTAINER}"
-	env -i ${setarch} $(type -p 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
-	# failed, so rather than trust that, check that the cgroup exists.
-	[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
-	eend $?
-}
-
-stop() {
-	checkconfig || return 1
-
-
-	if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
-	    ewarn "${CONTAINER} doesn't seem to be started."
-	    return 0
-	fi
-
-	init_pid=$(lxc-info -n ${CONTAINER} --pid | awk '{ print $2 }')
-
-	if [ -z "${init_pid}" ]; then
-	    ewarn "${CONTAINER} doesn't seem to be running."
-	    return 0
-	fi
-
-	ebegin "Shutting down system in ${CONTAINER}"
-	kill -PWR ${init_pid}
-	eend $?
-
-	TIMEOUT=${TIMEOUT:-30}
-	i=0
-	while [ -n "$(pgrep -P ${init_pid})" -a $i -lt ${TIMEOUT} ]; do
-		sleep 1
-		i=$(expr $i + 1)
-	done
-
-	if [ -n "${missingprocs}" ]; then
-		ewarn "Something failed to properly shut down in ${CONTAINER}"
-	fi
-
-	ebegin "Stopping ${CONTAINER}"
-	lxc-stop -n ${CONTAINER}
-	eend $?
-}

diff --git a/app-emulation/lxc/files/lxc_at.service b/app-emulation/lxc/files/lxc_at.service
deleted file mode 100644
index 1ef4497..0000000
--- a/app-emulation/lxc/files/lxc_at.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Linux Container %I
-After=network.target
-
-[Service]
-Restart=always
-ExecStart=/usr/sbin/lxc-start -n %i
-ExecReload=/usr/sbin/lxc-restart -n %i
-ExecStop=/usr/sbin/lxc-stop -n %i
-
-[Install]
-WantedBy=multi-user.target

diff --git a/app-emulation/lxc/lxc-9999.ebuild b/app-emulation/lxc/lxc-9999.ebuild
deleted file mode 100644
index fbf4b6a..0000000
--- a/app-emulation/lxc/lxc-9999.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-MY_P="${P/_/-}"
-PYTHON_COMPAT=( python3_{4,5} )
-DISTUTILS_OPTIONAL=1
-
-inherit autotools bash-completion-r1 distutils-r1 eutils git-r3 linux-info versionator flag-o-matic systemd
-
-DESCRIPTION="LinuX Containers userspace utilities"
-HOMEPAGE="http://lxc.sourceforge.net/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/lxc/lxc.git"
-
-LICENSE="LGPL-3"
-SLOT="0"
-KEYWORDS=""
-IUSE="doc examples lua python seccomp"
-
-RDEPEND="
-	net-libs/gnutls
-	sys-libs/libcap
-	lua? ( >=dev-lang/lua-5.1 )
-	python? ( ${PYTHON_DEPS} )
-	seccomp? ( sys-libs/libseccomp )"
-
-DEPEND="${RDEPEND}
-	doc? ( app-text/docbook-sgml-utils )
-	>=sys-kernel/linux-headers-3.2"
-
-RDEPEND="${RDEPEND}
-	sys-apps/util-linux
-	app-misc/pax-utils
-	virtual/awk"
-
-CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
-	~CPUSETS ~CGROUP_CPUACCT
-	~RESOURCE_COUNTERS
-	~CGROUP_SCHED
-
-	~NAMESPACES
-	~IPC_NS ~USER_NS ~PID_NS
-
-	~DEVPTS_MULTIPLE_INSTANCES
-	~CGROUP_FREEZER
-	~UTS_NS ~NET_NS
-	~VETH ~MACVLAN
-
-	~POSIX_MQUEUE
-	~!NETPRIO_CGROUP
-
-	~!GRKERNSEC_CHROOT_MOUNT
-	~!GRKERNSEC_CHROOT_DOUBLE
-	~!GRKERNSEC_CHROOT_PIVOT
-	~!GRKERNSEC_CHROOT_CHMOD
-	~!GRKERNSEC_CHROOT_CAPS
-"
-
-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"
-
-ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE:	needed for lxc-execute command"
-
-ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP:	as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
-
-ERROR_GRKERNSEC_CHROOT_MOUNT=":CONFIG_GRKERNSEC_CHROOT_MOUNT	some GRSEC features make LXC unusable see postinst notes"
-ERROR_GRKERNSEC_CHROOT_DOUBLE=":CONFIG_GRKERNSEC_CHROOT_DOUBLE	some GRSEC features make LXC unusable see postinst notes"
-ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT	some GRSEC features make LXC unusable see postinst notes"
-ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD	some GRSEC features make LXC unusable see postinst notes"
-ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS	some GRSEC features make LXC unusable see postinst notes"
-
-DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt )
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-src_prepare() {
-	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
-	if [[ -n ${BACKPORTS} ]]; then
-		epatch "${WORKDIR}"/patches/*
-	fi
-
-	epatch "${FILESDIR}"/${P}-bash-completion.patch
-
-	eautoreconf
-}
-
-src_configure() {
-	append-flags -fno-strict-aliasing
-
-	econf \
-		--localstatedir=/var \
-		--bindir=/usr/sbin \
-		--docdir=/usr/share/doc/${PF} \
-		--with-config-path=/etc/lxc	\
-		--with-rootfs-path=/usr/lib/lxc/rootfs \
-		$(use_enable doc) \
-		--disable-apparmor \
-		$(use_enable examples) \
-		$(use_enable lua) \
-		--disable-python
-}
-
-python_compile() {
-	distutils-r1_python_compile build_ext -I ../ -L ../${PN}
-}
-
-src_compile() {
-	default
-
-	if use python; then
-		pushd "${S}/src/python-${PN}" > /dev/null
-		distutils-r1_src_compile
-		popd > /dev/null
-	fi
-}
-
-src_install() {
-	default
-
-	mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
-	bashcomp_alias ${PN}-start \
-		${PN}-{attach,cgroup,clone,console,create,destroy,device,execute,freeze,info,monitor,snapshot,start-ephemeral,stop,unfreeze,wait}
-
-	if use python; then
-		pushd "${S}/src/python-lxc" > /dev/null
-		# Unset DOCS. This has been handled by the default target
-		unset DOCS
-		distutils-r1_src_install
-		popd > /dev/null
-	fi
-
-	keepdir /etc/lxc /usr/lib/lxc/rootfs /var/log/lxc
-
-	prune_libtool_files
-
-	# Gentoo-specific additions!
-	# Use initd.3 per #517144
-	newinitd "${FILESDIR}/${PN}.initd.3" ${PN}
-
-	# lxc-devsetup script
-	exeinto /usr/libexec/${PN}
-	doexe config/init/systemd/${PN}-devsetup
-	# Use that script with the systemd service (Similar to upstream
-	# Makefile.am
-	cp "${FILESDIR}"/${PN}_at.service ${PN}_at.service || die
-	sed -i \
-		"/Restart=always/a ExecStartPre=/usr/libexec/${PN}/${PN}-devsetup" \
-		${PN}_at.service \
-		|| die "Failed to add ${PN}-devsetup to the systemd service file"
-	systemd_newunit ${PN}_at.service "lxc@.service"
-}
-
-pkg_postinst() {
-	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 ""
-	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."
-	ewarn ""
-	ewarn "Some GrSecurity settings in relation to chroot security will cause LXC not to"
-	ewarn "work, while others will actually make it much more secure. Please refer to"
-	ewarn "Diego Elio Pettenò's weblog at http://blog.flameeyes.eu/tag/lxc for further"
-	ewarn "details."
-}

diff --git a/app-emulation/lxc/metadata.xml b/app-emulation/lxc/metadata.xml
deleted file mode 100644
index c6babac..0000000
--- a/app-emulation/lxc/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-  <maintainer type="project">
-    <email>maintainer-wanted@gentoo.org</email>
-  </maintainer>
-  <use>
-    <flag name="seccomp">Use seccomp syscall filters using <pkg>sys-libs/libseccomp</pkg></flag>
-  </use>
-  <upstream>
-    <remote-id type="sourceforge">lxc</remote-id>
-  </upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-27  1:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-27  1:09 [gentoo-commits] proj/betagarden:master commit in: app-emulation/lxc/files/, app-emulation/lxc/ Sebastian Pipping
  -- strict thread matches above, loose matches on Subject: below --
2014-06-08  8:45 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox