On Mon, Jun 19, 2023 at 05:40:42PM +0200, Philipp Rudo wrote:
On Thu, 15 Jun 2023 13:17:19 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
> Tests failed to run against Fedora 37 or newer cloud images because of
> the following error,
> It's a image with multiple partitions, using last partition as main
partition
> 'xxx/tests/build/x86_64/kexec-tools-2.0.26-5.fc37.src.rpm' not found
> /dev/nbd0 disconnected
> make: *** [Makefile:73: xxx/tests/output/test-base-image] Error 1
>
> This is because starting with Fedora 37, rpm changes its API,
> # Fedora >= 37
> $ rpm -q --specfile kexec-tools.spec
> kexec-tools-2.0.26-5.fc37.src
> # Fedora 36
> $ rpm -q --specfile kexec-tools.spec
> kexec-tools-2.0.26-5.fc36
>
> The tests depends on rpm to generate correct RPM name. Fix this issue by
> removing the trailing .src from the output of "rpm -q --specfile".
>
> Signed-off-by: Coiby Xu <coxu(a)redhat.com>
For the series
Reviewed-by: Philipp Rudo <prudo(a)redhat.com>
Patch set merged, thanks for the review!
> ---
> tests/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 05fda1da..45688caf 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -30,7 +30,7 @@ RPMDEFINE = --define '_sourcedir $(REPO)'\
>
> KEXEC_TOOLS_SRC = $(filter-out $(REPO)/tests,$(wildcard $(REPO)/*))
> KEXEC_TOOLS_TEST_SRC = $(wildcard $(REPO)/tests/scripts/**/*)
> -KEXEC_TOOLS_NVR = $(shell rpm $(RPMDEFINE) -q --specfile $(REPO)/$(SPEC)
2>/dev/null | grep -m 1 .)
> +KEXEC_TOOLS_NVR = $(shell rpm $(RPMDEFINE) -q --specfile $(REPO)/$(SPEC)
2>/dev/null | grep -m 1 . | sed -e 's#.src#.$(ARCH)#')
> KEXEC_TOOLS_RPM = $(BUILD_ROOT)/$(ARCH)/$(KEXEC_TOOLS_NVR).rpm
>
> all: $(TEST_ROOT)/output/test-base-image
--
Best regards,
Coiby