Add upstream patch to add proper C++-guards in <xcrypt.h>
This commit is contained in:
parent
60f1f832cf
commit
6f17715418
112
libxcrypt-4.4.2-cxx_guard_in_xcrypt_h.patch
Normal file
112
libxcrypt-4.4.2-cxx_guard_in_xcrypt_h.patch
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
From a32ce8344554128320ba3a7757260c8632db8b3e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
|
Date: Mon, 21 Jan 2019 14:55:34 +0100
|
||||||
|
Subject: [PATCH] Add generated C++-guards to <xcrypt.h>.
|
||||||
|
|
||||||
|
---
|
||||||
|
.gitignore | 1 +
|
||||||
|
Makefile.am | 32 ++++++++++++++++++++------------
|
||||||
|
NEWS | 1 +
|
||||||
|
xcrypt.h => xcrypt.h.in | 4 ++++
|
||||||
|
4 files changed, 26 insertions(+), 12 deletions(-)
|
||||||
|
rename xcrypt.h => xcrypt.h.in (98%)
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 907e80e..2a53aaa 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -19,9 +19,10 @@ TEST_EXTENSIONS = .sh
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
LICENSING THANKS \
|
||||||
|
- crypt.h.in.in libcrypt.map.in libcrypt.minver \
|
||||||
|
- gen-map.awk gen-vers.awk gen-crypt-h.awk \
|
||||||
|
- gen-hashes.awk sel-hashes.awk hashes.lst
|
||||||
|
+ crypt.h.in.in xcrypt.h.in libcrypt.map.in \
|
||||||
|
+ libcrypt.minver gen-map.awk gen-vers.awk \
|
||||||
|
+ gen-crypt-h.awk gen-hashes.awk sel-hashes.awk \
|
||||||
|
+ hashes.lst
|
||||||
|
|
||||||
|
notrans_dist_man3_MANS = \
|
||||||
|
crypt.3 crypt_r.3 crypt_ra.3 crypt_rn.3 \
|
||||||
|
@@ -40,9 +41,9 @@ noinst_HEADERS = \
|
||||||
|
crypt-obsolete.h crypt-port.h test-des-cases.h
|
||||||
|
|
||||||
|
if ENABLE_XCRYPT_COMPAT_FILES
|
||||||
|
-include_HEADERS = xcrypt.h
|
||||||
|
+nodist_include_HEADERS += xcrypt.h
|
||||||
|
else
|
||||||
|
-noinst_HEADERS += xcrypt.h
|
||||||
|
+nodist_noinst_HEADERS += xcrypt.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -98,12 +99,13 @@ CLEANFILES = Makefile.deps.T Makefile.deps \
|
||||||
|
libcrypt.map libcrypt.map.T \
|
||||||
|
crypt-symbol-vers.h crypt-symbol-vers.h.T \
|
||||||
|
crypt-hashes.h crypt-hashes.h.T \
|
||||||
|
- crypt.h crypt.h.T *.gcda *.gcno
|
||||||
|
+ crypt.h crypt.h.T xcrypt.h xcrypt.h.T \
|
||||||
|
+ *.gcda *.gcno
|
||||||
|
|
||||||
|
DISTCLEANFILES = .deps/*.Plo
|
||||||
|
|
||||||
|
# Empty target to have needed headers pre-generated before any other target.
|
||||||
|
-Makefile.deps: crypt.h
|
||||||
|
+Makefile.deps: xcrypt.h
|
||||||
|
$(AM_V_GEN)LC_ALL=C echo "# Deps" > Makefile.deps.T
|
||||||
|
$(AM_V_at)mv -f Makefile.deps.T Makefile.deps
|
||||||
|
|
||||||
|
@@ -115,6 +117,12 @@ libcrypt.map: libcrypt.map.in gen-map.awk Makefile
|
||||||
|
-f $(srcdir)/gen-map.awk $(srcdir)/libcrypt.map.in > libcrypt.map.T
|
||||||
|
$(AM_V_at)mv -f libcrypt.map.T libcrypt.map
|
||||||
|
|
||||||
|
+crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
|
||||||
|
+ $(AM_V_GEN)LC_ALL=C $(AWK) -f $(srcdir)/gen-hashes.awk \
|
||||||
|
+ -v ENABLED_HASHES=$(hashes_enabled) \
|
||||||
|
+ $(srcdir)/hashes.lst > crypt-hashes.h.T
|
||||||
|
+ $(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
|
||||||
|
+
|
||||||
|
crypt-symbol-vers.h: libcrypt.map.in gen-vers.awk Makefile
|
||||||
|
$(AM_V_GEN)LC_ALL=C $(AWK) \
|
||||||
|
-v SYMVER_MIN=$(SYMVER_MIN) \
|
||||||
|
@@ -134,11 +142,11 @@ crypt.h: crypt.h.in crypt-hashes.h crypt-symbol-vers.h gen-crypt-h.awk config.h
|
||||||
|
$(SED) -i -e "s/@DEFAULT_PREFIX_ENABLED@/0/g" crypt.h.T
|
||||||
|
$(AM_V_at)mv -f crypt.h.T crypt.h
|
||||||
|
|
||||||
|
-crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
|
||||||
|
- $(AM_V_GEN)LC_ALL=C $(AWK) -f $(srcdir)/gen-hashes.awk \
|
||||||
|
- -v ENABLED_HASHES=$(hashes_enabled) \
|
||||||
|
- $(srcdir)/hashes.lst > crypt-hashes.h.T
|
||||||
|
- $(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
|
||||||
|
+xcrypt.h: crypt.h
|
||||||
|
+ $(AM_V_GEN)LC_ALL=C $(AWK) \
|
||||||
|
+ -f $(srcdir)/gen-crypt-h.awk config.h $(srcdir)/xcrypt.h.in \
|
||||||
|
+ > xcrypt.h.T
|
||||||
|
+ $(AM_V_at)mv -f xcrypt.h.T xcrypt.h
|
||||||
|
|
||||||
|
install_exec_hook_targets =
|
||||||
|
|
||||||
|
diff --git a/xcrypt.h b/xcrypt.h.in
|
||||||
|
similarity index 98%
|
||||||
|
rename from xcrypt.h
|
||||||
|
rename to xcrypt.h.in
|
||||||
|
index f1d4d48..332722c 100644
|
||||||
|
--- a/xcrypt.h
|
||||||
|
+++ b/xcrypt.h.in
|
||||||
|
@@ -22,6 +22,8 @@
|
||||||
|
|
||||||
|
#include <crypt.h>
|
||||||
|
|
||||||
|
+/*HEADER*/
|
||||||
|
+
|
||||||
|
/* Those are kept for code compatibility with older versions
|
||||||
|
(v3.1.1 and earlier) of libxcrypt.
|
||||||
|
We intentionally declare these functions using macros here,
|
||||||
|
@@ -52,4 +54,6 @@ extern char * __REDIRECT_NTH (xcrypt_gensalt_r, (const char *__prefix,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/*TRAILER*/
|
||||||
|
+
|
||||||
|
#endif /* xcrypt.h */
|
@ -110,7 +110,7 @@ fi \
|
|||||||
|
|
||||||
Name: libxcrypt
|
Name: libxcrypt
|
||||||
Version: 4.4.2
|
Version: 4.4.2
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
|
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
|
||||||
|
|
||||||
# For explicit license breakdown, see the
|
# For explicit license breakdown, see the
|
||||||
@ -120,6 +120,7 @@ URL: https://github.com/besser82/%{name}
|
|||||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Patch 0000 - 2999: Backported patches from upstream.
|
# Patch 0000 - 2999: Backported patches from upstream.
|
||||||
|
Patch0000: %{url}/commit/a32ce8344554128320ba3a7757260c8632db8b3e.patch#/%{name}-4.4.2-cxx_guard_in_xcrypt_h.patch
|
||||||
|
|
||||||
# Patch 3000 - 5999: Backported patches from pull requests.
|
# Patch 3000 - 5999: Backported patches from pull requests.
|
||||||
|
|
||||||
@ -375,6 +376,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 21 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.2-6
|
||||||
|
- Add upstream patch to add proper C++-guards in <xcrypt.h>
|
||||||
|
|
||||||
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.2-5
|
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.2-5
|
||||||
- Build the compat package with glibc hashing methods only
|
- Build the compat package with glibc hashing methods only
|
||||||
- Add an option to disable the compat-package for future use
|
- Add an option to disable the compat-package for future use
|
||||||
|
Loading…
Reference in New Issue
Block a user