Bug 505995

Summary: rpmbuild does not recognize the last slash as directory
Product: [Fedora] Fedora Reporter: Mamoru TASAKA <mtasaka>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ffesti, jnovy, pmatilai
Target Milestone: ---Keywords: Triaged, Upstream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-19 09:15:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 504709    
Attachments:
Description Flags
test spec file
none
Test case 2 none

Description Mamoru TASAKA 2009-06-15 07:15:29 UTC
Created attachment 347897 [details]
test spec file

Description of problem:
Compiling the attached spec file causes the warning as:
---------------------------------------------------
Processing files: test-directory-0-1.fc.noarch
warning: File listed twice: /usr/share/test-directory/file
---------------------------------------------------

Version-Release number of selected component (if applicable):
rpm-4.7.0-6.fc12.i586

How reproducible:
100%

Steps to Reproduce:
1. Rebuild the attached spec file
2.
3.
  
Actual results:
Processing files: test-directory-0-1.fc.noarch
warning: File listed twice: /usr/share/test-directory/file

Expected results:
The last slash should be recognized as a directory like
"ls -al */" returns

Comment 1 Bug Zapper 2009-11-16 10:12:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Mamoru TASAKA 2009-12-13 15:13:38 UTC
This still happens with rpm-4.8.0-0.beta1.3.i686

Comment 3 Mamoru TASAKA 2010-01-11 17:31:08 UTC
Created attachment 383031 [details]
Test case 2

Even worse case

For this case the created $RPM_BUILD_ROOT%{_datadir}/foo-dir/bar-file
is a file, not a directory.
However the entry %dir %{_datadir}/foo-dir/* "matches" this file
even if %dir is explicitly specified (and in the created binary rpm
bar-file is a file, not a directory)

Comment 4 Bug Zapper 2010-03-15 12:39:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2011-06-02 18:01:48 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Panu Matilainen 2011-06-17 12:42:13 UTC
Moving to rawhide to avoid timeouting, this hasn't been addressed in later rpm versions either.

Comment 7 Panu Matilainen 2011-06-27 12:17:31 UTC
Fixed upstream now.

Here's the former behavior:
[pmatilai@localhost rpm]$ rpmbuild -bb --quiet ~/tmp/test-directory.spec 
warning: File listed twice: /usr/share/test-directory/file
[pmatilai@localhost rpm]$ rpmbuild -bb --quiet ~/tmp/dir-check.spec 
[pmatilai@localhost rpm]$

And this is the new behavior:
[pmatilai@localhost rpm]$ ./rpmbuild -bb --quiet ~/tmp/test-directory.spec 
[pmatilai@localhost rpm]$ ./rpmbuild -bb --quiet ~/tmp/dir-check.spec 
error: Directory not found by glob: /home/pmatilai/rpmbuild/BUILDROOT/dir-check-0-1.fc15.x86_64/usr/share/foo-dir/*/
    Directory not found by glob: /home/pmatilai/rpmbuild/BUILDROOT/dir-check-0-1.fc15.x86_64/usr/share/foo-dir/*/
[pmatilai@localhost rpm]$

...ie no whining in the correct 1st case, and abort build on the second one where a file is marked as %dir.

Comment 8 Panu Matilainen 2011-07-19 09:15:44 UTC
Fixed in rpm >= 4.9.1, in rawhide now (with an update for F15 to be expected sooner than later).