Is %defattr honored for automatically created parent directories of packaged files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to create an RPM package and ran into the following problem:

----
%files
%defattr(644,someuser,someuser,755)

%attr(755,someuser,someuser) /opt/adirectory/sbin/myfile
---

I can build the rpm and install it (/opt/adirectory does not exist).
However, while /opt/adirectory/sbin/myfile will have the correct
permissions and owner, /opt/adirectory/sbin will be owned by root when
I expected it to be owned by someuser (because of the %defattr).

If I directly specify the inclusion of the /opt/adirectory/sbin
directory, then it will have the correct owner. However, I do not want
to do that as I do not want the RPM to 'own' /opt/adirectory/sbin'
because I have to create other RPMs that also have to install files to
/opt/adirectory/sbin and RPM will refuse to install them because of
conflicts (if I use the same technique).

I haven't been able to find information on how to do that. Is there a
way to do what I intend to do using only the spec file?

Thank you,

John Craws
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux