diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/jenkins_node_wrapper.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_build_rpm.sh | 14 | ||||
-rwxr-xr-x | bin/reproducible_setup_mock.sh | 32 |
3 files changed, 26 insertions, 22 deletions
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh index 18795875..ebf61efe 100755 --- a/bin/jenkins_node_wrapper.sh +++ b/bin/jenkins_node_wrapper.sh @@ -112,7 +112,7 @@ elif [[ "$*" =~ reproducible_setup_mock_fedora-23_x86_64 ]] ; then elif [ "$1" = "/srv/jenkins/bin/reproducible_build_archlinux_pkg.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" ; croak "Exec failed"; elif [ "$1" = "/srv/jenkins/bin/reproducible_build_rpm.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then - exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" ; croak "Exec failed"; + exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" "$7" ; croak "Exec failed"; elif [ "$*" = "some_jenkins_job_name" ] ; then exec echo run any commands here ; croak "Exec failed"; fi diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh index 936c2844..a13fe845 100755 --- a/bin/reproducible_build_rpm.sh +++ b/bin/reproducible_build_rpm.sh @@ -41,7 +41,7 @@ update_mock() { touch -d "$(date -u -d "6 hours ago" '+%Y-%m-%d %H:%M') UTC" $DUMMY if [ ! -f $STAMP ] || [ $DUMMY -nt $STAMP ] ; then echo "$(date -u ) - updating mock for $RELEASE ($ARCH) on $HOSTNAME now..." - mock -r $RELEASE-$ARCH --resultdir=. --cleanup-after -v --update 2>&1 + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. --cleanup-after -v --update 2>&1 echo "$(date -u ) - mock updated." yum -v --releasever=23 check-update # FIXME: dont hard-code releasever here. echo "$(date -u ) - yum updated." @@ -109,7 +109,7 @@ first_build() { local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log # nicely run mock with a timeout of $TIMEOUT hours timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ - mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then echo "$(date -u) - mock was killed by timeout after ${TIMEOUT}h." | tee -a $LOG @@ -131,7 +131,7 @@ second_build() { # NEW_NUM_CPU=$(echo $NUM_CPU-1|bc) # nicely run mock with a timeout of $TIMEOUT hours timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ - mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then echo "$(date -u) - mock was killed by timeout after ${TIMEOUT}h." | tee -a $LOG @@ -154,7 +154,7 @@ remote_build() { sleep ${SLEEPTIME}m exec /srv/jenkins/bin/abort.sh fi - ssh -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_rpm.sh $BUILDNR $RELEASE $ARCH ${SRCPACKAGE} ${TMPDIR} + ssh -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_rpm.sh $BUILDNR $RELEASE $ARCH $UNIQEEXT ${SRCPACKAGE} ${TMPDIR} RESULT=$? if [ $RESULT -ne 0 ] ; then ssh -p $PORT $FQDN "rm -r $TMPDIR" || true @@ -197,8 +197,9 @@ if [ "$1" = "1" ] || [ "$1" = "2" ] ; then MODE="$1" RELEASE="$2" ARCH="$3" - SRCPACKAGE="$4" - TMPDIR="$5" + UNIQEEXT="$4" + SRCPACKAGE="$5" + TMPDIR="$6" [ -d $TMPDIR ] || mkdir -p $TMPDIR cd $TMPDIR mkdir -p b$MODE/$SRCPACKAGE @@ -222,6 +223,7 @@ delay_start # randomize start times # first, we need to choose a package… RELEASE="$1" ARCH="$2" +UNIQEEXT="mock_${JOB_NAME#reproducible_builder_${RELEASE}_$ARCH}}" SRCPACKAGE="" # package name SRC_RPM="" # src rpm file name # not used yet: diff --git a/bin/reproducible_setup_mock.sh b/bin/reproducible_setup_mock.sh index 240b693d..c39e901e 100755 --- a/bin/reproducible_setup_mock.sh +++ b/bin/reproducible_setup_mock.sh @@ -17,8 +17,6 @@ if [ -z "$1" ] || [ -z "$2" ] ; then fi RELEASE=$1 ARCH=$2 -# not used yet: -UNIQEEXT="mock_${JOB_NAME#reproducible_builder_${RELEASE}_$ARCH}}" echo "$(date -u) - showing setup." dpkg -l mock @@ -30,17 +28,21 @@ yum -v --releasever=23 clean all echo "$(date -u) - initialising yum for $RELEASE" yum -v --releasever=23 check yum -v --releasever=23 repolist all -echo "$(date -u) - starting to cleanly configure mock for $RELEASE on $ARCH." -echo "$(date -u) - mock --clean" -mock -r $RELEASE-$ARCH --resultdir=. -v --clean -echo "$(date -u) - mock --scrub=all" -mock -r $RELEASE-$ARCH --resultdir=. -v --scrub=all -tree /var/cache/mock/ -echo "$(date -u) - mock --init" -mock -r $RELEASE-$ARCH --resultdir=. -v --init -echo "$(date -u) - mock configured for $RELEASE on $ARCH." -echo "$(date -u) - mock --install rpm-build yum" -mock -r $RELEASE-$ARCH --resultdir=. -v --install rpm-build yum -echo "$(date -u) - mock --update" -mock -r $RELEASE-$ARCH --resultdir=. -v --update +for i in 1 2 ; do + UNIQEEXT="mock_$i" + echo "$(date -u) - starting to cleanly configure mock for $RELEASE on $ARCH using unique extension $UNIQEEXT." + echo "$(date -u) - mock --clean" + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. -v --clean + echo "$(date -u) - mock --scrub=all" + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. -v --scrub=all + echo "$(date -u) - mock --init" + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. -v --init + echo "$(date -u) - mock --install rpm-build yum" + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. -v --install rpm-build yum + echo "$(date -u) - mock --update" + mock -r $RELEASE-$ARCH --uniqeext=$UNIQEEXT --resultdir=. -v --update +done + +# finally +echo "$(date -u) - mock configured for $RELEASE on $ARCH." |