Since 1.1.0, guests are started in daemon mode so adapt the systemd service file...
authorMarkos Chandras <hwoarang@gentoo.org>
Sun, 15 Feb 2015 15:38:20 +0000 (15:38 +0000)
committerMarkos Chandras <hwoarang@gentoo.org>
Sun, 15 Feb 2015 15:38:20 +0000 (15:38 +0000)
Package-Manager: portage-2.2.17/cvs/Linux x86_64
Manifest-Sign-Key: 0x09BF4F54C2BA7F3C!

app-emulation/lxc/ChangeLog
app-emulation/lxc/Manifest
app-emulation/lxc/files/lxc_at.service.2 [new file with mode: 0644]
app-emulation/lxc/lxc-1.1.0-r1.ebuild [new file with mode: 0644]

index f186ef0b6942258e7164e85c144cfc9cc57d1cce..0d53b31b753690452005f46105abaef68d6eb658 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for app-emulation/lxc
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.59 2015/02/08 10:06:47 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.60 2015/02/15 15:38:19 hwoarang Exp $
+
+*lxc-1.1.0-r1 (15 Feb 2015)
+
+  15 Feb 2015; Markos Chandras <hwoarang@gentoo.org> +files/lxc_at.service.2,
+  +lxc-1.1.0-r1.ebuild:
+  Since 1.1.0, guests are started in daemon mode so adapt the systemd service
+  file. Also add missing Delegate=yes to facilitate systemd containers. Bug
+  #540076 by Joachim Herb
 
   08 Feb 2015; Markos Chandras <hwoarang@gentoo.org> lxc-1.1.0.ebuild:
   Add another kernel config check for CHECKPOINT_RESTORE
index d1d0da461319950a73598dece93a5a62e6e43ffe..f270151e0557c2f85be7c4fc5d95e44f55578975 100644 (file)
@@ -1,34 +1,14 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
 AUX lxc-1.0.6-bash-completion.patch 1341 SHA256 ddac7cc033a4029f8264d06978321bb33ef7c4fd34c9a44bb1acaaaf1c85d302 SHA512 56b00f77812c0600a8ff7557ef0acf7f50d37bb9f6e5b3641c9a218a53ac64a59785430d0775c1c7980ac39120a2544fd7c28cf39fefc07e7f1558f88b9b5917 WHIRLPOOL b3ff9a377d7d29fa76b6d547f2d1b1621c5ab52e972a9b52389c269f26ba9f43eae6a414db46135be84f1ed91ebea9d6d24cc25da11f493dc86fee088e90bfb4
 AUX lxc.initd.2 3673 SHA256 bb7780168695e934549909c5c7baa7d6cdc92b0e19093a3d04a1313081a832e1 SHA512 25b0474d6f16fcede89a8e17518a658f810cb554eaef10aae3ce1fdd8c8640118aa6375cbee443f0b26e8086eb7c25375ceaaaf29a4110bd779f94b2f4b0d300 WHIRLPOOL 28f56d71b95b26c7f6ad5402a37413a973bc7bdf08fd3963ad192888ae1b49809a56c16009bc6049061d419ecffb1279e153e6ef5acbe06956efca154eae6a01
 AUX lxc.initd.3 3765 SHA256 2a96156f8d07391ae67d2160199d6ae362889438ac5b48c6c241aa02b9f4928e SHA512 fecefad41640c648bc3923952131e97617bc40bfcaa8b7dce2cac752551ca4c9e126c14febe4c56c04ccb3ebd378a91c5a6fe1d3a8cfcf083186b962e4d43b82 WHIRLPOOL ac64b41aed33c08e3baef74fbacb3895a0566837f3e185315792e5a333e35af72c5c784e890cdbf4480515704b017a97c8ba8e1a256032c50da22c3d63b135d4
 AUX lxc_at.service 232 SHA256 0aaf2f362b3ac6aa2b427d47ac4436d46387624b0d8bc4850c5d5b6a7d228711 SHA512 4c3bab4f2cc9aea8b0753dcaf2fd7ed5f1cd7d97d286d6204b2fc17505b6edaac2f536bbda5c1466856311d0e93d75de91dec51e9b0f665d67afedbf40c19170 WHIRLPOOL f6928b4b85e63c38295cabc651b7bd61d2b0bc69ff1850de7cfa8a4f40e4894d94264c262fec7d345488cace49c4283f932739313b975f6862c1aa0ef51e0652
+AUX lxc_at.service.2 291 SHA256 ada7e5fa2728d3f2385bd7410c7263ffd789bd2ae6b3c61c6825ad392f71afce SHA512 367e090d0f22d52e5ffe3b06c4d3699e9c2602ad2cd195c5802dd50f58730146bbfe9b13f052067e2ab39d4d94b8ad93a065dd712c6c9d3381f70bcd46525886 WHIRLPOOL de409239a546314928c838701222825d39d9b0af3a8149459cd8c73e0b0eca274a6d6a82c0ac7eb839d8f636fb5094a880adb5e73a1f6be32d7592a1e902252c
 DIST lxc-1.0.6.tar.gz 561249 SHA256 2aea199a89e2cd946f93406af6c3f62844f36954b79a6991b36d2c33022cb11c SHA512 fe85ccb57865d86704df6b4b79d60f31892785b07dc9dd2580cc6c384c89c29c23516e906b7a16bc03c6582c1fb2432bb8ff11bd17c09efa8f6a035fb41f46b1 WHIRLPOOL 9e77453fbe31523a2e8f39cfaba6f09fef68d00b54549167a0cde56c00934f827f5b4190b9fb64242f36782a9fcda63e6796c35fd47420870c2cee7b9bc0a1c8
 DIST lxc-1.0.7.tar.gz 564985 SHA256 a0b1b09592e076e270dcb3ba004616d9ac3147f9de0b78ca39a30f8956b0a8f2 SHA512 e6ff42a7b41177e1be0d2cd47d4c554565c7fc35355f3aa8aeba00d4adc7a0f364ecd060ddb6c97b2fe5968329c4e4c4b3cb022bffd2da145f30880f077264a8 WHIRLPOOL f07e5e9efb8ff394aa9cdd6c3e725b453c8137ec221399cbf910d57dbc9268fc84e7227273567792821415dc14e774942b76a58a1a478de57d5c82e545702000
 DIST lxc-1.1.0.tar.gz 592543 SHA256 216e806f7e18e5bfbc782493a9e44fc255f24a587d6faee94cda848a0b949155 SHA512 160da88d6dc96cd9f0679f948bfed057c024adcd459fa4b79e872d12284fa3774ac33a13923c6e150072886a371ccfcdf7ab2c4587efa7f6175fc91a67525c4a WHIRLPOOL 2caf81418850ea8b1ecf25b25e799895563ecf1819f32310fcbb4efe88f711eafe2bcb16a0d3b8ee59072c770a5520b4df90a5962215b932e68a4705c4a56d61
 EBUILD lxc-1.0.6-r1.ebuild 5888 SHA256 c8470a673c846599a66c7aab372a9a551a9b2732d35d5fe4142a8ca385c70a51 SHA512 e84b347a0a39eee2c398d89d4cb217b1224f19eab86647d3a479a85b0eeb16f1375606c3c52ce55febe704e2e923890cc77e42940cc968654a60a4ea71a4a792 WHIRLPOOL 7a000c88099ec1dd5deffae80ce9905a274ce1c81e263ca5f12e9b943b455ca66109ea0b3ec9dfb490e326ac09b6e8912786e1138df3a9fe842eca2c9c636092
 EBUILD lxc-1.0.7.ebuild 5917 SHA256 889147f7dbceb408618a81e75789b6f00b24f19b9a7377da74ebfbd1565781d2 SHA512 f88a95ea399ae754202daf570082b3275c464e60a7f6f49485746509bb0a78b44fd43a67dde966ee4123da15d6697524ef46102950396b61ef1eafcecc0cf313 WHIRLPOOL b225c9b00afc6d697d68078f85e244fb3ff8c5e692bb1fae5a4c961ce426852ad612c40ad25e89bd12309c6b0c1c482a6cdd7812356c1f3c7950d07d90141a13
+EBUILD lxc-1.1.0-r1.ebuild 5733 SHA256 5c325823910f1044194ceccacf963e7397ca3f24f1cc86bc1908fedff12c2a4d SHA512 5a8b688b2ae520cad3a1a5978d26fe2ca9d60ce9331321da8c8a2d05a441ecf5531d85fdee37576feb3964f50bce4a1b94bc3b8d7ecd23d5548375667321b89b WHIRLPOOL cb799344a704e6e0b0a00f43890d447f085c146bd0c9c2abfad32e9f90323c61b02fcdc884330e400033bcf306f41d3b1d5aa9174a81fcdb7247d48fce4f4265
 EBUILD lxc-1.1.0.ebuild 5920 SHA256 69fe56ae8da67fcca434192088a91af500eeaeb5ad1afbd2e0b284a24a61e308 SHA512 fda24963b4fbdd06ab6166b13649ea59b82ca4acfe6a29d1ed64778277fb1e3a99cd5c2d1d62336882271040d22b9ae2653836b1de03da8ee39138d64169cf0f WHIRLPOOL 654e9879af5bcadc75d296cdc1e2fc9ed3a7941181e776d0016cc7b71a6ecc3547d34c6795463d49224e052f424dfed7318104d0e7b82ee8efafe663d6d7bb0d
