This has not been necessary for many Fedora releases; remove them from the spec template, since otherwise it keeps coming up in new package reviews.
@salimma This only got fixed in upstream rpm with version 4.16, so this needs to be handled in such a way that if it is rpm < 4.16, it's still present.
@ngompa ah, good point. Do we publish the same rpmdevtools across all branches, or can we build an older version on releases known to have RPM < 4.16?
@salimma We do publish the same rpmdevtools across all branches.
@ngompa thanks! Adjusting my patch right now. One thing that's odd though, is our packaging guidelines wrong?
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections
The contents of the buildroot SHOULD NOT be removed in the first line of %install.
A lot of our specs likely have rm -rf $RPM_BUILD_ROOT missing even though as of Fedora 32 beta we're still shipping RPM 4.15.1.
rm -rf $RPM_BUILD_ROOT
I need to check on an older machine -- but looks like regardless of what RPM's default is, the specs shipped with Fedora is correct at least in Fedora 32:
❯ rpm -E '%__spec_install_pre' | grep rm RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"
edit it does seem to be needed on EL8.
@salimma Fedora packaging guidelines assumes the altered rpm environment influenced by redhat-rpm-config, which has shipped a variant of the upstream patch in some form for a while: https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/5d8c70518a527c5c1958525afcf391dd03e4efab/f/macros#_212-220
redhat-rpm-config
rebased onto 74398161c3dba07d841746f54b762ac4041884a5
@salimma do you want to rebase this so I can merge it? rpmdevtools-9.x can take this patch...
rebased onto 7d8c7c2f572ad8744d17fe1907158f8bf385212f
Pull-Request has been merged by ngompa
This has not been necessary for many Fedora releases; remove them from the spec template, since otherwise it keeps coming up in new package reviews.