summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-27 00:13:53 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-27 00:13:53 +0100
commit9151984d9ac8135bc0a5e2f57f1654520443ba1b (patch)
tree9d861c4746a9d3161d0d43bb067924cdde783caa /bin
parentf991706691012fc14f4df6389c2f4e29762598c5 (diff)
parent94c77244b8064d6f29146f7f9e36389b5216076f (diff)
downloadjenkins.debian.net-9151984d9ac8135bc0a5e2f57f1654520443ba1b.tar.xz
Merge branch 'master' of git://git.debian.org/git/qa/jenkins.debian.net
Diffstat (limited to 'bin')
-rw-r--r--bin/g-i-installation.sh77
-rwxr-xr-xbin/make_graph.py6
-rwxr-xr-xbin/reproducible_build.sh2
-rwxr-xr-xbin/reproducible_common.sh12
-rwxr-xr-xbin/udd-query.sh146
5 files changed, 172 insertions, 71 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 74355978..375a4bf0 100644
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -124,7 +124,7 @@ cleanup_all() {
# save logs if there are any
#
case $NAME in
- *_rescue*) ;;
+ *_rescue*|*_presentation) ;;
*) if [ $NR -gt 200 ] ; then
save_logs
else
@@ -301,6 +301,17 @@ bootstrap_system() {
debian-edu_*)
EXTRA_APPEND="$EXTRA_APPEND DEBCONF_DEBUG=developer"
;;
+ *_brltty)
+ EXTRA_APPEND="$EXTRA_APPEND brltty=tt,ttyS0,en"
+ ;;
+ *_speakup)
+ EXTRA_APPEND="$EXTRA_APPEND speakup.synth=soft"
+ ;;
+ *_presentation)
+ EXTRA_APPEND="$EXTRA_APPEND url=hands.com classes=talks/fosdem07"
+ ;;
+ *)
+ ;;
esac
case $NAME in
debian-edu_*)
@@ -311,7 +322,14 @@ bootstrap_system() {
EXTRA_APPEND="$EXTRA_APPEND priority=critical"
;;
esac
- APPEND="auto=true $EXTRA_APPEND $INST_LOCALE $INST_KEYMAP url=$PRESEED_URL $INST_VIDEO -- quiet"
+ case $NAME in
+ *_presentation)
+ APPEND="auto=true $EXTRA_APPEND $INST_LOCALE $INST_KEYMAP $INST_VIDEO -- quiet"
+ ;;
+ *)
+ APPEND="auto=true $EXTRA_APPEND $INST_LOCALE $INST_KEYMAP url=$PRESEED_URL $INST_VIDEO -- quiet"
+ ;;
+ esac
show_preseed $(hostname -f)/$PRESEED_PATH/${NAME}_$PRESEEDCFG
echo
echo "Starting QEMU now:"
@@ -434,6 +452,17 @@ rescue_boot() {
esac
}
+presentation_boot() {
+ # boot in presentation mode
+ let MY_NR=NR-TRIGGER_NR
+ TOKEN=$(printf "%04d" $MY_NR)
+ case $TOKEN in
+ 0[123456]00) do_and_report key enter
+ ;;
+ *) ;;
+ esac
+}
+
post_install_boot() {
# normal boot after installation
let MY_NR=NR-TRIGGER_NR
@@ -611,7 +640,7 @@ post_install_boot() {
*) ;;
esac
;;
- debian_*gnome) case $TOKEN in
+ debian_*gnome*) case $TOKEN in
0150) do_and_report move 530 420 click 1
;;
0200) do_and_report key alt-f2
@@ -1109,11 +1138,13 @@ monitor_system() {
# let's drive this further (once/if triggered)
if [ $TRIGGER_NR -ne 0 ] && [ $TRIGGER_NR -ne $NR ] ; then
case $MODE in
- rescue) rescue_boot
- ;;
+ rescue) rescue_boot
+ ;;
+ presentation) presentation_boot
+ ;;
post_install) post_install_boot
- ;;
- *) ;;
+ ;;
+ *) ;;
esac
fi
# if TRIGGER_MODE matches NR, we are triggered too
@@ -1157,6 +1188,20 @@ save_logs() {
#
sudo chroot $SYSTEM_MNT dpkg -l > $RESULTS/dpkg-l || ( echo "Warning: cannot run dpkg inside the installed system, did the installation finish correctly?" ; export FAILURE=true )
#
+ # check for must installed packages
+ #
+ case $NAME in
+ *_brltty)
+ grep brltty $RESULTS/dpkg-l || echo "Warning: package brltty not installed."
+ ;;
+ *_speakup)
+ grep epeakup $RESULTS/dpkg-l || echo "Warning: package espeakup not installed."
+ ;;
+ *)
+ ;;
+ esac
+
+ #
# only on combi-servers and ltsp-servers:
# mount /opt
# copy LTSP logs and package list
@@ -1251,28 +1296,32 @@ fi
bootstrap_system
set +x
case $NAME in
- *_rescue*) monitor_system rescue
- ;;
+ *_rescue*) monitor_system rescue
+ ;;
+ *_presentation) monitor_system presentation 10
+ ;;
debian-edu_*combi-server) monitor_system install wait4match 3000
- ;;
+ ;;
debian-edu_*wheezy*standalone*) monitor_system install wait4match 1200
- ;;
- *) monitor_system install wait4match
- ;;
+ ;;
+ *) monitor_system install wait4match
+ ;;
esac
#
# boot up installed system
#
let NR=NR+1
case $NAME in
- *_rescue*) # so there are some artifacts to publish
+ *_rescue*|*_presentation) # so there are some artifacts to publish
mkdir -p $RESULTS/log/installer
touch $RESULTS/log/dummy $RESULTS/log/installer/dummy
;;
*) #
# kill qemu and image
#
+ set -x
sudo kill -9 $(ps fax | grep [q]emu-system | grep "vnc=$DISPLAY " 2>/dev/null | awk '{print $1}') || true
+ set +x
if [ ! -z "$IMAGE" ] ; then
sudo umount -l $IMAGE_MNT || true
fi
diff --git a/bin/make_graph.py b/bin/make_graph.py
index ad0e34cc..99866fc5 100755
--- a/bin/make_graph.py
+++ b/bin/make_graph.py
@@ -31,10 +31,10 @@ def main():
if int(colors) < 10:
r('palette(c("#4e9a06", "#f57900", "#cc0000", "#2e3436", "#888a85"))')
else:
- r('palette(c("#fce94f", "#c4a000", "#fcaf3e", "#ce5c00", \
+ r('palette(c("#fce94f", "#c4a000", "#eeeeec", "#babdb6", \
+ "#fcaf3e", "#ce5c00", "#ad7fa8", "#5c3566", \
"#e9b96e", "#8f5902", "#8ae234", "#4e9a06", \
- "#729fcf", "#204a87", "#ad7fa8", "#5c3566", \
- "#ef2929", "#a40000", "#eeeeec", "#babdb6", \
+ "#729fcf", "#204a87", "#ef2929", "#a40000", \
"#888a85", "#2e3436"))')
r('v <- t[0:nrow(t),0:'+colors+']')
# make graph since day 1
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 1761f9a2..835fd802 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -60,7 +60,7 @@ else
echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}
# host has only sid in deb-src in sources.list
set +e
- apt-get source --download-only --only-source ${SRCPACKAGE} >> ${RBUILDLOG} 2>&1
+ apt-get --download-only --only-source source ${SRCPACKAGE} >> ${RBUILDLOG} 2>&1
RESULT=$?
if [ $RESULT != 0 ] ; then
# sometimes apt-get cannot download a package for whatever reason.
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 6f1324d2..37fc6943 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -10,16 +10,16 @@
PACKAGES_DB=/var/lib/jenkins/reproducible.db
INIT=/var/lib/jenkins/reproducible.init
if [ -f $PACKAGES_DB ] && [ -f $INIT ] ; then
- if [ -f $PACKAGES_DB.lock ] ; then
+ if [ -f ${PACKAGES_DB}.lock ] ; then
for i in $(seq 0 100) ; do
sleep 15
echo "sleeping 15s, $PACKAGES_DB is locked."
- if [ ! -f $PACKAGES_DB.lock ] ; then
+ if [ ! -f ${PACKAGES_DB}.lock ] ; then
break
fi
done
- if [ -f $PACKAGES_DB.lock ] ; then
- echo "$PACKAGES_DB.lock still exist, exiting."
+ if [ -f ${PACKAGES_DB}.lock ] ; then
+ echo "${PACKAGES_DB}.lock still exist, exiting."
exit 1
fi
fi
@@ -95,7 +95,7 @@ elif [ ! -f ${PACKAGES_DB} ] ; then
done_randomness INTEGER,
PRIMARY KEY (datum))'
# 60 seconds timeout when trying to get a lock
- cat >/var/lib/jenkins/reproducible.init <<-EOF
+ cat > $INIT <<-EOF
.timeout 60000
EOF
fi
@@ -229,7 +229,7 @@ write_page_footer() {
}
write_page_meta_sign() {
- write_page "<p style=\"font-size:0.9em;\">An underlined package is an indication that this package has a note. Visited packages are linked in green, those which have not been visited are linked in blue."
+ write_page "<p style=\"font-size:0.9em;\">A package name displayed with a bold font is an indication that this package has a note. Visited packages are linked in green, those which have not been visited are linked in blue."
if $BUILDINFO_ON_PAGE ; then
write_page "A &beta; sign after a package which is unreproducible indicates that a .buildinfo file was generated."
write_page "And that means the <a href=\"https://wiki.debian.org/ReproducibleBuilds#The_basics_for_making_packages_build_reproducible\">basics for building packages reproducibly are covered</a>."
diff --git a/bin/udd-query.sh b/bin/udd-query.sh
index 2d8247e2..9fde6f5a 100755
--- a/bin/udd-query.sh
+++ b/bin/udd-query.sh
@@ -1,64 +1,116 @@
#!/bin/bash
# Copyright 2012-2014 Holger Levsen <holger@layer-acht.org>
-# UDD query by Stuart Prescott <stuart@debian.org>
+# multiarch_versionskew UDD query by Stuart Prescott <stuart@debian.org>
+# orphaned_without_o_bug by Johannes Schauer <j.schauer@email.de>
# released under the GPLv=2
DEBUG=false
. /srv/jenkins/bin/common-functions.sh
common_init "$@"
-#
-# have all needed params been supplied?
-#
-if [ -z "$2" ] ; then
- echo "Need at two params, distro + query_name..."
- exit 1
-fi
+udd_query() {
+ #
+ # Actually query UDD and save result in $UDD file
+ #
+ echo "$(date) - querying UDD using ${SQL_QUERY}"
+ echo
+ PGPASSWORD=public-udd-mirror \
+ psql -U public-udd-mirror \
+ -h public-udd-mirror.xvm.mit.edu -p 5432 \
+ -t \
+ udd -c"${SQL_QUERY}" > $UDD
+}
-DISTRO=$1
-declare -A SQL_QUERY
-QUERY=$2
+multiarch_versionskew() {
+ if [ -z "$1" ] ; then
+ echo "Warning: no distro supplied, assuming sid."
+ DISTR=sid
+ else
+ DISTRO=$1
+ fi
+ #
+ # SQL query for detecting multi-arch version skew
+ #
+ SQL_QUERY="SELECT DISTINCT source FROM
+ (SELECT DISTINCT source, package, version
+ FROM packages WHERE
+ release='$DISTRO' AND
+ multi_arch='same' AND
+ architecture IN ('amd64', 'arm64', 'armel', 'armhf', 'i386',
+ 'kfreebsd-amd64', 'kfreebsd-i386', 'mips', 'mipsel',
+ 'powerpc', 'ppc64el', 's390x')
+ ORDER BY source) AS all_versions
+ GROUP BY source, package
+ HAVING count(*) > 1
+ ORDER BY source ;"
-#
-# more to come, hopefully
-#
-if [ "$QUERY" != "multiarch_versionskew" ] ; then
- echo "unknown query requested, exiting... please provide patches :)"
- exit 1
-fi
+ udd_query
+ if [ -s $UDD ] ; then
+ echo "Warning: multi-arch version skew in $DISTRO detected."
+ echo
+ # TODO: turn source package names into links
+ # TODO: show versions (per arch) too
+ cat $UDD
+ fi
+ rm $UDD
+}
-#
-# SQL query for detecting multi-arch version skew
-#
-SQL_QUERY["multiarch_versionskew"]="
- SELECT DISTINCT source FROM
- (SELECT DISTINCT source, package, version
- FROM packages
- WHERE
- release='$DISTRO' AND
- multi_arch='same' AND
- architecture IN ('amd64', 'arm64', 'armel', 'armhf', 'i386',
- 'kfreebsd-amd64', 'kfreebsd-i386', 'mips', 'mipsel',
- 'powerpc', 'ppc64el', 's390x')
- ORDER BY source) AS all_versions
- GROUP BY source, package
- HAVING count(*) > 1
- ORDER BY source
- ;
-"
+orphaned_without_o_bug() {
+ WNPPRM=$(mktemp)
+ SORTED_UDD=$(mktemp)
+ RES1=$(mktemp)
+ SQL_QUERY="SELECT DISTINCT source
+ FROM sources
+ WHERE maintainer LIKE '%packages@qa.debian.org%'
+ AND release='sid'
+ ORDER BY source ; "
+
+ udd_query
+ cat $UDD | tr -d ' ' | sort | uniq > "$SORTED_UDD"
+ curl --silent https://qa.debian.org/data/bts/wnpp_rm \
+ | cut -d ' ' -f 1 | tr -d ':' | sort | uniq > "$WNPPRM"
+ comm -23 "$SORTED_UDD" "$WNPPRM" > "$RES1"
+
+ # $RES1 now contains all packages that have packages@qa.debian.org as the
+ # maintainer but do not appear on https://qa.debian.org/data/bts/wnpp_rm
+ # (because they are missing a bug)
+ # we have to remove all the packages that appear in experimental but do not
+ # have packages@qa.debian.org as a maintainer (i.e: they found a new one)
+ SQL_QUERY="SELECT DISTINCT source
+ FROM sources
+ WHERE maintainer NOT LIKE '%packages@qa.debian.org%'
+ AND release='experimental'
+ ORDER BY source ; "
+ udd_query
+
+ if [ -s $UDD ] ; then
+ cat $UDD | tr -d ' ' | sort | uniq > "$SORTED_UDD"
+
+ echo "Warning: The following packages are maintained by packages@qa.debian.org"
+ echo "but are missing a wnpp bug according to https://qa.debian.org/data/bts/wnpp_rm"
+ echo
+ # TODO: turn source package names into links
+ comm -13 "$SORTED_UDD" "$RES1"
+ fi
+
+ rm -f "$UDD" "$WNPPRM" "$RES1" "$SORTED_UDD"
+}
#
-# Actually query UDD
+# main
#
-echo "$(date) - querying UDD using ${SQL_QUERY[$QUERY]}"
+UDD=$(mktemp)
+case $1 in
+ orphaned_without_o_bug)
+ orphaned_without_o_bug
+ ;;
+ multiarch_versionskew)
+ multiarch_versionskew $2
+ ;;
+ *)
+ echo "unknown query requested, exiting... please provide patches :)"
+ ;;
+esac
echo
-PGPASSWORD=public-udd-mirror \
- psql -U public-udd-mirror \
- -h public-udd-mirror.xvm.mit.edu -p 5432 \
- -t \
- udd -c"${SQL_QUERY[$QUERY]}"
-
-# TODO: turn source package names into links
-# TODO: show versions (per arch) too