diff options
author | Fabian Groffen <grobian@gentoo.org> | 2017-11-01 08:42:51 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2017-11-01 08:43:26 +0100 |
commit | 13637b0563223920ef6b892a48c06848bf4b6897 (patch) | |
tree | fe59ed85703bf55cfaffa8d065e8c05d517eb8a9 /app-misc | |
parent | net-libs/libsrtp: stable 1.6.0 for ia64, bug #579318 (diff) | |
download | gentoo-13637b0563223920ef6b892a48c06848bf4b6897.tar.gz gentoo-13637b0563223920ef6b892a48c06848bf4b6897.tar.bz2 gentoo-13637b0563223920ef6b892a48c06848bf4b6897.zip |
app-misc/jail: add patch for newer glibc, bug #580326
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/jail/files/jail-2.0-sysmacros.patch | 20 | ||||
-rw-r--r-- | app-misc/jail/jail-2.0-r1.ebuild | 70 |
2 files changed, 90 insertions, 0 deletions
diff --git a/app-misc/jail/files/jail-2.0-sysmacros.patch b/app-misc/jail/files/jail-2.0-sysmacros.patch new file mode 100644 index 000000000000..4843c3d97194 --- /dev/null +++ b/app-misc/jail/files/jail-2.0-sysmacros.patch @@ -0,0 +1,20 @@ +--- src/generic_helpers.c ++++ src/generic_helpers.c +@@ -27,6 +27,7 @@ + + #include <stdlib.h> + #include <string.h> ++#include <sys/sysmacros.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> +--- src/terminal_helpers.c ++++ src/terminal_helpers.c +@@ -25,6 +25,7 @@ + + #include <stdlib.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <unistd.h> + #include <stdio.h> + #include <string.h> diff --git a/app-misc/jail/jail-2.0-r1.ebuild b/app-misc/jail/jail-2.0-r1.ebuild new file mode 100644 index 000000000000..62eb691b4a39 --- /dev/null +++ b/app-misc/jail/jail-2.0-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic + +DESCRIPTION="Builds a chroot and configures all the required files, directories and libraries" +HOMEPAGE="https://github.com/spiculator/jail" +SRC_URI="https://github.com/spiculator/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" + +DEPEND=">=sys-apps/sed-4" +RDEPEND="dev-lang/perl + dev-util/strace" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-1.9-gentoo.patch \ + "${FILESDIR}"/${PN}-1.9-wrongshell.patch \ + "${FILESDIR}"/${PN}-1.9-multiuser-rsa.patch \ + "${FILESDIR}"/${PN}-1.9-ldflags.patch \ + "${FILESDIR}"/${PN}-2.0-sysmacros.patch +} + +src_compile() { + # configuration files should be installed in /etc not /usr/etc + sed -i "s:\$4/etc:\${D}/etc:g" install.sh || die + + # the destination directory should be /usr not /usr/local + sed -i -e "s:usr/local:${D}/usr:g" \ + -e "s:^COPT =.*:COPT = -Wl,-z,no:g" src/Makefile || die + + # Below didn't work. Don't know why + #append-ldflags -Wl,-z,now + emake -C src CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + emake -C src install + + # remove //var/tmp/portage/${P}/image//usr from files + FILES=( "${D}/usr/bin/mkjailenv" + "${D}/usr/bin/addjailsw" + "${D}/usr/bin/addjailuser" + "${D}/etc/jail.conf" + "${D}/usr/lib/libjail.pm" + "${D}/usr/lib/arch/generic/definitions" + "${D}/usr/lib/arch/generic/functions" + "${D}/usr/lib/arch/linux/definitions" + "${D}/usr/lib/arch/linux/functions" + "${D}/usr/lib/arch/freebsd/definitions" + "${D}/usr/lib/arch/freebsd/functions" + "${D}/usr/lib/arch/irix/definitions" + "${D}/usr/lib/arch/irix/functions" + "${D}/usr/lib/arch/solaris/definitions" + "${D}/usr/lib/arch/solaris/functions" ) + + for f in "${FILES[@]}"; do + sed -i "s:/${D}/usr:/usr:g" ${f} || die + done + + sed -i "s:/usr/etc:/etc:" "${D}"/usr/lib/libjail.pm || die + + dodoc doc/{CHANGELOG,INSTALL,README,SECURITY,VERSION} +} |