From a0f7d51f23e183b03248c926ada96faccba2dabe Mon Sep 17 00:00:00 2001 From: Eric Smith Date: Tue, 22 May 2018 16:19:57 -0600 Subject: [PATCH] Mark explicit_bzero() and reallocarray() as compat symbols. (#1408465) --- libbsd-0.8.6-compat.patch | 18 ++++++++++++++++++ libbsd.spec | 11 ++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 libbsd-0.8.6-compat.patch diff --git a/libbsd-0.8.6-compat.patch b/libbsd-0.8.6-compat.patch new file mode 100644 index 0000000..a4f7868 --- /dev/null +++ b/libbsd-0.8.6-compat.patch @@ -0,0 +1,18 @@ +diff -up libbsd-0.8.6/src/explicit_bzero.c.compat libbsd-0.8.6/src/explicit_bzero.c +--- libbsd-0.8.6/src/explicit_bzero.c.compat 2018-05-22 16:06:09.926108522 -0600 ++++ libbsd-0.8.6/src/explicit_bzero.c 2018-05-22 16:06:43.102873673 -0600 +@@ -17,3 +17,5 @@ explicit_bzero(void *buf, size_t len) + memset(buf, 0, len); + __explicit_bzero_hook(buf, len); + } ++ ++asm(".symver explicit_bzero,explicit_bzero@LIBBSD_0.8"); +diff -up libbsd-0.8.6/src/reallocarray.c.compat libbsd-0.8.6/src/reallocarray.c +--- libbsd-0.8.6/src/reallocarray.c.compat 2018-05-22 16:07:32.247007073 -0600 ++++ libbsd-0.8.6/src/reallocarray.c 2018-05-22 16:08:10.687893640 -0600 +@@ -36,3 +36,5 @@ reallocarray(void *optr, size_t nmemb, s + } + return realloc(optr, size * nmemb); + } ++ ++asm(".symver reallocarray,reallocarray@LIBBSD_0.8"); diff --git a/libbsd.spec b/libbsd.spec index 807b47e..a221446 100644 --- a/libbsd.spec +++ b/libbsd.spec @@ -1,12 +1,13 @@ Name: libbsd Version: 0.8.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library providing BSD-compatible functions for portability URL: http://libbsd.freedesktop.org/ License: BSD and ISC and Copyright only and Public Domain Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz Patch1: %{name}-0.8.3-deprecated.patch +Patch2: %{name}-0.8.6-compat.patch %description libbsd provides useful functions commonly found on BSD systems, and @@ -36,6 +37,7 @@ configured using "pkg-config --libs libbsd-ctor". %setup -q %if 0%{?rhel} && 0%{?rhel} < 7 %patch1 -p1 -b .deprecated +%patch2 -p1 -b .compat %endif %build @@ -52,6 +54,10 @@ configured using "pkg-config --libs libbsd-ctor". rm %{buildroot}%{_libdir}/%{name}.a rm %{buildroot}%{_libdir}/%{name}.la +# remove manual pages that conflict with man-pages package +rm %{buildroot}%{_mandir}/man3/explicit_bzero.3bsd + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -74,6 +80,9 @@ rm %{buildroot}%{_libdir}/%{name}.la %{_libdir}/pkgconfig/%{name}-ctor.pc %changelog +* Tue May 22 2018 Eric Smith - 0.8.6-3 +- Mark explicit_bzero() and reallocarray() as compat symbols. (#1408465) + * Wed Feb 07 2018 Fedora Release Engineering - 0.8.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild