<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
If the tar file is the file that you are installing, then just use
the "%attr" directive under "%files". (<a
href="http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html">http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html</a>)<br>
<br>
If you are extracting the tar file in your %pre or %post scripts,
use the '-p' option to tar to preserve the mode for the files in the
tar image. (See the man pages for tar)<br>
<br>
Hope this helps.<br>
<br>
-ramin<br>
<br>
<br>
On 7/1/2011 12:10 PM, James R Maxwell wrote:
<blockquote
cite="mid:OF26F92AD7.9F2291E9-ON862578C0.0058E47C-862578C0.0058E484@mck.us.ray.com"
type="cite"><font size="2" face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">
<p style="margin: 0px;">I have a tar file that contains certain
permissions, ownerships and groups.</p>
<p style="margin: 0px;">My question is how do I specify in the
Spec file that I want to maintain the same permissions,
ownerships and groups of my tarfile when the RPM is installed.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">I have the following line in my spec
file;</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">%defattr (-,root,root,-)</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">However my tarfile contains files and
directories of different permissions for directories/files and
ownership/groups.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Any help would be appreciated.</p>
<p style="margin: 0px;">Jim</p>
</font>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Rpm-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rpm-list@lists.rpm.org">Rpm-list@lists.rpm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.rpm.org/mailman/listinfo/rpm-list">http://lists.rpm.org/mailman/listinfo/rpm-list</a>
</pre>
</blockquote>
</body>
</html>