summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2018-01-14 18:17:40 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-08-03 23:10:09 +0200
commitf3275e9b0d0c08dfe254c10810d02dd19caa45d6 (patch)
tree4cecd2206dcab8d70f20597b2afb238944271360 /scripts
parentGentoo: disable tests that fail only in sandbox (diff)
downloadglibc-f3275e9b0d0c08dfe254c10810d02dd19caa45d6.tar.gz
glibc-f3275e9b0d0c08dfe254c10810d02dd19caa45d6.tar.bz2
glibc-f3275e9b0d0c08dfe254c10810d02dd19caa45d6.zip
[no-patch] Make patchset generation script also work with master
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gentoo/README.Gentoo.patches13
-rwxr-xr-xscripts/gentoo/make-tarball.sh21
2 files changed, 17 insertions, 17 deletions
diff --git a/scripts/gentoo/README.Gentoo.patches b/scripts/gentoo/README.Gentoo.patches
index 8e9777238d..c6f94dc863 100644
--- a/scripts/gentoo/README.Gentoo.patches
+++ b/scripts/gentoo/README.Gentoo.patches
@@ -21,15 +21,6 @@ Currently, https://github.com/gentoo/glibc
=== How ===
===========
-For historical reasons, the patch naming convention is slightly different
-from Git. When "git format-patch" generates a patch file of the name
- xxxx-commit-message.patch
-it is placed into the tarball as
- xxxx_all_commit-message.patch
-
-This signifies that the patch should be applied on all Gentoo "arches".
-In the past also patches were included that should be applied only on one
-specific arch (say, hppa). We're trying hard to avoid that in the future.
-
-All patches should apply with -p1 (so they can be used both with the legacy
+Patches are named exactly as generated by "git format-patch".
+All patches thus apply with -p1 (so they can be used both with the legacy
epatch function and the new, more strict eapply function).
diff --git a/scripts/gentoo/make-tarball.sh b/scripts/gentoo/make-tarball.sh
index 8c9070b54a..09950d1c7d 100755
--- a/scripts/gentoo/make-tarball.sh
+++ b/scripts/gentoo/make-tarball.sh
@@ -12,7 +12,7 @@ fi
# check that we're in the root of a glibc git repo
-if [[ ! -f ChangeLog.old-ports-hppa ]] || [[ ! -d .git ]] ; then
+if [[ ! -f libc-abis ]] || [[ ! -d .git ]] ; then
echo "Error: You need to call this script in the main directory of a Gentoo glibc git clone"
exit 1
fi
@@ -67,15 +67,24 @@ cp scripts/gentoo/README.Gentoo.patches tmp/ || exit 1
# create and rename patches
-git format-patch glibc-${PV}..HEAD > /dev/null
+if [[ "${PV}" == "9999" ]]; then
+ # we're working with master, start from upstream master
+ startpoint="master"
+else
+ # release branch, start from upstream release tag
+ startpoint="glibc-${PV}"
+fi
+
+git format-patch ${startpoint}..HEAD > /dev/null
# remove all patches where the summary line starts with [no-tarball] or [no-patch]
+
rm -f 0???-no-tarball-*.patch
rm -f 0???-no-patch-*.patch
-for myname in 0*.patch ; do
- mv ${myname} tmp/patches/$(echo ${myname}|sed -e 's:^\(....\)-:\1_all_:') || exit 1
-done
+# move patches into temporary directory
+
+mv 0*.patch tmp/patches/ || exit 1
# copy support files
@@ -83,7 +92,7 @@ cp -r scripts/gentoo/extra tmp/ || exit 1
# add a history file
-git log --stat --decorate glibc-${PV}..HEAD > tmp/patches/README.history || exit 1
+git log --stat --decorate ${startpoint}..HEAD > tmp/patches/README.history || exit 1
# package everything up