-MISC ChangeLog 12423 SHA256 2cecb05c02059ff059bb5edbc8528fc04e29725e5fdca714a35d974bd21c0969 SHA512 11c3a38a5c360d0a3e7a256434ca3e6657953155ac04b78817e2ee4921becc941c041f86acfc0bb476ddea572fa8e20dabf3f48340a92c6bcad48176f0fc0360 WHIRLPOOL 3fb6c2ca92de7b836a022059d9cf71380485187a2af36eeee780f2f94f705f8dd894851c776be3de818c285867664b705a917b8ce0e3d6cafa389f2ed62287a8
+MISC ChangeLog 12735 SHA256 dc39002b6618693d4edd9a1d20576e2c4273e887aa72f1c0565bdfdf514d462e SHA512 b62f04061a1360579dc8b05572c2cec5c763013a263031e98e4d1569718b3373345644e1351df9843c70ec84a0fd8aef7a08a37d14e6c4a283d8f684b9f3d02e WHIRLPOOL 1e7bc59d10d4fbfd3e6081e4f3994628e9931b99d7767ab890c68e1ae3568b5957addd28642fa3b1eaa53f05c928870777465f84b18705f538b5e50b9a79be18
 MISC metadata.xml 602 SHA256 9499be0ed7a430f9b8492a9db1dbebd9eff3c495962882c6c6e35c96f3cbc5d6 SHA512 fa7af1390b3e60c04dfa085654d68e121b476ed1e92e367d9b9aab2aabd6b8e8b028db9704161c1da25b3b62fce268ef503eea229da37a3f09fb1235c78847fb WHIRLPOOL 9760914ec9365c7c5f904fee3282b942b37b7afc723cc00694ddf0705c052f32b5328eff26517d3e668676ffe92f6a117abe25e5e5373deda2adea61c607fc15
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
-
-iQJ8BAEBCABmBQJU1zVHXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNTVDNDczOUYzRjJEMTRGNDRGMzU2RkMw
-OUJGNEY1NEMyQkE3RjNDAAoJEAm/T1TCun88ijAP/0GSYwv2q06BgEI24RNgvSgr
-3rr9eQR0oAcmvIhnOEFslw9Ls3lmOXQdCuHotW6RxtgnxTU85EBSVqxEFceuF49c
-oI0HRlIuh6OBtw2d+ig6a0HehjULw6LaCIljTQlUKTg2QuYyH7Ami0YL57R7L7Ix
-pWA9tKqvK6mhHkpL1ESdq/H/FNXgNyQLoU8pexkpiDpLLrtVjcHKFMWLHX8/BRuu
-cd9U4/K102AyMLPH7MDY/QUrMxkVU3n/QHMN1uJITdl29yCHi1APpc8/ECvl8XRz
-Ul2CEN/GcVACF0L3YjjwhN8W5+qrfICCUS2bxlJhtkMnIMTMT0HsRKvVGbSQCStq
-hf7dVhjzUMpSx2SHlAifZnvGheEkhwzEAFuRWJJA0fVW29U05/cUseBadhy1p7yu
-AO1/rc9zyLDeEF45azonskitnrkhbPJvLFZqB95UR0EBnPuGcfwf9C+SQgArrKjN
-vHuwYVL110OQT9KDnkZYNTVJU4PFodRg/t5g2bXGK47E7/G2w0JSArc7YvHHBg9H
-z49PuqVUd/oKpSkX3H5DrIkT8Jy0b2fjuRqPvsa/MJtioDfa5FDD1Z+5DrCLSn1E
-kaqo0Obtfj1slzhSKHq9r/vHsPYAEFPr03d4sxQ7cskx/TeTIj5UaeyMFT/j9K+1
-KdLIgFeKuWSxw1Bi5DhV
-=DEIC
------END PGP SIGNATURE-----
diff --git a/app-emulation/lxc/files/lxc_at.service.2 b/app-emulation/lxc/files/lxc_at.service.2
new file mode 100644 (file)
index 0000000..9b92ec6
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Linux Container %I
+After=network.target
+
+[Service]
+Restart=always
+ExecStartPre=/usr/libexec/lxc/lxc-devsetup
+ExecStart=/usr/sbin/lxc-start -n %i -F
+ExecReload=/usr/sbin/lxc-restart -n %i
+ExecStop=/usr/sbin/lxc-stop -n %i
+Delegate=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-emulation/lxc/lxc-1.1.0-r1.ebuild b/app-emulation/lxc/lxc-1.1.0-r1.ebuild
new file mode 100644 (file)
index 0000000..c1a5531
--- /dev/null
@@ -0,0 +1,187 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-1.1.0-r1.ebuild,v 1.1 2015/02/15 15:38:19 hwoarang Exp $
+
+EAPI="5"
+
+MY_P="${P/_/-}"
+PYTHON_COMPAT=( python{3_2,3_3,3_4} )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools bash-completion-r1 distutils-r1 eutils linux-info versionator flag-o-matic systemd
+
+DESCRIPTION="LinuX Containers userspace utilities"
+HOMEPAGE="https://linuxcontainers.org/"
+SRC_URI="https://github.com/lxc/lxc/archive/${MY_P}.tar.gz"
+
+KEYWORDS="~amd64"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="cgmanager doc examples lua python seccomp"
+
+RDEPEND="net-libs/gnutls
+       sys-libs/libcap
+       cgmanager? ( app-admin/cgmanager )
+       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-process/criu
+       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
+
+       ~NETLINK_DIAG ~PACKET_DIAG
+       ~INET_UDP_DIAG ~INET_TCP_DIAG
+       ~UNIX_DIAG ~CHECKPOINT_RESTORE
+
+       ~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_NETLINK_DIAG="CONFIG_NETLINK_DIAG:  needed for lxc-checkpoint"
+ERROR_PACKET_DIAG="CONFIG_PACKET_DIAG:  needed for lxc-checkpoint"
+ERROR_INET_UDP_DIAG="CONFIG_INET_UDP_DIAG:  needed for lxc-checkpoint"
+ERROR_INET_TCP_DIAG="CONFIG_INET_TCP_DIAG:  needed for lxc-checkpoint"
+ERROR_UNIX_DIAG="CONFIG_UNIX_DIAG:  needed for lxc-checkpoint"
+ERROR_CHECKPOINT_RESTORE="CONFIG_CHECKPOINT_RESTORE:  needed for lxc-checkpoint"
+
+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)
+
+S="${WORKDIR}/${PN}-${MY_P}"
+
+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}"/${PN}-1.0.6-bash-completion.patch
+
+       eautoreconf
+}
+
+src_configure() {
+       append-flags -fno-strict-aliasing
+
+       # I am not sure about the --with-rootfs-path
+       # /var/lib/lxc is probably more appropriate than
+       # /usr/lib/lxc.
+       econf \
+               --localstatedir=/var \
+               --bindir=/usr/sbin \
+               --docdir=/usr/share/doc/${PF} \
+               --with-config-path=/etc/lxc     \
+               --with-rootfs-path=/var/lib/lxc/rootfs \
+               --with-distro=gentoo \
+               --with-runtime-path=/run \
+               --disable-apparmor \
+               $(use_enable cgmanager) \
+               $(use_enable doc) \
+               $(use_enable examples) \
+               $(use_enable lua) \
+               --disable-python \
+               $(use_enable seccomp)
+}
+
+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 /var/lib/lxc/rootfs /var/log/lxc
+
+       find "${D}" -name '*.la' -delete
+
+       # 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
+       # Remember to compare our systemd unit file with the upstream one
+       # config/init/systemd/lxc.service.in
+       systemd_newunit "${FILESDIR}"/${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 ""
+}