7d8c7c2
@@ -32,7 +32,6 @@
%install
- rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{rlibdir}
%{_bindir}/R CMD INSTALL -l $RPM_BUILD_ROOT%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
@@ -16,7 +16,6 @@
%files
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
@@ -23,7 +23,6 @@
@@ -45,7 +45,6 @@
# These rules work if the library uses 'ocamlfind install' to install itself.
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
# Remove the next line from noarch packages (unneeded)
@@ -34,7 +34,7 @@
cd %{pear_name}-%{version}
- rm -rf $RPM_BUILD_ROOT docdir
+ rm -rf docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
# Move documentation
@@ -31,7 +31,6 @@
%check
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 7439816
@salimma do you want to rebase this so I can merge it? rpmdevtools-9.x can take this patch...
rebased onto 7d8c7c2
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.