Bug 146623

Summary: rpm 4.4.1 - %dev doesn't work as expected anymore
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: axel.thimm, nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-25 22:29:58 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:

Description Robert Scheck 2005-01-30 23:40:53 UTC
Description of problem:
Since rpm 4.4.x, %dev doesn't work as expected anymore, IMHO it's
a regression in rpm - even if devfs/hal etc is mostly used. Either
%dev should be obsoleted correctly or the support of %dev should be 
fixed.

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

How reproducible:
Everytime, see below.

Steps to Reproduce:
1. Take the following as spec file "dummy.spec":
--- snipp ---
Summary:        Dummy test package for %%dev
Name:           dummy
Version:        0.0.1
Release:        1
License:        Blahblub
Group:          Foo/Bar
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

%description
foo

%files
%attr(0644, root, root) %dev(c, 10, 175) /dev/dummy
--- snapp ---
2. rpmbuild -ba dummy.spec
3. Die with this error:
error: magic_file(ms, "/var/tmp/dummy-0.0.1-root/dev/dummy") failed: 
cannot open `/var/tmp/dummy-0.0.1-root/dev/dummy' 
(No such file or directory)
rpmbuild: rpmfc.c:1225: rpmfcClassify: 
Assertion `ftype != ((void *)0)' failed.
4. If you try the same with rpm 4.3.x for example, the rebuild will
   work fine.

Actual results:
The use of %dev currently causes bad error messages :-(

Expected results:
Working %dev as in rpm < 4.4 it was the case... :)

Comment 1 Jeff Johnson 2005-02-13 20:44:43 UTC
Fixed on rpm-4_4 branch, in rpm-4.4.1-1 final when built.

Comment 2 Axel Thimm 2005-05-29 12:09:11 UTC
The same issue happens with static device nodes for udev under /etc. Could
/etc/udev/devices/ be removed from the classification list as well? Thanks!

Comment 3 Paul Nasrat 2005-10-21 22:05:16 UTC
rawhide
[pauln@enki SPECS]$ rpm -qpvl ../RPMS/devetc-0.0.1-1.i386.rpm
c---------    1 root    root        10, 175 Oct 21 18:06 /dev/dummy
c---------    1 root    root         7,   6 Oct 21 18:06 /etc/udev/devices/loop6

rpm -i/-e work as normal for me.