#7 NOTE: Changes to CI. Temporary, please do not merge.
Closed 8 months ago by vkadlcik. Opened 9 months ago by vkadlcik.
Unknown source master  into  rawhide

@@ -46,8 +46,12 @@

  PACKAGES="${PACKAGES:-$PACKAGE}"

  

  # Kernel package - usualy "kernel", but some trees may use different package

- # name (e.g. kernel-PAE).

+ # name (e.g. kernel-PAE). In some lean installs (like those in Fedora CI),

+ # kernel.rpm  isn't necessarily present - but kernel-core.rpm is.

  KERNEL="${KERNEL:-kernel}"

+ if ! rpm -q "$KERNEL" &>/dev/null; then

+     KERNEL="${KERNEL}-core"

+ fi

  

  REQUIRES="${REQUIRES:-$KERNEL $GCC_PACKAGE glibc}"

  RPM_BUILD_ID="${RPM_BUILD_ID:-.LimeKitten}"
@@ -58,6 +62,15 @@

  

  unset ARCH

  

+ report_disk_usage () {

+     local fs="$1"

+     while true; do

+         echo -n "... Running disk usage: "

+         df -h "$fs" | tail -n 1

+         sleep 60

+     done

+ }

+ 

  rlJournalStart

      rlPhaseStartSetup

          rlLogInfo "PACKAGES=$PACKAGES"
@@ -126,6 +139,14 @@

  

              builddep_options="--nobest"

              rlRun "yum-builddep -y $builddep_options $SPECFILE"

+ 

+             rpm -q fpaste &>/dev/null || rlRun 'yum -y install fpaste'

+ 

+             rpm -qa &>rpm-qa.out

+             rlRun -t -l 'fpaste -t rpm-qa.out rpm-qa.out'

+ 

+             set >set.out

+             rlRun -t -l 'fpaste -t set.out set.out'

          fi

      rlPhaseEnd

  
@@ -142,11 +163,22 @@

                  TARGET="--target=$(uname -m)"

              fi

  

+             report_disk_usage "$TMPDIR" & REPORT_DISK_USAGE_PID=$!

              if rlRun "CC=$GCC rpmbuild --define=\"_topdir $TmpDir\" -bb $TARGET --clean $SPECFILE &> BUILD_LOG"; then

+                 kill $REPORT_DISK_USAGE_PID

                  rlRun "RPMBUILD_OK=yes"

              else

+                 kill $REPORT_DISK_USAGE_PID

                  rlLogInfo "rpmbuild kernel failed"

                  rlRun "RPMBUILD_OK=no"

+                 rlFileSubmit BUILD_LOG BUILD_LOG

+                 rlRun -t -l 'fpaste -t BUILD_LOG BUILD_LOG'

+                 echo '=== df -h ==='

+                 df -h

+                 echo '=== The build ended up with:  ==='

+                 tail -n 100 BUILD_LOG

+                 echo '=== System log ends up with:  ==='

+                 journalctl --no-pager -n 30

              fi

              rlBundleLogs "Build-log" BUILD_LOG

          rlPhaseEnd