From 9e5c04933c7d37c42c0329fe2bb919e84a987741 Mon Sep 17 00:00:00 2001 From: jpzhang Date: Tue, 4 Aug 2020 11:39:41 +0800 Subject: [PATCH] Workaround deprecation warnings introduced in update libselinux >= 3.1 --- ...ings-introduced-in-libselinux-update.patch | 32 +++++++++++++++++++ libreswan.spec | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 libreswan-3.25-workaround-deprecation-warnings-introduced-in-libselinux-update.patch diff --git a/libreswan-3.25-workaround-deprecation-warnings-introduced-in-libselinux-update.patch b/libreswan-3.25-workaround-deprecation-warnings-introduced-in-libselinux-update.patch new file mode 100644 index 0000000..af3f280 --- /dev/null +++ b/libreswan-3.25-workaround-deprecation-warnings-introduced-in-libselinux-update.patch @@ -0,0 +1,32 @@ +diff --git a/programs/pluto/security_selinux.c b/programs/pluto/security_selinux.c +index ac5028e..2073a4a 100644 +--- a/programs/pluto/security_selinux.c ++++ b/programs/pluto/security_selinux.c +@@ -18,6 +18,8 @@ + + static int selinux_ready = 0; + ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + void init_avc(void) + { + if (!is_selinux_enabled()) { +@@ -82,3 +84,4 @@ int within_range(security_context_t sl, security_context_t range) + range); + return 1; + } ++#pragma GCC diagnostic pop +diff --git a/programs/pluto/security_selinux.h b/programs/pluto/security_selinux.h +index cccd60f..61279eb 100644 +--- a/programs/pluto/security_selinux.h ++++ b/programs/pluto/security_selinux.h +@@ -20,6 +20,9 @@ + #include + + void init_avc(void); ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + int within_range(security_context_t sl, security_context_t range); ++#pragma GCC diagnostic pop + + #endif /* _SECURITY_SELINUX_H */ diff --git a/libreswan.spec b/libreswan.spec index 1699d52..a9a04ef 100644 --- a/libreswan.spec +++ b/libreswan.spec @@ -20,7 +20,7 @@ Name: libreswan Version: 3.25 -Release: 6 +Release: 7 Summary: A free implementation of IPsec & IKE for Linux License: GPLv2 Url: https://libreswan.org/ @@ -30,6 +30,7 @@ Source2: openeuler-libreswan-tmpfiles.conf Patch0001: libreswan-3.25-relax-delete.patch Patch0002: libreswan-3.25-unbound-hook.patch +Patch0003: libreswan-3.25-workaround-deprecation-warnings-introduced-in-libselinux-update.patch BuildRequires: gcc pkgconfig hostname bison flex systemd-devel nss-devel >= 3.16.1 BuildRequires: nspr-devel pam-devel libevent-devel unbound-devel >= 1.6.0-6 ldns-devel @@ -130,6 +131,9 @@ export NSS_DISABLE_HW_GCM=1 %doc %{_mandir}/*/* %changelog +* Tue Aug 04 2020 zhangjiapeng - 3.25-7 +- Workaround deprecation warnings introduced in update libselinux >= 3.1 + * Fri Apr 03 2020 Jiangping Hu - 3.25-6 - Add config files