Ok, I´m try to do that, but the variables that are defined on the top of spec file will be avaliable for the %post section? How can I access then on the %post section?<br><br><b>e.g:</b><br><br><i>%post<br>chgrp oracle: %{script_path}<br>
</i> <br><br><br><br><div class="gmail_quote">2009/8/17 Todd Zullinger <span dir="ltr"><<a href="mailto:tmz@pobox.com">tmz@pobox.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Bruno Galindro da Costa wrote:<br>
> I´m building a RPM package and I need to check if a user exists<br>
> before install the package. If user exists, the script will create<br>
> him in the system. Before I compile then, I´ve  tried to install it,<br>
> but the following error is displayed. Is this because I´ve putted a<br>
> %define into the %pre section? How can I define a variable that I<br>
> %can use on the %defattr directive inside %pre section?<br>
<br>
</div>I don't think you can do what you want with rpm.  By the time the %pre<br>
scriptlet is running, the %defattr in the %files section is long since<br>
set.  You could use chgrp in %post to fix up the group ownership of<br>
the files, which will make rpm complain if you run --verify against<br>
this package.<br>
<br>
There's probably a better way to handle this if you're willing and<br>
able to change more than just this one package.  It seems to me that<br>
needing to do this seems like a good indication that something else is<br>
wrong.<br>
<font color="#888888"><br>
--<br>
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: <a href="http://www.pobox.com/%7Etmz/pgp" target="_blank">www.pobox.com/~tmz/pgp</a><br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
All I really want for Christmas is Santa's list of Naughty Girls.<br>
<br>
</font><br>--<br>
fedora-list mailing list<br>
<a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>
To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-list</a><br>
Guidelines: <a href="http://fedoraproject.org/wiki/Communicate/MailingListGuidelines" target="_blank">http://fedoraproject.org/wiki/Communicate/MailingListGuidelines</a><br></blockquote></div><br><br clear="all"><br>-- <br>
Att.<br>Bruno Galindro da Costa<br><a href="mailto:bruno.galindro@gmail.com">bruno.galindro@gmail.com</a><br>Florianópolis - SC<br>