Skip to content

Commit

Permalink
NFS ganesha packaging based on tag V3.5 (kadalu#319)
Browse files Browse the repository at this point in the history
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
  • Loading branch information
aravindavk authored Mar 30, 2023
1 parent 000d039 commit 16d1365
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 100 deletions.
1 change: 0 additions & 1 deletion packaging/nfs-ganesha-kadalu/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Standards-Version: 3.9.7
Homepage: https://kadalu.tech
Build-Depends: debhelper (>= 10~),
dh-python,
dh-systemd,
quilt,
bison,
flex,
Expand Down
103 changes: 13 additions & 90 deletions packaging/nfs-ganesha-kadalu/debian/patches/0002-CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
--- nfs-ganesha-4.1/src/cmake/modules/FindNTIRPC.cmake.orig 2022-11-18 19:39:44.000000000 +0000
+++ nfs-ganesha-4.1/src/cmake/modules/FindNTIRPC.cmake 2022-11-21 14:31:09.148000000 +0000
@@ -67,15 +67,18 @@
--- nfs-ganesha-3.0/src/CMakeLists.txt.orig 2019-11-13 14:52:54.092000000 +0000
+++ nfs-ganesha-3.0/src/CMakeLists.txt 2019-11-13 14:50:16.240000000 +0000
@@ -1005,6 +1005,7 @@

set(NTIRPC_MIN_VERSION 3.0)
if (USE_SYSTEM_NTIRPC)
+ set(NTIRPC_INCLUDE_DIR "/usr/include/ntirpc/")
find_package(NTIRPC ${NTIRPC_MIN_VERSION} REQUIRED)
if (USE_LTTNG)
set(NTIRPC_LIBRARY ${NTIRPC_LIBRARY} ${NTIRPC_LTTNG})
--- nfs-ganesha-3.0/src/cmake/modules/FindNTIRPC.cmake.orig 2019-11-13 18:28:28.028000000 +0000
+++ nfs-ganesha-3.0/src/cmake/modules/FindNTIRPC.cmake 2019-11-13 18:30:26.280000000 +0000
@@ -46,15 +46,18 @@

if (NOT NTIRPC_LIBRARY_DIR)
find_path(NTIRPC_LIBRARY_DIR
Expand All @@ -24,90 +34,3 @@

set(NTIRPC_VERSION_HEADER "${NTIRPC_INCLUDE_DIR}/version.h")
if (EXISTS ${NTIRPC_VERSION_HEADER})
--- nfs-ganesha-4.1/src/scripts/gpfs-epoch/CMakeLists.txt.orig 2022-11-18 19:39:44.000000000 +0000
+++ nfs-ganesha-4.1/src/scripts/gpfs-epoch/CMakeLists.txt 2022-11-21 14:31:09.152000000 +0000
@@ -21,7 +21,7 @@
#-------------------------------------------------------------------------------

if(USE_FSAL_GPFS)
- if(Python_FOUND)
+ if(PYTHONINTERP_FOUND)
set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/gpfs_epoch_timestamp")
@@ -59,7 +59,7 @@
add_custom_command(
OUTPUT ${OUTPUT}
COMMAND ${CMAKE_COMMAND} -E touch __init__.py
- COMMAND ${Python_EXECUTABLE} "${SETUP_PY}" build
+ COMMAND ${PYTHON_EXECUTABLE} "${SETUP_PY}" build
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
DEPENDS ${GPFS_EPOCH_SRCS} ${SCRIPTS}
)
@@ -68,7 +68,7 @@

install(
CODE
- "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${Python_EXECUTABLE} ${SETUP_PY} install --skip-build --no-compile --prefix=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} --install-scripts=\$ENV{DESTDIR}${LIBEXECDIR}/ganesha)"
+ "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --skip-build --no-compile --prefix=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} --install-scripts=\$ENV{DESTDIR}${LIBEXECDIR}/ganesha)"
)
- endif(Python_FOUND)
+ endif(PYTHONINTERP_FOUND)
endif(USE_FSAL_GPFS)
--- nfs-ganesha-4.1/src/scripts/ganeshactl/CMakeLists.txt.orig 2022-11-18 19:39:44.000000000 +0000
+++ nfs-ganesha-4.1/src/scripts/ganeshactl/CMakeLists.txt 2022-11-21 14:31:09.152000000 +0000
@@ -139,7 +139,7 @@

add_custom_command(
OUTPUT ${OUTPUT}
- COMMAND ${Python_EXECUTABLE} "${SETUP_PY}" build
+ COMMAND ${PYTHON_EXECUTABLE} "${SETUP_PY}" build
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
DEPENDS ${GANESHA_SRCS} ${UI_PY_FILES} ${SCRIPTS}
)
@@ -148,9 +148,9 @@

install(
CODE
- "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${Python_EXECUTABLE} ${SETUP_PY} install --skip-build --no-compile --prefix=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
+ "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --skip-build --no-compile --prefix=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX})"
)
-endif(Python_FOUND)
+endif(PYTHONINTERP_FOUND)

# Man page
set(man8_file ganesha_conf.man)
--- nfs-ganesha-4.1/src/CMakeLists.txt.orig 2022-11-18 19:39:44.000000000 +0000
+++ nfs-ganesha-4.1/src/CMakeLists.txt 2022-11-21 14:31:09.152000000 +0000
@@ -578,13 +578,19 @@

gopt_test(USE_ADMIN_TOOLS)
if (USE_ADMIN_TOOLS)
- find_package (Python COMPONENTS Interpreter Development)
- if (NOT Python_Interpreter_FOUND)
- message(WARNING "Cannot find python. Disablin admin tools")
+ find_package(PythonInterp ${USE_ADMIN_TOOLS_REQUIRED})
+ if (NOT PYTHONINTERP_FOUND)
+ message(WARNING "Cannot find python. Disabling admin tools")
set(USE_ADMIN_TOOLS OFF)
- endif (NOT Python_Interpreter_FOUND)
+ endif (NOT PYTHONINTERP_FOUND)
endif (USE_ADMIN_TOOLS)

+get_cmake_property(_variableNames VARIABLES)
+list(SORT _variableNames)
+foreach(_variableName ${_variableNames})
+ message(STATUS "${_variableName}=${${_variableName}}")
+endforeach()
+
gopt_test(USE_GUI_ADMIN_TOOLS)
if (USE_ADMIN_TOOLS)
if (USE_GUI_ADMIN_TOOLS)
@@ -1184,6 +1190,7 @@

set(NTIRPC_MIN_VERSION 4.0)
if (USE_SYSTEM_NTIRPC)
+ set(NTIRPC_INCLUDE_DIR "/usr/include/ntirpc/")
find_package(NTIRPC ${NTIRPC_MIN_VERSION} REQUIRED)
if (USE_LTTNG)
set(NTIRPC_LIBRARY ${NTIRPC_LIBRARY} ${NTIRPC_LTTNG})
17 changes: 8 additions & 9 deletions packaging/nfs-ganesha-kadalu/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# $ cd nfs-ganesha/src
# $ dpkg-buildpackage -uc -us
#

export DH_VERBOSE=1
export PREFIX=/usr
export DESTDIR=$(CURDIR)/debian/tmp
Expand All @@ -18,12 +19,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
dh $@ --with python3,systemd

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l /usr/lib/ganesha/

override_dh_auto_configure:
cd src && ln -s ../debian .
cd src && dh_auto_configure -- \
-DWITH_PYTHON3=3 \
-DBUILD_CONFIG=debian \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLIB_INSTALL_DIR:STRING=lib/${DEB_HOST_MULTIARCH} \
Expand All @@ -35,15 +35,14 @@ override_dh_auto_configure:
-DUSE_FSAL_CEPH=NO \
-DUSE_FSAL_RGW=NO \
-DUSE_FSAL_GPFS=NO \
-DUSE_FSAL_KVSFS=NO \
-DUSE_FSAL_PANFS=NO \
-DUSE_FSAL_GLUSTER=YES \
-DUSE_FSAL_VFS=NO \
-DUSE_FSAL_PROXY_V4=ON \
-DUSE_FSAL_PROXY_V3=ON \
-DUSE_FSAL_PROXY=ON \
-DUSE_SYSTEM_NTIRPC=YES \
-DUSE_9P_RDMA=NO \
-DUSE_LTTNG=NO \
-DUSE_RADOS_RECOV=YES \
-DUSE_RADOS_RECOV=NO \
-DRADOS_URLS=YES \
-DUSE_ADMIN_TOOLS=YES \
-DUSE_GUI_ADMIN_TOOLS=YES \
Expand All @@ -52,8 +51,8 @@ override_dh_auto_configure:
-DDISTNAME_HAS_GIT_DATA=OFF \
-DUSE_MAN_PAGE=YES \
-D_MSPAC_SUPPORT=YES \
-DSANITIZE_ADDRESS=NO \
-DALLOCATOR=jemalloc
-DSANITIZE_ADDRESS=NO


override_dh_auto_build:
cd src && dh_auto_build
Expand All @@ -70,7 +69,7 @@ override_dh_install:
mkdir -p debian/tmp/usr/lib/ganesha
mkdir -p debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/ganesha
mkdir -p debian/tmp/usr/sbin/
cp src/config_samples/ganesha.conf.example debian/tmp/etc/ganesha/
cp src/config_samples/ganesha.conf.example debian/tmp/etc/ganesha/ganesha.conf
cp src/config_samples/vfs.conf debian/tmp/etc/ganesha/
cp src/config_samples/ceph.conf debian/tmp/etc/ganesha/
cp src/config_samples/rgw.conf debian/tmp/etc/ganesha/
Expand Down

0 comments on commit 16d1365

Please sign in to comment.