From 95fb416342932f39fd200fa74bcdf4cdf306eb95 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 20 Apr 2021 08:34:59 -0600 Subject: [PATCH] New version (20210419-3.1). Add -strlcat patch to avoid polluting the global namespace. --- libedit-strlcat.patch | 17 +++++++++++++++++ libedit.spec | 20 ++++++++++++++++---- sources | 2 +- 3 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 libedit-strlcat.patch diff --git a/libedit-strlcat.patch b/libedit-strlcat.patch new file mode 100644 index 0000000..71670fd --- /dev/null +++ b/libedit-strlcat.patch @@ -0,0 +1,17 @@ +--- src/sys.h.orig 2021-04-19 15:19:17.000000000 -0600 ++++ src/sys.h 2021-04-20 08:26:19.950621433 -0600 +@@ -83,12 +83,12 @@ typedef void *ioctl_t; + #include + + #ifndef HAVE_STRLCAT +-//#define strlcat libedit_strlcat ++#define strlcat libedit_strlcat + size_t strlcat(char *dst, const char *src, size_t size); + #endif + + #ifndef HAVE_STRLCPY +-//#define strlcpy libedit_strlcpy ++#define strlcpy libedit_strlcpy + size_t strlcpy(char *dst, const char *src, size_t size); + #endif + diff --git a/libedit.spec b/libedit.spec index 0f6d8a4..778e7f1 100644 --- a/libedit.spec +++ b/libedit.spec @@ -1,13 +1,21 @@ -%global snap 20210216 -%global dir_snap 20210216 +%global snap 20210419 +%global dir_snap 20210419 Summary: The NetBSD Editline library Name: libedit Version: 3.1 -Release: 35.%{snap}cvs%{?dist} +Release: 36.%{snap}cvs%{?dist} License: BSD URL: https://www.thrysoee.dk/editline/ Source0: https://www.thrysoee.dk/editline/%{name}-%{snap}-%{version}.tar.gz +# Version 20210419 changes internal symbols named libedit_strlcat and +# libedit_strlcpy to plain strlcat and strlcpy. None of those symbols are +# mentioned in the public header files. Many projects check for the existence +# of functions named strlcat and strlcpy. I am not prepared to deal with the +# possible fallout of those functions suddenly existing in a low-level Fedora +# library, so restore the old names for now. +Patch0: %{name}-strlcat.patch + BuildRequires: gcc BuildRequires: groff-base BuildRequires: make @@ -28,7 +36,7 @@ Requires: ncurses-devel%{?_isa} This package contains development files for %{name}. %prep -%autosetup -n %{name}-%{dir_snap}-%{version} +%autosetup -n %{name}-%{dir_snap}-%{version} -p0 # Fix unused direct shared library dependencies. sed -i "s/lncurses/ltinfo/" configure @@ -64,6 +72,10 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man3/history.3* %{_includedir}/editline/readline.h %changelog +* Tue Apr 20 2021 Jerry James - 3.1-36.20210419cvs +- New version (20210419-3.1) +- Add -strlcat patch to avoid polluting the global namespace + * Tue Feb 16 2021 Jerry James - 3.1-35.20210216cvs - New version (20210216-3.1) diff --git a/sources b/sources index 4d567f1..1ffc9d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libedit-20210216-3.1.tar.gz) = 2577c66b3f20a7f3cdaac529bda7f55dbed1cd902f39971b8f792885dec7f8c137a980c570dbab195d3d45989cc9d16a96a3567e02c5ac32ed4757fa36e46b4c +SHA512 (libedit-20210419-3.1.tar.gz) = d5e2cdad18d17fb94e839d02b7b7437378bb85986478d4c95e4105a6ac47fcbbd6bdd0a20a83d23455ed9cb1e178d6c0acbe63f4559096afd506f283c2cc00e9