summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_build.sh21
-rwxr-xr-xbin/reproducible_html_packages.py16
-rwxr-xr-xbin/reproducible_maintainance.sh2
3 files changed, 23 insertions, 16 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 83f542c6..0c28a0ea 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -11,17 +11,21 @@ common_init "$@"
# common code defining db access
. /srv/jenkins/bin/reproducible_common.sh
-# create dirs for results
-mkdir -p /var/lib/jenkins/userContent/dbd/
-mkdir -p /var/lib/jenkins/userContent/rbuild/
-mkdir -p /var/lib/jenkins/userContent/buildinfo/
+# support for different architectures (we have actual support only for amd64)
+ARCH="amd64"
+
+create_results_dirs() {
+ mkdir -p /var/lib/jenkins/userContent/dbd/
+ mkdir -p /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}
+ mkdir -p /var/lib/jenkins/userContent/buildinfo/
+}
cleanup_all() {
rm -r $TMPDIR $TMPCFG
}
cleanup_userContent() {
- rm -f /var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1
+ rm -f /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1
rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1
rm -f /var/lib/jenkins/userContent/buildinfo/${SRCPACKAGE}_*.buildinfo > /dev/null 2>&1
}
@@ -78,7 +82,7 @@ call_debbindiff() {
elif [ $RESULT -eq 1 ] ; then
DEBBINDIFFOUT="debbindiff found issues, please investigate $REPRODUCIBLE_URL/dbd/${LOGFILE}"
elif [ $RESULT -eq 2 ] ; then
- DEBBINDIFFOUT="debbindiff had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SRCPACKAGE}_${EVERSION}.rbuild.log"
+ DEBBINDIFFOUT="debbindiff had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log"
fi
if [ $RESULT -eq 0 ] && [ ! -f ./${LOGFILE} ] && [ -f b1/${BUILDINFO} ] ; then
cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/ > /dev/null 2>&1
@@ -150,8 +154,9 @@ else
DURATION=0
# mark build attempt
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');"
+ create_results_dirs
- RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_None.rbuild.log
+ RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log
echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG}
echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}
set +e
@@ -185,7 +190,7 @@ else
TMPLOG=$(mktemp)
mv ${RBUILDLOG} ${TMPLOG}
cleanup_userContent
- RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_${EVERSION}.rbuild.log
+ RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
mv ${TMPLOG} ${RBUILDLOG}
cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG}
# check whether the package is not for us...
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 4ed7806e..cb8cecf7 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -77,10 +77,11 @@ def check_package_status(package, suite):
build_date = str(result[2])+" UTC"
return (status, version, build_date)
-def gen_extra_links(package, version):
+def gen_extra_links(package, version, suite, arch):
eversion = strip_epoch(version)
notes = NOTES_PATH + '/' + package + '_note.html'
- rbuild = RBUILD_PATH + '/' + package + '_' + eversion + '.rbuild.log'
+ rbuild = RBUILD_PATH + '/' + suite + '/' + arch + '/' + package + '_' + \
+ eversion + '.rbuild.log'
buildinfo = BUILDINFO_PATH + '/' + package + '_' + eversion + '_amd64.buildinfo'
dbd = DBD_PATH + '/' + package + '_' + eversion + '.debbindiff.html'
@@ -108,7 +109,8 @@ def gen_extra_links(package, version):
else:
log.debug('buildinfo not detected at ' + buildinfo)
if os.access(rbuild, os.R_OK):
- url = RBUILD_URI + '/' + package + '_' + eversion + '.rbuild.log'
+ url = RBUILD_URI + '/' + suite + '/' + suite + '/' + package + '_' + \
+ eversion + '.rbuild.log'
log_size = os.stat(rbuild).st_size
links +='<a href="' + url + '" target="main">rbuild (' + \
sizeof_fmt(log_size) + ')</a>\n'
@@ -133,7 +135,7 @@ def gen_bugs_links(package, bugs):
return html
-def gen_packages_html(packages, suite='sid', no_clean=False):
+def gen_packages_html(packages, suite='sid', arch='amd64', no_clean=False):
"""
generate the /rb-pkg/package.html page
packages should be a list
@@ -148,7 +150,7 @@ def gen_packages_html(packages, suite='sid', no_clean=False):
log.info('Generating the page of ' + pkg + ' ' + version +
' built at ' + build_date)
- links, default_view = gen_extra_links(pkg, version)
+ links, default_view = gen_extra_links(pkg, version, suite, arch)
bugs_links = gen_bugs_links(pkg, bugs)
status, icon = join_status_icon(status, pkg, version)
@@ -169,14 +171,14 @@ def gen_packages_html(packages, suite='sid', no_clean=False):
if not no_clean:
purge_old_pages() # housekeep is always good
-def gen_all_rb_pkg_pages(suite='sid', no_clean=False):
+def gen_all_rb_pkg_pages(suite='sid', arch='amd64', no_clean=False):
query = 'SELECT s.name ' + \
'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' + \
'WHERE r.status !="" AND s.suite="%s"' % suite
rows = query_db(query)
pkgs = [str(i[0]) for i in rows]
log.info('Processing all the package pages, ' + str(len(pkgs)))
- gen_packages_html(pkgs, suite, no_clean)
+ gen_packages_html(pkgs, suite=suite, arch=arch, no_clean=no_clean)
def purge_old_pages():
presents = sorted(os.listdir(RB_PKG_PATH))
diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh
index 6f3a875b..b33701f2 100755
--- a/bin/reproducible_maintainance.sh
+++ b/bin/reproducible_maintainance.sh
@@ -94,7 +94,7 @@ if [ ! -z "$FAILED_BUILDS" ] ; then
echo
echo "Rescheduling packages: "
# FIXME the suite got hardcoded here, a way to recognize the original suite must be found
- ( for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f7 | cut -d "_" -f1) ; do echo $PKG ; done ) | xargs /srv/jenkins/bin/reproducible_schedule_on_demand.sh sid
+ ( for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f9 | cut -d "_" -f1) ; do echo $PKG ; done ) | xargs /srv/jenkins/bin/reproducible_schedule_on_demand.sh sid
echo
DIRTY=true
fi