Re: RPM Spec File - %define into %pre section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't take life so seriously...it's not a permanent condition.
    -- Noire

Attachment: pgpZueYCxegKq.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux