#3519 PR merged: Unbreak the srpm build with recent rpmbuild¶
Labels: bug
pcahyna opened issue at 2025-09-10 14:40:¶
Pull Request Details:¶
-
Type: Bug Fix
-
Impact: Low
-
Reference to related issue (URL):
-
How was this pull request tested?
make srpmon Fedora 41. -
Description of the changes in this pull request:
rpmbuild started to generate cleanup code for SRPM builds that assumes
existence of a directory that it does not create, causing the build to
fail and thus failing the srpm Makefile target.
The error message is like
Executing(rmbuild): /bin/sh -e /var/tmp/rpm-tmp.BFfEcM
+ umask 022
+ cd /var/tmp/build-rear-2.9-git.5699.8831a249.fixautomaticrearmismerge.changed/rpmbuild/BUILD/rear-2.9-build
/var/tmp/rpm-tmp.BFfEcM: line 33: cd: /var/tmp/build-rear-2.9-git.5699.8831a249.fixautomaticrearmismerge.changed/rpmbuild/BUILD/rear-2.9-build: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.BFfEcM (rmbuild)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.BFfEcM (rmbuild)
make: *** [Makefile:275: srpm] Error 1
Fix by removing --clean from rpmbuild invocation when building SRPM. I don't think there is anything to clean up anyway since the SRPM build does not extract sources.
pcahyna commented at 2025-09-17 14:08:¶
@rear/contributors If there are no objections, I plan to merge it tomorrow before noon.
pcahyna commented at 2025-09-18 12:02:¶
@schlomo I will have a quick look. I suspect that the directory was not
removed even by the old rpmbuild with --clean, so this question is
probably not directly related to this change.
pcahyna commented at 2025-09-18 15:17:¶
@schlomo so, make clean does not remove the BUILD_DIR and neither
does rpmbuild --clean (so it was not getting removed even before this
change), the reason is that there is another clean-all target which
removes this.
I think it is a questionable choice, given that make clean removes
dist/ which contains the final build results, while BUILD_DIR is
merely intermediary. So, I would expect BUILD_DIR to be cleaned by
default and dist/ only with a special target, and not vice versa.
However, it has not caused real issues until now, apparently.
schlomo commented at 2025-09-18 15:21:¶
Thanks for checking @pcahyna, let's just merge it
[Export of Github issue for rear/rear.]