diff options
author | 2011-07-04 17:15:56 +0200 | |
---|---|---|
committer | 2011-07-04 17:15:56 +0200 | |
commit | 6a46a50aa15b42492738b651566c77acab7587ef (patch) | |
tree | a80a2e1f727353245705f70a66113ed4b4d0b39f /sys-apps/fakechroot | |
parent | fakechroot-2.12-r1.ebuild: (diff) | |
download | aluco-6a46a50aa15b42492738b651566c77acab7587ef.tar.gz aluco-6a46a50aa15b42492738b651566c77acab7587ef.tar.bz2 aluco-6a46a50aa15b42492738b651566c77acab7587ef.zip |
+fakechroot-2.14.ebuild
-Bump version
-Patch __realpath.c file to check __chk_fail function.
Diffstat (limited to 'sys-apps/fakechroot')
-rw-r--r-- | sys-apps/fakechroot/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/fakechroot/fakechroot-2.14.ebuild | 33 | ||||
-rw-r--r-- | sys-apps/fakechroot/files/fakechroot-2.14-fix_chk_fail.patch | 25 | ||||
-rw-r--r-- | sys-apps/fakechroot/files/fakechroot-2.14-fix_chroot_test_location.patch | 88 | ||||
-rw-r--r-- | sys-apps/fakechroot/files/fakechroot-2.14-fix_test_hardened.patch | 23 | ||||
-rw-r--r-- | sys-apps/fakechroot/metadata.xml | 17 |
6 files changed, 192 insertions, 0 deletions
diff --git a/sys-apps/fakechroot/Manifest b/sys-apps/fakechroot/Manifest index 6db7f7f..f220aae 100644 --- a/sys-apps/fakechroot/Manifest +++ b/sys-apps/fakechroot/Manifest @@ -1,4 +1,10 @@ AUX fakechroot-2.12-fix_chroot_test_location.patch 3544 RMD160 f3d3a3252e473263c61f259965d32f7bb77f5d41 SHA1 84c264fc629d007e79b8b5097a18c32a6398d011 SHA256 ca09808116801262577b93ec2e864472705d9a9a1223218a8a73b36d700ef895 AUX fakechroot-2.12-fix_test_hardened.patch 1005 RMD160 349ea7261845711ce0431215723fc2449cb3e0a6 SHA1 96e9a0c37ea6455f0263f6c891afbab9e8a40509 SHA256 eb8099b341675384b95e132bb6fa1be9f42a30994db3be4a9664d71a572a9141 +AUX fakechroot-2.14-fix_chk_fail.patch 732 RMD160 0379c47d28c43feeae94c18158721fe76b631ea7 SHA1 358dcb04be06dd700e2784429a7d4d81e151d744 SHA256 f3d01578720cefd1f01ce52c8a987e5a7be614e7a7ffd9d1e24ee6668e60a5f6 +AUX fakechroot-2.14-fix_chroot_test_location.patch 3659 RMD160 38c9f8ddf98cf6435baa095714a2b75a4e7464eb SHA1 24ecd3c9bd5f9502136ab38a8b1caddfae786131 SHA256 0929c3bc41464f937fa610829bf7aeb194e2a27547b30048d9e922c0f80ccdd5 +AUX fakechroot-2.14-fix_test_hardened.patch 1005 RMD160 349ea7261845711ce0431215723fc2449cb3e0a6 SHA1 96e9a0c37ea6455f0263f6c891afbab9e8a40509 SHA256 eb8099b341675384b95e132bb6fa1be9f42a30994db3be4a9664d71a572a9141 DIST fakechroot_2.12.orig.tar.gz 352298 RMD160 34a8068f360720032c82c6c6635c165da4a7d89b SHA1 b2e32c4de64ba2f2d83f3ac7947f502afbaa1cd9 SHA256 05174cc9caa3ec84cd7515caeafd809a9411e13498f972a617bf3616463b5d2b +DIST fakechroot_2.14.orig.tar.gz 391823 RMD160 e72e6b10c72789d28fb6b46803f61ed8b45cb646 SHA1 64f85078795692017a51ca5c695254e93e6a67e1 SHA256 da5d61f1c752e2e43400fc6c70cb8ad2f7177a3295534f8e0c6e3c208432d9f5 EBUILD fakechroot-2.12-r1.ebuild 901 RMD160 75225e45a3c7e2e8a800ad9991bbe4e09e4e9ac2 SHA1 148bcb08b2be157eb44d84afe17e4445567aaa82 SHA256 fa3ea4f85c5a16c63289be1376980210089d45495b43066db683bd8e0bf45b56 +EBUILD fakechroot-2.14.ebuild 840 RMD160 b6ff1eeff057fb629cae25b930d9d10162413b8c SHA1 55f1aacf6226617abda194c40be87c1d43cb5e1c SHA256 364dee30bd0b7fb46042c49551dc9c5a7f42efe7714375c7caf9652ca501b080 +MISC metadata.xml 536 RMD160 26872042b59fd58181ddef07ee88367f6055bd0c SHA1 ffa6191360532a423b8bcb8e03822437ecfdf32f SHA256 3834f1c7dca4f1997b5a7f759fda3618e5bc7c3a68ffa3d19c538cf6b8a3de63 diff --git a/sys-apps/fakechroot/fakechroot-2.14.ebuild b/sys-apps/fakechroot/fakechroot-2.14.ebuild new file mode 100644 index 0000000..ad8f628 --- /dev/null +++ b/sys-apps/fakechroot/fakechroot-2.14.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit eutils + +DESCRIPTION="Provide a faked chroot environment without requiring root privileges" +HOMEPAGE="http://fakechroot.alioth.debian.org/" +SRC_URI="mirror://debian/pool/main/f/${PN}/${PN}_${PV}.orig.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test hardened" + +src_prepare() { + epatch "${FILESDIR}"/${P}-fix_chk_fail.patch + use test && epatch "${FILESDIR}"/${P}-fix_chroot_test_location.patch + use test && use hardened && epatch "${FILESDIR}"/${P}-fix_test_hardened.patch +} + +src_configure() { + econf \ + --disable-static \ + --disable-dependency-tracking +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc NEWS README THANKS + find "${D}" -name '*.la' -exec rm -f '{}' + +} diff --git a/sys-apps/fakechroot/files/fakechroot-2.14-fix_chk_fail.patch b/sys-apps/fakechroot/files/fakechroot-2.14-fix_chk_fail.patch new file mode 100644 index 0000000..a714d02 --- /dev/null +++ b/sys-apps/fakechroot/files/fakechroot-2.14-fix_chk_fail.patch @@ -0,0 +1,25 @@ +# This patch fix the availablity of __chk_fail function. +# patch from blueness@gentoo.org + +diff -ur fakechroot-2.14.orig//src/__realpath_chk.c fakechroot-2.14/src/__realpath_chk.c +--- fakechroot-2.14.orig//src/__realpath_chk.c 2011-07-04 16:59:16.176441002 +0200 ++++ fakechroot-2.14/src/__realpath_chk.c 2011-07-04 17:00:23.718441000 +0200 +@@ -24,10 +24,18 @@ + + #define _FORTIFY_SOURCE 2 + #include <stddef.h> ++#include <stdlib.h> + #include "libfakechroot.h" + + ++#ifdef HAVE___CHK_FAIL + extern void __chk_fail (void) __attribute__((__noreturn__)); ++#else ++__attribute__((__noreturn__)) void __chk_fail (void) ++{ ++ exit(-1); ++} ++#endif + + wrapper(__realpath_chk, char *, (const char * path, char * resolved, size_t resolvedlen)) + { diff --git a/sys-apps/fakechroot/files/fakechroot-2.14-fix_chroot_test_location.patch b/sys-apps/fakechroot/files/fakechroot-2.14-fix_chroot_test_location.patch new file mode 100644 index 0000000..a737c4d --- /dev/null +++ b/sys-apps/fakechroot/files/fakechroot-2.14-fix_chroot_test_location.patch @@ -0,0 +1,88 @@ +diff -ur test.orig/chroot.sh test/chroot.sh +--- test.orig/chroot.sh 2011-04-30 19:05:41.000000000 +0300 ++++ test/chroot.sh 2011-04-30 19:05:48.000000000 +0300 +@@ -10,7 +10,7 @@ + fi + + if [ $# -gt 0 ]; then +- HOME=/root exec /usr/sbin/chroot $destdir "$@" ++ HOME=/root exec /bin/chroot $destdir "$@" + else +- HOME=/root exec /usr/sbin/chroot $destdir $SHELL ++ HOME=/root exec /bin/chroot $destdir $SHELL + fi +diff -ur test.orig/common.inc test/common.inc +--- test.orig/common.inc 2011-04-30 19:05:41.000000000 +0300 ++++ test/common.inc 2011-04-30 19:05:48.000000000 +0300 +@@ -26,7 +26,7 @@ + export LD_PRELOAD + + if ! which chroot >/dev/null; then +- PATH=$PATH:/usr/sbin:/sbin ++ PATH=$PATH:/usr/sbin:/sbin:/bin + export PATH + fi + +diff -ur test.orig/febootstrap.sh test/febootstrap.sh +--- test.orig/febootstrap.sh 2011-04-30 19:05:41.000000000 +0300 ++++ test/febootstrap.sh 2011-04-30 19:05:48.000000000 +0300 +@@ -6,7 +6,7 @@ + export PATH=$srcdir/bin:$PATH + + run () { +- HOME=/root fakechroot /usr/sbin/chroot $destdir "$@" ++ HOME=/root fakechroot /bin/chroot $destdir "$@" + } + + vendor=${VENDOR:-`lsb_release -s -i | tr 'A-Z' 'a-z'`} +@@ -21,13 +21,13 @@ + fi + + export FAKECHROOT_EXCLUDE_PATH=${FAKECHROOT_EXCLUDE_PATH:-/dev:/proc:/sys} +-export FAKECHROOT_CMD_SUBST=/sbin/ldconfig=/bin/true:/usr/sbin/glibc_post_upgrade.i686=/bin/true:/usr/sbin/glibc_post_upgrade.x86_64=/bin/true:/usr/sbin/build-locale-archive=/bin/true:/usr/sbin/libgcc_post_upgrade=/bin/true:/sbin/new-kernel-pkg=/bin/true:/usr/sbin/nscd=/bin/true ++export FAKECHROOT_CMD_SUBST=/sbin/ldconfig=/bin/true:/bin/glibc_post_upgrade.i686=/bin/true:/bin/glibc_post_upgrade.x86_64=/bin/true:/bin/build-locale-archive=/bin/true:/bin/libgcc_post_upgrade=/bin/true:/sbin/new-kernel-pkg=/bin/true:/bin/nscd=/bin/true + export FAKECHROOT_AF_UNIX_PATH=/tmp + + rm -rf $destdir + + if ! which chroot >/dev/null; then +- PATH=$PATH:/usr/sbin:/sbin ++ PATH=$PATH:/bin:/sbin + export PATH + fi + +@@ -38,8 +38,8 @@ + rm -fv $destdir/etc/yum.repos.d/*update*.repo + sed -i 's/^enabled=0/enabled=1/' $destdir/etc/yum.repos.d/*.repo + +-HOME=/root fakeroot fakechroot /usr/sbin/chroot $destdir yum -y update +-HOME=/root fakeroot fakechroot /usr/sbin/chroot $destdir yum -y install fakeroot gcc gettext make rpm-build tar yum-utils ++HOME=/root fakeroot fakechroot /bin/chroot $destdir yum -y update ++HOME=/root fakeroot fakechroot /bin/chroot $destdir yum -y install fakeroot gcc gettext make rpm-build tar yum-utils + + # rpmbuild has statically compiled glob() function so buildroot directory have to be the same inside and outside fakechroot. + FAKECHROOT_EXCLUDE_PATH=$FAKECHROOT_EXCLUDE_PATH:/tmp +diff -ur test.orig/t/chroot.t test/t/chroot.t +--- test.orig/t/chroot.t 2011-04-30 19:05:41.000000000 +0300 ++++ test/t/chroot.t 2011-04-30 19:06:36.000000000 +0300 +@@ -15,7 +15,7 @@ + else + + for testtree in testtree /testtree ./testtree /./testtree testtree/. testtree/./.; do +- t=`$srcdir/$chroot.sh testtree /usr/sbin/chroot $testtree /bin/cat /CHROOT` ++ t=`$srcdir/$chroot.sh testtree /bin/chroot $testtree /bin/cat /CHROOT` + test "$t" = "testtree/testtree" || not + ok "$chroot chroot $testtree:" $t + done +diff -ur test.orig/testtree.sh test/testtree.sh +--- test.orig/testtree.sh 2011-04-30 19:05:41.000000000 +0300 ++++ test/testtree.sh 2011-04-30 19:05:48.000000000 +0300 +@@ -64,7 +64,7 @@ + '/usr/bin/seq' \ + '/usr/bin/strace' \ + '/usr/bin/touch' \ +- '/usr/sbin/chroot' \ ++ '/bin/chroot' \ + '/usr/local/bin/bash' \ + '/usr/local/bin/gseq' \ + '/usr/local/bin/ltrace' \ diff --git a/sys-apps/fakechroot/files/fakechroot-2.14-fix_test_hardened.patch b/sys-apps/fakechroot/files/fakechroot-2.14-fix_test_hardened.patch new file mode 100644 index 0000000..f3541a6 --- /dev/null +++ b/sys-apps/fakechroot/files/fakechroot-2.14-fix_test_hardened.patch @@ -0,0 +1,23 @@ +# Some escape nested chroot are forbidden with grsecurity therefore hardened. +# Disable the test that doesn't pass anymore with grsecurity. + +diff -ur fakechroot-2.12.orig//test/t/escape-nested-chroot.t fakechroot-2.12/test/t/escape-nested-chroot.t +--- fakechroot-2.12.orig//test/t/escape-nested-chroot.t 2011-07-04 11:33:03.495441000 +0200 ++++ fakechroot-2.12/test/t/escape-nested-chroot.t 2011-07-04 11:33:45.468440998 +0200 +@@ -24,16 +24,6 @@ + ok "$chroot test-chroot $paths (not escaped):" $t + done + +- for paths in '. .'; do +- t=`$srcdir/$chroot.sh testtree /bin/test-chroot / /testtree 'ls -id /' $paths 'ls -id /' 2>&1` +- f1=`echo $t | awk '{print $1}'` +- f2=`echo $t | awk '{print $2}'` +- f3=`echo $t | awk '{print $3}'` +- f4=`echo $t | awk '{print $4}'` +- test "$f2" = "/" -a "$f4" = "/" -a "$f1" != "$f3" || not +- ok "$chroot test-chroot $paths (escaped):" $t +- done +- + fi + + done diff --git a/sys-apps/fakechroot/metadata.xml b/sys-apps/fakechroot/metadata.xml new file mode 100644 index 0000000..be3be37 --- /dev/null +++ b/sys-apps/fakechroot/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>anthoine.bourgeois@gmail.com</email> + <description>Maintainer, assign bugs</description> + </maintainer> + <maintainer> + <email>dilfridge@gentoo.org</email> + <description>Proxy Maintainer, CC on bugs</description> + </maintainer> + <maintainer> + <email>c1pher@gentoo.org</email> + <description>Proxy Maintainer, CC on bugs</description> + </maintainer> +</pkgmetadata> |