From 29a67f267e9b345a6e72c5d11680357f121cd062326ca9c1cfd298c1eabda15a Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 21 Aug 2016 06:18:06 +0000 Subject: [PATCH] - 0001-Make-location-of-nfs-utils_env.sh-configurable.patch 1.3.4 moved the config script location to somewhere that doesn't exist on openSUSE. Move it somewhere better and install it there. (bsc#990356) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=169 --- ...ion-of-nfs-utils_env.sh-configurable.patch | 67 +++++++++++++++++++ nfs-utils.changes | 9 +++ nfs-utils.spec | 10 +-- 3 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 0001-Make-location-of-nfs-utils_env.sh-configurable.patch diff --git a/0001-Make-location-of-nfs-utils_env.sh-configurable.patch b/0001-Make-location-of-nfs-utils_env.sh-configurable.patch new file mode 100644 index 0000000..a894d32 --- /dev/null +++ b/0001-Make-location-of-nfs-utils_env.sh-configurable.patch @@ -0,0 +1,67 @@ +From dc071e55135019d4503930f204674219a9f8676b Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Sun, 21 Aug 2016 14:53:57 +1000 +Subject: [PATCH] Make location of nfs-utils_env.sh configurable. + +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 + +--- + configure.ac | 6 ++++++ + systemd/nfs-config.service | 13 ------------- + systemd/nfs-config.service.in | 13 +++++++++++++ + 3 files changed, 19 insertions(+), 13 deletions(-) + +--- 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 +--- a/systemd/nfs-config.service ++++ /dev/null +@@ -1,13 +0,0 @@ +-[Unit] +-Description=Preprocess NFS configuration +-After=local-fs.target +-DefaultDependencies=no +- +-[Service] +-Type=oneshot +-# This service needs to run any time any nfs service +-# is started, so changes to local config files get +-# incorporated. Having "RemainAfterExit=no" (the default) +-# ensures this happens. +-RemainAfterExit=no +-ExecStart=/usr/libexec/nfs-utils/nfs-utils_env.sh +--- /dev/null ++++ b/systemd/nfs-config.service.in +@@ -0,0 +1,13 @@ ++[Unit] ++Description=Preprocess NFS configuration ++After=local-fs.target ++DefaultDependencies=no ++ ++[Service] ++Type=oneshot ++# This service needs to run any time any nfs service ++# is started, so changes to local config files get ++# incorporated. Having "RemainAfterExit=no" (the default) ++# ensures this happens. ++RemainAfterExit=no ++ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh diff --git a/nfs-utils.changes b/nfs-utils.changes index 4ff870d..dcdf0e9 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Aug 21 06:16:27 UTC 2016 - nfbrown@suse.com + +- 0001-Make-location-of-nfs-utils_env.sh-configurable.patch + 1.3.4 moved the config script location to somewhere + that doesn't exist on openSUSE. Move it somewhere + better and install it there. + (bsc#990356) + ------------------------------------------------------------------- Wed Aug 10 02:57:57 UTC 2016 - nfbrown@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 1a31c67..553b0c2 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -40,6 +40,7 @@ Source16: nfs.service Source17: nfs-server.nfsserver.conf Source18: nfs-client.nfs.conf Patch0: nfs-utils-1.0.7-bind-syntax.patch +Patch1: 0001-Make-location-of-nfs-utils_env.sh-configurable.patch BuildRequires: e2fsprogs-devel BuildRequires: fedfs-utils-devel BuildRequires: gcc-c++ @@ -106,6 +107,7 @@ This package contains additional NFS documentation. %prep %setup -q -a 1 %patch0 -p1 +%patch1 -p1 cp %{SOURCE6} . @@ -142,8 +144,8 @@ install -d %{buildroot}%{_unitdir}/nfs-server.service.d install -m 644 %{SOURCE17} %{buildroot}%{_unitdir}/nfs-server.service.d/nfsserver.conf install -d %{buildroot}%{_unitdir}/nfs-client.target.d install -m 644 %{SOURCE18} %{buildroot}%{_unitdir}/nfs-client.target.d/nfs.conf -install -d %{buildroot}%{_prefix}/lib/systemd/scripts -install -m 755 %{SOURCE14} %{buildroot}%{_prefix}/lib/systemd/scripts/nfs-utils_env.sh +install -d %{buildroot}%{_libexecdir}/nfs-utils +install -m 755 %{SOURCE14} %{buildroot}%{_libexecdir}/nfs-utils/nfs-utils_env.sh install -d %{buildroot}%{_unitdir}/nfs-config.service.d install -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/nfs-config.service.d/restart.conf ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcnfsserver @@ -263,8 +265,8 @@ fi %{_unitdir}/nfs-client.target.d/nfs.conf %dir %{_unitdir}/nfs-config.service.d %{_unitdir}/nfs-config.service.d/restart.conf -%dir %{_libexecdir}/systemd/scripts -%{_libexecdir}/systemd/scripts/nfs-utils_env.sh +%dir %{_libexecdir}/nfs-utils +%{_libexecdir}/nfs-utils/nfs-utils_env.sh %{_mandir}/man5/nfsmount.conf.5%{ext_man} %{_mandir}/man5/nfs.5%{ext_man} %{_mandir}/man8/mount.nfs.8%{ext_man}