Bug 1256815

Summary: Update /etc/rpmdevtools/*.spec files
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: bugs.michael, kevin, twoerner, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpmdevtools-8.9-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-26 20:55:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2015-08-25 13:50:00 UTC
Description of problem:
It would be nice to update /etc/rpmdevtools/*.spec files to current Fedora guidelines.

Biggest problem I have that you use there $RPM_OPT_FLAGS and $RPM_BUILD_ROOT while everywhere else you use %{} syntax. It would be nice if you can replace
  $RPM_BUILD_ROOT
with 
  %{buildroot}
and
  $RPM_OPT_FLAGS
with
  %{optflags}.

There are other things which you may consider. E.g.

* drop Group tag

* drop BuildRoot (needed only for EPEL5)

* drop
  rm -rf $RPM_BUILD_ROOT
  in %clean and %install - this is not needed unless you target EPEL (not sure which version).

* change
    %doc
  to
    %license LICENSE.txt
    %doc README.txt
  people very often leave the %doc macro there and they do not know how to use it.

All this reflects my experience from dozen of Package Reviews, where people use this template (in hope that it is up to date) and I have to explain them to do all these changes in review process.

Comment 1 Ville Skyttä 2015-08-25 14:02:13 UTC
Macro vs env variable style, Group, and BuildRoot are already taken care of by rpmdev-newspec and its configuration. The spec templates should not be used/edited directly but generated through that tool.

The two that are not handled:

> * drop rm -rf $RPM_BUILD_ROOT
> in %clean and %install - this is not needed unless you target EPEL

Auto-cleaning of $RPM_BUILD_ROOT is implemented in redhat-rpm-config so it is required in all setups where it cannot be guaranteed to be installed.

> [%doc and %license stuff]

I'll look into doing something about those.

Comment 2 Miroslav Suchý 2015-08-25 14:23:42 UTC
(In reply to Ville Skyttä from comment #1)
> Macro vs env variable style, Group, and BuildRoot are already taken care of
> by rpmdev-newspec and its configuration. The spec templates should not be
> used/edited directly but generated through that tool.

Ok for group and buildroot. However ... can you please make the default for macro style on?
I see this in every second package review, so I guess that people do not know about -m option (neither me 5 minutes ago).

Comment 3 Ville Skyttä 2015-08-25 18:32:52 UTC
(In reply to Miroslav Suchý from comment #2)
> can you please make the default for macro style on?

Nope, the guidelines explicitly leave that choice to the packager, the variable style has been the default in this package for ages, and it happens to be my personal preference.

https://fedoraproject.org/wiki/Packaging:Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS

Comment 4 Ville Skyttä 2015-09-10 18:04:22 UTC
(In reply to Ville Skyttä from comment #1)
> 
> > [%doc and %license stuff]
> 
> I'll look into doing something about those.

https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=f4f219a40e82134b3e58c72431cc172831b8db49
https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=21638ef1b3c3d333509cb86969c822d48b3c27cc

Comment 5 Jan Kurik 2016-02-24 13:40:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 6 Fedora Update System 2016-06-23 17:14:12 UTC
rpmdevtools-8.7-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9

Comment 7 Fedora Update System 2016-06-23 17:15:47 UTC
rpmdevtools-8.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1

Comment 8 Fedora Update System 2016-06-25 00:27:37 UTC
rpmdevtools-8.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1

Comment 9 Fedora Update System 2016-06-25 00:32:13 UTC
rpmdevtools-8.7-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9

Comment 10 Fedora Update System 2016-06-25 10:36:01 UTC
rpmdevtools-8.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9

Comment 11 Fedora Update System 2016-06-25 10:37:26 UTC
rpmdevtools-8.8-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1

Comment 12 Fedora Update System 2016-06-26 00:27:27 UTC
rpmdevtools-8.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9

Comment 13 Fedora Update System 2016-06-26 06:22:14 UTC
rpmdevtools-8.9-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1

Comment 14 Fedora Update System 2016-06-26 20:55:18 UTC
rpmdevtools-8.9-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-06-27 22:56:12 UTC
rpmdevtools-8.9-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.