[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [rpm-list] Trouble with RPM and %{_sysconfdir}.
- From: Jeff Johnson <n3npq jbj gmail com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: [rpm-list] Trouble with RPM and %{_sysconfdir}.
- Date: Fri, 6 Apr 2007 11:53:32 -0400
On Apr 6, 2007, at 11:24 AM, Kevin Cosgrove wrote:
On 6 April 2007 at 11:11, Jeff Johnson <n3npq jbj gmail com> wrote:
If all else fails, this will change the value of %_sysconfdir for
you:
echo '%_sysconfdir /etc' >> ~/.rpmmacros
My Linux systems are just as Jeff said. In addition to that I
sometimes use this in a specfile, in cases where my %_prefix is
other than the default AND when the source code is free from
hard-coded paths, or can be patched to be so.
%{expand: %define _sysconfdir %{_prefix}%{_sysconfdir}/somewhere}
If you *have* to do that, try this instead:
%{expand: %%global _sysconfdir %{_prefix}%{_sysconfdir}/somewhere}
All that the %expand does is reparse its argument, kinda like eval in
shell. In
this situation, the %{expand: ...} is likely overkill. OTOH, if %
{_sysconfdir} or
%{_prefix} expansion involved some complicated system(3) invocation,
one might
want to run the command once, not every time that %{_sysconfdir} or %
{_prefix}
was expanded.
The %% insures that the %define is done on the 2nd, not the first,
pass. One
of the two % characters is stripped on the first pass.
Using %global insures that the definition is persistent, kinda like
using
global rather than automatic storage in C.
But you're likely only need
%define _sysconfdir %{_prefix}%{_sysconfdir}/somewhere
without all the other goo.
hth
73 de Jeff
Cheers...
--
Kevin
_______________________________________________
Rpm-list mailing list
Rpm-list redhat com
https://www.redhat.com/mailman/listinfo/rpm-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]