Remove NFS server stanza if nfs-utils not present
This commit is contained in:
parent
635aea68a9
commit
fbd063543a
@ -1,31 +0,0 @@
|
||||
From 25efd54adaa4f377ba9c95d697f650b450c4b07c Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Tue, 16 May 2017 18:21:24 -0400
|
||||
Subject: [PATCH] Fix definition of _GNU_SOURCE
|
||||
|
||||
AC_GNU_SOURCE doesn't properly define this value for unclear reasons.
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit c478a8d06fd3cda06bf21f6839e599b2e0b6fbbf)
|
||||
---
|
||||
proxy/configure.ac | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/proxy/configure.ac b/proxy/configure.ac
|
||||
index c52dbb6..9ab208b 100644
|
||||
--- a/proxy/configure.ac
|
||||
+++ b/proxy/configure.ac
|
||||
@@ -5,12 +5,8 @@ AC_INIT([gssproxy],
|
||||
VERSION_NUMBER,
|
||||
[simo@redhat.com])
|
||||
|
||||
-m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
|
||||
- [AC_USE_SYSTEM_EXTENSIONS],
|
||||
- [AC_GNU_SOURCE])
|
||||
-
|
||||
AC_PROG_CC_C99
|
||||
-CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
+CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE"
|
||||
|
||||
AC_CONFIG_SRCDIR([BUILD.txt])
|
||||
|
@ -1,22 +1,24 @@
|
||||
From aade7877a78c662238033ff836e00e195c7b868b Mon Sep 17 00:00:00 2001
|
||||
From 5597edf7a2289a54a1bd6a95a55422e40e9e1e6f Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Tue, 16 May 2017 17:14:57 -0400
|
||||
Subject: [PATCH] Include header for writev() and sort includes
|
||||
Date: Wed, 17 May 2017 12:21:37 -0400
|
||||
Subject: [PATCH] Include header for writev()
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit 8bf50e867dd09ff7e56ad2ca5620fc61f494f8b6)
|
||||
Reviewed-by: Simo Sorce <simo@redhat.com>
|
||||
Merges: #186
|
||||
(cherry picked from commit c8c5e8d2b2154d1006633634478a24bfa0b04b4d)
|
||||
---
|
||||
proxy/src/gp_socket.c | 20 +++++++++++---------
|
||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||
proxy/src/gp_socket.c | 21 ++++++++++++---------
|
||||
1 file changed, 12 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/proxy/src/gp_socket.c b/proxy/src/gp_socket.c
|
||||
index 829ff21..f97e022 100644
|
||||
index 829ff21..e07789c 100644
|
||||
--- a/proxy/src/gp_socket.c
|
||||
+++ b/proxy/src/gp_socket.c
|
||||
@@ -1,17 +1,19 @@
|
||||
@@ -1,19 +1,22 @@
|
||||
/* Copyright (C) 2011,2015 the GSS-PROXY contributors, see COPYING for license */
|
||||
|
||||
-#include "config.h"
|
||||
#include "config.h"
|
||||
-#include <stdlib.h>
|
||||
-#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
@ -24,10 +26,16 @@ index 829ff21..f97e022 100644
|
||||
-#include <sys/stat.h>
|
||||
-#include <sys/socket.h>
|
||||
-#include <sys/un.h>
|
||||
#include <errno.h>
|
||||
-#include <errno.h>
|
||||
-#include <netinet/in.h>
|
||||
+
|
||||
#include "gp_proxy.h"
|
||||
#include "gp_creds.h"
|
||||
#include "gp_selinux.h"
|
||||
|
||||
+#include <errno.h>
|
||||
+#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
-#include "gp_proxy.h"
|
||||
+#include <netinet/in.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/stat.h>
|
||||
@ -36,9 +44,6 @@ index 829ff21..f97e022 100644
|
||||
+#include <sys/un.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#include "config.h"
|
||||
#include "gp_creds.h"
|
||||
+#include "gp_proxy.h"
|
||||
#include "gp_selinux.h"
|
||||
|
||||
#define FRAGMENT_BIT (1 << 31)
|
||||
|
||||
struct unix_sock_conn {
|
@ -1,6 +1,6 @@
|
||||
Name: gssproxy
|
||||
Version: 0.7.0
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: GSSAPI Proxy
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -21,8 +21,7 @@ Patch3: Remove-gpm_release_ctx-to-fix-double-unlock.patch
|
||||
Patch4: Update-systemd-file.patch
|
||||
Patch5: Fix-unused-variables.patch
|
||||
Patch6: Fix-segfault-when-no-config-files-are-present.patch
|
||||
Patch7: Include-header-for-writev-and-sort-includes.patch
|
||||
Patch8: Fix-definition-of-_GNU_SOURCE.patch
|
||||
Patch7: Include-header-for-writev.patch
|
||||
|
||||
### Dependencies ###
|
||||
Requires: krb5-libs >= 1.12.0
|
||||
@ -65,8 +64,7 @@ A proxy for GSSAPI credential handling
|
||||
%patch4 -p2 -b .Update-systemd-file
|
||||
%patch5 -p2 -b .Fix-unused-variables
|
||||
%patch6 -p2 -b .Fix-segfault-when-no-config-files-are-present
|
||||
%patch7 -p2 -b .Include-header-for-writev-and-sort-includes
|
||||
%patch8 -p2 -b .Fix-definition-of-_GNU_SOURCE
|
||||
%patch7 -p2 -b .Include-header-for-writev
|
||||
|
||||
%build
|
||||
autoreconf -f -i
|
||||
@ -115,6 +113,21 @@ rm -rf %{buildroot}
|
||||
%post
|
||||
%systemd_post gssproxy.service
|
||||
|
||||
%triggerun -- gssproxy
|
||||
old_ver=$(rpm -q --qf '%%{VERSION}\n' gssproxy | sort -V | head -n 1 | tr -d '\n')
|
||||
|
||||
old_rel=$(rpm -q --qf '%%{RELEASE}\n' gssproxy | sort -V | head -n 1 | tr -d '\n')
|
||||
old_rel=${old_rel%%.*}
|
||||
|
||||
# if nfs-utils is not present, the user doesn't want this file around
|
||||
if [[ $old_ver < 0.7.0 || ( $old_ver = 0.7.0 && $old_rel < 7 ) ]]; then
|
||||
rpm -q --qf '%%{VERSION}\n' nfs-utils >/dev/null 2>&1
|
||||
if [[ $! != 0 ]]; then
|
||||
rm -f /etc/gssproxy/24-nfs-server.conf 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
%systemd_preun gssproxy.service
|
||||
|
||||
@ -122,6 +135,10 @@ rm -rf %{buildroot}
|
||||
%systemd_postun_with_restart gssproxy.service
|
||||
|
||||
%changelog
|
||||
* Wed May 17 2017 Robbie Harwood <rharwood@redhat.com> - 0.7.0-7
|
||||
- Remove NFS server stanza if nfs-utils not present
|
||||
- Also update gcc7 patch to match upstream
|
||||
|
||||
* Tue May 16 2017 Robbie Harwood <rharwood@redhat.com> - 0.7.0-6
|
||||
- Fix segfault when no configuration files are found
|
||||
- Various build fixes for gcc7
|
||||
|
Loading…
Reference in New Issue
Block a user