[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: fb00aa98de17dba7ffb4ef5fed6608af8a6968d8 Author: Joonas Niilola gentoo org> AuthorDate: Sun May 9 09:27:30 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Mon May 10 05:01:28 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb00aa98 app-emulation/lxc: handle kernels with CAP_SETFCAP Closes: https://bugs.gentoo.org/789012 Signed-off-by: Joonas Niilola gentoo.org> ...lxc-4.0.9-handle-kernels-with-CAP_SETFCAP.patch | 93 ++ .../lxc/{lxc-4.0.9.ebuild => lxc-4.0.9-r1.ebuild} | 1 + 2 files changed, 94 insertions(+) diff --git a/app-emulation/lxc/files/lxc-4.0.9-handle-kernels-with-CAP_SETFCAP.patch b/app-emulation/lxc/files/lxc-4.0.9-handle-kernels-with-CAP_SETFCAP.patch new file mode 100644 index 000..6fba3c4154a --- /dev/null +++ b/app-emulation/lxc/files/lxc-4.0.9-handle-kernels-with-CAP_SETFCAP.patch @@ -0,0 +1,93 @@ +From 91ad9b94bcd964adfbaa8d84d8f39304d39835d0 Mon Sep 17 00:00:00 2001 +From: Christian Brauner +Date: Thu, 6 May 2021 18:16:45 +0200 +Subject: [PATCH] conf: handle kernels with CAP_SETFCAP + +LXC is being very clever and sometimes maps the caller's uid into the +child userns. This means that the caller can technically write fscaps +that are valid in the ancestor userns (which can be a security issue in +some scenarios) so newer kernels require CAP_SETFCAP to do this. Until +newuidmap/newgidmap are updated to account for this simply write the +mapping directly in this case. + +Cc: stable-4.0 +Signed-off-by: Christian Brauner +--- + src/lxc/conf.c | 25 - + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index 72e21b5300..f388946970 100644 +--- a/src/lxc/conf.c b/src/lxc/conf.c +@@ -2978,6 +2978,9 @@ static int lxc_map_ids_exec_wrapper(void *args) + return -1; + } + ++static struct id_map *find_mapped_hostid_entry(const struct lxc_list *idmap, ++ unsigned id, enum idtype idtype); ++ + int lxc_map_ids(struct lxc_list *idmap, pid_t pid) + { + int fill, left; +@@ -2991,12 +2994,22 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid) + char mapbuf[STRLITERALLEN("new@idmap") + STRLITERALLEN(" ") + + INTTYPE_TO_STRLEN(pid_t) + STRLITERALLEN(" ") + + LXC_IDMAPLEN] = {0}; +- bool had_entry = false, use_shadow = false; ++ bool had_entry = false, maps_host_root = false, use_shadow = false; + int hostuid, hostgid; + + hostuid = geteuid(); + hostgid = getegid(); + ++ /* ++ * Check whether caller wants to map host root. ++ * Due to a security fix newer kernels require CAP_SETFCAP when mapping ++ * host root into the child userns as you would be able to write fscaps ++ * that would be valid in the ancestor userns. Mapping host root should ++ * rarely be the case but LXC is being clever in a bunch of cases. ++ */ ++ if (find_mapped_hostid_entry(idmap, 0, ID_TYPE_UID)) ++ maps_host_root = true; ++ + /* If new{g,u}idmap exists, that is, if shadow is handing out subuid +* ranges, then insist that root also reserve ranges in subuid. This +* will protected it by preventing another user from being handed the +@@ -3014,7 +3027,9 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid) + else if (!gidmap) + WARN("newgidmap is lacking necessary privileges"); + +- if (uidmap > 0 && gidmap > 0) { ++ if (maps_host_root) { ++ INFO("Caller maps host root. Writing mapping directly"); ++ } else if (uidmap > 0 && gidmap > 0) { + DEBUG("Functional newuidmap and newgidmap binary found"); + use_shadow = true; + } else { +@@ -4229,14 +4244,14 @@ static struct id_map *mapped_nsid_add(const struct lxc_conf *conf, unsigned id, + return retmap; + } + +-static struct id_map *find_mapped_hostid_entry(const struct lxc_conf *conf, ++static struct id_map *find_mapped_hostid_entry(const struct lxc_list *idmap, + unsigned id, enum idtype idtype) + { + struct id_map *map; + struct lxc_list *it; + struct id_map *retmap = NULL; + +- lxc_list_for_each (it, &conf->id_map) { ++ lxc_list_for_each (it, idmap) { + map = it->elem; + if (map->idtype != idtype) + continue; +@@ -4265,7 +4280,7 @@ static struct id_map *mapped_hostid_add(const struct lxc_conf *conf, uid_t id, + return NULL; + + /* Reuse existing mapping. */ +- tmp = find_mapped_hostid_entry(conf, id, type); ++ tmp = find_mapped_hostid_entry(&conf->id_map, id, type); + if (tmp) { + memcpy(entry, tmp, sizeof(*entry)); + } else { diff --git a/app-emulation/lxc/lxc-4.0.9.ebuild b/app-emulation/lxc/lxc-4.0.9-r1.ebuild similarity index 98% rena
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: b81652e7f5f0a438d3f9617d4d7103908873da9d Author: Joonas Niilola gentoo org> AuthorDate: Mon May 18 13:31:25 2020 + Commit: Joonas Niilola gentoo org> CommitDate: Mon May 18 13:39:10 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b81652e7 app-emulation/lxc: bump to 4.0.2 - delete all static libraries. Closes: https://bugs.gentoo.org/723532 Signed-off-by: Joonas Niilola gentoo.org> app-emulation/lxc/Manifest | 1 + app-emulation/lxc/files/lxc_at.service.4.0.0 | 15 +++ app-emulation/lxc/lxc-4.0.2.ebuild | 133 +++ 3 files changed, 149 insertions(+) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index 8887f39f223..294553b27b9 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -2,3 +2,4 @@ DIST lxc-2.1.1.tar.gz 1378640 BLAKE2B 5fca516540a886729434579ff99acf3baa06977fa0 DIST lxc-3.0.3.tar.gz 1263371 BLAKE2B 77d0f593119654f570ae748d305e86c27117fd4e9ec7bdab1110f5356afb4a00d81c105ae9757d9da5827f6883a4a5d8ddc43b5b6e56a2927ed990e757f7c7b6 SHA512 cdc411364153d7ed494bab604260f5cbdfd5bd7734a59af970b3198c7b3cb340b6736856a2189d5989e169945a817ac8b531bc3ab62217a4285dd63a851f9c8a DIST lxc-3.1.0.tar.gz 1277877 BLAKE2B e114855659c8199378d14bc23f667ce1927bb32c55d336fa9c222a60198da51e7ded6aeb6d1c89cbeb1e9edc101e424a847be1e4a2330d2a0bceda52d0df5e30 SHA512 706cee9bc8ac57300574b59d728437e41baa4eb16c68f8548142e53b4e13679ef6698df30a4fbf8617e4f07338f898464e9f818e80d32648fe9717370dcbbb20 DIST lxc-4.0.1.tar.gz 1352119 BLAKE2B 0146091c7704397c097f74bfec1e30c0fc542f1cdd58d4359157f01921e916529280ec96c89c8822ab4051e489216a9518f93a630cc324c7ec5b23a3d1f71386 SHA512 e4c0129c9351a46f5bd37d908c69adc2a30359d9d879f11d75860691bf106f08f4fe205f49e511986a33f0b0498b5f613712496893b3e56286a78a341bbaf365 +DIST lxc-4.0.2.tar.gz 1352667 BLAKE2B 2ecc076bacb9bb1c2a808422f7b2e0cbfc74bf3bec6ca89ea58eb6ef4a414353c2e58163bff17b3304beb39f4980d10f54365f739645c1581bfca9f6079bf57c SHA512 0de6c1f9649d161579b45fc28a735f703c4498eff9c588462b838220aeab73f91921db628f77bc461eff38c7583cac10a38951263181956e2d33412a406f3ef3 diff --git a/app-emulation/lxc/files/lxc_at.service.4.0.0 b/app-emulation/lxc/files/lxc_at.service.4.0.0 new file mode 100644 index 000..b354bc53e08 --- /dev/null +++ b/app-emulation/lxc/files/lxc_at.service.4.0.0 @@ -0,0 +1,15 @@ +[Unit] +Description=Linux Container %i +After=network.target +Wants=lxcfs.service + +[Service] +Type=forking +ExecStart=/usr/bin/lxc-start -d -n %i -p /run/lxc-%i.pid +PIDFile=/run/lxc-%i.pid +ExecStop=/usr/bin/lxc-stop -n %i +Delegate=true +TasksMax=32768 + +[Install] +WantedBy=multi-user.target diff --git a/app-emulation/lxc/lxc-4.0.2.ebuild b/app-emulation/lxc/lxc-4.0.2.ebuild new file mode 100644 index 000..d3eae71be36 --- /dev/null +++ b/app-emulation/lxc/lxc-4.0.2.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools bash-completion-r1 linux-info flag-o-matic pam readme.gentoo-r1 systemd + +DESCRIPTION="LinuX Containers userspace utilities" +HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"; +SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz"; + +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +LICENSE="LGPL-3" +SLOT="0" +IUSE="apparmor examples pam seccomp selinux +templates" + +RDEPEND="app-misc/pax-utils + net-libs/gnutls + sys-apps/util-linux + sys-libs/libcap + virtual/awk + pam? ( sys-libs/pam ) + seccomp? ( sys-libs/libseccomp ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + >=app-text/docbook-sgml-utils-0.6.14-r2 + >=sys-kernel/linux-headers-3.2 + apparmor? ( sys-apps/apparmor )" +PDEPEND="templates? ( app-emulation/lxc-templates )" + +CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE + ~CPUSETS ~CGROUP_CPUACCT + ~CGROUP_SCHED + + ~NAMESPACES + ~IPC_NS ~USER_NS ~PID_NS + + ~CGROUP_FREEZER + ~UTS_NS ~NET_NS + ~VETH ~MACVLAN + + ~POSIX_MQUEUE + ~!NETPRIO_CGROUP" + +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." + +DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt ) + +pkg_setup() { + linux-info_pkg_setup +} + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.0-bash-completion.patch + "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854 +) +
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 681c0364b0b3877c811e0db49bf4c55d7103d1cd Author: Alexey Shvetsov gentoo org> AuthorDate: Mon Apr 22 14:48:41 2019 + Commit: Alexey Shvetsov gentoo org> CommitDate: Mon Apr 22 14:48:41 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681c0364 app-emulation/lxc: Fix init.d Closes: https://bugs.gentoo.org/675540 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Alexey Shvetsov gentoo.org> app-emulation/lxc/files/lxc.initd.8| 131 + .../lxc/{lxc-3.1.0.ebuild => lxc-3.1.0-r1.ebuild} | 4 +- 2 files changed, 133 insertions(+), 2 deletions(-) diff --git a/app-emulation/lxc/files/lxc.initd.8 b/app-emulation/lxc/files/lxc.initd.8 new file mode 100644 index 000..727f6d504fb --- /dev/null +++ b/app-emulation/lxc/files/lxc.initd.8 @@ -0,0 +1,131 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +CONTAINER=${SVCNAME#*.} + +LXC_PATH=`lxc-config lxc.lxcpath` + +lxc_get_configfile() { + if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then + echo "${LXC_PATH}/${CONTAINER}.conf" + elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then + echo "${LXC_PATH}/${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;} + match($1, /lxc\.net\.[[:digit:]]+\.type/) {_type=$2;} + match($1, /lxc\.net\.[[:digit:]]+\.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.uts.name) + if [ -z "$utsname" ] ; then + utsname=$(lxc_get_var lxc.utsname) + fi + + 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 + use lxcfs + + 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 -f /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 LXC container ${CONTAINER}" + env -i ${setarch} $(which lxc-start) -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log + sleep 1 + + # lxc-start -d will _always_ report a correct startup, even if it + # failed, so rather than trust that, check that the cgroup exists. + # fix for LXC 3.1 + + STATE="$(lxc-info -s -H ${CONTAINER})" + [ "$STATE" = "RUNNING" ] + + eend $? +} + +stop() { + checkconfig ||
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 0d591c9d3e741c4567665b4e62e2205dbe96730c Author: Virgil Dupras gentoo org> AuthorDate: Mon Jul 30 22:54:30 2018 + Commit: Virgil Dupras gentoo org> CommitDate: Mon Jul 30 22:54:30 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d591c9d app-emulation/lxc: remove old Package-Manager: Portage-2.3.43, Repoman-2.3.10 app-emulation/lxc/Manifest | 1 - app-emulation/lxc/files/lxc_at.service | 12 --- app-emulation/lxc/lxc-3.0.0.ebuild | 170 - 3 files changed, 183 deletions(-) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index 0d31b16fc38..e8d8e7473f5 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -1,3 +1,2 @@ DIST lxc-2.1.1.tar.gz 1378640 BLAKE2B 5fca516540a886729434579ff99acf3baa06977fa0e0b6f24dbf15094626335fc073597d308276e3dd20e27ceabf1477cc8e99d1fd24cf50b9aed2720b887b69 SHA512 2989d57acddfe091adcf8031721c3c9a2f8eff5476bd6155366b76ea7511e0f6120e669276e056e3963863e0f0acf3b095d44c36fa6652e67c197671f28cbdd4 -DIST lxc-3.0.0.tar.gz 1233316 BLAKE2B ba726a07f48b1d32366012c8d885a853e33f88d8c45c910b061d9deecf472d940f7d45a1e742c8194517ba3231e1875a49bbf303b2c3fd2c9ece33b941670bb7 SHA512 21372e6fe4d38e2cf54707fab4133137793deff1dd500ed7ed02c03bbaa809de56c7490971594cddbdcb2b96f0c03ab5dfb43a8582a584598a12c5943b7ca490 DIST lxc-3.0.1.tar.gz 1239920 BLAKE2B 7be668c11d7211540fe7e2fb6318d38eac0d8d493914f4705d097fca4c004a8d2191609d02bd9e1d9204c3c0b9ea937084d3f9050fc841f6d68067af3d19 SHA512 f51b0844f61f64d4efc530454eae1fa499f7f1b908bd3b40d7031e7f311a402893a7504bddbc53f2ef9da2b3154d1b047fc4d876b99f0d487d7c79de64eea505 diff --git a/app-emulation/lxc/files/lxc_at.service b/app-emulation/lxc/files/lxc_at.service deleted file mode 100644 index 1ef44977530..000 --- 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-3.0.0.ebuild b/app-emulation/lxc/lxc-3.0.0.ebuild deleted file mode 100644 index 4122c2e8599..000 --- a/app-emulation/lxc/lxc-3.0.0.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools bash-completion-r1 linux-info flag-o-matic systemd readme.gentoo-r1 pam - -DESCRIPTION="LinuX Containers userspace utilities" -HOMEPAGE="https://linuxcontainers.org/"; -SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz"; - -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" - -LICENSE="LGPL-3" -SLOT="0" -IUSE="examples pam seccomp selinux" - -RDEPEND=" - net-libs/gnutls - sys-libs/libcap - pam? ( virtual/pam ) - seccomp? ( sys-libs/libseccomp ) - selinux? ( sys-libs/libselinux )" - -DEPEND="${RDEPEND} - >=app-text/docbook-sgml-utils-0.6.14-r2 - >=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 - ~CGROUP_SCHED - - ~NAMESPACES - ~IPC_NS ~USER_NS ~PID_NS - - ~NETLINK_DIAG ~PACKET_DIAG - ~INET_UDP_DIAG ~INET_TCP_DIAG - ~UNIX_DIAG ~CHECKPOINT_RESTORE - - ~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 - ~!GRKERNSEC_PROC - ~!GRKERNSEC_SYSFS_RESTRICT -" - -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_GRKERN
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 0efdce03862201ff917e5102de893d29a9c304a8 Author: Matthias Maier gentoo org> AuthorDate: Thu Apr 26 01:37:33 2018 + Commit: Matthias Maier gentoo org> CommitDate: Thu Apr 26 01:37:33 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0efdce03 app-emulation/lxc: drop obsolete versions Package-Manager: Portage-2.3.31, Repoman-2.3.9 app-emulation/lxc/Manifest | 4 - .../lxc/files/lxc-1.0.11-bash-completion.patch | 27 --- app-emulation/lxc/files/lxc-1.0.11-major.patch | 64 --- .../lxc/files/lxc-1.0.8-bash-completion.patch | 35 app-emulation/lxc/lxc-1.0.11.ebuild| 184 -- app-emulation/lxc/lxc-1.0.8.ebuild | 188 -- app-emulation/lxc/lxc-2.0.7.ebuild | 201 --- app-emulation/lxc/lxc-2.0.9.ebuild | 212 - 8 files changed, 915 deletions(-) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index b6edf39a003..b823f03c02c 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -1,6 +1,2 @@ -DIST lxc-1.0.11.tar.gz 850645 BLAKE2B 1a8eff91d970d3160d5ca7338f4e4d68c722a277a804396e7c30b34dbf4aeccc0609982940bb660992880078167cdf3382a55af404b3e52ebe8cd8af104b1efc SHA512 5537e61a286cfce3c763b81eec625538c796ea1e8f5e94c5a28fc8964762c8c0efa7983a188d521bf3420a42569d7124e6587950bc90b79583fa42cc8e2f8f74 -DIST lxc-1.0.8.tar.gz 575127 BLAKE2B 246ac7a2b4306c52a741b2f763bcc81dfb27942ef93d6a786ed2ea010c646f5a2388407d26425387b8a819cacae927c8512995bf19b11d610e1887ea6470 SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a -DIST lxc-2.0.7.tar.gz 792557 BLAKE2B e5f1e6d8961938200e116527fab8ce341cf285826afdccac88f4bae65ffd649a406dac7555024557f38c4b415a59cd3b5fb255f1dbf015ce01d4975bed3b1c80 SHA512 eb48dc800ce43d2f4d46e0cecc4d0a714b3e22c6a4975776b54d17d1d20d5a1411e6b605215282f1f77286ddf22b61c80b86b83752191fc18023894ef7a1c44d -DIST lxc-2.0.9.tar.gz 1333044 BLAKE2B 44d405bf933923a020a6aadca9d84cfce04db72ac0ef1a727c83eca8121683419a2e74849f08fb4773010002928b424840fa9ec19ab619e420b1dfb5156de5c6 SHA512 c7c595fbc6163e500700b756ae30c96b70d41b9bf297a609622b5d5b8431171ed8db70fa8368c3b9650c86452820e9da7f329f9186ae75c24a7adb15d5826102 DIST lxc-2.1.1.tar.gz 1378640 BLAKE2B 5fca516540a886729434579ff99acf3baa06977fa0e0b6f24dbf15094626335fc073597d308276e3dd20e27ceabf1477cc8e99d1fd24cf50b9aed2720b887b69 SHA512 2989d57acddfe091adcf8031721c3c9a2f8eff5476bd6155366b76ea7511e0f6120e669276e056e3963863e0f0acf3b095d44c36fa6652e67c197671f28cbdd4 DIST lxc-3.0.0.tar.gz 1233316 BLAKE2B ba726a07f48b1d32366012c8d885a853e33f88d8c45c910b061d9deecf472d940f7d45a1e742c8194517ba3231e1875a49bbf303b2c3fd2c9ece33b941670bb7 SHA512 21372e6fe4d38e2cf54707fab4133137793deff1dd500ed7ed02c03bbaa809de56c7490971594cddbdcb2b96f0c03ab5dfb43a8582a584598a12c5943b7ca490 diff --git a/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch b/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch deleted file mode 100644 index d8d0bac55a7..000 --- a/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/config/bash/lxc.in b/config/bash/lxc.in -index 344d5cb2..f051eaae 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/configure.ac b/configure.ac -index 2ea88c19..f52d772a 100644 a/configure.ac -+++ b/configure.ac -@@ -429,7 +429,7 @@ AM_CONDITIONAL([ENABLE_BASH], [test "x$enable_bash" = "xyes"]) - AM_COND_IF([ENABLE_BASH], - [AC_MSG_CHECKING([bash completion directory]) - PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , -- bashcompdir="${sysconfdir}/bash_completion.d") -+ bashcompdir="$datadir/bash-completion/completions") - AC_MSG_RESULT([$bashcompdir]) - AC_SUBST(bashcompdir) - ]) diff --git a/app-emulation/lxc/files/lxc-1.0.11-major.patch b/app-emulation/lxc/files/lxc-1.0.11-major.patch deleted file mode 100644 index 8a3c2b2bd6d..000 --- a/app-emulation/lxc/files/lxc-1.0.11-major.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c -index 59eda7e4..44b71d4c 100644 a/src/lxc/bdev.c -+++ b/src/lxc/bdev.c -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - - #include "lxc.h" - #include "config.h" -@@ -58,9 +59,6 @@ - #ifdef MAJOR_IN_MKDEV - #include - #endif --#ifdef MAJOR_IN_SYSMACROS --#include --#endif - - #ifndef BLKGETSIZE64 - #define BLKGETSIZE64 _IOR(0x12,114,size_t) -diff --git a/src/lxc/con
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 25812fb8449c5b693f492d2fcfce53262de48ec3 Author: Matthias Maier gentoo org> AuthorDate: Fri Dec 15 02:46:59 2017 + Commit: Matthias Maier gentoo org> CommitDate: Fri Dec 15 02:47:03 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25812fb8 app-emulation/lxc: put terribly old ebuild back in place Package-Manager: Portage-2.3.18, Repoman-2.3.6 RepoMan-Options: --force app-emulation/lxc/Manifest | 1 + .../lxc/files/lxc-1.0.8-bash-completion.patch | 35 app-emulation/lxc/lxc-1.0.8.ebuild | 188 + 3 files changed, 224 insertions(+) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index 265bac0824f..34820bb75ee 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -1,3 +1,4 @@ DIST lxc-1.0.11.tar.gz 850645 BLAKE2B 1a8eff91d970d3160d5ca7338f4e4d68c722a277a804396e7c30b34dbf4aeccc0609982940bb660992880078167cdf3382a55af404b3e52ebe8cd8af104b1efc SHA512 5537e61a286cfce3c763b81eec625538c796ea1e8f5e94c5a28fc8964762c8c0efa7983a188d521bf3420a42569d7124e6587950bc90b79583fa42cc8e2f8f74 +DIST lxc-1.0.8.tar.gz 575127 BLAKE2B 246ac7a2b4306c52a741b2f763bcc81dfb27942ef93d6a786ed2ea010c646f5a2388407d26425387b8a819cacae927c8512995bf19b11d610e1887ea6470 SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a DIST lxc-2.0.7.tar.gz 792557 BLAKE2B e5f1e6d8961938200e116527fab8ce341cf285826afdccac88f4bae65ffd649a406dac7555024557f38c4b415a59cd3b5fb255f1dbf015ce01d4975bed3b1c80 SHA512 eb48dc800ce43d2f4d46e0cecc4d0a714b3e22c6a4975776b54d17d1d20d5a1411e6b605215282f1f77286ddf22b61c80b86b83752191fc18023894ef7a1c44d DIST lxc-2.0.8.tar.gz 1308705 BLAKE2B 044e82e182f4ca325da237b888ff16b0469eb11ecdab2ed55f5e9372e84d816ec30edee28ef1473aaa7211a9d9aee0d26f45f169320551e45098da9de7a74104 SHA512 ed9fd47e92007f433695cffea659180866a5ac2778712f4eb13b6629bb18292589f5b674b734853ca196ba1f6d38bdbf3cc8a2bb28e25d3540b06b945fcf9096 diff --git a/app-emulation/lxc/files/lxc-1.0.8-bash-completion.patch b/app-emulation/lxc/files/lxc-1.0.8-bash-completion.patch new file mode 100644 index 000..e9e0e6c98df --- /dev/null +++ b/app-emulation/lxc/files/lxc-1.0.8-bash-completion.patch @@ -0,0 +1,35 @@ +Index: lxc-lxc-1.0.8/config/bash/Makefile.am +=== +--- lxc-lxc-1.0.8.orig/config/bash/Makefile.am lxc-lxc-1.0.8/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 +Index: lxc-lxc-1.0.8/config/bash/lxc.in +=== +--- lxc-lxc-1.0.8.orig/config/bash/lxc.in lxc-lxc-1.0.8/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/lxc-1.0.8.ebuild b/app-emulation/lxc/lxc-1.0.8.ebuild new file mode 100644 index 000..1c55e591610 --- /dev/null +++ b/app-emulation/lxc/lxc-1.0.8.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +MY_P="${P/_/-}" +PYTHON_COMPAT=( python3_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 ~arm ~arm64 ppc64 x86" + +LICENSE="LGPL-3" +SLOT="0" +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_
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 10f4222c4de2373a926f90a621dff33929b4ddd4 Author: Virgil Dupras hardcoded net> AuthorDate: Fri Dec 15 00:22:23 2017 + Commit: Matthias Maier gentoo org> CommitDate: Fri Dec 15 01:54:49 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10f4222c app-emulation/lxc: Bump to 1.0.11 Closes: https://bugs.gentoo.org/634866 Closes: https://github.com/gentoo/gentoo/pull/6551 Package-Manager: Portage-2.3.13, Repoman-2.3.3 Signed-off-by: Matthias Maier gentoo.org> app-emulation/lxc/Manifest | 1 + .../lxc/files/lxc-1.0.11-bash-completion.patch | 27 +++ app-emulation/lxc/files/lxc-1.0.11-major.patch | 64 +++ app-emulation/lxc/lxc-1.0.11.ebuild| 184 + 4 files changed, 276 insertions(+) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index c1ef825e830..b425522f07c 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -1,3 +1,4 @@ +DIST lxc-1.0.11.tar.gz 850645 BLAKE2B 1a8eff91d970d3160d5ca7338f4e4d68c722a277a804396e7c30b34dbf4aeccc0609982940bb660992880078167cdf3382a55af404b3e52ebe8cd8af104b1efc SHA512 5537e61a286cfce3c763b81eec625538c796ea1e8f5e94c5a28fc8964762c8c0efa7983a188d521bf3420a42569d7124e6587950bc90b79583fa42cc8e2f8f74 DIST lxc-1.0.8.tar.gz 575127 BLAKE2B 246ac7a2b4306c52a741b2f763bcc81dfb27942ef93d6a786ed2ea010c646f5a2388407d26425387b8a819cacae927c8512995bf19b11d610e1887ea6470 SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a DIST lxc-2.0.3.tar.gz 772448 BLAKE2B 2336edea328a0ac033f2183386a2907ee8a088032b089c073ae8bbce6f54c55788288be85fe35a0b547976d5868abc31b27ffe5a5049e8769350c2b48dd9310c SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef DIST lxc-2.0.4.tar.gz 775634 BLAKE2B 9699ae598c3dfddf458f62ca154a4ec75c3510d8dc0be98ebb6b10a30b21ec5e56ff9ec20615c0104a92124c4833e9439f88d04e0312a7c82f79ed7b6f802bbd SHA512 3f985bba5aaa8a70f0329316ea4f42ab135d58c47611154c62e103718212a4b2c5e4f25fd45c372424db1fbf40afdc8269ae98655fb3bc8e31085a5d948f702b diff --git a/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch b/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch new file mode 100644 index 000..d8d0bac55a7 --- /dev/null +++ b/app-emulation/lxc/files/lxc-1.0.11-bash-completion.patch @@ -0,0 +1,27 @@ +diff --git a/config/bash/lxc.in b/config/bash/lxc.in +index 344d5cb2..f051eaae 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/configure.ac b/configure.ac +index 2ea88c19..f52d772a 100644 +--- a/configure.ac b/configure.ac +@@ -429,7 +429,7 @@ AM_CONDITIONAL([ENABLE_BASH], [test "x$enable_bash" = "xyes"]) + AM_COND_IF([ENABLE_BASH], + [AC_MSG_CHECKING([bash completion directory]) + PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , +- bashcompdir="${sysconfdir}/bash_completion.d") ++ bashcompdir="$datadir/bash-completion/completions") + AC_MSG_RESULT([$bashcompdir]) + AC_SUBST(bashcompdir) + ]) diff --git a/app-emulation/lxc/files/lxc-1.0.11-major.patch b/app-emulation/lxc/files/lxc-1.0.11-major.patch new file mode 100644 index 000..8a3c2b2bd6d --- /dev/null +++ b/app-emulation/lxc/files/lxc-1.0.11-major.patch @@ -0,0 +1,64 @@ +diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c +index 59eda7e4..44b71d4c 100644 +--- a/src/lxc/bdev.c b/src/lxc/bdev.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #include "lxc.h" + #include "config.h" +@@ -58,9 +59,6 @@ + #ifdef MAJOR_IN_MKDEV + #include + #endif +-#ifdef MAJOR_IN_SYSMACROS +-#include +-#endif + + #ifndef BLKGETSIZE64 + #define BLKGETSIZE64 _IOR(0x12,114,size_t) +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index 5d583d5f..d4217c27 100644 +--- a/src/lxc/conf.c b/src/lxc/conf.c +@@ -36,14 +36,12 @@ + #include + #include + #include ++#include + + /* makedev() */ + #ifdef MAJOR_IN_MKDEV + #include + #endif +-#ifdef MAJOR_IN_SYSMACROS +-#include +-#endif + + #ifdef HAVE_STATVFS + #include +diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c +index 3963a3ee..30ac6733 100644 +--- a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -60,9 +61,6 @@ + #ifdef MAJOR_IN_MKDEV + #include + #endif +-#ifdef MAJOR_IN_SYSMACROS +-#include +-#endif + + #if HAVE_IFADDRS_H + #include diff --git a/app-emulation/lxc/lxc-1.0.11.ebuild b/app-
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 10087423e3d0467e699f775c0e6e1ac7e116de58 Author: Justin Lecher gentoo org> AuthorDate: Sun Nov 12 21:08:35 2017 + Commit: Justin Lecher gentoo org> CommitDate: Sun Nov 12 21:08:51 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10087423 app-emulation/lxc: Handle automagic dep in selinux Signed-off-by: Justin Lecher gentoo.org> Package-Manager: Portage-2.3.13, Repoman-2.3.4 app-emulation/lxc/files/lxc.initd.6 | 118 app-emulation/lxc/lxc-2.0.8.ebuild | 17 +++--- 2 files changed, 10 insertions(+), 125 deletions(-) diff --git a/app-emulation/lxc/files/lxc.initd.6 b/app-emulation/lxc/files/lxc.initd.6 deleted file mode 100644 index a66dfdd22b4..000 --- a/app-emulation/lxc/files/lxc.initd.6 +++ /dev/null @@ -1,118 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -CONTAINER=${SVCNAME#*.} - -LXC_PATH=`lxc-config lxc.lxcpath` - -lxc_get_configfile() { - if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then - echo "${LXC_PATH}/${CONTAINER}.conf" - elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then - echo "${LXC_PATH}/${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 - use lxcfs - - 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 -f /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} $(which lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log - sleep 1 - - # 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 - - # 10s should be enough to shut everything down - ebegin "Stopping ${CONTAINER}" - lxc-stop -t 10 -n ${CONTAINER} - eend $? -} diff --git a/app-emulat
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: fba974e99b93d9f151d7012cc37a969a0592b726 Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Jan 21 11:52:28 2017 + Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Jan 21 11:52:41 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fba974e9 app-emulation/lxc: fix build failure against glibc-2.24, bug #604360 Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/604360 Package-Manager: Portage-2.3.3, Repoman-2.3.1 app-emulation/lxc/files/lxc-2.0.6-major.patch | 74 +++ app-emulation/lxc/lxc-2.0.6-r1.ebuild | 3 +- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/app-emulation/lxc/files/lxc-2.0.6-major.patch b/app-emulation/lxc/files/lxc-2.0.6-major.patch new file mode 100644 index ..beb379a --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.6-major.patch @@ -0,0 +1,74 @@ +Adapt to future removal of major()/minor()/makedev() from + +Gentoo removed it in glibc-2.24. + +https://bugs.gentoo.org/575232 +https://bugs.gentoo.org/604360 +diff --git a/configure.ac b/configure.ac +index 4640c0d..71e6450 100644 +--- a/configure.ac b/configure.ac +@@ -620,4 +620,7 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include ]) + AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h]) + ++# lookup major()/minor()/makedev() ++AC_HEADER_MAJOR ++ + # Check for some syscalls functions + AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat]) +diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c +index 3d41b10..419d1c2 100644 +--- a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c +@@ -33,8 +33,17 @@ + + #include "bdev.h" ++#include "config.h" + #include "log.h" + #include "lxclvm.h" + #include "utils.h" + ++/* major()/minor() */ ++#ifdef MAJOR_IN_MKDEV ++#include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++#include ++#endif ++ + lxc_log_define(lxclvm, lxc); + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index c54ee41..9a00e7f 100644 +--- a/src/lxc/conf.c b/src/lxc/conf.c +@@ -40,4 +40,12 @@ + #include + ++/* makedev() */ ++#ifdef MAJOR_IN_MKDEV ++#include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++#include ++#endif ++ + #ifdef HAVE_STATVFS + #include +diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c +index 3a9e1e3..fe75fcc 100644 +--- a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c +@@ -62,4 +62,12 @@ + #include "version.h" + ++/* major()/minor() */ ++#ifdef MAJOR_IN_MKDEV ++#include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++#include ++#endif ++ + #if HAVE_IFADDRS_H + #include diff --git a/app-emulation/lxc/lxc-2.0.6-r1.ebuild b/app-emulation/lxc/lxc-2.0.6-r1.ebuild index b6928bc..569b71e 100644 --- a/app-emulation/lxc/lxc-2.0.6-r1.ebuild +++ b/app-emulation/lxc/lxc-2.0.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -108,6 +108,7 @@ src_prepare() { eapply "${FILESDIR}"/${P}-bash-completion.patch #558854 eapply "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch + eapply "${FILESDIR}"/${PN}-2.0.6-major.patch eapply_user eautoreconf }
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: 0f3fd4deb01b5a24d7e2710b78bc0e0ba36768db Author: Erik Mackdanz gentoo org> AuthorDate: Tue Oct 11 03:45:25 2016 + Commit: Erik Mackdanz gentoo org> CommitDate: Tue Oct 11 03:45:25 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f3fd4de app-emulation/lxc: Bump to 2.0.5 Package-Manager: portage-2.3.1 app-emulation/lxc/Manifest | 1 + .../lxc/files/lxc-2.0.5-bash-completion.patch | 31 .../lxc/files/lxc-2.0.5-omit-sysconfig.patch | 5 + app-emulation/lxc/lxc-2.0.5.ebuild | 201 + 4 files changed, 238 insertions(+) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index fe865f9..155b6f9 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -2,3 +2,4 @@ DIST lxc-1.0.7.tar.gz 564985 SHA256 a0b1b09592e076e270dcb3ba004616d9ac3147f9de0b DIST lxc-1.0.8.tar.gz 575127 SHA256 399ac3eb4e0a89d657fb2e2a57f686ed061d3f1ea4733e7521b1539e9906c7ee SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a WHIRLPOOL 72cd0b8b0345692dd9a3ed8785ee27f5e575794a96c515db1f1d073c29be4c06ae8c1ee24fa375a5ede2bba2494704916710b2e8814ed991d43330a40dff3d56 DIST lxc-2.0.3.tar.gz 772448 SHA256 635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef WHIRLPOOL 89ce2f6762c7279e24658c1154b5c2960d3db32e0ec3724b338f5d30da77cc0b33a2376e5eebe6d9c356bdd34c2aa9da1e2434aecd7e428fa4b729389e35b862 DIST lxc-2.0.4.tar.gz 775634 SHA256 57d40234aeecf5b60fb29d563e5a09d6a04c89e1267eb22a6704388ac8573e7b SHA512 3f985bba5aaa8a70f0329316ea4f42ab135d58c47611154c62e103718212a4b2c5e4f25fd45c372424db1fbf40afdc8269ae98655fb3bc8e31085a5d948f702b WHIRLPOOL b001c75d67d676e75b203d789cf2c0643ba9a47aa31965441340b66f28e18371415b9d44ce752e35102bc8677688eec6e586d800a33a2a965c8a046c091ebc06 +DIST lxc-2.0.5.tar.gz 778842 SHA256 1f1c491b2ad5e74a85b8eb791ccac8128e6eaf5ddcc1323e9360997c030f7072 SHA512 8e14036597fa3407c87fb92d13b40bbca9a646d27d817e0a9d20fe626625d6cf04a1df65b1a723391d41a311b9f4f3432b3213004892d64355fe0edc7858cb9f WHIRLPOOL fa6ac86d67fe563f92411cbd09a0d66d729a0a15fe48076b42f4b3996e6b786826990bd51382c14606fd1b5240d413bc8d217fac37becd9baccd89de15d30b22 diff --git a/app-emulation/lxc/files/lxc-2.0.5-bash-completion.patch b/app-emulation/lxc/files/lxc-2.0.5-bash-completion.patch new file mode 100644 index ..6feb4c2 --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.5-bash-completion.patch @@ -0,0 +1,31 @@ +--- /config/bash/Makefile.am.orig 2016-05-18 20:40:42.238487678 + /config/bash/Makefile.am 2016-05-18 20:43:02.163497779 + +@@ -2,12 +2,12 @@ + + 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/completions/ || : + + install-data-local: install-bash + uninstall-local: uninstall-bash +--- /config/bash/lxc.in.orig 2016-05-18 20:40:51.079488316 + /config/bash/lxc.in2016-05-18 20:45:03.506506538 + +@@ -1,4 +1,3 @@ +-_have lxc-start && { + _lxc_names() { + COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) ) + } +@@ -100,4 +99,3 @@ + + complete -o default -F _lxc_generic_o lxc-copy + complete -o default -F _lxc_generic_o lxc-start-ephemeral +-} diff --git a/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch new file mode 100644 index ..3ec8135 --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.5-omit-sysconfig.patch @@ -0,0 +1,5 @@ +--- /config/Makefile.am.orig 2016-05-19 02:56:11.891113982 + /config/Makefile.am2016-05-19 02:56:32.596115476 + +@@ -1 +1 @@ +-SUBDIRS = apparmor bash etc init selinux templates yum sysconfig ++SUBDIRS = apparmor bash etc init selinux templates yum diff --git a/app-emulation/lxc/lxc-2.0.5.ebuild b/app-emulation/lxc/lxc-2.0.5.ebuild new file mode 100644 index ..452f249 --- /dev/null +++ b/app-emulation/lxc/lxc-2.0.5.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +MY_P="${P/_/-}" +PYTHON_COMPAT=( python{3_3,3_4,3_5} ) +DISTUTILS_OPTIONAL=1 + +inherit autotools bash-completion-r1 distutils-r1 linux-info versionator f
[gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
commit: d004d537f8e5963a898d482d3e072a19d8a5c4c8 Author: Erik Mackdanz gentoo org> AuthorDate: Mon Jul 11 00:28:14 2016 + Commit: Erik Mackdanz gentoo org> CommitDate: Mon Jul 11 00:28:14 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d004d537 app-emulation/lxc: Bump to 2.0.3 removes devsetup script Package-Manager: portage-2.3.0 app-emulation/lxc/Manifest | 1 + .../lxc/files/lxc-2.0.3-bash-completion.patch | 31 .../lxc/files/lxc-2.0.3-omit-sysconfig.patch | 5 + app-emulation/lxc/lxc-2.0.3.ebuild | 197 + app-emulation/lxc/metadata.xml | 3 + 5 files changed, 237 insertions(+) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index ef86569..575cd3e 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -8,3 +8,4 @@ DIST lxc-1.1.3.tar.gz 599889 SHA256 b75fb8e376d3313e152f31fb7372b68f33a953a12191 DIST lxc-1.1.4.tar.gz 604167 SHA256 b087baf5ac4b94618388e6e759d9cdafcf5c98ed67bf9012ee9660076f9fb0d1 SHA512 b239c285b68ddb25c165e998307d69b368bb802e89c1e26de9daab956ffc05cb8e80bf7c796233552b08a57d1cc37c22777bb7a7469db111582184ee13272c93 WHIRLPOOL 2d69d0540c15274627cdbd0f1944a119b601e1298b9328ba336beae0aa6bffd62dfdf85af82f54c3926489e19b4cee7eaa6c35bcfb72e4b3904f85102055ae85 DIST lxc-1.1.5.tar.gz 607219 SHA256 eefce4cc679656cb8636bf0849f3ba6981c48167884e13dbcb377820a717c09c SHA512 e48ab549f1317afcb5f7768ab988ba27a3e9f1458504e1d70b2e27c502233e7b3538b8ce0b79940140a59a37681bcd8e459416e814f9e4814a4ed86b89e8df1c WHIRLPOOL 0d65ec400913b3298517ba0cb50e064b894d8b26cbd331662e11caee285a37aa1e0d1e4623b69e75585c4369544ca02ff97db90d5127c697cd53fde87d2bc968 DIST lxc-2.0.1.tar.gz 772083 SHA256 543b927e0be6df256562afe05281552645c78c4a9c0881bf313e31ae13679a29 SHA512 f64cc7167bfed1cc74689bf7d9a5b1ad5b957d5791529c8319c55d2cc671dbd00df9c08fb8f10f73c0d77465a54eb4c98c980e66dd888f52c7670640c6bbf78f WHIRLPOOL a4d25a6733200fcc488b90c34715af8d5d9cd53632f8c82085e5dfe0216500c4714414b616bddda82f4ee014525fd222604d9d46d385658147e411060632f748 +DIST lxc-2.0.3.tar.gz 772448 SHA256 635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef WHIRLPOOL 89ce2f6762c7279e24658c1154b5c2960d3db32e0ec3724b338f5d30da77cc0b33a2376e5eebe6d9c356bdd34c2aa9da1e2434aecd7e428fa4b729389e35b862 diff --git a/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch b/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch new file mode 100644 index 000..9ef6013 --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch @@ -0,0 +1,31 @@ +--- lxc-lxc-2.0.1/config/bash/Makefile.am.orig 2016-05-18 20:40:42.238487678 + lxc-lxc-2.0.1/config/bash/Makefile.am 2016-05-18 20:43:02.163497779 + +@@ -2,12 +2,12 @@ + + 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/completions/ || : + + install-data-local: install-bash + uninstall-local: uninstall-bash +--- lxc-lxc-2.0.1/config/bash/lxc.in.orig 2016-05-18 20:40:51.079488316 + lxc-lxc-2.0.1/config/bash/lxc.in 2016-05-18 20:45:03.506506538 + +@@ -1,4 +1,3 @@ +-_have lxc-start && { + _lxc_names() { + COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) ) + } +@@ -100,4 +99,3 @@ + + complete -o default -F _lxc_generic_o lxc-copy + complete -o default -F _lxc_generic_o lxc-start-ephemeral +-} diff --git a/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch new file mode 100644 index 000..9b83a3b --- /dev/null +++ b/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch @@ -0,0 +1,5 @@ +--- lxc-lxc-2.0.1/config/Makefile.am.orig 2016-05-19 02:56:11.891113982 + lxc-lxc-2.0.1/config/Makefile.am 2016-05-19 02:56:32.596115476 + +@@ -1 +1 @@ +-SUBDIRS = apparmor bash etc init selinux templates yum sysconfig ++SUBDIRS = apparmor bash etc init selinux templates yum diff --git a/app-emulation/lxc/lxc-2.0.3.ebuild b/app-emulation/lxc/lxc-2.0.3.ebuild new file mode 100644 index 000..291b2d4 --- /dev/null +++ b/app-emulation/lxc/lxc-2.0.3.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5"