X-Git-Url: http://git.jankratochvil.net/?p=massrebuild.git;a=blobdiff_plain;f=runone;h=92f67188d011393b69ece1fcd9114f5d8172aaca;hp=71a49f01b7772cf56c38f50c499c597ec933164f;hb=HEAD;hpb=4e677ed836190dbaf3c832f29f5a95ba2d9ea64f diff --git a/runone b/runone index 71a49f0..92f6718 100755 --- a/runone +++ b/runone @@ -3,6 +3,11 @@ set -ex repos=$1 shift mock="mock -v -r fedora-rawhide-x86_64 --uniqueext=mass$$ --no-bootstrap-chroot --disable-plugin=yum_cache" +# https://bugzilla.redhat.com/show_bug.cgi?id=1869030 glibc 2.32.9000-1 snapshot build in rawhide breaks systemd-nspawn based chroots +mock="$mock --isolation=simple" +# (1) inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin +# (2) -a gets ignored. +mock="$mock --disable-plugin=root_cache" mkdir -p build cd build for pkg in "$@";do @@ -19,6 +24,7 @@ for pkg in "$@";do continue fi #rpm -q --requires -p $srcrpm|egrep '^(gcc|clang)' || continue +if true;then rpm2archive $srcrpm rm -rf $srcrpm.d mkdir $srcrpm.d @@ -31,7 +37,8 @@ for pkg in "$@";do continue fi (echo '%global _find_debuginfo_dwz_opts %{nil}' - echo '%global optflags %(echo %{optflags}|sed "s/ -g / -g -fdebug-types-section /")' +# It removes -fcommon, use redhat-rpm-config.patch instead. +# echo '%global optflags %(echo %{optflags}|sed "s/ -g / -g -fdebug-types-section /")' sed 's/^%\(\(define\|global\) *_find_debuginfo_dwz_opts\)/\1/' ) <$name.spec >$name.spec.new cp -p $name.spec ../$srcrpm.spec @@ -47,38 +54,34 @@ for pkg in "$@";do continue fi # if not pkg.endswith('.rpm'): log.error("%s doesn't appear to be an rpm - skipping", pkg) - mv -f resultdir/*.src.rpm ../$srcrpm.dt.rpm + mv -f resultdir/*.src.rpm ../$srcrpm.no.rpm cd .. - test -e $srcrpm.dt.rpm + test -e $srcrpm.no.rpm rm -rf $srcrpm.d - for ext in "" ".dt.rpm";do +else + ln $srcrpm $srcrpm.nc.rpm +fi + for ext in "" ".no.rpm";do resultdir=$PWD/$srcrpm$ext.resultdir test ! -e $resultdir set +e - # --chain instead of --rebuild as otherwise -a does not work - $mock --resultdir=$resultdir --nocheck $(: -a https://people.redhat.com/jkratoch/dwzrepo/ ) --chain $srcrpm$ext &>$srcrpm$ext.mocklog - rc=$? + $mock --resultdir=$resultdir --nocheck $( + if [ "$ext" = ".nc.rpm" ];then echo -a https://www.jankratochvil.net/t/nocommon/;fi + if [ "$ext" = ".dt.rpm" ];then echo -a https://www.jankratochvil.net/t/rpmdts/ ;fi + if [ "$ext" = ".dt5.rpm" ];then echo -a https://www.jankratochvil.net/t/rpmdts5/ ;fi + ) --rebuild $srcrpm$ext &>$srcrpm$ext.mocklog + mockrc=$? set -e test -e $resultdir - #rm -f $srcrpm$ext - if [ $rc -ne 0 ];then + if [ $mockrc -ne 0 ];then touch $srcrpm$ext.mockfail break fi - # --chain ignores --resultdir - resultdirsrc="$(sed -n 's/^INFO: Results out to: //p' $srcrpm$ext.mocklog)" - if [ ! -e $resultdirsrc/*/root.log ];then - touch $srcrpm$ext.mockrfail - break - fi - # With --chain $resultdir contains just some small *.log files. - rm -rf $resultdir - mv `dirname $resultdirsrc/*/root.log` $resultdir echo >$srcrpm$ext.rpmsize $(du -sbc /dev/null $resultdir/*-debuginfo*.rpm|tail -n1|awk '{print $1}') size=0 for i in $resultdir/*-debuginfo*.rpm;do if [ -e "$i" ];then - sizethis="$(rpm -q --qf '%{size}' -p $i)" + sizethis="$(rpm -q --qf '%{longsize}' -p $i)" [[ "$sizethis" =~ ^[0-9]+$ ]] size=$[$size+$sizethis] fi @@ -86,7 +89,8 @@ for pkg in "$@";do echo >$srcrpm$ext.filesize $size mkdir $srcrpm$ext.rpms mv -f $resultdir/*-debuginfo*.rpm $srcrpm$ext.rpms || : - rm -rf $resultdir +# rm -rf $resultdir + rm -f $resultdir/*.rpm done touch $srcrpm.done done