Hi,
This is mainly targeted at Dan, since he's been cleaning up the build.
For 2.3rc3 fedora packaging I spent a bit of time figuring out why the
ganeshactl bits get installed twice, once with an overt `python setup.py
install ...` and then again by the `make install` when it recurses into
the ganeshactl subdir. The `make install` actually attempts to install
the ganeshactl bits to /usr/... and naturally fails as you might expect.
See the attached diff. Let me know what you think. (I'll submit it as a
patch to gerrithub when and if that's appropriate, including now if
you'd rather think about it as a patch in gerrithub.)
Regards,
--
Kaleb
diff --git a/src/nfs-ganesha.spec-in.cmake b/src/nfs-ganesha.spec-in.cmake
index 798a485..a880b06 100644
--- a/src/nfs-ganesha.spec-in.cmake
+++ b/src/nfs-ganesha.spec-in.cmake
@@ -336,7 +336,8 @@ be used with NFS-Ganesha to support Gluster
%setup -q -n %{sourcename}
%build
-cmake . -DCMAKE_BUILD_TYPE=Debug \
+cmake . -DDESTDIR=%{buildroot} \
+ -DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CONFIG=rpmbuild \
-DUSE_FSAL_NULL=%{use_fsal_null} \
-DUSE_FSAL_ZFS=%{use_fsal_zfs} \
@@ -373,6 +374,12 @@ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_libdir}/ganesha
+# Fedora has symlinks /bin->/usr/bin, /lib->/usr/lib, /lib64->/usr/lib64
+# `make install` seems to install some things in /bin, some in /usr/bin, etc.
+# and rpmbuild isn't very smart about it
+ln -s %{buildroot}%{_bindir} %{buildroot}/bin
+ln -s %{buildroot}%{_libdir} %{buildroot}/lib64
+ln -s %{buildroot}/usr/lib %{buildroot}/lib
mkdir -p %{buildroot}%{_localstatedir}/run/ganesha
install -m 644 config_samples/logrotate_ganesha
%{buildroot}%{_sysconfdir}/logrotate.d/ganesha
install -m 644 scripts/ganeshactl/org.ganesha.nfsd.conf
%{buildroot}%{_sysconfdir}/dbus-1/system.d
@@ -429,15 +436,12 @@ install -m 755 scripts/init.d/nfs-ganesha.gpfs
%{buildroot}%{_sysconfdir}/init.
%endif
%endif
-%if %{with utils}
-pushd .
-cd scripts/ganeshactl/
-python setup.py --quiet install --root=%{buildroot}
-popd
-install -m 755 Protocols/NLM/sm_notify.ganesha
%{buildroot}%{_bindir}/sm_notify.ganesha
-%endif
-
make DESTDIR=%{buildroot} install
+# remove symlinks created earlier, otherwise they will confuse rpmbuild
+rm %{buildroot}/bin
+rm %{buildroot}/lib
+rm %{buildroot}/lib64
+
%post
%if %{with_systemd}
diff --git a/src/scripts/ganeshactl/CMakeLists.txt
b/src/scripts/ganeshactl/CMakeLists.txt
index 5484188..48516b0 100644
--- a/src/scripts/ganeshactl/CMakeLists.txt
+++ b/src/scripts/ganeshactl/CMakeLists.txt
@@ -124,6 +124,6 @@ if(PYTHON)
install(
CODE
- "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND
${PYTHON} ${SETUP_PY} install --skip-build
--prefix=$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
+ "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND
${PYTHON} ${SETUP_PY} install --skip-build --prefix=${DESTDIR})"
)
endif(PYTHON)
------------------------------------------------------------------------------
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel