NFS-Ganesha 3.2, gcc-10

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
This commit is contained in:
Kaleb S. KEITHLEY 2020-01-23 07:22:29 -05:00
parent 9825f8b96a
commit abe97aa180
4 changed files with 140 additions and 24 deletions

View File

@ -0,0 +1,134 @@
From fc62d0dcc1b7e2f5c45fecacc3dddfa3ec600585 Mon Sep 17 00:00:00 2001
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
Date: Thu, 2 Jan 2020 10:10:40 -0500
Subject: [PATCH] core: multiple definitions of 'common' data compiling with
gcc-10
Winter is coming. So is gcc-10.
gcc-10 changes the way declared data is defined. Previously it was
defined as common data, now it is BSS. Common data was silently
merged by the linker.
See https://review.gluster.org/#/c/glusterfs/+/23956/ for a specific
example. The variables fixed in this patch are similar.
There are many changes coming in gcc-10 described in
https://gcc.gnu.org/gcc-10/changes.html
See nm(1) and ld(1) for a description C (common) and B (BSS) and how
they are treated by the linker.
Note: there is still a small chance that gcc-10 will land in Fedora-32,
despite 31 Dec. 2019 having been the deadline for that to happen.
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Change-Id: I212a9c82c4d79012f25b9a4803776ab7a5a8af6d
---
src/FSAL/commonlib.c | 2 ++
src/MainNFSD/libganesha_nfsd.ver | 3 ++-
src/config_parsing/conf_yacc.y | 4 +++-
src/dbus/dbus_server.c | 2 ++
src/include/FSAL/fsal_commonlib.h | 8 ++++----
src/include/nfs_init.h | 2 +-
6 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/FSAL/commonlib.c b/src/FSAL/commonlib.c
index a780ddc55..254c8fcdc 100644
--- a/src/FSAL/commonlib.c
+++ b/src/FSAL/commonlib.c
@@ -92,6 +92,8 @@
static struct blkid_struct_cache *cache;
#endif
+pthread_rwlock_t fs_lock;
+
/* fsal_attach_export
* called from the FSAL's create_export method with a reference on the fsal.
*/
diff --git a/src/MainNFSD/libganesha_nfsd.ver b/src/MainNFSD/libganesha_nfsd.ver
index 7291d84b3..0e5774915 100644
--- a/src/MainNFSD/libganesha_nfsd.ver
+++ b/src/MainNFSD/libganesha_nfsd.ver
@@ -51,7 +51,9 @@
fridgethr_init;
fridgethr_submit;
fridgethr_sync_command;
+ fs_lock;
fsal_acl_2_posix_acl;
+ fsal_acl_support;
fsal_attach_export;
fsal_common_is_referral;
fsal_create;
diff --git a/src/config_parsing/conf_yacc.y b/src/config_parsing/conf_yacc.y
index 1911daea9..23403f24d 100644
--- a/src/config_parsing/conf_yacc.y
+++ b/src/config_parsing/conf_yacc.y
@@ -80,7 +80,7 @@ void ganesha_yyerror(YYLTYPE *yylloc_param,
void *yyscanner,
char*);
-struct glist_head all_blocks;
+extern struct glist_head all_blocks;
struct config_node *config_block(char *blockname,
struct config_node *list,
@@ -379,6 +379,8 @@ void ganesha_yyerror(YYLTYPE *yylloc_param,
* Create a block item with the given content
*/
+struct glist_head all_blocks;
+
void dump_all_blocks(void)
{
struct glist_head *glh;
diff --git a/src/dbus/dbus_server.c b/src/dbus/dbus_server.c
index 4e964baf1..fc665ce71 100644
--- a/src/dbus/dbus_server.c
+++ b/src/dbus/dbus_server.c
@@ -669,6 +669,8 @@ int32_t gsh_dbus_register_path(const char *name,
return code;
}
+pthread_t gsh_dbus_thrid;
+
void gsh_dbus_pkgshutdown(void)
{
struct avltree_node *node, *next_node;
diff --git a/src/include/FSAL/fsal_commonlib.h b/src/include/FSAL/fsal_commonlib.h
index 1529f0d98..729d54e6d 100644
--- a/src/include/FSAL/fsal_commonlib.h
+++ b/src/include/FSAL/fsal_commonlib.h
@@ -97,12 +97,12 @@ void fsal_ds_handle_fini(struct fsal_ds_handle *dsh);
int open_dir_by_path_walk(int first_fd, const char *path, struct stat *stat);
-struct avltree avl_fsid;
-struct avltree avl_dev;
+extern struct avltree avl_fsid;
+extern struct avltree avl_dev;
-struct glist_head posix_file_systems;
+extern struct glist_head posix_file_systems;
-pthread_rwlock_t fs_lock;
+extern pthread_rwlock_t fs_lock;
void free_fs(struct fsal_filesystem *fs);
diff --git a/src/include/nfs_init.h b/src/include/nfs_init.h
index deef2084e..e32de26ce 100644
--- a/src/include/nfs_init.h
+++ b/src/include/nfs_init.h
@@ -50,7 +50,7 @@ struct nfs_init {
extern struct nfs_init nfs_init;
-pthread_t gsh_dbus_thrid;
+extern pthread_t gsh_dbus_thrid;
void nfs_init_init(void);
void nfs_init_complete(void);
--
2.24.1

View File

@ -1,11 +0,0 @@
--- nfs-ganesha-3.0-rc5/src/cmake/modules/FindNTIRPC.cmake.orig 2019-11-03 13:38:45.462670795 -0500
+++ nfs-ganesha-3.0-rc5/src/cmake/modules/FindNTIRPC.cmake 2019-11-03 13:39:19.323670795 -0500
@@ -69,7 +69,7 @@
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NTIRPC
- REQUIRED_VARS NTIRPC_INCLUDE_DIR NTIRPC_LIBRARY NTIRPC_LTTNG
+ REQUIRED_VARS NTIRPC_INCLUDE_DIR NTIRPC_LIBRARY
VERSION_VAR NTIRPC_VERSION)
# VERSION FPHSA options not handled by CMake version < 2.8.2)
# VERSION_VAR)

View File

@ -1,12 +0,0 @@
--- nfs-ganesha-3.0-rc5/src/CMakeLists.txt.orig 2019-11-04 06:12:36.480670795 -0500
+++ nfs-ganesha-3.0-rc5/src/CMakeLists.txt 2019-11-04 06:13:24.795670795 -0500
@@ -1033,6 +1033,9 @@
if (NOT LIBURCU)
message(FATAL_ERROR "userspace-rcu library not found!")
endif(NOT LIBURCU)
+if (CMAKE_MAJOR_VERSION VERSION_EQUAL 3 AND CMAKE_MINOR_VERSION VERSION_GREATER 14)
+ include(CheckSymbolExists)
+endif(CMAKE_MAJOR_VERSION VERSION_EQUAL 3 AND CMAKE_MINOR_VERSION VERSION_GREATER 14)
check_symbol_exists(urcu_ref_get_unless_zero urcu/ref.h HAVE_URCU_REF_GET_UNLESS_ZERO)
# All the plumbing in the basement

View File

@ -130,12 +130,13 @@ Requires: openSUSE-release
Name: nfs-ganesha
Version: 3.2
Release: 1%{?dev:%{dev}}%{?dist}
Release: 2%{?dev:%{dev}}%{?dist}
Summary: NFS-Ganesha is a NFS Server running in user space
License: LGPLv3+
Url: https://github.com/nfs-ganesha/nfs-ganesha/wiki
Source0: https://github.com/%{name}/%{name}/archive/V%{version}%{?dev:-%{dev}}/%{name}-%{version}%{?dev:-%{dev}}.tar.gz
Patch0001: 0001-core-multiple-definitions-of-common-data-compiling-w.patch
BuildRequires: cmake
BuildRequires: bison
@ -515,6 +516,7 @@ Development headers and auxiliary files for developing with %{name}.
%prep
%setup -q -n %{name}-%{version}%{?dev:-%{dev}}
%patch0001 -p1
%build
cd src && %cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -891,6 +893,9 @@ exit 0
%endif
%changelog
* Thu Jan 23 2020 Kaleb S. KEITHLEY <kkeithle at redhat.com> - 3.2-2
- NFS-Ganesha 3.2, gcc-10
* Sun Dec 22 2019 Kaleb S. KEITHLEY <kkeithle at redhat.com> - 3.2-1
- NFS-Ganesha 3.2 GA
- 3.1 was not built