Thanks Elia!<br><br>Exactly what I was looking for.<br>Ive put attr independently for each file - now it works.<br><br><br><div class="gmail_quote">On Sat, Oct 8, 2011 at 5:30 PM,  <span dir="ltr"><<a href="mailto:rpm-list-request@lists.rpm.org">rpm-list-request@lists.rpm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Rpm-list mailing list submissions to<br>
        <a href="mailto:rpm-list@lists.rpm.org">rpm-list@lists.rpm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.rpm.org/mailman/listinfo/rpm-list" target="_blank">http://lists.rpm.org/mailman/listinfo/rpm-list</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:rpm-list-request@lists.rpm.org">rpm-list-request@lists.rpm.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:rpm-list-owner@lists.rpm.org">rpm-list-owner@lists.rpm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Rpm-list digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Problem with %attr/%defattr (Amol Kulkarni)<br>
   2. Re: Problem with %attr/%defattr (Jos Vos)<br>
   3. Re: Problem with %attr/%defattr (devzero2000)<br>
   4. rpm: failed dependency even though the dso library is<br>
      installed, but seems to not be "provided" (Jim Galarowicz)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 7 Oct 2011 18:11:15 +0530<br>
From: Amol Kulkarni <<a href="mailto:amolk112k@gmail.com">amolk112k@gmail.com</a>><br>
To: <a href="mailto:rpm-list@lists.rpm.org">rpm-list@lists.rpm.org</a><br>
Subject: Problem with %attr/%defattr<br>
Message-ID:<br>
        <<a href="mailto:CABhJRgMW%2B_7ogzQPBbD7urRGow7VFTuR5hS3pccmFzFrMtvXug@mail.gmail.com">CABhJRgMW+_7ogzQPBbD7urRGow7VFTuR5hS3pccmFzFrMtvXug@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Dear All,<br>
<br>
I had built some RPMs for our product on RHEL4  ( rpm ver= rpm-4.3.3-26 ).<br>
Now I'm migrating these rpms to RHEL6 ( rpm ver = rpm-4.8.0-16 ).<br>
<br>
One of the rpms has files owned by different users.<br>
<br>
Eg. In qmail queue, "queue/remote" folder is owned by "qmails" user while<br>
"queue/todo" folder is owned by "qmailq" user.<br>
<br>
The qmail makefile creates the files with appropriate permissions and<br>
ownerships. There is no code to set the permissions/ownership in spec file.<br>
<br>
In RHEL4, rpm was automatically taking the file permissions set on the files<br>
during the build/compile phase. But in RHEL6, it is changing the ownership<br>
to root.root.<br>
<br>
My files section is :<br>
<br>
%files<br>
/var/qmail/bin<br>
/var/qmail/boot<br>
%config(noreplace) /var/qmail/control<br>
/var/qmail/doc<br>
/var/qmail/log<br>
/var/qmail/man<br>
%config(noreplace) /var/qmail/queue<br>
/var/qmail/users<br>
/var/qmail/rc<br>
<br>
<br>
After searching the net, I tried using %defattr(-,-,-,-) macro at global<br>
level and the %attr(-,-,-) macro per entry in the %files section. But to no<br>
avail.<br>
<br>
Can anybody point me in the right direction ?<br>
<br>
Thanks for all the help in advance.<br>
Amol.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.rpm.org/pipermail/rpm-list/attachments/20111007/cfdcd442/attachment-0001.html" target="_blank">http://lists.rpm.org/pipermail/rpm-list/attachments/20111007/cfdcd442/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 7 Oct 2011 14:57:17 +0200<br>
From: Jos Vos <<a href="mailto:jos@xos.nl">jos@xos.nl</a>><br>
To: General discussion about the RPM package manager<br>
        <<a href="mailto:rpm-list@lists.rpm.org">rpm-list@lists.rpm.org</a>><br>
