Bug 1399798

Summary: non-standard-dir-perm of doc and licenses
Product: [Fedora] Fedora Reporter: Van de Bugger <van.de.bugger>
Component: rpmAssignee: packaging-team-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: ignatenko, kardos.lubos, novyjindrich, packaging-team-maint, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rpm-4.13.0.1-1.fc24 rpm-4.13.0.1-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-28 20:21:21 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
The simple source rpm to reproduce the problem. none

Description Van de Bugger 2016-11-29 13:42:28 EST
Created attachment 1225978 [details]
The simple source rpm to reproduce the problem.

Description of problem:

rpmbuild builds packages with wrong permissions set on doc and licenses directories created with %doc and %license rpm macros.

Version-Release number of selected component (if applicable):

F24 on x86_64, recently updated.
rpm-4.13.0-1.fc24.x86_64 and family (rpm-libs, rpm-build, rpm-build-libs, etc — all of the same version 4.13.0-1.fc24.x86_64).

How reproducible:

Always.

Steps to Reproduce:
1. rpmbuild -rb foo-0.1.0-1.src.rpm
2. rpmlint ../RPMS/noarch/foo-0.1.0-1.noarch.rpm
3. rpmls ../RPMS/noarch/foo-0.1.0-1.noarch.rpm

Actual results:

$ rpmlint ../RPMS/noarch/foo-0.1.0-1.noarch.rpm
foo.noarch: E: non-standard-dir-perm /usr/share/doc/foo 644
foo.noarch: E: non-standard-dir-perm /usr/share/licenses/foo 644
1 packages and 0 specfiles checked; 2 errors, 0 warnings.

$ rpmls ../RPMS/noarch/foo-0.1.0-1.noarch.rpm
drw-r--r--  /usr/share/doc/foo
-rw-r--r--  /usr/share/doc/foo/CHANGES.txt
-rw-r--r--  /usr/share/doc/foo/README.md
drw-r--r--  /usr/share/licenses/foo
-rw-r--r--  /usr/share/licenses/foo/LICENSE.txt

Expected results:

$ rpmlint ../RPMS/noarch/foo-0.1.0-1.noarch.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmls ../RPMS/noarch/foo-0.1.0-1.noarch.rpm
drwxr-xr-x  /usr/share/doc/foo
-rw-r--r--  /usr/share/doc/foo/CHANGES.txt
-rw-r--r--  /usr/share/doc/foo/README.md
drwxr-xr-x  /usr/share/licenses/foo
-rw-r--r--  /usr/share/licenses/foo/LICENSE.txt

Additional info:

This is regression. The problem does not appear with rpm-4.13.0-0.rc1.27.fc24.x86_64 (the version of rpm from F24 release), but appears with rpm-4.13.0-1.fc24.x86_64 (current version).
Comment 1 Panu Matilainen 2016-11-30 02:12:13 EST
Right, easily verified, thanks for the report + reproducer. 

This is caused by the fix for bug 1254483, upstream commit here:
https://github.com/rpm-software-management/rpm/commit/877d5b130cbfdfd93ad39c1f0f1505790eba264e

The patch has been in Fedora (f25-in-progress and rawhide) since April so it was deemed safe enough for inclusion 4.13.0. Anyway, will fix.
Comment 3 Fedora Update System 2017-02-24 08:36:37 EST
rpm-4.13.0.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-beb25f1953
Comment 4 Fedora Update System 2017-02-24 08:59:45 EST
rpm-4.13.0.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-54078f9dd2
Comment 5 Fedora Update System 2017-02-24 19:53:49 EST
rpm-4.13.0.1-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-2017-54078f9dd2
Comment 6 Fedora Update System 2017-02-24 20:52:25 EST
rpm-4.13.0.1-1.fc25 has been pushed to the Fedora 25 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-2017-beb25f1953
Comment 7 Fedora Update System 2017-02-28 20:21:21 EST
rpm-4.13.0.1-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 8 Fedora Update System 2017-02-28 20:24:58 EST
rpm-4.13.0.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.