<div class="gmail_quote">On Fri, Oct 7, 2011 at 2:41 PM, Amol Kulkarni <span dir="ltr"><<a href="mailto:amolk112k@gmail.com">amolk112k@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Dear All,<br><br>I had built some RPMs for our product on RHEL4 ( rpm ver= rpm-4.3.3-26 ). 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 "queue/todo" folder is owned by "qmailq" user. <br><br>The qmail makefile creates the files with appropriate permissions and 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 during the build/compile phase. But in RHEL6, it is changing the 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 level and the %attr(-,-,-) macro per entry in the %files section. But to no avail.<br>
<br>Can anybody point me in the right direction ? <br><br>Thanks for all the help in advance.<br></blockquote><div>In rpm 4.4 (Oct 31 2004) was introduced the "add default %defattr(-,root,root) for all packages". So the "problem" is not only in RHEL6 but also RHEL5 for example.<br>
<br><span id="result_box" class="" lang="en"><span class="hps">IIUC</span> <span class="hps">you're</span> <span class="hps">basing</span> <span class="hps">your</span> <span class="hps"></span><span class="hps"></span> <span class="hps">spec</span> </span><span id="result_box" class="" lang="en"><span class="hps">on </span> a <span class="hps">behavior </span></span><span id="result_box" class="" lang="en"><span class="hps">later</span> <span class="hps">deemed</span> <span class="hps">incorrect.</span> <span class="hps">My advice</span><span class="">,</span> <span class="hps">as already mentioned,</span> <span class="hps">is to use</span> <span class="hps">multiple</span> <span class="hps">%attr</span><span class=""></span> <span class="hps">or use, if</span> you <span class="hps">have many file</span><span class="">,</span> <span class="hps">multiple</span> <span class="hps"></span><span class="">%</span><span class="hps">defattr with the right perms and ownership.<br>
<br><br>hth</span></span> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888">Amol.<br>
</font><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></blockquote></div><br>