#! /bin/bash
-reldir=$HOME/linux-libre/releases
+$0.cln "$@" &&
-key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
+echo all revs cleaned up, awaiting manual check results... &&
-success=:
-for rel
-do
+$0.pub "$@" &&
-rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
-cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
+echo all git tagging done, now compressing... &&
-if test -d $reldir/$rel; then
- echo $reldir/$rel exists >&2
- continue
-fi
+$0.rel "$@"
-if test -h $reldir/LATEST-$cbr.0; then
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-else
- cbr=$rup
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-fi
-
-for up in linus stable; do
- git rev-parse --verify -q $up/v$rup && break
-done
-
-git verify-tag $up/v$rup &&
-
-{ test -d scripts/v$rel ||
- git worktree add --detach scripts/v$rel scripts/$cbr
-} &&
-
-git worktree add --detach sources/v$rel $up/v$rup &&
-
-git worktree add --detach logs/v$rel public/logs/v$prevn &&
-
-(cd logs/v$rel && git rm -f linux-*) &&
-
-(
- cd sources/v$rel &&
- ../../scripts/v$rel/deblob-$cbr >& ../../logs/v$rel/linux-libre-$rel.log &&
- git commit -m "GNU Linux-libre v$rel incremental" -a &&
- git tag incr/v$rel
-) &&
-
-DATE=$(git cat-file -p incr/v$rel |
- gawk '/^(author|tagger)/ {
- print strftime(PROCINFO["strftime"], $(NF-1))
- }') &&
-export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
-
-(
- cd sources/v$rel &&
- git reset --soft -q public/sources/v$prevn &&
- git commit --amend --reset-author -S$key \
- -m "GNU Linux-libre $rel" &&
- git tag -m "GNU Linux-libre $rel" -s -u $key sources/v$rel &&
-
- git reset --hard incr/v$rel^ &&
- { git merge --no-commit incr/v$prevn || :; } &&
- git diff incr/v$rel > ../../linux-libre-$rel.patckT &&
- mv -v ../../linux-libre-$rel.patckT ../../linux-libre-$rel.patck
- ) &&
-
-git archive --format tar --prefix=linux-$rup/ -o linux-libre-$rel.tar sources/v$rel &&
-gpg --armor --detach-sign linux-libre-$rel.tar &&
-mv linux-libre-$rel.tar.asc logs/v$rel/linux-libre-$rel.tar.sign &&
-
-for f in linux-libre-; do
- if cmp logs/v$rel/$f$rel.log $reldir/$prevn/$f$prevn.log; then
- ln -vf $reldir/$prevn/$f$prevn.log logs/v$rel/$f$rel.log &&
- ln -vf $reldir/$prevn/$f$prevn.log.sign logs/v$rel/$f$rel.log.sign
- else
- gpg --armor --detach-sign logs/v$rel/$f$rel.log &&
- mv -v logs/v$rel/$f$rel.log.asc logs/v$rel/$f$rel.log.sign
- fi
-done &&
-
-(
- cd logs/v$rel &&
- git add linux* &&
- git commit --amend --reset-author -S$key -m "GNU Linux-libre $rel logs" &&
- git tag -m "GNU Linux-libre $rel logs" -s -u $key logs/v$rel
-) &&
-
-git diff --src-prefix=linux-libre-$prev0/ --dst-prefix=linux-libre-$rel/ \
- public/sources/v$prev0 sources/v$rel -- > patch-$prev0-$rel &&
-
-if test "$prev0" != "$prevn"; then
- git diff --src-prefix=linux-libre-$prevn/ --dst-prefix=linux-libre-$rel/ \
- public/sources/v$prevn sources/v$rel -- > patch-$prevn-$rel
-fi &&
-
-{ scripts/v$rel/deblob-check --use-awk linux-libre-$rel.tar ||
- scripts/v$rel/deblob-check --use-awk -C linux-libre-$rel.tar \
- > linux-libre-$rel.check ||
- { success=false; continue; }; }
-
-done &&
-
-$success && echo all revs cleaned up, awaiting manual check results... &&
-
-for rel
-do
-
-rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
-cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
-
-if test -d $reldir/$rel; then
- echo $reldir/$rel exists >&2
- continue
-fi
-
-if test -h $reldir/LATEST-$cbr.0; then
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-else
- cbr=$rup
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-fi
-
-DATE=$(git cat-file -p incr/v$rel |
- gawk '/^(author|tagger)/ {
- print strftime(PROCINFO["strftime"], $(NF-1))
- }') &&
-export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
-
-while test -f linux-libre-$rel.patck; do
- echo please verify linux-libre-$rel.patck and move it away to complete the release
- sleep 30
-done &&
-
-(
- cd scripts/v$rel &&
- git reset --soft -q scripts/$cbr &&
- otop=$(git rev-parse --verify -q HEAD) &&
- { git commit -a -S$key -m "GNU Linux-libre $rel scripts" ||
- if git status -su | grep .; then
- success=false
- continue
- fi; } &&
- case $rup:$(git rev-parse --verify -q HEAD) in
- *-rc*:* | "$cbr":*) forcetag=: ;;
- *:"$otop") forcetag=false ;;
- *) forcetag=: ;;
- esac &&
- if $forcetag; then
- git tag -m "GNU Linux-libre $rel scripts" -s -u $key \
- -f \
- scripts/v$rel &&
- git checkout scripts/$cbr &&
- git reset --hard scripts/v$rel &&
- git checkout HEAD
- fi
-) &&
-
-for x in scripts sources logs; do
- if git rev-parse --verify -q $x/v$rel > /dev/null ; then
- git tag public/$x/v$rel $x/v$rel &&
- git tag -d $x/v$rel
- fi
-done
-
-done &&
-
-$success && echo all git tagging done, now compressing... &&
-
-for rel
-do
-
-rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
-cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
-
-if test -d $reldir/$rel; then
- echo $reldir/$rel exists >&2
- continue
-fi
-
-if test -h $reldir/LATEST-$cbr.0; then
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-else
- cbr=$rup
- prev0=$(readlink $reldir/LATEST-$cbr.0)
- prevn=$(readlink $reldir/LATEST-$cbr.N)
-fi
-
-DATE=$(git cat-file -p incr/v$rel |
- gawk '/^(author|tagger)/ {
- print strftime(PROCINFO["strftime"], $(NF-1))
- }') &&
-export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
-
-plist="patch-$prev0-$rel" &&
-if test "$prev0" != "$prevn"; then
- plist="$plist patch-$prevn-$rel"
-fi &&
-
-list="linux-libre-$rel.tar $plist" &&
-
-bzip2 -k9 $list &&
-xz -k9 $list &&
-lzip -k9s64MiB $list &&
-
-mkdir -v $rel &&
-
-for f in $(ls scripts/v$rel); do
- if cmp scripts/v$rel/$f $reldir/$prevn/$f; then
- gpg --verify $reldir/$prevn/$f.sign &&
- ln -v $reldir/$prevn/$f $reldir/$prevn/$f.sign $rel/
- else
- ln -v scripts/v$rel/$f $rel/ &&
- gpg --armor --detach-sign $rel/$f &&
- mv -v $rel/$f.asc $rel/$f.sign
- fi
-done &&
-
-ln -v logs/v$rel/linux-libre-$rel.* $rel/ &&
-
-for f in $plist; do
- gpg --armor --detach-sign $f &&
- mv -v $f.asc $rel/$f.sign
-done &&
-
-for ext in .bz2 .xz .lz; do
- for f in $list; do
- mv -v $f$ext $rel/ &&
- gpg --armor --detach-sign $rel/$f$ext &&
- mv -v $rel/$f$ext.asc $rel/$f$ext.sign
- done
-done &&
-
-rm -vf $list &&
-
-mv -v $rel $reldir/$rel &&
-ln -snfv $rel $reldir/LATEST-$cbr.N &&
-if test "$rup" = "$cbr"; then
- ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-$cbr.0 &&
- ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-${cbr%.*}.N
-fi &&
-
-git worktree remove logs/v$rel &&
-git worktree remove scripts/v$rel &&
-git worktree remove --force sources/v$rel
-
-done
-
-$success
exit
--- /dev/null
+#! /bin/bash
+
+reldir=$HOME/linux-libre/releases
+
+key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
+
+success=:
+for rel
+do
+
+rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
+cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
+
+if test -d $reldir/$rel; then
+ echo $reldir/$rel exists >&2
+ continue
+fi
+
+if test -h $reldir/LATEST-$cbr.0; then
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+elif test -h $reldir/LATEST-$rup.N; then
+ cbr=$rup
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+else
+ echo Neither $reldir/LATEST-$cbr.0 nor $reldir/LATEST-$rup.N exist >&2
+ exit 1
+fi
+
+for up in linus stable; do
+ git rev-parse --verify -q $up/v$rup && break
+done
+
+git verify-tag $up/v$rup &&
+
+{ test -d scripts/v$rel ||
+ git worktree add --detach scripts/v$rel scripts/$cbr
+} &&
+
+git worktree add --detach sources/v$rel $up/v$rup &&
+
+git worktree add --detach logs/v$rel public/logs/v$prevn &&
+
+(cd logs/v$rel && git rm -f linux-*) &&
+
+(
+ cd sources/v$rel &&
+ ../../scripts/v$rel/deblob-$cbr >& ../../logs/v$rel/linux-libre-$rel.log &&
+ git commit -m "GNU Linux-libre v$rel incremental" -a &&
+ git tag incr/v$rel
+) &&
+
+DATE=$(git cat-file -p incr/v$rel |
+ gawk '/^(author|tagger)/ {
+ print strftime(PROCINFO["strftime"], $(NF-1))
+ }') &&
+export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
+
+(
+ cd sources/v$rel &&
+ git reset --soft -q public/sources/v$prevn &&
+ git commit --amend --reset-author -S$key \
+ -m "GNU Linux-libre $rel" &&
+ git tag -m "GNU Linux-libre $rel" -s -u $key sources/v$rel &&
+
+ git reset --hard incr/v$rel^ &&
+ { git merge --no-commit incr/v$prevn || :; } &&
+ git diff incr/v$rel > ../../linux-libre-$rel.patckT &&
+ mv -v ../../linux-libre-$rel.patckT ../../linux-libre-$rel.patck
+ ) &&
+
+git archive --format tar --prefix=linux-$rup/ -o linux-libre-$rel.tar sources/v$rel &&
+gpg --armor --detach-sign linux-libre-$rel.tar &&
+mv linux-libre-$rel.tar.asc logs/v$rel/linux-libre-$rel.tar.sign &&
+
+for f in linux-libre-; do
+ if cmp logs/v$rel/$f$rel.log $reldir/$prevn/$f$prevn.log; then
+ ln -vf $reldir/$prevn/$f$prevn.log logs/v$rel/$f$rel.log &&
+ ln -vf $reldir/$prevn/$f$prevn.log.sign logs/v$rel/$f$rel.log.sign
+ else
+ gpg --armor --detach-sign logs/v$rel/$f$rel.log &&
+ mv -v logs/v$rel/$f$rel.log.asc logs/v$rel/$f$rel.log.sign
+ fi
+done &&
+
+(
+ cd logs/v$rel &&
+ git add linux* &&
+ git commit --amend --reset-author -S$key -m "GNU Linux-libre $rel logs" &&
+ git tag -m "GNU Linux-libre $rel logs" -s -u $key logs/v$rel
+) &&
+
+git diff --src-prefix=linux-libre-$prev0/ --dst-prefix=linux-libre-$rel/ \
+ public/sources/v$prev0 sources/v$rel -- > patch-$prev0-$rel &&
+
+if test "$prev0" != "$prevn"; then
+ git diff --src-prefix=linux-libre-$prevn/ --dst-prefix=linux-libre-$rel/ \
+ public/sources/v$prevn sources/v$rel -- > patch-$prevn-$rel
+fi &&
+
+{ scripts/v$rel/deblob-check --use-awk linux-libre-$rel.tar ||
+ scripts/v$rel/deblob-check --use-awk -C linux-libre-$rel.tar \
+ > linux-libre-$rel.check ||
+ { success=false; continue; }; }
+
+done &&
+
+$success
--- /dev/null
+#! /bin/bash
+
+reldir=$HOME/linux-libre/releases
+
+key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
+
+success=:
+for rel
+do
+
+rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
+cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
+
+if test -d $reldir/$rel; then
+ echo $reldir/$rel exists >&2
+ continue
+fi
+
+if test -h $reldir/LATEST-$cbr.0; then
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+elif test -h $reldir/LATEST-$rup.N; then
+ cbr=$rup
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+else
+ echo Neither $reldir/LATEST-$cbr.0 nor $reldir/LATEST-$rup.N exist >&2
+ exit 1
+fi
+
+DATE=$(git cat-file -p incr/v$rel |
+ gawk '/^(author|tagger)/ {
+ print strftime(PROCINFO["strftime"], $(NF-1))
+ }') &&
+export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
+
+while test -f linux-libre-$rel.patck; do
+ echo please verify linux-libre-$rel.patck and move it away to complete the release
+ sleep 30
+done &&
+
+(
+ cd scripts/v$rel &&
+ { { git reset --soft -q scripts/$cbr &&
+ otop=$(git rev-parse --verify -q HEAD); } ||
+ echo $rel | grep -q -e -rc; } &&
+ { git commit -a -S$key -m "GNU Linux-libre $rel scripts" ||
+ if git status -su | grep .; then
+ success=false
+ continue
+ fi; } &&
+ case $rup:$(git rev-parse --verify -q HEAD) in
+ *-rc*:* | "$cbr":*) forcetag=: ;;
+ *:"$otop") forcetag=false ;;
+ *) forcetag=: ;;
+ esac &&
+ if $forcetag; then
+ git tag -m "GNU Linux-libre $rel scripts" -s -u $key \
+ -f \
+ scripts/v$rel &&
+ git checkout scripts/$cbr &&
+ git reset --hard scripts/v$rel &&
+ git checkout HEAD
+ fi
+) &&
+
+for x in scripts sources logs; do
+ if git rev-parse --verify -q $x/v$rel > /dev/null ; then
+ git tag public/$x/v$rel $x/v$rel &&
+ git tag -d $x/v$rel
+ fi
+done
+
+done &&
+
+$success
\ No newline at end of file
--- /dev/null
+#! /bin/bash
+
+reldir=$HOME/linux-libre/releases
+
+key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
+
+success=:
+for rel
+do
+
+rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
+cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
+
+if test -d $reldir/$rel; then
+ echo $reldir/$rel exists >&2
+ continue
+fi
+
+if test -h $reldir/LATEST-$cbr.0; then
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+elif test -h $reldir/LATEST-$rup.N; then
+ cbr=$rup
+ prev0=$(readlink $reldir/LATEST-$cbr.0)
+ prevn=$(readlink $reldir/LATEST-$cbr.N)
+else
+ echo Neither $reldir/LATEST-$cbr.0 nor $reldir/LATEST-$rup.N exist >&2
+ exit 1
+fi
+
+DATE=$(git cat-file -p incr/v$rel |
+ gawk '/^(author|tagger)/ {
+ print strftime(PROCINFO["strftime"], $(NF-1))
+ }') &&
+export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
+
+plist="patch-$prev0-$rel" &&
+if test "$prev0" != "$prevn"; then
+ plist="$plist patch-$prevn-$rel"
+fi &&
+
+list="linux-libre-$rel.tar $plist" &&
+
+bzip2 -k9 $list &&
+xz -k9 $list &&
+lzip -k9s64MiB $list &&
+
+mkdir -v $rel &&
+
+for f in $(ls scripts/v$rel); do
+ if cmp scripts/v$rel/$f $reldir/$prevn/$f; then
+ gpg --verify $reldir/$prevn/$f.sign &&
+ ln -v $reldir/$prevn/$f $reldir/$prevn/$f.sign $rel/
+ else
+ ln -v scripts/v$rel/$f $rel/ &&
+ gpg --armor --detach-sign $rel/$f &&
+ mv -v $rel/$f.asc $rel/$f.sign
+ fi
+done &&
+
+ln -v logs/v$rel/linux-libre-$rel.* $rel/ &&
+
+for f in $plist; do
+ gpg --armor --detach-sign $f &&
+ mv -v $f.asc $rel/$f.sign
+done &&
+
+for ext in .bz2 .xz .lz; do
+ for f in $list; do
+ mv -v $f$ext $rel/ &&
+ gpg --armor --detach-sign $rel/$f$ext &&
+ mv -v $rel/$f$ext.asc $rel/$f$ext.sign
+ done
+done &&
+
+rm -vf $list &&
+
+mv -v $rel $reldir/$rel &&
+ln -snfv $rel $reldir/LATEST-$cbr.N &&
+if test "$rup" = "$cbr"; then
+ ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-$cbr.0 &&
+ ln -nfv $reldir/LATEST-$cbr.N $reldir/LATEST-${cbr%.*}.N
+fi &&
+
+git worktree remove logs/v$rel &&
+git worktree remove scripts/v$rel &&
+git worktree remove --force sources/v$rel
+
+done &&
+
+$success