summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-10 12:40:10 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-10 12:40:10 +0100
commitd1da1bd375818eb798ef755f71d01e964b8e4d1c (patch)
tree7bb157af8292c91c071cdee5bf8ca0eb6b3e4526
parent49cc1830343050e9da932fdb90d99b751678d456 (diff)
downloadjenkins.debian.net-d1da1bd375818eb798ef755f71d01e964b8e4d1c.tar.xz
reproducible archlinux: refactor
-rwxr-xr-xbin/reproducible_build_archlinux_pkg.sh56
1 files changed, 30 insertions, 26 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 5cd509d8..7fea6dcf 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -38,6 +38,35 @@ handle_remote_error() {
exit 0
}
+choose_package() {
+ #SESSION="arch-scheduler-$RANDOM"
+ #schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+ #PACKAGES="$(schroot --run-session -c $SESSION --directory /var/abs/core -- ls -1|sort -R|xargs echo)"
+ #schroot --end-session -c $SESSION
+ #SRCPACKAGE=""
+ PACKAGES="acl archlinux-keyring attr autoconf automake b43-fwcutter bash binutils bison bridge-utils btrfs-progs bzip2 ca-certificates ca-certificates-cacert coreutils cracklib crda cronie cryptsetup curl dash db dbus dhcpcd dialog diffutils ding-libs dmraid dnssec-anchors dosfstools e2fsprogs ed efibootmgr efivar elfutils expat fakeroot file filesystem findutils flex gawk gcc gdbm gettext glib2 glibc gmp gnupg gnutls gpgme gpm grep groff grub gssproxy gzip hdparm hwids iana-etc ifenslave inetutils iproute2 iptables iputils ipw2100-fw ipw2200-fw isdn4k-utils iw jfsutils kbd keyutils kmod krb5 ldns less libaio libarchive libassuan libcap libedit libevent libffi libgcrypt libgpg-error libgssglue libidn libksba libmpc libnl libpcap libpipeline librpcsecgss libsasl libseccomp libssh2 libtasn1 libtirpc libtool libunistring libusb licenses links linux linux-api-headers linux-atm linux-firmware linux-lts logrotate lvm2 lz4 lzo m4 make man-db man-pages mdadm mkinitcpio mkinitcpio-busybox mkinitcpio-nfs-utils mlocate mpfr nano ncurses net-tools netctl nettle nfs-utils nfsidmap nilfs-utils npth nspr nss openldap openresolv openssh openssl openvpn p11-kit pacman pacman-mirrorlist pam pambase patch pciutils pcmciautils pcre perl pinentry pkg-config popt ppp pptpclient procinfo-ng procps-ng psmisc pth readline reiserfsprogs rfkill rpcbind run-parts s-nail sdparm sed shadow sqlite sudo sysfsutils syslinux systemd tar texinfo thin-provisioning-tools traceroute tzdata usbutils util-linux vi which wireless-regdb wireless_tools wpa_actiond wpa_supplicant xfsprogs xinetd xz zd1211-firmware zlib" # this is hard coded here, because of running jobs on remote nodes, basically… WIP :)
+ for PKG in $PACKAGES ; do
+ # build package if it has never build or at least a week ago
+ if [ ! -d $BASE/archlinux/$PKG ] || [ ! -z $(find $BASE/archlinux/ -name $PKG -mtime +6) ] ; then
+ SRCPACKAGE=$PKG
+ echo "Building $PKG now..."
+ # very simple locking…
+ mkdir -p $BASE/archlinux/$PKG
+ touch $BASE/archlinux/$PKG
+ break
+ fi
+ done
+ if [ -z $SRCPACKAGE ] ; then
+ echo "$(date -u ) - no package found to be build, sleeping 6h."
+ for i in $(seq 1 12) ; do
+ sleep 30m
+ echo "$(date -u ) - still sleeping..."
+ done
+ echo "$(date -u ) - exiting cleanly now."
+ exit 0
+ fi
+}
+
first_build() {
echo "============================================================================="
echo "Building ${SRCPACKAGE} for Arch Linux on $(hostname -f) now."
@@ -175,32 +204,7 @@ fi
#
delay_start # randomize start times
# first, we need to choose a package…
-#SESSION="arch-scheduler-$RANDOM"
-#schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
-#PACKAGES="$(schroot --run-session -c $SESSION --directory /var/abs/core -- ls -1|sort -R|xargs echo)"
-#schroot --end-session -c $SESSION
-#SRCPACKAGE=""
-PACKAGES="acl archlinux-keyring attr autoconf automake b43-fwcutter bash binutils bison bridge-utils btrfs-progs bzip2 ca-certificates ca-certificates-cacert coreutils cracklib crda cronie cryptsetup curl dash db dbus dhcpcd dialog diffutils ding-libs dmraid dnssec-anchors dosfstools e2fsprogs ed efibootmgr efivar elfutils expat fakeroot file filesystem findutils flex gawk gcc gdbm gettext glib2 glibc gmp gnupg gnutls gpgme gpm grep groff grub gssproxy gzip hdparm hwids iana-etc ifenslave inetutils iproute2 iptables iputils ipw2100-fw ipw2200-fw isdn4k-utils iw jfsutils kbd keyutils kmod krb5 ldns less libaio libarchive libassuan libcap libedit libevent libffi libgcrypt libgpg-error libgssglue libidn libksba libmpc libnl libpcap libpipeline librpcsecgss libsasl libseccomp libssh2 libtasn1 libtirpc libtool libunistring libusb licenses links linux linux-api-headers linux-atm linux-firmware linux-lts logrotate lvm2 lz4 lzo m4 make man-db man-pages mdadm mkinitcpio mkinitcpio-busybox mkinitcpio-nfs-utils mlocate mpfr nano ncurses net-tools netctl nettle nfs-utils nfsidmap nilfs-utils npth nspr nss openldap openresolv openssh openssl openvpn p11-kit pacman pacman-mirrorlist pam pambase patch pciutils pcmciautils pcre perl pinentry pkg-config popt ppp pptpclient procinfo-ng procps-ng psmisc pth readline reiserfsprogs rfkill rpcbind run-parts s-nail sdparm sed shadow sqlite sudo sysfsutils syslinux systemd tar texinfo thin-provisioning-tools traceroute tzdata usbutils util-linux vi which wireless-regdb wireless_tools wpa_actiond wpa_supplicant xfsprogs xinetd xz zd1211-firmware zlib" # this is hard coded here, because of running jobs on remote nodes, basically… WIP :)
-for PKG in $PACKAGES ; do
- # build package if it has never build or at least a week ago
- if [ ! -d $BASE/archlinux/$PKG ] || [ ! -z $(find $BASE/archlinux/ -name $PKG -mtime +6) ] ; then
- SRCPACKAGE=$PKG
- echo "Building $PKG now..."
- # very simple locking…
- mkdir -p $BASE/archlinux/$PKG
- touch $BASE/archlinux/$PKG
- break
- fi
-done
-if [ -z $SRCPACKAGE ] ; then
- echo "$(date -u ) - no package found to be build, sleeping 6h."
- for i in $(seq 1 12) ; do
- sleep 30m
- echo "$(date -u ) - still sleeping..."
- done
- echo "$(date -u ) - exiting cleanly now."
- exit 0
-fi
+choose_package
# build package twice
mkdir b1 b2
remote_build 1