diff options
author | kpcyrd <git@rxv.cc> | 2017-11-19 04:39:08 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-11-20 00:28:52 +0000 |
commit | 5c89f72ff29eeb23db6034a08323d4c17b695506 (patch) | |
tree | 9cd1792eaa9ee0939f6e3da073dd1092b1c58333 | |
parent | 4ca6d34d9a6894e05647ffb45a5f9d05101b0005 (diff) | |
download | jenkins.debian.net-5c89f72ff29eeb23db6034a08323d4c17b695506.tar.xz |
reproducible-archlinux: introduce modeline
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 23 | ||||
-rwxr-xr-x | bin/reproducible_html_archlinux.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_setup_archlinux_schroot.sh | 34 |
3 files changed, 32 insertions, 27 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 83a39171..4ff74d20 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -284,14 +284,14 @@ trap cleanup_all INT TERM EXIT if [ "$1" = "" ] ; then MODE="master" TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX) # where everything actually happens - SOURCE_DATE_EPOCH=$(date +%s) + SOURCE_DATE_EPOCH=$(date +%s) cd $TMPDIR elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then MODE="$1" REPOSITORY="$2" SRCPACKAGE="$3" TMPDIR="$4" - SOURCE_DATE_EPOCH="$5" + SOURCE_DATE_EPOCH="$5" [ -d $TMPDIR ] || mkdir -p $TMPDIR cd $TMPDIR mkdir -p b$MODE/$SRCPACKAGE @@ -301,15 +301,15 @@ elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then second_build fi - # preserve results and delete build directory - if ! mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.xz $TMPDIR/b$MODE/$SRCPACKAGE/; then - echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME didn't build a package!" - find /tmp/$SRCPACKAGE-$(basename $TMPDIR)/ - fi + # preserve results and delete build directory + if ! mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.xz $TMPDIR/b$MODE/$SRCPACKAGE/; then + echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME didn't build a package!" + find /tmp/$SRCPACKAGE-$(basename $TMPDIR)/ + fi - rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)/ - echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done." - exit 0 + rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)/ + echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done." + exit 0 fi # @@ -340,7 +340,7 @@ if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz 2>/dev/null|| true)" ] ; the fi done else - echo "$(date -u) - build1 didn't create a package, skipping build2!" + echo "$(date -u) - build1 didn't create a package, skipping build2!" fi # publish logs cd $TMPDIR/b1/$SRCPACKAGE @@ -352,3 +352,4 @@ cd cleanup_all trap - INT TERM EXIT +# vim: set sw=0 noet : diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh index 20a8bbef..9249b8f8 100755 --- a/bin/reproducible_html_archlinux.sh +++ b/bin/reproducible_html_archlinux.sh @@ -197,3 +197,5 @@ write_page " </table>" write_page "</div></div>" write_page_footer 'Arch Linux' echo "$(date -u) - enjoy $REPRODUCIBLE_URL/archlinux/$PAGE" + +# vim: set sw=0 noet : diff --git a/bin/reproducible_setup_archlinux_schroot.sh b/bin/reproducible_setup_archlinux_schroot.sh index 7cee3f6d..70489d26 100755 --- a/bin/reproducible_setup_archlinux_schroot.sh +++ b/bin/reproducible_setup_archlinux_schroot.sh @@ -31,20 +31,20 @@ bootstrap() { exit 1 fi - if [ ! -f "archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz" ]; then - BOOTSTRAP_TAR_GZ="$BOOTSTRAP_DATE/archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz" - echo "$(date -u) - downloading Arch Linux bootstrap.tar.gz." + if [ ! -f "archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz" ]; then + BOOTSTRAP_TAR_GZ="$BOOTSTRAP_DATE/archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz" + echo "$(date -u) - downloading Arch Linux bootstrap.tar.gz." - curl -fO "$BOOTSTRAP_BASE/$BOOTSTRAP_TAR_GZ" - sudo rm -rf --one-file-system "$SCHROOT_BASE/root.x86_64/" - tar xzf archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz -C $SCHROOT_BASE + curl -fO "$BOOTSTRAP_BASE/$BOOTSTRAP_TAR_GZ" + sudo rm -rf --one-file-system "$SCHROOT_BASE/root.x86_64/" + tar xzf archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz -C $SCHROOT_BASE - mv "$SCHROOT_BASE/$TARGET" "$SCHROOT_BASE/$TARGET.old" - mv $SCHROOT_BASE/root.x86_64 $SCHROOT_BASE/$TARGET - sudo rm -rf --one-file-system "$SCHROOT_BASE/$TARGET.old" + mv "$SCHROOT_BASE/$TARGET" "$SCHROOT_BASE/$TARGET.old" + mv $SCHROOT_BASE/root.x86_64 $SCHROOT_BASE/$TARGET + sudo rm -rf --one-file-system "$SCHROOT_BASE/$TARGET.old" - rm archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz - fi + rm archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz + fi # write the schroot config echo "$(date -u ) - writing schroot configuration for $TARGET." @@ -101,8 +101,8 @@ echo "Server = $ARCHLINUX_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGE # (-0777 tells perl to read the whole file before processing it. then it just does a multi-line regex…) perl -0777 -i -pe 's/#\[multilib\]\n#Include = \/etc\/pacman.d\/mirrorlist/[multilib]\nInclude = \/etc\/pacman.d\/mirrorlist/igs' $SCHROOT_BASE/$TARGET/etc/pacman.conf if [ "$HOSTNAME" = "profitbricks-build4-amd64" ] ; then - # disable signature verification so packages won't fail to install when setting the time to +$x years - sed -i 's/^SigLevel\s*=.*/SigLevel = Never/' "$SCHROOT_BASE/$TARGET/etc/pacman.conf" + # disable signature verification so packages won't fail to install when setting the time to +$x years + sed -i 's/^SigLevel\s*=.*/SigLevel = Never/' "$SCHROOT_BASE/$TARGET/etc/pacman.conf" fi $ROOTCMD bash -l -c 'pacman -Syu --noconfirm' $ROOTCMD bash -l -c 'pacman -S --noconfirm base-devel devtools fakechroot asciidoc asp' @@ -122,7 +122,7 @@ echo "keyserver-options auto-key-retrieve" | tee -a $SCHROOT_BASE/$TARGET/var/li # The workaround with sh -c is needed to delay the shell expansion due to chroot WGET_OPTS='' if [ "$HOSTNAME" = "profitbricks-build4-amd64" ] ; then - WGET_OPTS="--no-check-certificate" + WGET_OPTS="--no-check-certificate" fi wget $WGET_OPTS -O "/tmp/PKGBUILD" "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacman-git" @@ -168,8 +168,10 @@ __END__ $ROOTCMD sed -i "s/^PKGEXT='.pkg.tar.gz'/PKGEXT='.pkg.tar.xz'/" /etc/makepkg.conf if [ "$HOSTNAME" = "profitbricks-build4-amd64" ] ; then - # disable signature verification so packages won't fail to install when setting the time to +$x years - $ROOTCMD sed -i 's/^#?SigLevel\s*=.*/SigLevel = Never/' /etc/pacman.conf + # disable signature verification so packages won't fail to install when setting the time to +$x years + $ROOTCMD sed -i 's/^#?SigLevel\s*=.*/SigLevel = Never/' /etc/pacman.conf fi echo "schroot $TARGET set up successfully in $SCHROOT_BASE/$TARGET - exiting now." + +# vim: set sw=0 noet : |