Subject: Re: Problem with %attr/%defattr<br>
Message-ID: <<a href="mailto:20111007125717.GA15842@jasmine.xos.nl">20111007125717.GA15842@jasmine.xos.nl</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Fri, Oct 07, 2011 at 06:11:15PM +0530, Amol Kulkarni wrote:<br>
<br>
> The qmail makefile creates the files with appropriate permissions and<br>
> ownerships. There is no code to set the permissions/ownership in spec file.<br>
<br>
In %install a package should *never* set ownership of files, as you<br>
should be able to build the package as *any* user (building a package<br>
as root is almost a crime ;-)).  If the Makefile does this, you should<br>
apply a patch in your package to avoid this.<br>
<br>
> In RHEL4, rpm was automatically taking the file permissions set on the files<br>
> during the build/compile phase. But in RHEL6, it is changing the ownership<br>
> to root.root.<br>
><br>
> My files section is :<br>
><br>
> %files<br>
> /var/qmail/bin<br>
> /var/qmail/boot<br>
> %config(noreplace) /var/qmail/control<br>
> /var/qmail/doc<br>
> /var/qmail/log<br>
> /var/qmail/man<br>
> %config(noreplace) /var/qmail/queue<br>
> /var/qmail/users<br>
> /var/qmail/rc<br>
><br>
> After searching the net, I tried using %defattr(-,-,-,-) macro at global<br>
> level and the %attr(-,-,-) macro per entry in the %files section. But to no<br>
> avail.<br>
<br>
You don't need to use %defattr (defaults to -,root,root), but use %attr<br>
for the files/dirs that need a non-root owner/group, e.g.<br>
<br>
%attr(-,qmails,root) /var/qmail/queue/remote<br>
%attr(-,qmailq,root) /var/qmail/queue/remote<br>
<br>
Hope this helps,<br>
<br>
--<br>
--    Jos Vos <<a href="mailto:jos@xos.nl">jos@xos.nl</a>><br>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364<br>
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 7 Oct 2011 15:59:00 +0200<br>
From: devzero2000 <<a href="mailto:pinto.elia@gmail.com">pinto.elia@gmail.com</a>><br>
To: General discussion about the RPM package manager<br>
        <<a href="mailto:rpm-list@lists.rpm.org">rpm-list@lists.rpm.org</a>><br>
Subject: Re: Problem with %attr/%defattr<br>
Message-ID:<br>
        <<a href="mailto:CAH5b-BVJU6ZQuDefybMYuj9HW1vJuXOabVP5yONXYst2ukfFaw@mail.gmail.com">CAH5b-BVJU6ZQuDefybMYuj9HW1vJuXOabVP5yONXYst2ukfFaw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
