Bug 1290913

Summary: rpmdev-newspec: remove obsolete stuff from the initial template
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bugs.michael, kevin, michel, phracek, 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:39 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 Zbigniew Jędrzejewski-Szmek 2015-12-11 21:34:38 UTC
Description of problem:
When a new spec file is created, there are some elemements which could be removed/updated:

Remove:
rm -rf $RPM_BUILD_ROOT

Update:
make %{?_smp_mflags} → %make_build

%setup -q → %autosetup

In %files, add something like %license LICENSE to remind people to use the new macro.

For initial python spec file, the new template should be used:
https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Version-Release number of selected component (if applicable):
emacs-rpm-spec-mode-0.15-3.fc23.noarch

Comment 1 Michael Schwendt 2015-12-11 21:54:10 UTC
> Remove:
> rm -rf $RPM_BUILD_ROOT

For that see the rationale at: https://fedorahosted.org/rpmdevtools/ticket/25

But else: yes, some people use these tools when preparing a package for a Fedora review request. And things like the empty %doc line are not a good idea either.

As a compromise, why not add a comment line to the %install section tool's output?

| %install
| # cleaning up the Buildroot here is only necessary for EL5
| # or if the redhat-rpm-config package is not installed
| rm -rf $RPM_BUILD_ROOT
| %make_install

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-12-11 22:11:55 UTC
I think it's an upstream/downstream thing. I don't know (or care) what the upstream default should be, but the Fedora template should follow our guidelines. It really doesn't make sense to have stuff in the Fedora template which is not useful for Fedora. Since it is not possible to serve all cases properly, imho the Fedora package should just follow the guidelines as much as possible, without any legacy stuff.

Comment 3 Ville Skyttä 2015-12-11 22:13:21 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #0)
> Update:
> make %{?_smp_mflags} → %make_build

https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=dcf1005d2cca7ce2a541718425f84d65fe8b8d00

> %setup -q → %autosetup

https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=cd37dabffc135170311bdef3f2fa712c44e90d89

> In %files, add something like %license LICENSE to remind people to use the
> new macro.

See bug 1256815.

> For initial python spec file, the new template should be used:
> https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Probably, but at least some modifications should be made, at least use the python3_pkgversion stuff for EPEL Python 3.

Comment 4 Ville Skyttä 2015-12-11 22:22:25 UTC
(In reply to Michael Schwendt from comment #1)
> As a compromise, why not add a comment line to the %install section tool's
> output?

No, that would make it "wrong" for everyone out of the box, requiring manual removal of the comments, and the comments are subject to bitrot.

(In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> Since it is not possible to serve all cases properly, imho [...]

IMNSHO we already do a good job of serving all cases properly right now. It's amazing how people have the energy to nitpick over this single harmless line, which does not make the produced specfiles improper in any environment. I'm not going to remove it.

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

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

Comment 7 Fedora Update System 2016-06-25 00:27:41 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 8 Fedora Update System 2016-06-25 00:32:15 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 9 Fedora Update System 2016-06-25 10:36:09 UTC
rpmdevtools-8.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9

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

Comment 11 Fedora Update System 2016-06-26 00:27:29 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 12 Fedora Update System 2016-06-26 06:22:17 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 13 Fedora Update System 2016-06-26 20:55:20 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 14 Fedora Update System 2016-06-27 22:56:15 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.