diff --git a/supermin.spec b/supermin.spec index 86c987b..8a4817f 100644 --- a/supermin.spec +++ b/supermin.spec @@ -88,11 +88,36 @@ find %{buildroot} -ls %check ls -alt /boot /lib/modules || : ls -altd /lib/modules/*/* || : + +for i in /boot/Image* /boot/vmlinu* +do + test -f "$i" || continue + if get_kernel_version "${i}" > $$ + then + if test -s $$ + then + read SUPERMIN_KERNEL_VERSION < $$ + export "SUPERMIN_KERNEL=$i" + export "SUPERMIN_KERNEL_VERSION=$SUPERMIN_KERNEL_VERSION" + export "SUPERMIN_MODULES=/lib/modules/${SUPERMIN_KERNEL_VERSION}" + break + fi + fi +done +rm -fv $$ +test -n "${SUPERMIN_KERNEL}" +test -n "${SUPERMIN_KERNEL_VERSION}" +test -d "${SUPERMIN_MODULES}" %ifnarch s390x -make check || { - cat tests/test-suite.log - exit 1 -} +if make check +then + rc=0 +else + : rc $? + rc=1 +fi +cat tests/test-suite.log +exit ${rc} %endif %files