summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-02-21 17:09:57 +0000
committerMike Frysinger <vapier@gentoo.org>2011-02-21 17:09:57 +0000
commitc338d48ee526358e6b82f43609a24980289a0353 (patch)
tree298f3e0ce5f0c5c0c4a8840377f38752bbe99b70 /sys-block/parted
parentNew ebuild: ayttm IM client (diff)
downloadgentoo-2-c338d48ee526358e6b82f43609a24980289a0353.tar.gz
gentoo-2-c338d48ee526358e6b82f43609a24980289a0353.tar.bz2
gentoo-2-c338d48ee526358e6b82f43609a24980289a0353.zip
Fix from upstream gnulib for sandbox violations with git repos in higher dirs.
(Portage version: 2.2.0_alpha24/cvs/Linux x86_64)
Diffstat (limited to 'sys-block/parted')
-rw-r--r--sys-block/parted/ChangeLog7
-rw-r--r--sys-block/parted/files/parted-2.3-git-version-gen.patch39
-rw-r--r--sys-block/parted/parted-2.3-r1.ebuild4
3 files changed, 48 insertions, 2 deletions
diff --git a/sys-block/parted/ChangeLog b/sys-block/parted/ChangeLog
index 96176de5651b..54ff9266e801 100644
--- a/sys-block/parted/ChangeLog
+++ b/sys-block/parted/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-block/parted
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/parted/ChangeLog,v 1.3 2011/01/29 05:45:06 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/parted/ChangeLog,v 1.4 2011/02/21 17:09:57 vapier Exp $
+
+ 21 Feb 2011; Mike Frysinger <vapier@gentoo.org> parted-2.3-r1.ebuild,
+ +files/parted-2.3-git-version-gen.patch:
+ Fix from upstream gnulib for sandbox violations with git repos in higher
+ dirs.
*parted-2.3-r1 (29 Jan 2011)
diff --git a/sys-block/parted/files/parted-2.3-git-version-gen.patch b/sys-block/parted/files/parted-2.3-git-version-gen.patch
new file mode 100644
index 000000000000..32f85d4bdf54
--- /dev/null
+++ b/sys-block/parted/files/parted-2.3-git-version-gen.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/355045
+
+[PATCH] git-version-gen: skip "-dirty" check when appropriate
+
+* build-aux/git-version-gen: Don't run any git commands
+when the version comes from .tarball-version. Prior to this,
+we would run git update-index --refresh even from a just-unpacked
+tarball directory, and that could affect a .git/ directory in a
+parent of the build directory. Reported by Mike Frysinger.
+
+diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
+index 68c7d64..686f703 100755
+--- a/build-aux/git-version-gen
++++ b/build-aux/git-version-gen
+@@ -124,13 +124,16 @@
+ # Change the first '-' to a '.', so version-comparing tools work properly.
+ # Remove the "g" in git describe's output string, to save a byte.
+ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
++ v_from_git=1
+ else
+ v=UNKNOWN
++ v_from_git=
+ fi
+
+ v=`echo "$v" |sed 's/^v//'`
+
+ # Don't declare a version "dirty" merely because a time stamp has changed.
++if test -n "$v_from_git"; then
+ git update-index --refresh > /dev/null 2>&1
+
+ dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+@@ -142,6 +145,7 @@
+ *) v="$v-dirty" ;;
+ esac ;;
+ esac
++fi
+
+ # Omit the trailing newline, so that m4_esyscmd can use the result directly.
+ echo "$v" | tr -d "$nl"
diff --git a/sys-block/parted/parted-2.3-r1.ebuild b/sys-block/parted/parted-2.3-r1.ebuild
index 194ca38d73dc..bd33da3aefc0 100644
--- a/sys-block/parted/parted-2.3-r1.ebuild
+++ b/sys-block/parted/parted-2.3-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/parted/parted-2.3-r1.ebuild,v 1.1 2011/01/29 05:45:06 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/parted/parted-2.3-r1.ebuild,v 1.2 2011/02/21 17:09:57 vapier Exp $
EAPI="3"
@@ -33,6 +33,8 @@ DEPEND="
"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-git-version-gen.patch #355045
+
# Remove tests known to FAIL instead of SKIP without OS/userland support
sed -i libparted/tests/Makefile.am \
-e 's|t3000-symlink.sh||g' || die "sed failed"