On Fri, Oct 7, 2011 at 2:41 PM, Amol Kulkarni <<a href="mailto:amolk112k@gmail.com">amolk112k@gmail.com</a>> wrote:<br>
<br>
> Dear All,<br>
><br>
> I had built some RPMs for our product on RHEL4  ( rpm ver= rpm-4.3.3-26 ).<br>
> Now I'm migrating these rpms to RHEL6 ( rpm ver = rpm-4.8.0-16 ).<br>
><br>
> One of the rpms has files owned by different users.<br>
><br>
> Eg. In qmail queue, "queue/remote" folder is owned by "qmails" user while<br>
> "queue/todo" folder is owned by "qmailq" user.<br>
><br>
> The qmail makefile creates the files with appropriate permissions and<br>
> ownerships. There is no code to set the permissions/ownership in spec file.<br>
><br>
> In RHEL4, rpm was automatically taking the file permissions set on the<br>
> files during the build/compile phase. But in RHEL6, it is changing the<br>
> ownership to root.root.<br>
><br>
> My files section is :<br>
><br>
> %files<br>
> /var/qmail/bin<br>
> /var/qmail/boot<br>
> %config(noreplace) /var/qmail/control<br>
> /var/qmail/doc<br>
> /var/qmail/log<br>
> /var/qmail/man<br>
> %config(noreplace) /var/qmail/queue<br>
> /var/qmail/users<br>
> /var/qmail/rc<br>
><br>
><br>
> After searching the net, I tried using %defattr(-,-,-,-) macro at global<br>
> level and the %attr(-,-,-) macro per entry in the %files section. But to no<br>
> avail.<br>
><br>
> Can anybody point me in the right direction ?<br>
><br>
> Thanks for all the help in advance.<br>
><br>
In rpm 4.4 (Oct 31 2004) was introduced the "add default<br>
%defattr(-,root,root) for all packages". So the "problem" is not only in<br>
RHEL6 but also RHEL5 for example.<br>
<br>
IIUC you're basing your spec on  a behavior later deemed incorrect. My<br>
advice, as already mentioned, is to use multiple %attr or use, if you have<br>
many file, multiple %defattr with the right perms and ownership.<br>
<br>
<br>
hth<br>
<br>
> Amol.<br>
><br>
> _______________________________________________<br>
> Rpm-list mailing list<br>
> <a href="mailto:Rpm-list@lists.rpm.org">Rpm-list@lists.rpm.org</a><br>
> <a href="http://lists.rpm.org/mailman/listinfo/rpm-list" target="_blank">http://lists.rpm.org/mailman/listinfo/rpm-list</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.rpm.org/pipermail/rpm-list/attachments/20111007/09dd63f7/attachment-0001.html" target="_blank">http://lists.rpm.org/pipermail/rpm-list/attachments/20111007/09dd63f7/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 07 Oct 2011 09:28:44 -0500<br>
From: Jim Galarowicz <<a href="mailto:jeg@krellinst.org">jeg@krellinst.org</a>><br>
To: General discussion about the RPM package manager<br>
        <<a href="mailto:rpm-list@lists.rpm.org">rpm-list@lists.rpm.org</a>><br>
Subject: rpm: failed dependency even though the dso library is<br>
        installed, but seems to not be "provided"<br>
Message-ID: <<a href="mailto:4E8F0C9C.9030408@krellinst.org">4E8F0C9C.9030408@krellinst.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Hi everyone,<br>
<br>
I have successfully built an openspeedshop rpm and installed it before,<br>
but now I'm having a problem with the latest source and spec file when<br>
trying to install the latest version of the openspeedshop rpm file.<br>
<br>
Specifically, I'm having trouble with a dso that is built in my own tool<br>
(OpenSpeedShop, <a href="http://www.openspeedshop.org" target="_blank">www.openspeedshop.org</a>).<br>
When I try to install, rpm installs flag the "so.0" variant to be not<br>
provided.<br>
I believe the automake option in the makefile is creating<br>
libopenss-cli.so which is linked to libopenss-cli.so.0.0.0 and<br>
additionally libopenss-cli.so.0 is also linked to libopenss-cli.so.0.0.0.<br>
<br>
Another library, libopenss-framework builds and installs successfully.<br>
libopenss-framework.so variants also appear to be similar but I don't<br>
have a problem with those dsos and rpm installation.<br>
<br>
[root@localhost kickstart-files]# ls -lastr /opt/OSS/lib64/libopenss-cli.*<br>
23056 -rw-r--r--. 1 root root 23608899 Sep 27 21:34<br>
/opt/OSS/lib64/libopenss-cli.so.0.0.0<br>
     4 -rwxr-xr-x. 1 root root     1541 Sep 27 21:34<br>
/opt/OSS/lib64/<a href="http://libopenss-cli.la" target="_blank">libopenss-cli.la</a><br>
     0 lrwxrwxrwx. 1 root root       22 Sep 28 07:27<br>
/opt/OSS/lib64/libopenss-cli.so.0 -> libopenss-cli.so.0.0.0<br>
     0 lrwxrwxrwx. 1 root root       22 Sep 28 07:27<br>
/opt/OSS/lib64/libopenss-cli.so -> libopenss-cli.so.0.0.0<br>
<br>
[root@localhost kickstart-files]# ls -lastr<br>
/opt/OSS/lib64/libopenss-framework.*<br>
8276 -rwxr-xr-x. 1 root root 8470629 Sep 27 21:34<br>
/opt/OSS/lib64/libopenss-framework.so.1.0.0<br>
    4 -rwxr-xr-x. 1 root root    1053 Sep 27 21:34<br>
