59
by Ubuntu Archive
add run-proposed-migration and hook into archive-reports |
1 |
#! /bin/sh
|
2 |
set -e
|
|
3 |
||
4 |
# We need promote-to-release.
|
|
5 |
case :$PATH: in |
|
6 |
*:/home/ubuntu-archive/ubuntu-archive-tools:*)
|
|
7 |
;;
|
|
8 |
*)
|
|
9 |
PATH="/home/ubuntu-archive/ubuntu-archive-tools:$PATH" |
|
10 |
;;
|
|
11 |
esac
|
|
12 |
||
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
13 |
DEFAULT_DISTRIBUTION=ubuntu |
280
by Łukasz 'sil2100' Zemczak
focal -> groovy; drop disco |
14 |
DEFAULT_SERIES=groovy |
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
15 |
|
16 |
export DISTRIBUTION="${DISTRIBUTION:-$DEFAULT_DISTRIBUTION}" |
|
17 |
export SERIES="${SERIES:-$DEFAULT_SERIES}" |
|
162
by Colin Watson
run-proposed-migration: revert previous commit; britney1 handles prefixing a bit differently now |
18 |
if [ "$DISTRIBUTION" = ubuntu ]; then |
142
by Colin Watson
run-proposed-migration: Export DISTRIBUTION, defaulting to "ubuntu"; include distribution name in log file path if it is not "ubuntu". |
19 |
full_series="$SERIES" |
20 |
else
|
|
21 |
full_series="$DISTRIBUTION/$SERIES" |
|
22 |
fi
|
|
136
by Colin Watson
run-proposed-migration: Write logs to series-specific locations. |
23 |
|
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
24 |
case $DISTRIBUTION/$SERIES in |
265
by Colin Watson
Stop running reports on ubuntu-rtm or the stable phone overlay. |
25 |
ubuntu/$DEFAULT_SERIES) |
245.1.1
by Balint Reczey
run britney with excuse_bugs, too |
26 |
actions='hints_bzr blocks excuse_bugs pkglists run save stats summary' |
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
27 |
;;
|
28 |
ubuntu/*)
|
|
245.1.1
by Balint Reczey
run britney with excuse_bugs, too |
29 |
actions='hints_bzr blocks excuse_bugs pkglists run stats summary' |
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
30 |
;;
|
31 |
*)
|
|
32 |
echo "Don't know what actions to run for $DISTRIBUTION/$SERIES!" >&2 |
|
33 |
exit 1 |
|
34 |
;;
|
|
35 |
esac
|
|
36 |
||
59
by Ubuntu Archive
add run-proposed-migration and hook into archive-reports |
37 |
cd "$HOME/proposed-migration" |
100
by Colin Watson
run-proposed-migration: honour a STOP file |
38 |
[ -e STOP ] && exit 0 |
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
39 |
if ! lockfile -r0 ".run-proposed-migration-$DISTRIBUTION-$SERIES.lock"; then |
59
by Ubuntu Archive
add run-proposed-migration and hook into archive-reports |
40 |
exit 1 |
41 |
fi
|
|
242
by Steve Langasek
Merge the multiple traps rather than overwriting |
42 |
|
43 |
cleanup () { |
|
44 |
rm -f $HOME/proposed-migration/.run-proposed-migration-$DISTRIBUTION-$SERIES.lock |
|
243
by Steve Langasek
safe variable quoting of mktemp output |
45 |
[ -n "$tmpdir" ] && rm -rf "$tmpdir" |
242
by Steve Langasek
Merge the multiple traps rather than overwriting |
46 |
}
|
47 |
trap cleanup EXIT HUP INT QUIT TERM
|
|
76
by Colin Watson
run-proposed-migration: update code at the start of each run |
48 |
bzr pull -q -d "$HOME/proposed-migration/code/b1" |
198
by Martin Pitt
Fix previous commit |
49 |
(cd "$HOME/proposed-migration/code/b2"; git fetch origin; git reset --hard --quiet origin/master) |
105
by Colin Watson
run-proposed-migration: automatically pull auto-package-testing |
50 |
bzr pull -q -d "$HOME/auto-package-testing" |
142
by Colin Watson
run-proposed-migration: Export DISTRIBUTION, defaulting to "ubuntu"; include distribution name in log file path if it is not "ubuntu". |
51 |
logfile="log/$full_series/$(date -u +%F/%T).log" |
61
by Ubuntu Archive
run-proposed-migration: store logs in directories by day |
52 |
mkdir -p "${logfile%/*}" |
163
by Colin Watson
run-proposed-migration: allow running for stable Ubuntu series |
53 |
|
54 |
code/b1/britney $actions >"$logfile" 2>&1 |
|
225.1.3
by Michael Hudson-Doyle
review feedback |
55 |
if [ "$SERIES" = "$DEFAULT_SERIES" ]; then |
227
by Steve Langasek
run generate-team-p-m from the right directory |
56 |
cd ~/public_html/proposed-migration/
|
282.1.1
by Iain Lane
generate-team-p-m, run-proposed-migration: More updates for .xz excuses |
57 |
generate-team-p-m --excuses-yaml $SERIES/update_excuses.yaml.xz \ |
225.1.3
by Michael Hudson-Doyle
review feedback |
58 |
--subscribers-json ~/public_html/package-team-mapping.json \
|
234.1.1
by Michael Hudson-Doyle
yaml output for generate-team-p-m |
59 |
$SERIES/update_excuses_by_team.html $SERIES/update_excuses_by_team.yaml |
243
by Steve Langasek
safe variable quoting of mktemp output |
60 |
tmpdir="$(mktemp -d)" |
250
by Adam Conrad
Call wget with -q when fetching debian-excuses.yaml |
61 |
wget -q -O "$tmpdir/debian-excuses.yaml" https://release.debian.org/britney/excuses.yaml |
288
by Iain Lane
Fix find-rcbuggy-problem-packages for .xz excuses |
62 |
find-rcbuggy-problem-packages --ubuntu-excuses $SERIES/update_excuses.yaml.xz \ |
238.1.6
by Michael Hudson-Doyle
integrate into run-proposed-migration |
63 |
--ubuntu-update_output $SERIES/update_output.txt \ |
243
by Steve Langasek
safe variable quoting of mktemp output |
64 |
--debian-excuses "$tmpdir/debian-excuses.yaml" \ |
238.1.15
by Michael Hudson-Doyle
update run-proposed-migration |
65 |
--output $SERIES/rcbuggy-problem-packages.html
|
225.1.3
by Michael Hudson-Doyle
review feedback |
66 |
fi
|
266
by Colin Watson
run-proposed-migration: Explicitly exit 0 at the end. |
67 |
|
68 |
exit 0 |