retire unused scripts

Junio C Hamano committed Nov 7, 2023 at 14:13 UTC c59a7f23373ff5a432b058a72dcd394d730fb2f6
6 files changed -591
AT deleted
-196
@@ -1,196 +0,0 @@
1 -#!/bin/sh
2 -
3 -log=Meta/AT.log
4 ->>"$log"
5 -buildlog=Meta/AT.build-logs
6 -mkdir -p "$buildlog"
7 -t="/tmp/AT.$$"
8 -
9 -trap 'rm -f "$t.*"; exit' 0 1 2 3 15
10 -
11 -_x40="[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"
12 -_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
13 -
14 -log_prune () {
15 - cp "$log" "$log.bak"
16 -
17 - git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
18 - git rev-list --not ko/maint --not --stdin |
19 - while read commit
20 - do
21 - git rev-parse --verify "$commit^{tree}"
22 - done | sort -u >"$t.tree0"
23 - sed -ne "s/A \($_x40\) .*/\1/p" "$log" | sort -u >"$t.tree1"
24 - comm -13 "$t.tree0" "$t.tree1" | sed -e 's|.*|/^A &/d|' >"$t.prune"
25 -
26 - next=$(git rev-parse --verify "refs/heads/next^0")
27 - ko_next=$(git rev-parse --verify "refs/remotes/ko/next^0")
28 - echo "/^N /{
29 - s/^N $next /&/
30 - t ok
31 - s/^N $ko_next /&/
32 - t ok
33 - d
34 - : ok
35 -}" >>"$t.prune"
36 -
37 - sed -f "$t.prune" "$log" >"$t.pruned"
38 - cat "$t.pruned" >"$log"
39 -}
40 -
41 -check_skip_test () {
42 - GIT_SKIP_TESTS=
43 - git diff --name-only ko/master "$1" >"$t.d"
44 - if ! grep -q -e git-svn "$t.d"
45 - then
46 - GIT_SKIP_TESTS="$GIT_SKIP_TESTS t91??"
47 - fi
48 - if ! grep -q -e git-cvsexportcommit "$t.d"
49 - then
50 - GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9200"
51 - fi
52 - if ! grep -q -e git-cvsimport "$t.d"
53 - then
54 - GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9600"
55 - fi
56 - if test -n "$GIT_SKIP_TESTS"
57 - then
58 - export GIT_SKIP_TESTS
59 - else
60 - unset GIT_SKIP_TESTS
61 - fi
62 -}
63 -
64 -autotest () {
65 - commit=$(git rev-parse --verify "$1^0") &&
66 - tree=$(git rev-parse --verify "$commit^{tree}") || return 1
67 - grep -s "^A $tree " "$log" >/dev/null && return 0
68 - o="$buildlog/$tree"
69 -
70 - git reset -q --hard HEAD^0 &&
71 - git checkout -q "$commit^0" || return 1
72 -
73 - check_skip_test "$tree"
74 -
75 - PAGER= git show -s --pretty='format:* %h %s%n' "$commit" --
76 - if ! Meta/Make -pedantic >"$o" 2>&1
77 - then
78 - status="build error"
79 - elif ! Meta/Make -pedantic test >>"$o" 2>&1
80 - then
81 - status="test error"
82 - else
83 - status=ok
84 - rm -f "$o"
85 - fi
86 - : Meta/Make clean >/dev/null 2>&1
87 - echo "A $tree $status" >>"$log"
88 - echo "$status"
89 -}
90 -
91 -append_to_status () {
92 - if test -z "$status"
93 - then
94 - status="$1"
95 - else
96 - status="$status; $1"
97 - fi
98 -}
99 -
100 -nexttest () {
101 - mb=$(git merge-base "$commit" "$next") || return 1
102 - test "$mb" = "$commit" && return 0
103 - grep -s "^N $next $commit " "$log" >/dev/null && return 0
104 -
105 - branch="${refname#refs/heads/}"
106 - git reset -q --hard next^0
107 -
108 - echo "* $branch"
109 -
110 - status= skip_build=
111 - if ! git merge "$commit" >/dev/null 2>&1
112 - then
113 - conflict_count=$(git ls-files -u |
114 - sed -e 's/.* //' |
115 - sort -u |
116 - xargs grep -e '^<<<<<<< ' |
117 - wc -l)
118 - if test $conflict_count = 0
119 - then
120 - append_to_status "rerere ok"
121 - else
122 - skip_build=t
123 - append_to_status "conflict $conflict_count"
124 - fi
125 - fi
126 - if test -z "$skip_build"
127 - then
128 - o="$buildlog/$commit"
129 - check_skip_test "$commit"
130 - if ! Meta/Make -pedantic >"$o" 2>&1
131 - then
132 - append_to_status "build error"
133 - elif ! Meta/Make -pedantic test >>"$o" 2>&1
134 - then
135 - append_to_status "test error"
136 - else
137 - append_to_status "test ok"
138 - rm -f "$o"
139 - fi
140 - fi
141 - : Meta/Make clean >/dev/null 2>&1
142 - echo "N $next $commit $status" >>"$log"
143 - echo "$status"
144 -}
145 -
146 -loop () {
147 - Meta/Make clean >/dev/null 2>&1
148 - git reset --hard -q
149 - git checkout -q HEAD^0
150 - next=$(git rev-parse --verify "refs/remotes/ko/next^0")
151 -
152 - while :
153 - do
154 - log_prune
155 -
156 - date
157 -
158 - l0=$(ls -l "$log")
159 -
160 - git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
161 - git rev-list --not ko/maint ko/master --not --stdin |
162 - while read commit
163 - do
164 - autotest "$commit" || echo "oops?"
165 - done
166 -
167 - l1=$(ls -l "$log")
168 - test "$l0" = "$l1" || continue
169 -
170 - git for-each-ref --format='%(objectname) %(refname)' \
171 - 'refs/heads/*/*' |
172 - while read commit refname
173 - do
174 - nexttest "$commit" "$refname" || echo "oops?"
175 - done
176 -
177 - l1=$(ls -l "$log")
178 - test "$l0" = "$l1" || continue
179 -
180 - sleep 600 || exit
181 - done
182 -}
183 -
184 -case "$#" in
185 -0)
186 - loop
187 - exit ;;
188 -esac
189 -
190 -(
191 - git rev-list --no-walk "$@" 2>/dev/null || git rev-list "$@"
192 -) |
193 -while read commit
194 -do
195 - autotest "$commit"
196 -done
CB deleted
-13
@@ -1,13 +0,0 @@
1 -#!/bin/sh
2 -# Cull topic branches
3 -
4 -git for-each-ref --merged maint 'refs/heads/*/*' |
5 -while read commit type name
6 -do
7 - git for-each-ref --count=1 --sort=version:refname \
8 - --contains "$name" \
9 - --format="%(taggerdate:iso) #%(refname:strip=2) $name" \
10 - refs/tags/
11 -done |
12 -sort |
13 -sed -e 's/[^#]*#//'
DoKernelOrg deleted
-177
@@ -1,177 +0,0 @@
1 -#!/bin/sh
2 -
3 -exec 3>&2 >./:all.log 2>&1
4 -
5 -ln_or_cp () {
6 - ln -f "$@" || cp -f "$@"
7 -}
8 -
9 -STAGE= narch= arch= master= jobs= rpm=t final= clean_stage=
10 -G=/pub/software/scm/git
11 -THIS=$(git describe HEAD)
12 -
13 -while case "$1" in -*) ;; *) break ;; esac
14 -do
15 - case "$1" in
16 - --master) master=t ;;
17 - --slave) master=f ;;
18 - -j*) jobs="$1" ;;
19 - --dist-only) rpm=f ;;
20 - --stage=?*) STAGE=${1#--stage=} ;;
21 - --clean-stage) clean_stage=t ;;
22 - --final) final=t ;;
23 - --pub=?*) G=${1#--pub=} ;;
24 - *) echo >&3 "Eh? $1"; exit 1 ;;
25 - esac
26 - shift
27 -done
28 -
29 -while test -n "$STAGE" && test "$STAGE" != "${STAGE%/}"
30 -do
31 - STAGE="${STAGE%/}"
32 -done
33 -
34 -if test -n "$clean_stage" && test -d "$STAGE/$G"
35 -then
36 - echo -n "Remove $STAGE/$G [y/N]? "
37 - read yesno
38 - case "$yesno" in
39 - [yY])
40 - rm -fr "$STAGE/$G" &&
41 - mkdir -p "$STAGE/$G" || exit ;;
42 - *)
43 - echo "Not removing, then"
44 - exit 0 ;;
45 - esac
46 -fi
47 -
48 -if test -z "$master"
49 -then
50 - case "$(hostname)" in
51 - hera.kernel.org) master=t ;;
52 - *) master=f ;;
53 - esac
54 -fi
55 -
56 -if test t = "$master"
57 -then
58 - narch='x86_64 i386 i686'
59 - if test -z "$final"
60 - then
61 - case "$STAGE" in
62 - ?*) final=f ;;
63 - '') final=t ;;
64 - esac
65 - fi
66 -else
67 - if test t != "$rpm"
68 - then
69 - echo >&3 "'--dist-only' only makes sense on the master machine"
70 - exit 1
71 - fi
72 - if test t = "$final"
73 - then
74 - echo >&3 "'--final' only makes sense on the master machine"
75 - exit 1
76 - fi
77 -fi
78 -
79 -eval $(rpm --showrc | sed -ne '
80 - s/^-14: dist[ ]*\./dist=/p
81 - s/^-11= _target_cpu[ ]*/arch=/p
82 -') && test -n "$dist" && test -n "$arch" || exit 1
83 -
84 -d='
85 -MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/"
86 -ASCIIDOC_NO_ROFF=YesPlease
87 -ASCIIDOC8=YesPlease
88 -BLK_SHA1=YesPlease
89 -GNU_ROFF=YesPlease
90 -'
91 -
92 -rm -f version
93 -echo "* Building $THIS"
94 -
95 -make $jobs git &&
96 -V=`./git --version | sed -e 's/git version //'` || exit
97 -
98 -make $jobs dist || exit
99 -
100 -if test t = "$rpm"
101 -then
102 - NEEDS_CRYPTO_WITH_SSL=YesPlease make $jobs $d rpm || exit
103 -fi
104 -
105 -if test t != "$master"
106 -then
107 - (
108 - cd "$HOME/rpms/" &&
109 - tar cf "TARPIT/$V.$arch.$dist.tar" \
110 - RPMS/$arch/*-$V-*.$dist.$arch.rpm &&
111 - ls -ld $HOME/rpms/TARPIT/$V.$arch.$dist.tar
112 - ) || exit
113 - make clean
114 - echo >&2 "Done -- move RPMS to the master machine."
115 - echo >&2 "scp $HOME/rpms/TARPIT/$V.$arch.$dist.tar master.kernel.org:rpms/TARPIT"
116 - echo >&2 "sha1sum -c <<\EOF"
117 - (cd $HOME/rpms && sha1sum TARPIT/$V.$arch.$dist.tar) >&2
118 - echo >&2 "EOF"
119 - exit
120 -fi
121 -
122 -make $jobs $d dist-doc || exit
123 -
124 -mkdir -p "$STAGE$G" &&
125 -ln_or_cp git-$V.tar.gz "$STAGE$G/." &&
126 -ln_or_cp git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz "$STAGE$G/." &&
127 -mkdir -p "$STAGE$G/docs/v$V" &&
128 -tar Cxf "$STAGE$G/docs/v$V" "$STAGE$G/git-htmldocs-$V.tar.gz" || exit
129 -
130 -case "$V" in
131 -*.rc[0-9]* | *-rc[0-9]*)
132 - mkdir -p "$STAGE$G/testing" || exit
133 - for a in $narch
134 - do
135 - for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
136 - do
137 - test -f "$rr" || continue
138 - ln_or_cp "$rr" "$STAGE$G/testing/." || exit
139 - done
140 - done
141 - ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/testing/." || exit
142 - ;;
143 -*)
144 - mkdir -p "$STAGE$G/RPMS/$arch" "$STAGE$G/RPMS/SRPMS" || exit
145 - for a in $narch
146 - do
147 - mkdir -p "$STAGE$G/RPMS/$a" || exit
148 - for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
149 - do
150 - test -f "$rr" || continue
151 - ln_or_cp "$rr" "$STAGE$G/RPMS/$a/." || exit
152 - done
153 - done
154 - ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/RPMS/SRPMS/." || exit
155 -esac
156 -
157 -make clean
158 -
159 -if test t = "$final"
160 -then
161 - if test -n "$STAGE"
162 - then
163 - (
164 - cd "$STAGE$G" &&
165 - find . ! -type d -print0 | cpio -0plumda "$G" ||
166 - find . ! -type d -print0 | cpio -0pumda "$G"
167 - )
168 - fi || exit
169 - if test -f /usr/local/bin/yummy
170 - then
171 - for a in $narch
172 - do
173 - /usr/local/bin/yummy "$G/RPMS/$a"
174 - done
175 - /usr/local/bin/yummy "$G/RPMS/SRPMS"
176 - fi
177 -fi
candidates deleted
-47
@@ -1,47 +0,0 @@
1 -#!/usr/bin/perl
2 -# Feed whats-cooking to this to find what to merge to 'master'
3 -
4 -sub merged {
5 - my ($topic, $base) = @_;
6 - my $fh;
7 - (open $fh, "-|", qw(git rev-list), "^$base", $topic)
8 - or die "$!";
9 - my $count = 0;
10 - while (<$fh>) {
11 - $count++;
12 - }
13 - (close $fh)
14 - or die "$! (after $count for $topic)";
15 - return $count;
16 -}
17 -
18 -my ($topic, $topic_date, $last);
19 -my (@candidate);
20 -
21 -while (<>) {
22 - if (/^\* ([a-z][a-z]\/[-a-zA-Z0-9_]+) \(([-0-9]{10})\) \d+ commit/) {
23 - $topic = $last = $1;
24 - $topic_date = $2;
25 - next;
26 - }
27 - if (defined $topic) {
28 - if (/^ \(merged to 'next' on ([-0-9]{10}) at/) {
29 - push @candidate, [$topic, $1, $topic_date, ""];
30 - next;
31 - }
32 - $topic = undef;
33 - $topic_date = undef;
34 - }
35 - if (defined $last && @candidate && $candidate[-1][0] eq $last) {
36 - if (/Will merge to 'master'/i) {
37 - $candidate[-1][3] = "*";
38 - }
39 - }
40 -}
41 -
42 -for $topic (sort { ($a->[1] cmp $b->[1]) || ($a->[2] cmp $b->[2]) } @candidate) {
43 - my $count = merged($topic->[0], 'master');
44 - if ($count) {
45 - print "$topic->[1] $topic->[2] ($count) $topic->[3]$topic->[0]\n";
46 - }
47 -}
check-topic-merges deleted
-29
@@ -1,29 +0,0 @@
1 -#!/bin/sh
2 -#
3 -# Run this script _after_ making a proposed merge into a copy of
4 -# the target branch (e.g. "master") to see if it contains unrelated
5 -# merging back from the upstream.
6 -#
7 -F=`git diff-tree -r --name-only HEAD^ HEAD`
8 -echo "The topic modifies these paths:"
9 -echo "$F" | sed -e 's/^/ /'
10 -
11 -_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
12 -_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
13 -git rev-list --parents master..HEAD^2 |
14 -sed -ne "/^$_x40 $_x40 $_x40/p" |
15 -while read merge first second
16 -do
17 - echo
18 - # First is the previous cvs topic tip, second is what was merged into
19 - # it. Does the merge have anything to do with adjust the topic to
20 - # updated upstream?
21 - git name-rev "$merge"
22 - out=`git diff-tree --stat "$merge^" "$merge" -- $F`
23 - case "$out" in
24 - '')
25 - echo "* Nothing to do with the topic" ;;
26 - *)
27 - echo "$out" ;;
28 - esac
29 -done
cycle-run deleted
-129
@@ -1,129 +0,0 @@
1 -#!/bin/sh
2 -
3 -: ${RANGE:=origin/master..origin/seen} ${J:=j32} ${OKNG:="(OK|NG)"}
4 -
5 -test_it () {
6 - type=$1 commit=$2 subject=$3
7 - log=".Cycle/log.$commit"
8 - rm -f "$log"
9 - git ls-files -x Meta -x .Cycle -o -z | xargs -r -0 rm -rf
10 -
11 - (
12 - echo "*** log for $subject ***" &&
13 - case "$type" in
14 - C)
15 - # Single parent commit on a topic
16 - Meta/Make -$J &&
17 - Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse
18 - ;;
19 - M)
20 - # Merges on the first-parent chain on seen
21 - Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse &&
22 - Meta/Make -$J -- test
23 - ;;
24 - T)
25 - # Commit at the tip of a topic
26 - Meta/Make -$J SANITIZE=address,undefined -- test &&
27 - Meta/Make -$J -- doc
28 - ;;
29 - esac
30 -
31 - status=$?
32 -
33 - # Does 'distclean' clean them up properly?
34 - Meta/Make -- $D distclean >/dev/null
35 - case $(git ls-files -x Meta -x .Cycle -o | wc -l) in
36 - 0) exit "$status" ;;
37 - *) git ls-files -x Meta -x .Cycle -o
38 - exit 1 ;;
39 - esac
40 - ) >"$log" 2>&1
41 - case $? in
42 - 0) rm -f "$log" ;;
43 - *) return 1 ;;
44 - esac
45 -}
46 -
47 -tested () {
48 - # sign=$1 commit=$2
49 - egrep "^$OKNG $1($2|$(git rev-parse "$2^{tree}"))" .Cycle/log >/dev/null
50 -}
51 -
52 -test_them () {
53 - while read merge parent sides
54 - do
55 - case "$parent" in
56 - ?*)
57 - tested M $merge && continue
58 - echo "TEST M $merge"
59 -
60 - for tip in $sides
61 - do
62 - git rev-parse --verify --quiet "$tip" || continue
63 - tested T $tip && continue
64 - echo "TEST $tip $merge"
65 - done
66 - ;;
67 - '')
68 - commit=$merge
69 - git rev-parse --verify --quiet "$commit" || continue
70 - tested C $commit && continue
71 - echo "TEST C $commit"
72 - esac
73 - done |
74 - sed -n -e 's/^TEST //p' >.Cycle/plan
75 -
76 - count=$(wc -l <.Cycle/plan)
77 - case $count in 0) return ;; esac
78 -
79 - total=$count
80 - echo TEST $count ON $(date) >>.Cycle/log
81 - while read tip merge
82 - do
83 - case "$tip" in
84 - M)
85 - type=M
86 - commit=$merge
87 - subject=$(git show -s --format="%s" "$commit") ;;
88 - C)
89 - type=C
90 - commit=$merge
91 - subject=$(git show -s --format="%s" "$commit") ;;
92 - *)
93 - type=T
94 - commit=$tip
95 - subject=$(
96 - git show -s --format="%s" "$merge" |
97 - sed -e 's/^Merge branch '\''\(.*\)'\'' into .*/\1/'
98 - ) ;;
99 - esac
100 -
101 - echo >&2 -n "$count/$total ?? $subject "
102 - if test_it $type $commit "$subject"
103 - then
104 - OK=OK
105 - else
106 - OK=NG
107 - fi
108 - echo "$OK $type$commit $count" >>.Cycle/log
109 - echo "$OK $type$(git rev-parse $commit^{tree}) $count" >>.Cycle/log
110 - echo >&2 "$count/$total $OK $subject"
111 - count=$(( $count - 1 ))
112 - done <.Cycle/plan
113 -}
114 -
115 -: >>.Cycle/log
116 -git reflog expire --expire=now --expire-unreachable=now --all
117 -git gc
118 -
119 -for l in .Cycle/log.[0-9a-f]*
120 -do
121 - x=${l##*.}
122 - git rev-parse --verify "$x" >/dev/null 2>&1 || rm -f "$l"
123 -done
124 -
125 -git fetch
126 -(
127 - git rev-list --no-merges $RANGE
128 - git rev-list --first-parent --parents $RANGE
129 -) | test_them