/opt/OSS/lib64/<a href="http://libopenss-framework.la" target="_blank">libopenss-framework.la</a><br>
    0 lrwxrwxrwx. 1 root root      28 Sep 28 07:27<br>
/opt/OSS/lib64/libopenss-framework.so.1 -> libopenss-framework.so.1.0.0<br>
    0 lrwxrwxrwx. 1 root root      28 Sep 28 07:27<br>
/opt/OSS/lib64/libopenss-framework.so -> libopenss-framework.so.1.0.0<br>
<br>
<br>
Here is the error I'm seeing:<br>
<br>
rpm --install openspeedshop.OSS.x86_64.rpm<br>
error: Failed dependencies:<br>
     libopenss-cli.so.0()(64bit) is needed by openspeedshop-2.0.1-3.x86_64<br>
<br>
or when I try to build a live CD:<br>
Error creating Live CD : Failed to build transaction :<br>
openspeedshop-2.0.1-3.x86_64 requires libopenss-cli.so.0()(64bit)<br>
<br>
I forced an install of OpenSpeedShop and the components on my laptop and<br>
now I can use some of the rpm options to query the installed rpm.<br>
I had to do rpm --install --nodeps in order to get around the error<br>
message:<br>
   openspeedshop-2.0.1-3.x86_64 requires libopenss-cli.so.0()(64bit)<br>
<br>
I'm seeing the libopenss-cli.so.0.0.0 does not follow the pattern of the<br>
other OpenSpeedShop dsos when I do this query:<br>
         rpm --query --fileprovide openspeedshop-2.0.1-3.x86_64<br>
<br>
...<br>
...<br>
/opt/OSS/lib64/libopenss-CustomExperimentPanel.so.0.0.0<br>
libopenss-CustomExperimentPanel.so.0()(64bit)<br>
/opt/OSS/lib64/libopenss-ExprInfo.so.0.0.0<br>
libopenss-ExprInfo.so.0()(64bit)<br>
/opt/OSS/lib64/libopenss-framework-binutils.so.1.0.0<br>
libopenss-framework-binutils.so.1()(64bit)<br>
/opt/OSS/lib64/libopenss-gui.so.0.0.0   libopenss-gui.so.0()(64bit)<br>
...<br>
/opt/OSS/lib64/libopenss-cli.so.0.0.0             ##### Nothing listed<br>
here - no libopenss-cli.so.0 like the other dsos<br>
<br>
I think that is the key, but the Makefile.am for libopenss-cli has the<br>
same  "-export-dynamic -version-info 0:0:0" clause that<br>
the other dsos that show provides output that I'd like to see for<br>
libopenss-cli: "/opt/OSS/lib64/libopenss-gui.so.0.0.0<br>
libopenss-gui.so.0()(64bit)"<br>
<br>
libopenss_cli_la_LDFLAGS = \<br>
         -L$(top_srcdir)/libopenss-message \<br>
         -L$(top_srcdir)/libopenss-framework \<br>
         -L$(top_srcdir)/libopenss-queries \<br>
         @PYTHON_LDFLAGS@ \<br>
         @OPENMP_LDFLAGS@ \<br>
         -export-dynamic -version-info 0:0:0<br>
<br>
Does anyone have any experience with this kind of issue?<br>
<br>
It seems it could be an autotools usage or rpm spec file issue?  I hope<br>
this is the correct list to post this.<br>
<br>
Thanks,<br>
Jim G<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Rpm-list mailing list<br>
<a href="mailto:Rpm-list@lists.rpm.org">Rpm-list@lists.rpm.org</a><br>
<a href="http://lists.rpm.org/mailman/listinfo/rpm-list" target="_blank">http://lists.rpm.org/mailman/listinfo/rpm-list</a><br>
<br>
<br>
End of Rpm-list Digest, Vol 128, Issue 5<br>
****************************************<br>
</blockquote></div><br>