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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
#!/bin/sh
# copyright, licensing and documentation at the end
. "${DPT__SCRIPTS:-/usr/share/pkg-perl-tools}/lib/dpt-lib.sh"
is_key_pkg () {
is_command curl
local P="$1"
local RES
RES=$(echo "$P" | curl --silent --data-binary @- \
https://udd.debian.org/cgi-bin/select-key-packages.cgi)
if [ "$RES" ]
then
echo $(colored "GREEN" "✔") "$P is a key package"
else
echo $(colored "RED" "✘") "$P is no key package"
fi
}
ci_report () {
psql --quiet "$UDD_PG" <<EOF | sed "s/\\bpass\\b/$(colored GREEN ' ✔ ')/; s/\\bfail\\b/$(colored RED ' ✘ ')/;" | head -n -1
\\pset border 1
\\pset footer off
select distinct on (suite)
suite, date, version, status
from ci
where source='$1'
order by suite, date desc;
EOF
}
header "gbp pull"
gbp pull
header "Bugs"
if is_installed "pkg-perl-tools" "0.69"; then
bts-srcpkg -t
else
warn "Running 'bts-srcpkg' without -t, sorry for the duplicate title."
bts-srcpkg
fi
header "rmadison"
rmadison $PKG
header "grep-excuses"
EXCUSES=$(grep-excuses --wipnity $PKG)
if [ -z "$EXCUSES" ] || [ "$EXCUSES" = "No excuse for $PKG" ]; then
colored "GREEN" "None \o/"
else
colored "YELLOW" "$EXCUSES"
fi
header "Last upload"
who-uploads --date --max-uploads=1 $PKG
header "Popcon"
if is_command popcon python3-popcon; then
if is_installed "python3-popcon" "3.0.0"; then
popcon --verbose $PKG
else
info "Output is nicer with python3-popcon >= 3.0.0."
popcon $PKG
fi
fi
header "Key package?"
is_key_pkg $PKG
header "transition-check"
transition-check $PKG
header "CI (amd64)"
if is_command psql postgresql-client; then
ci_report $PKG
fi
header "MRs on salsa?"
if git remote --verbose | grep -qF 'salsa.debian.or' && is_command salsa devscripts; then
# skip project name (first line) and empty lines (last 2 lines)
MRS=$(salsa merge_requests | tail -n +2 | head -n -2)
if [ -z "$MRS" ]; then
colored "GREEN" "None \o/"
else
colored "YELLOW" "$MRS"
fi
fi
header "New upstream release?"
USCAN=$(uscan --report)
if [ -n "$USCAN" ]; then
colored "YELLOW" "$USCAN"
else
colored "GREEN" "None \o/"
fi
header "Git diff against last Debian tag"
gitddiff
POD=<<'EOF'
=head1 NAME
dpt-prepare - prepare yourself and a source directory before working on a package
=head1 SYNOPSIS
B<dpt prepare>
=head1 DESCRIPTION
B<dpt prepare> runs a couple of commands in the checked out directory of a
source package which are useful -- either for the person or the code -- as a
preparation before working on the package.
=head1 CONFIGURATION, OPTIONS, & PARAMETERS
None (yet).
=head1 COPYRIGHT & LICENSE
=over
=item Copyright 2022-2025 gregor herrmann L<gregoa@debian.org>
=item Copyright 2022 Damyan Ivanov L<dmn@debian.org>
=back
This program is free software, licensed under the same terms as perl.
=cut
EOF
|