#2026 Issue closed: rear.spec: Remove obsolete BuildRoot tag

Labels: cleanup, fixed / solved / done

gdha opened issue at 2019-01-29 07:47:

diff --git a/rear.spec b/rear.spec
index 7d8650b..7ca476c 100644
--- a/rear.spec
+++ b/rear.spec
@@ -16,7 +16,6 @@ URL: http://relax-and-recover.org/
 # as GitHub stopped with download section we need to go back to Sourceforge for downloads
 Source: https://sourceforge.net/projects/rear/files/rear/%{version}/rear-%{version}.tar.gz

-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

 # rear contains only bash scripts plus documentation so that on first glance it could be "BuildArch: noarch"
 # but actually it is not "noarch" because it only works on those architectures that are explicitly supported.

https://src.fedoraproject.org/rpms/rear/c/8f7a987e85bee79f341d3a556125160f8e84e0c2?branch=master

Question for SuSe: could you verify if the same rules apply to SLES these days?

jsmeix commented at 2019-01-29 10:44:

Removing the BuildRoot tag would violate
the "openSUSE:Specfile guidelines" at
https://en.opensuse.org/openSUSE:Specfile_guidelines
that read (excerpts):

BuildRoot: should always be used, even if newer versions
of RPM override it anyway. The preferred path is
%{_tmppath}/%{name}-%{version}-build.

cf. https://github.com/rear/rear/issues/1855#issuecomment-404100990

I think we need to maintain several separated RPM spec files
as needed for different Linux distributions, for example
rename packaging/rpm/ into packaging/fedora/ and add
a packaging/suse/ so that we can have different RPM spec files
for Fedora and SUSE based Linux distributions,
cf. https://github.com/rear/rear/issues/1892#issuecomment-456005881

gdha commented at 2019-02-11 14:11:

was already commented via 2819c071681a19fc3382aa84bfaf1654508a64aa

jsmeix commented at 2019-05-06 11:52:

In https://github.com/rear/rear/pull/1908 that is
https://github.com/rear/rear/commit/2819c071681a19fc3382aa84bfaf1654508a64aa
both the disabled BuildRoot and the disabled defattr
need to be reenabled to make it build again on SLES11 RHEL 5 CentOS 5
see https://github.com/rear/rear/issues/2135#issuecomment-489590653
and https://github.com/rear/rear/issues/2026#issuecomment-458493458


[Export of Github issue for rear/rear.]