summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2009-12-08 07:45:34 +0000
committerSven Wegener <swegener@gentoo.org>2009-12-08 07:45:34 +0000
commit15f0ea40e6bf92173e850bc5eca2477c73a639f4 (patch)
tree09f4739272666de9f0ccfa04c751cd3c32adbda1 /app-emulation/lxc
parentBug #295672 - Override XDG_CONFIG_HOME to avoid sandbox violations. (diff)
downloadhistorical-15f0ea40e6bf92173e850bc5eca2477c73a639f4.tar.gz
historical-15f0ea40e6bf92173e850bc5eca2477c73a639f4.tar.bz2
historical-15f0ea40e6bf92173e850bc5eca2477c73a639f4.zip
Also include my tty malloc() fix, it prevents memory corruption.
Package-Manager: portage-2.2_rc55/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/lxc')
-rw-r--r--app-emulation/lxc/ChangeLog8
-rw-r--r--app-emulation/lxc/Manifest10
-rw-r--r--app-emulation/lxc/files/lxc-0.6.4-tty-malloc.patch25
-rw-r--r--app-emulation/lxc/lxc-0.6.4-r2.ebuild78
4 files changed, 116 insertions, 5 deletions
diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog
index 0785b60e6112..322b986e03d8 100644
--- a/app-emulation/lxc/ChangeLog
+++ b/app-emulation/lxc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/lxc
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.6 2009/12/07 11:39:11 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.7 2009/12/08 07:45:34 swegener Exp $
+
+*lxc-0.6.4-r2 (08 Dec 2009)
+
+ 08 Dec 2009; Sven Wegener <swegener@gentoo.org> +lxc-0.6.4-r2.ebuild,
+ +files/lxc-0.6.4-tty-malloc.patch:
+ Also include my tty malloc() fix, it prevents memory corruption.
*lxc-0.6.4-r1 (07 Dec 2009)
diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest
index e69d2567a16a..b4e1b22b2d2c 100644
--- a/app-emulation/lxc/Manifest
+++ b/app-emulation/lxc/Manifest
@@ -4,15 +4,17 @@ Hash: SHA1
AUX lxc-0.6.4-fix-full-system.patch 1741 RMD160 049dea2e10d4df6abf758bf70bd18ea571648e74 SHA1 a1431cbb18eefffa42ca6f22920f38d8b5fdb25b SHA256 7e2f3609dd9c84d555ebd772ffad521fc19ca2f712d49fe1fa3ffa0fa1350339
AUX lxc-0.6.4-lxc.network.pair.patch 3787 RMD160 79dcc4b4e6e8c8710d295e2b6b9273d9764160df SHA1 24c75f18bee91fe797e8242d0b0e80ed6cf494eb SHA256 aa3e64248ae37b1d1eb1e74499641cff06cab71dcc3b4a985dec2345998a2f19
AUX lxc-0.6.4-move-rcfile.patch 8502 RMD160 594a72a5f8272302492a5467de0d1854d81a1dea SHA1 03ae85bcdb2d8951647d539cee16bdf9fe336489 SHA256 52d570bb1feaedf88a643899bd64408da7e8803f88479e4549abe5e7cd1ffec2
+AUX lxc-0.6.4-tty-malloc.patch 946 RMD160 9128f04a383c58c5c3851b2be6db03532194d2f8 SHA1 f2b3c19e656766686aad7733ecb07f4a5beb5851 SHA256 40734c9afac0f84553965f756617a7cff6f525307bf664e6bf708c810be50330
DIST lxc-0.6.4.tar.gz 288214 RMD160 542fc7968ef735ab30f45a2c93c51f355c29314e SHA1 d3b00458691d02d0d31bc2943a07c5c52cfc39a9 SHA256 3ff249246e0a8805db1d3619219c61e3489b5d774cc6c227e8371c7038ed2d04
EBUILD lxc-0.6.4-r1.ebuild 1975 RMD160 a36b7a07f35f3db2fdd7f57b3f677d43859fd11b SHA1 20a16f98420602e5c4901aa401a6f849c9ab5d6a SHA256 fc4d87fa42535c5f463dbcf46b8288cb1786e4dd29fa2cee7bb42a7bc94fdc03
+EBUILD lxc-0.6.4-r2.ebuild 2011 RMD160 bdd149b0ae30cb4d2fb09deff013c770c5fa72d6 SHA1 12847ffa4db98b551dc211e8cc162d7e74140d99 SHA256 97c0ba14a930e176b15efb8f0ece3c6efc6d83eec8960483264caeb27f3b31c5
EBUILD lxc-0.6.4.ebuild 1831 RMD160 e5ca087c9931bef84db5962d096a0420f4f4eeaa SHA1 bc7bde8946c650e3c61e36c4e501800565748d2e SHA256 5dc0a197b1e756a15f7a3ede2e060db65469a492b92238b84ffed9d736b72479
-MISC ChangeLog 1578 RMD160 c8ddfe3e100de52b5e52d079f4a9d78c457d3530 SHA1 21623b987ebabf2a3fce1d3645b6a1f3feb7b096 SHA256 9bffde55035969342a8e7bdf399c7d1b35a325c4db6e6058b37fe2c6abc7d6cf
+MISC ChangeLog 1783 RMD160 6d7326c7a9b1798341cd7226d7ea2e6454e2194f SHA1 46076b1dee657d56fbbab48828ad3dc4c7984d9b SHA256 48344921d9277531bc69f13d6a35e1c5d089c4314865e1a2828c9abc269d348c
MISC metadata.xml 521 RMD160 a545e00e2df3202e465b684e7581fa541ba2165f SHA1 023dbfe77bba8e848659d38de3287eb8eb1f3832 SHA256 a8f5a0f955bef325605cc123abd008ed57f89e7b6601dad56ca49a6e977eabbc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
-iEYEARECAAYFAksc6TkACgkQAiZjviIA2XgUfgCeJjfvH1WRAfGwJfsjWu4F/SjF
-RHUAoPPwt5SqBCkK3dZ8mh8N9Eh23n64
-=GusL
+iEYEARECAAYFAkseBCUACgkQI1lqEGTUzyR5WQCgsw8eI4OvhwDvFyhkgNtkjNo9
+leIAn0sn+MNnPMYUHN4aXBKs/EFb+CCp
+=pqGE
-----END PGP SIGNATURE-----
diff --git a/app-emulation/lxc/files/lxc-0.6.4-tty-malloc.patch b/app-emulation/lxc/files/lxc-0.6.4-tty-malloc.patch
new file mode 100644
index 000000000000..c445f1928c69
--- /dev/null
+++ b/app-emulation/lxc/files/lxc-0.6.4-tty-malloc.patch
@@ -0,0 +1,25 @@
+From e4e7d59db88478186188024c78f76066dad1e733 Mon Sep 17 00:00:00 2001
+From: Sven Wegener <sven.wegener@stealer.net>
+Date: Thu, 26 Nov 2009 16:46:23 +0100
+Subject: [PATCH] use correct number of ttys during setup
+
+commit 985d15b106c8959ff130ba5425c2abbe36dc2cca "fix fdleak and errors
+in lxc_create_tty()" created a zero-sized malloc(), causing memory
+corruption. use config->tty like all the other code does.
+
+Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
+Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
+
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 0ce51aa..81bc470 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -999,7 +999,7 @@ int lxc_create_tty(const char *name, struct lxc_conf *conf)
+ return 0;
+
+ tty_info->pty_info =
+- malloc(sizeof(*tty_info->pty_info)*tty_info->nbtty);
++ malloc(sizeof(*tty_info->pty_info)*conf->tty);
+ if (!tty_info->pty_info) {
+ SYSERROR("failed to allocate pty_info");
+ return -1;
diff --git a/app-emulation/lxc/lxc-0.6.4-r2.ebuild b/app-emulation/lxc/lxc-0.6.4-r2.ebuild
new file mode 100644
index 000000000000..997b1901408f
--- /dev/null
+++ b/app-emulation/lxc/lxc-0.6.4-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.6.4-r2.ebuild,v 1.1 2009/12/08 07:45:34 swegener Exp $
+
+EAPI="2"
+
+inherit eutils linux-info versionator base
+
+DESCRIPTION="LinuX Containers userspace utilities"
+HOMEPAGE="http://lxc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="+doc examples"
+
+RDEPEND="sys-libs/libcap"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-sgml-utils )
+ >=sys-kernel/linux-headers-2.6.29"
+
+CONFIG_CHECK="~CGROUPS
+ ~CGROUP_NS ~CPUSETS ~CGROUP_CPUACCT
+ ~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
+ ~CGROUP_SCHED
+
+ ~NAMESPACES
+ ~IPC_NS ~USER_NS ~PID_NS
+
+ ~SECURITY_FILE_CAPABILITIES
+ ~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 (inter-container) networking"
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-lxc.network.pair.patch
+ "${FILESDIR}"/${P}-move-rcfile.patch
+ "${FILESDIR}"/${P}-fix-full-system.patch
+ "${FILESDIR}"/${P}-tty-malloc.patch
+)
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --bindir=/usr/sbin \
+ --docdir=/usr/share/doc/${PF} \
+ --with-config-path=/etc/lxc \
+ $(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"
+
+ rm -r "${D}"/etc/lxc "${D}"/usr/sbin/lxc-{setcap,ls}
+
+ keepdir /etc/lxc
+
+ find "${D}" -name '*.la' -delete
+}