Bug 505995 - rpmbuild does not recognize the last slash as directory
rpmbuild does not recognize the last slash as directory
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
: Triaged, Upstream
Depends On:
Blocks: 504709
  Show dependency treegraph
 
Reported: 2009-06-15 03:15 EDT by Mamoru TASAKA
Modified: 2011-07-19 05:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-19 05:15:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test spec file (617 bytes, text/plain)
2009-06-15 03:15 EDT, Mamoru TASAKA
no flags Details
Test case 2 (584 bytes, text/plain)
2010-01-11 12:31 EST, Mamoru TASAKA
no flags Details

  None (edit)
Description Mamoru TASAKA 2009-06-15 03:15:29 EDT
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 05:12:17 EST
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 10:13:38 EST
This still happens with rpm-4.8.0-0.beta1.3.i686
Comment 3 Mamoru TASAKA 2010-01-11 12:31:08 EST
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 08:39:24 EDT
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 14:01:48 EDT
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 08:42:13 EDT
Moving to rawhide to avoid timeouting, this hasn't been addressed in later rpm versions either.
Comment 7 Panu Matilainen 2011-06-27 08:17:31 EDT
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 05:15:44 EDT
Fixed in rpm >= 4.9.1, in rawhide now (with an update for F15 to be expected sooner than later).

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