Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/toolchain/glibc-patches:master commit in: /
Date: Thu, 14 May 2020 12:45:01
Message-Id: 1589460280.0374816013765ce62786243b695b8d98c6e8a2ef.dilfridge@gentoo
1 commit: 0374816013765ce62786243b695b8d98c6e8a2ef
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 14 12:44:02 2020 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Thu May 14 12:44:40 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/toolchain/glibc-patches.git/commit/?id=03748160
7
8 Update make-tarball.sh for separate glibc and glibc-patches repos
9
10 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
11
12 make-tarball.sh | 55 ++++++++++++++++++++++++++++++++++++++++++-------------
13 1 file changed, 42 insertions(+), 13 deletions(-)
14
15 diff --git a/make-tarball.sh b/make-tarball.sh
16 index a4f380d..1063e1b 100755
17 --- a/make-tarball.sh
18 +++ b/make-tarball.sh
19 @@ -1,28 +1,59 @@
20 #!/bin/bash
21
22 +mypathglibc=${GENTOO_GLIBC_REPO:-~/Gentoo/misc/glibc}
23 +mypathpatches=${GENTOO_GLIBC_PATCHES_REPO:-~/Gentoo/misc/glibc-patches}
24 +
25 +# I plan to extend this script a bit, to also help with the initial
26 +# Gentoo release branch creation. That's why I check so much for both
27 +# git repos... -A
28 +
29 PN="glibc"
30 PV=${1%/}
31 pver=$2
32
33 if [[ -z ${PV} ]] ; then
34 echo "Usage: $0 glibc-version patchset-version-to-be-created"
35 + echo "Important environment variables: GENTOO_GLIBC_REPO GENTOO_GLIBC_PATCHES_REPO"
36 echo "Please read the script before trying to use it :)"
37 exit 1
38 fi
39
40 -# check that we're in the root of a glibc git repo
41 +# check that we have a gentoo glibc patches git repo
42 +
43 +if [[ ! -f "${mypathpatches}/README.Gentoo.patches" ]] || [[ ! -d "${mypathpatches}/.git" ]] ; then
44 + echo "Error: GENTOO_GLIBC_PATCHES_REPO needs to point to the main directory of a Gentoo glibc patchset git clone"
45 + exit 1
46 +fi
47 +
48 +# check that we have a gentoo glibc git repo
49
50 -if [[ ! -f libc-abis ]] || [[ ! -d .git ]] ; then
51 - echo "Error: You need to call this script in the main directory of a Gentoo glibc git clone"
52 +if [[ ! -f "${mypathglibc}/libc-abis" ]] || [[ ! -d "${mypathglibc}/.git" ]] ; then
53 + echo "Error: GENTOO_GLIBC_REPO needs to point to the main directory of a Gentoo glibc git clone"
54 exit 1
55 fi
56
57 +# go into the gentoo patches repo
58 +
59 +cd "${mypathpatches}"
60 +
61 +# check that the working directory is clean
62 +
63 +mystatusinfo=$(git status --porcelain)
64 +if [[ ! -z "${mystatusinfo}" ]] ; then
65 + echo "Error: Your glibc patches working directory is not clean"
66 + exit 1
67 +fi
68 +
69 +# go into the gentoo glibc repo
70 +
71 +cd "${mypathglibc}"
72 +
73 # check that we're on a branch gentoo/${PV}
74
75 mybranchinfo=$(git status --porcelain -b|grep '^##')
76 mybranch=$(echo ${mybranchinfo}|sed -e 's:^## ::' -e 's:\.\.\..*$::')
77 if [[ ! "gentoo/${PV}" == "${mybranch}" ]] ; then
78 - echo "Error: Your git repository is on the incorrect branch ${mybranch}; should be gentoo/${PV}"
79 + echo "Error: Your glibc git repository is on the incorrect branch ${mybranch}; should be gentoo/${PV}"
80 exit 1
81 fi
82
83 @@ -30,7 +61,7 @@ fi
84
85 mystatusinfo=$(git status --porcelain)
86 if [[ ! -z "${mystatusinfo}" ]] ; then
87 - echo "Error: Your working directory is not clean"
88 + echo "Error: Your glibc working directory is not clean"
89 exit 1
90 fi
91
92 @@ -63,13 +94,14 @@ mkdir -p tmp/patches
93
94 # copy README.Gentoo.patches
95
96 -cp scripts/gentoo/README.Gentoo.patches tmp/ || exit 1
97 +cp "${mypathpatches}/README.Gentoo.patches" tmp/ || exit 1
98
99 # create and rename patches
100
101 if [[ "${PV}" == "9999" ]]; then
102 - # we're working with master, start from upstream master
103 - startpoint="master"
104 + # working with master is not supported anymore
105 + echo "Patchsets for git master are not supported anymore"
106 + exit 1
107 else
108 # release branch, start from upstream release tag
109 startpoint="glibc-${PV}"
110 @@ -78,6 +110,7 @@ fi
111 git format-patch ${startpoint}..HEAD > /dev/null
112
113 # remove all patches where the summary line starts with [no-tarball] or [no-patch]
114 +# this should not be needed anymore (no such commits), we can remove it once we're sure
115
116 rm -f 0???-no-tarball-*.patch
117 rm -f 0???-no-patch-*.patch
118 @@ -86,10 +119,6 @@ rm -f 0???-no-patch-*.patch
119
120 mv 0*.patch tmp/patches/ || exit 1
121
122 -# copy support files
123 -
124 -cp -r scripts/gentoo/extra tmp/ || exit 1
125 -
126 # add a history file
127
128 git log --stat --decorate ${startpoint}..HEAD > tmp/patches/README.history || exit 1
129 @@ -97,7 +126,7 @@ git log --stat --decorate ${startpoint}..HEAD > tmp/patches/README.history || ex
130 # package everything up
131
132 tar -Jcf ${PN}-${PV}-patches-${pver}.tar.xz \
133 - -C tmp patches extra README.Gentoo.patches || exit 1
134 + -C tmp patches README.Gentoo.patches || exit 1
135 rm -r tmp
136
137 du -b *.tar.xz