Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 49 lines (48 sloc) 1.51 KB
#!/bin/bash -e
# rebuild with KVM mode
pkg=$(basename `pwd`)
years=15
if grep -q "^$pkg$" "$(dirname $BASH_SOURCE)"/exceptions/neardate ; then
years=1
fi
if grep -q "^$pkg$" "$(dirname $BASH_SOURCE)"/exceptions/cpu ; then
cputype2=host
fi
: ${slot:=4}
: ${clean:=--clean --offline}
: ${project:=home:bmwiedemann:reproducible}
: ${repo:=openSUSE_Tumbleweed}
: ${datediff:=$(((((365*$years+36)*24+13)*60+17)*60))}
: ${host1:=sles12a}
: ${host2:=sles12b}
: ${parallelism:=4}
: ${parallelism2:=1}
: ${cputype2:=qemu64}
: ${vmtype:=--vm-type=kvm}
export vmtype
now=$(date +%s)
later=$(date --date=@$((now+datediff)) -u "+%FT%T")
export OSC_BUILD_ROOT=/var/tmp/build-root.${slot}/
export VM_CUSTOMOPT=""
osc up -S
fixuposcmtime
mkdir -p RPMS
osc build ${oscbuildextrapkg} --preload --nopreinstallimage --noservice --vm-type=kvm --alternative-project=$project ${oscbuildparams} $repo $pkg.spec 2>&1 | tee RPMS/.build.log2
if (( ${PIPESTATUS[0]} )) ; then
if grep -q "Error: build description file named '.*does not exist" RPMS/.build.log2 ; then
echo 2
else
echo 33
fi > .osc-build-retval
exit 33
fi
rm -f .build-differed .build-rbkt
export clean
vmtype="--vm-type=kvm" clean="$clean -j${parallelism}" HOST=$host1 OUTDIR=RPMS.2017 nice -n 7 rebuild &
pid=$!
export VM_CUSTOMOPT="-rtc base=$later -cpu $cputype2,l3-cache=on"
export OSC_BUILD_ROOT=/var/tmp/build-root.${slot}b/
clean="$clean -j${parallelism2}" HOST=$host2 OUTDIR=RPMS rebuild
wait $pid
dir1=RPMS.2017 compareone
grep '^0$' .build-differed || oscmount
You can’t perform that action at this time.