3 reldir=$HOME/linux-libre/releases
5 key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
11 rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
12 cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
14 if test -d $reldir/$rel; then
15 echo $reldir/$rel exists >&2
19 if test -h $reldir/LATEST-$cbr.0; then
20 prev0=$(readlink $reldir/LATEST-$cbr.0)
21 prevn=$(readlink $reldir/LATEST-$cbr.N)
24 prev0=$(readlink $reldir/LATEST-$cbr.0)
25 prevn=$(readlink $reldir/LATEST-$cbr.N)
28 for up in linus stable; do
29 git rev-parse --verify -q $up/v$rup && break
32 git verify-tag $up/v$rup &&
34 { test -d scripts/v$rel ||
35 git worktree add --detach scripts/v$rel scripts/$cbr
38 git worktree add --detach sources/v$rel $up/v$rup &&
40 git worktree add --detach logs/v$rel public/logs/v$prevn &&
42 (cd logs/v$rel && git rm -f linux-*) &&
46 ../../scripts/v$rel/deblob-$cbr >& ../../logs/v$rel/linux-libre-$rel.log &&
47 git commit -m "GNU Linux-libre v$rel incremental" -a &&
51 DATE=$(git cat-file -p incr/v$rel |
52 gawk '/^(author|tagger)/ {
53 print strftime(PROCINFO["strftime"], $(NF-1))
55 export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
59 git reset --soft -q public/sources/v$prevn &&
60 git commit --amend --reset-author -S$key \
61 -m "GNU Linux-libre $rel" &&
62 git tag -m "GNU Linux-libre $rel" -s -u $key sources/v$rel &&
64 git reset --hard incr/v$rel^ &&
65 { git merge --no-commit incr/v$prevn || :; } &&
66 git diff incr/v$rel > ../../linux-libre-$rel.patckT &&
67 mv -v ../../linux-libre-$rel.patckT ../../linux-libre-$rel.patck
70 git archive --format tar --prefix=linux-$rup/ -o linux-libre-$rel.tar sources/v$rel &&
71 gpg --armor --detach-sign linux-libre-$rel.tar &&
72 mv linux-libre-$rel.tar.asc logs/v$rel/linux-libre-$rel.tar.sign &&
74 for f in linux-libre-; do
75 if cmp logs/v$rel/$f$rel.log $reldir/$prevn/$f$prevn.log; then
76 ln -vf $reldir/$prevn/$f$prevn.log logs/v$rel/$f$rel.log &&
77 ln -vf $reldir/$prevn/$f$prevn.log.sign logs/v$rel/$f$rel.log.sign
79 gpg --armor --detach-sign logs/v$rel/$f$rel.log &&
80 mv -v logs/v$rel/$f$rel.log.asc logs/v$rel/$f$rel.log.sign
87 git commit --amend --reset-author -S$key -m "GNU Linux-libre $rel logs" &&
88 git tag -m "GNU Linux-libre $rel logs" -s -u $key logs/v$rel
91 git diff --src-prefix=linux-libre-$prev0/ --dst-prefix=linux-libre-$rel/ \
92 public/sources/v$prev0 sources/v$rel -- > patch-$prev0-$rel &&
94 if test "$prev0" != "$prevn"; then
95 git diff --src-prefix=linux-libre-$prevn/ --dst-prefix=linux-libre-$rel/ \
96 public/sources/v$prevn sources/v$rel -- > patch-$prevn-$rel
99 { scripts/v$rel/deblob-check --use-awk linux-libre-$rel.tar ||
100 scripts/v$rel/deblob-check --use-awk -C linux-libre-$rel.tar \
101 > linux-libre-$rel.check ||
102 { success=false; continue; }; }
106 $success && echo all revs cleaned up, awaiting manual check results... &&
111 rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
112 cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
114 if test -d $reldir/$rel; then
115 echo $reldir/$rel exists >&2
119 if test -h $reldir/LATEST-$cbr.0; then
120 prev0=$(readlink $reldir/LATEST-$cbr.0)
121 prevn=$(readlink $reldir/LATEST-$cbr.N)
124 prev0=$(readlink $reldir/LATEST-$cbr.0)
125 prevn=$(readlink $reldir/LATEST-$cbr.N)
128 DATE=$(git cat-file -p incr/v$rel |
129 gawk '/^(author|tagger)/ {
130 print strftime(PROCINFO["strftime"], $(NF-1))
132 export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
134 while test -f linux-libre-$rel.patck; do
135 echo please verify linux-libre-$rel.patck and move it away to complete the release
141 git reset --soft -q scripts/$cbr &&
142 otop=$(git rev-parse --verify -q HEAD) &&
143 { git commit -a -S$key -m "GNU Linux-libre $rel scripts" ||
144 if git status -su | grep .; then
148 case $rup:$(git rev-parse --verify -q HEAD) in
149 *-rc*:* | "$cbr":*) forcetag=: ;;
150 *:"$otop") forcetag=false ;;
154 git tag -m "GNU Linux-libre $rel scripts" -s -u $key \
157 git checkout scripts/$cbr &&
158 git reset --hard scripts/v$rel &&
163 for x in scripts sources logs; do
164 if git rev-parse --verify -q $x/v$rel > /dev/null ; then
165 git tag public/$x/v$rel $x/v$rel &&
172 $success && echo all git tagging done, now compressing... &&
177 rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
178 cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
180 if test -d $reldir/$rel; then
181 echo $reldir/$rel exists >&2
185 if test -h $reldir/LATEST-$cbr.0; then
186 prev0=$(readlink $reldir/LATEST-$cbr.0)
187 prevn=$(readlink $reldir/LATEST-$cbr.N)
190 prev0=$(readlink $reldir/LATEST-$cbr.0)
191 prevn=$(readlink $reldir/LATEST-$cbr.N)
194 DATE=$(git cat-file -p incr/v$rel |
195 gawk '/^(author|tagger)/ {
196 print strftime(PROCINFO["strftime"], $(NF-1))
198 export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
200 plist="patch-$prev0-$rel" &&
201 if test "$prev0" != "$prevn"; then
202 plist="$plist patch-$prevn-$rel"
205 list="linux-libre-$rel.tar $plist" &&
209 lzip -k9s64MiB $list &&
213 for f in $(ls scripts/v$rel); do
214 if cmp scripts/v$rel/$f $reldir/$prevn/$f; then
215 ln -v $reldir/$prevn/$f $reldir/$prevn/$f.sign $rel/
217 ln -v scripts/v$rel/$f $rel/ &&
218 gpg --armor --detach-sign $rel/$f &&
219 mv -v $rel/$f.asc $rel/$f.sign
223 ln -v logs/v$rel/linux-libre-$rel.* $rel/ &&
226 gpg --armor --detach-sign $f &&
227 mv -v $f.asc $rel/$f.sign
230 for ext in .bz2 .xz .lz; do
232 mv -v $f$ext $rel/ &&
233 gpg --armor --detach-sign $rel/$f$ext &&
234 mv -v $rel/$f$ext.asc $rel/$f$ext.sign
240 mv -v $rel $reldir/$rel &&
241 ln -snfv $rel $reldir/LATEST-$cbr.N &&
242 if test "$rup" = "$cbr"; then
243 ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-$cbr.0 &&
244 ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-${cbr%.*}.N
247 git worktree remove logs/v$rel &&
248 git worktree remove scripts/v$rel &&
249 git worktree remove --force sources/v$rel