rpmbuild - change sysconfdir

arnaud gaboury arnaud.gaboury at gmail.com
Mon Sep 14 10:52:12 UTC 2015


On Mon, Sep 14, 2015 at 12:32 PM, Michael Schwendt <mschwendt at gmail.com> wrote:
> On Mon, 14 Sep 2015 11:03:13 +0200, arnaud gaboury wrote:
>
>> > %build
>> > mkdir %{buildroot}/etc/R
>>
>> I already tried this method, with no sucess. Finally, after a close
>> look at my SPEC file, I found one $ which has to be moved to % (I
>> rewrote my file trying to use the conventional % for variable names
>> instead of $).
>> Then I could build with --sysconfdir=/etc/R
>
> You only need to redefine %_sysconfdir at the top of your spec file,
> since the %configure macro uses %_sysconfdir. See /usr/lib/rpm/macros
> and this:
>
>   rpm --define "_sysconfdir /BLUBB" --eval %configure
>
> No need to modify the %configure call in %build.

Sounds like a clean way to change default sysconfig path.
Thank you

>
> Also, there is nothing like a "conventional % for variable names
> instead of $" in spec files. % is used by RPM. RPM-specific variables
> in your spec file are expanded/substituted before passing the result
> to the shell that is used to process the spec file sections. A close
> look at rpmbuild output is a good way to look into it.
> --
> devel mailing list
> devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct



-- 

google.com/+arnaudgabourygabx


More information about the devel mailing list