Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architecture applicability check performed very late by rpm 4.20.0 #3569

Open
jpalus opened this issue Feb 12, 2025 · 1 comment
Open

Architecture applicability check performed very late by rpm 4.20.0 #3569

jpalus opened this issue Feb 12, 2025 · 1 comment

Comments

@jpalus
Copy link
Contributor

jpalus commented Feb 12, 2025

Describe the bug
Architecture applicability check is not performed early in the process by rpmbuild but very late after successful %install.

To Reproduce
Steps to reproduce the behavior:

  1. Sample spec file:
Summary:	test
Name:		test
Version:	1
Release:	1
License:	GPL
Group:		Applications/System
ExclusiveArch:	x86_64

%description
test

%prep
echo prep

%build
echo build

%install
echo install

%clean
rm -rf $RPM_BUILD_ROOT
  1. rpmbuild -bb test.spec (on arch different than x86_64 ie aarch64 or with different --target)
  2. %mkbuilddir, %prep, %build and %install are all executed and only then error: Architecture is not included: aarch64 appears

Expected behavior
rpmbuild fails with error: Architecture is not included: aarch64 before even %mkbuilddir is executed.

Environment

  • OS / Distribution: PLD Linux 3.0
  • Version rpm 4.20.0

Additional context
Appears to be caused by this change: fd32a43 which made checkForValidArchitectures() part of finalizeSpec() invoked through parseGeneratedSpecs() only after successful %install

@pmatilai pmatilai added this to RPM Feb 13, 2025
@github-project-automation github-project-automation bot moved this to Backlog in RPM Feb 13, 2025
@pmatilai
Copy link
Member

This seems like a regression indeed, caused by the delayed sanity checking for the dynamic spec generation stuff. But buildarch compatibility pretty obviously has to be decided up front, not after the build...

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants