RPM Spec File - %define into %pre section

Bruno Galindro da Costa bruno.galindro at gmail.com
Mon Aug 17 23:46:17 UTC 2009


It works! Thank you very much!

2009/8/17 Todd Zullinger <tmz at pobox.com>

> Bruno Galindro da Costa wrote:
>
> (Please don't top post.  Trim the quotes and reply after.)
>
> > 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?
> >
> > *e.g:*
> >
> > *%post
> > chgrp oracle: %{script_path}
> > *
>
> In a case like the example above, %{script_path} will be expanded by
> rpm when the %post scriptlet is run.
>
> If you are thinking more of how to get the current oracle group for
> use in %post, it might be something like this:
>
> %post
> oracle_group=$(groups oracle | awk -F : '{print $2}' |awk '{print $1}')
> chmod $oracle_group %{script_path}
>
> Still, I'd look to avoid needing to do this entirely.
>
> --
> Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp<http://www.pobox.com/%7Etmz/pgp>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Don't take life so seriously...it's not a permanent condition.
>    -- Noire
>
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines:
> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>



-- 
Att.
Bruno Galindro da Costa
bruno.galindro at gmail.com
Florianópolis - SC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090817/e73510d1/attachment-0001.htm>


More information about the fedora-list mailing list