* [PATCH/nfs-utils] Make location of nfs-utils_env.sh configurable.
@ 2016-08-23 22:29 NeilBrown
2016-08-24 14:30 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2016-08-23 22:29 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing List
[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]
A recent patch moved this file to /usr/libexec/...
That directory isn't universal, and doesn't exist on openSUSE or
Debian for example.
So change it to use the $libexecdir directory determined by configure
Signed-off-by: NeilBrown <neilb@suse.com>
---
Hi Steve,
thanks for processing the server startup patches nice and promptly,
and for fixing the little details.
Here is another patches:-) I really should have tried out the latest
nfs-utils in openSUSE *before* the release instead of just after.
Maybe next time.
It took me a while to get this configure.ac magic to work, but it does
work nicely for me. I haven't testing it on a RH distro, but I think
it should default to the same behavior as before.
Note that there is a 'rename' in this patch. Presumably "git am" will
handle that correctly. Worth verifying though.
Thanks,
NeilBrown
configure.ac | 6 ++++++
systemd/{nfs-config.service => nfs-config.service.in} | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
rename systemd/{nfs-config.service => nfs-config.service.in} (86%)
diff --git a/configure.ac b/configure.ac
index 1daf5b8130e2..4fb108fb68d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -511,8 +511,14 @@ AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
# Make sure that $ACLOCAL_FLAGS are used during a rebuild
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
+# make libexecdir available for substituion in config files
+# 2 "evals" needed late to expand variable names.
+AC_SUBST([_libexecdir])
+AC_CONFIG_COMMANDS_PRE([eval eval _libexecdir=$libexecdir])
+
AC_CONFIG_FILES([
Makefile
+ systemd/nfs-config.service
linux-nfs/Makefile
support/Makefile
support/export/Makefile
diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service.in
similarity index 86%
rename from systemd/nfs-config.service
rename to systemd/nfs-config.service.in
index bd69e84a7233..e89dc54209aa 100644
--- a/systemd/nfs-config.service
+++ b/systemd/nfs-config.service.in
@@ -10,4 +10,4 @@ Type=oneshot
# incorporated. Having "RemainAfterExit=no" (the default)
# ensures this happens.
RemainAfterExit=no
-ExecStart=/usr/libexec/nfs-utils/nfs-utils_env.sh
+ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh
--
2.9.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH/nfs-utils] Make location of nfs-utils_env.sh configurable.
2016-08-23 22:29 [PATCH/nfs-utils] Make location of nfs-utils_env.sh configurable NeilBrown
@ 2016-08-24 14:30 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2016-08-24 14:30 UTC (permalink / raw)
To: NeilBrown; +Cc: Linux NFS Mailing List
On 08/23/2016 06:29 PM, NeilBrown wrote:
>
> A recent patch moved this file to /usr/libexec/...
> That directory isn't universal, and doesn't exist on openSUSE or
> Debian for example.
> So change it to use the $libexecdir directory determined by configure
>
> Signed-off-by: NeilBrown <neilb@suse.com>
Committed!
> ---
>
> Hi Steve,
> thanks for processing the server startup patches nice and promptly,
> and for fixing the little details.
> Here is another patches:-) I really should have tried out the latest
> nfs-utils in openSUSE *before* the release instead of just after.
> Maybe next time.
Sorry about that... I did just assumed that path existed in all distros
It guess that was a bad assumption :-(
>
> It took me a while to get this configure.ac magic to work, but it does
> work nicely for me. I haven't testing it on a RH distro, but I think
> it should default to the same behavior as before.
Nice work!!! We can now do the same thing to make the keytab
configurable in rpc-gssd.service. I've had a compile complaints
about that.
It's too bad systemd does not have someway of configuring paths
in the [Unit] section so we could make changes like this
"on the fly" instead of at compile time.
>
> Note that there is a 'rename' in this patch. Presumably "git am" will
> handle that correctly. Worth verifying though.
Noted... thanks!
steved.
>
> Thanks,
> NeilBrown
>
>
> configure.ac | 6 ++++++
> systemd/{nfs-config.service => nfs-config.service.in} | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
> rename systemd/{nfs-config.service => nfs-config.service.in} (86%)
>
> diff --git a/configure.ac b/configure.ac
> index 1daf5b8130e2..4fb108fb68d2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -511,8 +511,14 @@ AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
> # Make sure that $ACLOCAL_FLAGS are used during a rebuild
> AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
>
> +# make libexecdir available for substituion in config files
> +# 2 "evals" needed late to expand variable names.
> +AC_SUBST([_libexecdir])
> +AC_CONFIG_COMMANDS_PRE([eval eval _libexecdir=$libexecdir])
> +
> AC_CONFIG_FILES([
> Makefile
> + systemd/nfs-config.service
> linux-nfs/Makefile
> support/Makefile
> support/export/Makefile
> diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service.in
> similarity index 86%
> rename from systemd/nfs-config.service
> rename to systemd/nfs-config.service.in
> index bd69e84a7233..e89dc54209aa 100644
> --- a/systemd/nfs-config.service
> +++ b/systemd/nfs-config.service.in
> @@ -10,4 +10,4 @@ Type=oneshot
> # incorporated. Having "RemainAfterExit=no" (the default)
> # ensures this happens.
> RemainAfterExit=no
> -ExecStart=/usr/libexec/nfs-utils/nfs-utils_env.sh
> +ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-24 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 22:29 [PATCH/nfs-utils] Make location of nfs-utils_env.sh configurable NeilBrown
2016-08-24 14:30 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox