Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1399798

Summary: non-standard-dir-perm of doc and licenses
Product: [Fedora] Fedora Reporter: Van de Bugger <van.de.bugger>
Component: rpmAssignee: Packaging Maintenance Team <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-03-01 01:21:21 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:
Attachments:
Description Flags
The simple source rpm to reproduce the problem. none

Description Van de Bugger 2016-11-29 18:42:28 UTC
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 07:12:13 UTC
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 13:36:37 UTC
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 13:59:45 UTC
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-25 00:53:49 UTC
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-25 01:52:25 UTC
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-03-01 01:21:21 UTC
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-03-01 01:24:58 UTC
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.