From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041012 Description of problem: When building an RPM package, if a file is installed to RPM_BUILD_ROOT and hardlinked to another file name and an %{attr} statement added to the first one, rpm does a double chown/chmod and resets permissions on the first one. for instance (in the %install section)... touch RPM_BUILD_ROOT/sbin/a chmod 644 RPM_BUILD_ROOT/sbin/a ln RPM_BUILD_ROOT/sbin/a RPM_BUILD_ROOT/sbin/b in the %files section... %attr(0755,root,root) /sbin/a /sbin/b when installed both files with be 0644. this is not really a bug in rpm, but maybe a warning would be a good idea? Version-Release number of selected component (if applicable): rpm-4.3.3 & rpm-4.4 How reproducible: Always Steps to Reproduce: 1.create an rpm specfile which hardlinks one file to another name 2.create an attr statement for first file and leave second file without an %attr() statement 3.install rpm Actual Results: both files are set with default permissions of second file above Expected Results: maybe a warning message? Additional info:
There are a vanishingly small number of packages attempting both hardlinks and %attr, so the work detecting different %attr modifiers on hardlinks is not worth the effort imho. The command rpm -V pkg will detect multiple %attr apllied to hardlinks.