This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1256815 - Update /etc/rpmdevtools/*.spec files
Update /etc/rpmdevtools/*.spec files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-25 09:50 EDT by Miroslav Suchý
Modified: 2016-06-27 18:56 EDT (History)
4 users (show)

See Also:
Fixed In Version: rpmdevtools-8.9-1.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-26 16:55:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2015-08-25 09:50:00 EDT
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 10:02:13 EDT
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 10:23:42 EDT
(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 14:32:52 EDT
(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 14:04:22 EDT
(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 08:40:25 EST
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 13:14:12 EDT
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 13:15:47 EDT
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-24 20:27:37 EDT
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-24 20:32:13 EDT
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 06:36:01 EDT
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 06:37:26 EDT
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-25 20:27:27 EDT
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 02:22:14 EDT
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 16:55:18 EDT
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 18:56:12 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.