Skip to content
Commits on Source (5)
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -53,41 +53,41 @@ update_alpine_repositories() {
#
# remove packages which are gone (only when run between 21:00 and 23:59)
#
# if [ $(date +'%H') -gt 21 ] ; then
# REMOVED=0
# REMOVE_LIST=""
# for REPO in $ALPINE_REPOS ; do
# echo "$(date -u ) - dropping removed packages from filesystem in repository '$REPO':"
# for i in $(find $BASE/alpine/$REPO -type d -wholename "$BASE/alpine/$REPO/*" | sort) ; do
# PKG=$(basename $i)
# if ! grep -q "$REPO $PKG" ${ALPINE_PKGS}_full_pkgbase_list > /dev/null ; then
# # we could check here whether a package is currently building,
# # and if so defer the pkg removal. (but I think this is pointless,
# # as we are unlikely to kill that build, so meh, let it finish
# # and fail to update the db, because the package is gone...)
# let REMOVED=$REMOVED+1
# REMOVE_LIST="$REMOVE_LIST $REPO/$PKG"
# rm -r --one-file-system $BASE/alpine/$REPO/$PKG
# echo "$(date -u) - $REPO/$PKG removed as it's gone from the alpine repositories."
# SUITE="alpine_$REPO"
# PKG_ID=$(query_db "SELECT id FROM sources WHERE distribution=$DISTROID AND name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
# if [ -n "${PKG_ID}" ] ; then
# query_db "DELETE FROM results WHERE package_id='${PKG_ID}';"
# query_db "DELETE FROM schedule WHERE package_id='${PKG_ID}';"
# query_db "DELETE FROM sources WHERE id='${PKG_ID}';"
# echo "$(date -u) - $SUITE $PKG removed from database."
# else
# echo "$(date -u) - $SUITE $PKG not found in database."
# fi
# fi
# done
# done
# MESSAGE="Deleted $REMOVED packages: $REMOVE_LIST"
# echo -n "$(date -u ) - "
# if [ $REMOVED -ne 0 ] ; then
# irc_message alpine-reproducible "$MESSAGE"
# fi
# fi
if [ $(date +'%H') -gt 21 ] ; then
REMOVED=0
REMOVE_LIST=""
for REPO in $ALPINE_REPOS ; do
echo "$(date -u ) - dropping removed packages from filesystem in repository '$REPO':"
for i in $(find $BASE/alpine/$REPO -type d -wholename "$BASE/alpine/$REPO/*" | sort) ; do
PKG=$(basename $i)
if ! grep -q "$REPO $PKG" ${ALPINE_PKGS}_full_pkgbase_list > /dev/null ; then
# we could check here whether a package is currently building,
# and if so defer the pkg removal. (but I think this is pointless,
# as we are unlikely to kill that build, so meh, let it finish
# and fail to update the db, because the package is gone...)
let REMOVED=$REMOVED+1
REMOVE_LIST="$REMOVE_LIST $REPO/$PKG"
rm -r --one-file-system $BASE/alpine/$REPO/$PKG
echo "$(date -u) - $REPO/$PKG removed as it's gone from the alpine repositories."
SUITE="alpine_$REPO"
PKG_ID=$(query_db "SELECT id FROM sources WHERE distribution=$DISTROID AND name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
if [ -n "${PKG_ID}" ] ; then
query_db "DELETE FROM results WHERE package_id='${PKG_ID}';"
query_db "DELETE FROM schedule WHERE package_id='${PKG_ID}';"
query_db "DELETE FROM sources WHERE id='${PKG_ID}';"
echo "$(date -u) - $SUITE $PKG removed from database."
else
echo "$(date -u) - $SUITE $PKG not found in database."
fi
fi
done
done
MESSAGE="Deleted $REMOVED packages: $REMOVE_LIST"
echo -n "$(date -u ) - "
if [ $REMOVED -ne 0 ] ; then
irc_message alpine-reproducible "$MESSAGE"
fi
fi
#
# schedule packages
......
......@@ -332,6 +332,7 @@ case $HOSTNAME in
osuosl-build169*|osuosl-build170*|jenkins)
echo "$(date -u) - updating alpine schroot now."
schroot --directory /tmp -c source:jenkins-reproducible-alpine -u root -- apk update
schroot --directory /tmp -c source:jenkins-reproducible-alpine -u root -- apk upgrade
RESULT=$?
if [ $RESULT -eq 1 ] ; then
echo "Warning: failed to update alpine schroot."
......
......@@ -13,10 +13,10 @@
import sys
import lzma
import deb822
import apt_pkg
from sqlalchemy import sql
from urllib.request import urlopen
from datetime import datetime, timedelta
from debian.debian_support import Version
from rblib import query_db, db_table
from rblib.confparse import log
......@@ -27,7 +27,6 @@ from reproducible_html_live_status import generate_schedule
from reproducible_html_packages import gen_packages_html
from reproducible_html_packages import purge_old_pages
apt_pkg.init_system()
"""
How the scheduler chooses which limit to apply, based on the MAXIMA
......@@ -334,7 +333,7 @@ def update_sources_db(suite, arch, sources):
pkg_id = result[0]
old_version = result[1]
notify_maint = int(result[2])
if apt_pkg.version_compare(pkg[1], old_version) > 0:
if Version(pkg[1]) > Version(old_version):
log.debug('New version: ' + str(pkg) + ' (we had ' +
old_version + ')')
updated_pkgs.append({
......@@ -495,7 +494,7 @@ def query_new_versions(suite, arch, limit):
# packages in our repository != official repo,
# so they will always be selected by the query above
# so we only accept them if there version is greater than the already tested one
packages = [(x[0], x[1]) for x in pkgs if apt_pkg.version_compare(x[2], x[3]) > 0]
packages = [(x[0], x[1]) for x in pkgs if Version(x[2]) > Version(x[3])]
print_schedule_result(suite, arch, criteria, packages)
return packages
......
......@@ -164,7 +164,7 @@ echo "$(date -u) - cloning aports repo"
$USERCMD sh -c "$GIT_OPTIONS git clone --depth=1 https://git.alpinelinux.org/aports.git /var/lib/jenkins/aports"
# build and install a patched abuild
$USERCMD sh -c "cd /var/lib/jenkins/aports/main/abuild && base64 -d | git apply - && PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' abuild -r && sudo /sbin/apk add ~/packages/main/x86_64/abuild-3.5.0_rc2-r1.apk && git checkout ." <<-__END__
$USERCMD sh -c "cd /var/lib/jenkins/aports/main/abuild && base64 -d | git apply - && PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' abuild -r && sudo /sbin/apk add --allow-untrusted ~/packages/main/x86_64/abuild-3.5.0_rc2-r1.apk && git checkout ." <<-__END__
ZGlmZiAtLWdpdCBhL21haW4vYWJ1aWxkLzAwMDItcmVwcm8ucGF0Y2ggYi9tYWluL2FidWlsZC8w
MDAyLXJlcHJvLnBhdGNoCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAwLi41ZmYy
MjAxMwotLS0gL2Rldi9udWxsCisrKyBiL21haW4vYWJ1aWxkLzAwMDItcmVwcm8ucGF0Y2gKQEAg
......