aboutsummaryrefslogtreecommitdiff
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-03-04 22:18:27 +0100
commit90f08140138f69c3c5a1bc173a624a55ff6f095b (patch)
treed63e28d4ab43f19800dcb4591e95940fece3a055
parent[no-patch] Gentoo: Add support files (diff)
downloadglibc-90f08140138f69c3c5a1bc173a624a55ff6f095b.tar.gz
glibc-90f08140138f69c3c5a1bc173a624a55ff6f095b.tar.bz2
glibc-90f08140138f69c3c5a1bc173a624a55ff6f095b.zip
[no-patch] Make patchset generation script also work with master
-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