From e5a825de740ce78d99a1f47118c76b756bf32554 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:46:35 +0100 Subject: Fix RPM build tests --- .github/mock.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/mock.sh b/.github/mock.sh index 87543ce8..ea4f7f3d 100755 --- a/.github/mock.sh +++ b/.github/mock.sh @@ -52,13 +52,16 @@ if command -v git > /dev/null 2>&1; then fi mkdir -p "${SRCRPM_DIR}" "${RPM_DIR}" -#rpmbuild --undefine=_disable_source_fetch --define "_sourcedir ${SOURCE_DIR}" -ba ${SPEC_FILE} + +# Run mock below +# No idea what happens here to be honest +# mock seems to run more containers to build the package dnf -y --setopt="tsflags=nodocs" install rpmdevtools && \ spectool -g -C ${SOURCE_DIR} ${SPEC_FILE} && \ - { mock --dnf --clean --spec ${SPEC_FILE} --sources=${SOURCE_DIR} --result=${SRCRPM_DIR} --build || \ - { cat ${SRCRPM_DIR}/{root,build}.log; exit 1; } } - -mock --dnf --clean --sources=${SOURCE_DIR} --result=${RPM_DIR} --rebuild "${SRCRPM_DIR}"/${SRC_RPM} || \ - { cat ${RPM_DIR}/{root,build}.log; exit 1; } + mock --init && \ + { mock --no-clean --spec ${SPEC_FILE} --sources=${SOURCE_DIR} --result=${SRCRPM_DIR} --build || \ + { cat ${SRCRPM_DIR}/{root,build}.log; exit 1; } } && \ + { mock --no-clean --sources=${SOURCE_DIR} --result=${RPM_DIR} --rebuild "${SRCRPM_DIR}"/${SRC_RPM} || \ + { cat ${RPM_DIR}/{root,build}.log; exit 1; } } ls -la ${SOURCE_DIR} ${SRCRPM_DIR} ${RPM_DIR} -- cgit v1.2.3-74-g34f1