~ubuntu-archive/ubuntu-archive-scripts/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /bin/sh
set -e

# We need promote-to-release.
case :$PATH: in
    *:/home/ubuntu-archive/ubuntu-archive-tools:*)
	;;
    *)
	PATH="/home/ubuntu-archive/ubuntu-archive-tools:$PATH"
	;;
esac

DEFAULT_DISTRIBUTION=ubuntu
DEFAULT_SERIES=noble

export DISTRIBUTION="${DISTRIBUTION:-$DEFAULT_DISTRIBUTION}"
export SERIES="${SERIES:-$DEFAULT_SERIES}"
if [ "$DISTRIBUTION" = ubuntu ]; then
	full_series="$SERIES"
else
	full_series="$DISTRIBUTION/$SERIES"
fi

case $DISTRIBUTION/$SERIES in
    ubuntu/$DEFAULT_SERIES)
	actions='hints_git blocks excuse_bugs pkglists run save stats'
	;;
    ubuntu/*)
	actions='hints_git blocks excuse_bugs pkglists run stats'
	;;
    *)
	echo "Don't know what actions to run for $DISTRIBUTION/$SERIES!" >&2
	exit 1
	;;
esac

cd "$HOME/proposed-migration"
[ -e STOP ] && exit 0
if ! lockfile -r0 ".run-proposed-migration-$DISTRIBUTION-$SERIES.lock"; then
	exit 1
fi

cleanup () {
    rm -f $HOME/proposed-migration/.run-proposed-migration-$DISTRIBUTION-$SERIES.lock
    [ -n "$tmpdir" ] && rm -rf "$tmpdir"
}
trap cleanup EXIT HUP INT QUIT TERM
http_proxy= bzr pull -q -d "$HOME/proposed-migration/code/b1"
(cd "$HOME/proposed-migration/code/b2"; git fetch origin; git reset --hard --quiet origin/master)
logfile="log/$full_series/$(date -u +%F/%T).log"
mkdir -p "${logfile%/*}"

code/b1/britney $actions >"$logfile" 2>&1
if [ "$SERIES" = "$DEFAULT_SERIES" ]; then
    cd ~/public_html/proposed-migration/
    generate-team-p-m --excuses-yaml $SERIES/update_excuses.yaml.xz \
                      --subscribers-json ~/public_html/package-team-mapping.json \
                      $SERIES/update_excuses_by_team.html $SERIES/update_excuses_by_team.yaml
    tmpdir="$(mktemp -d)"
    wget -q -O "$tmpdir/debian-excuses.yaml" https://release.debian.org/britney/excuses.yaml
    find-rcbuggy-problem-packages --ubuntu-excuses $SERIES/update_excuses.yaml.xz \
                                  --ubuntu-update_output $SERIES/update_output.txt \
                                  --debian-excuses "$tmpdir/debian-excuses.yaml" \
                                  --output $SERIES/rcbuggy-problem-packages.html
fi

exit 0