From 21a1a2a421d4db45bcd1ccb86fa30bbe0ee34b773093bc76f07db40f1d7661e2 Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Wed, 5 Feb 2020 21:34:06 +0000 Subject: [PATCH 1/2] Accepting request 770306 from home:pevik:branches:Base:System - Backport upstream fix daed7ee ("Avoid multiple-definiton with gcc -fno-common") to fix build error with gcc flag -fno-common (bsc#1160875). Tested on gcc-9 and gcc-10. 0001-Avoid-multiple-definiton-with-gcc-fno-common.patch OBS-URL: https://build.opensuse.org/request/show/770306 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=83 --- ...ltiple-definiton-with-gcc-fno-common.patch | 47 +++++++++++++++++++ libtirpc.changes | 8 ++++ libtirpc.spec | 2 + 3 files changed, 57 insertions(+) create mode 100644 0001-Avoid-multiple-definiton-with-gcc-fno-common.patch diff --git a/0001-Avoid-multiple-definiton-with-gcc-fno-common.patch b/0001-Avoid-multiple-definiton-with-gcc-fno-common.patch new file mode 100644 index 0000000..72af14f --- /dev/null +++ b/0001-Avoid-multiple-definiton-with-gcc-fno-common.patch @@ -0,0 +1,47 @@ +From daed7eedba73907730241c5262a5c16c7abedb6f Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Tue, 21 Jan 2020 11:49:35 -0500 +Subject: [PATCH] Avoid multiple-definiton with gcc -fno-common + +GCC 10 enables -fno-common by default. + +Fixes: https://bugs.gentoo.org/705896 + +Signed-off-by: Steve Dickson +[Upstream status: daed7ee Avoid multiple-definiton with gcc -fno-common] +--- + src/rpc_com.h | 3 +-- + src/svc.c | 3 +++ + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/rpc_com.h b/src/rpc_com.h +index 10bec79..76badef 100644 +--- a/src/rpc_com.h ++++ b/src/rpc_com.h +@@ -61,8 +61,7 @@ void __xprt_unregister_unlocked(SVCXPRT *); + void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *); + + +-SVCXPRT **__svc_xports; +-int __svc_maxrec; ++extern int __svc_maxrec; + + #ifdef __cplusplus + } +diff --git a/src/svc.c b/src/svc.c +index b59467b..6db164b 100644 +--- a/src/svc.c ++++ b/src/svc.c +@@ -57,6 +57,9 @@ + + #define max(a, b) (a > b ? a : b) + ++static SVCXPRT **__svc_xports; ++int __svc_maxrec; ++ + /* + * The services list + * Each entry represents a set of procedures (an rpc program). +-- +2.24.1 + diff --git a/libtirpc.changes b/libtirpc.changes index b5b2155..952547c 100644 --- a/libtirpc.changes +++ b/libtirpc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 5 14:08:52 UTC 2020 - Petr Vorel + +- Backport upstream fix daed7ee ("Avoid multiple-definiton with gcc -fno-common") + to fix build error with gcc flag -fno-common (bsc#1160875). + Tested on gcc-9 and gcc-10. + 0001-Avoid-multiple-definiton-with-gcc-fno-common.patch + ------------------------------------------------------------------- Fri Jan 3 15:45:16 UTC 2020 - Petr Vorel diff --git a/libtirpc.spec b/libtirpc.spec index 3fe1469..aa6c470 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -35,6 +35,7 @@ URL: https://sourceforge.net/projects/libtirpc/ Source: %{name}-%{version}.tar.bz2 Source1: baselibs.conf Patch0: 0001-Add-authdes_seccreate-stub.patch +Patch1: 0001-Avoid-multiple-definiton-with-gcc-fno-common.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires libtirpc3 = %{version}-%{release} @@ -80,6 +81,7 @@ TCP over IPv4. %prep %setup -q -n %name-%version %patch0 -p1 +%patch1 -p1 %build sed -i -e 's|@includedir@/tirpc|@includedir@|g' libtirpc.pc.in From 0ab3e4fae7ff882e8cc1ba113f6abc15059190ed3ae0fb1470108b5e3c6938ce Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 8 Feb 2020 08:01:35 +0000 Subject: [PATCH 2/2] Accepting request 768955 from home:StefanBruens:branches:Base:System - Skip unneeded autogen.sh run (configure is up-to-date), drop dependencies: libtool, autoconf - Replace krb5-mini-devel/krb5-devel with pkgconfig(krb5) OBS-URL: https://build.opensuse.org/request/show/768955 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=84 --- libtirpc.changes | 7 +++++++ libtirpc.spec | 14 ++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/libtirpc.changes b/libtirpc.changes index 952547c..dfbc066 100644 --- a/libtirpc.changes +++ b/libtirpc.changes @@ -6,6 +6,13 @@ Wed Feb 5 14:08:52 UTC 2020 - Petr Vorel Tested on gcc-9 and gcc-10. 0001-Avoid-multiple-definiton-with-gcc-fno-common.patch +------------------------------------------------------------------- +Fri Jan 31 00:58:56 UTC 2020 - Stefan BrĂ¼ns + +- Skip unneeded autogen.sh run (configure is up-to-date), drop + dependencies: libtool, autoconf +- Replace krb5-mini-devel/krb5-devel with pkgconfig(krb5) + ------------------------------------------------------------------- Fri Jan 3 15:45:16 UTC 2020 - Petr Vorel diff --git a/libtirpc.spec b/libtirpc.spec index aa6c470..05631f3 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -23,14 +23,8 @@ Release: 0 Summary: Transport Independent RPC Library License: BSD-3-Clause Group: Development/Libraries/C and C++ -%if 0%{suse_version} >= 1300 -BuildRequires: krb5-mini-devel -%else -BuildRequires: krb5-devel -%endif -BuildRequires: autoconf -BuildRequires: libtool BuildRequires: pkg-config +BuildRequires: pkgconfig(krb5) URL: https://sourceforge.net/projects/libtirpc/ Source: %{name}-%{version}.tar.bz2 Source1: baselibs.conf @@ -85,13 +79,9 @@ TCP over IPv4. %build sed -i -e 's|@includedir@/tirpc|@includedir@|g' libtirpc.pc.in -/bin/sh autogen.sh %configure --disable-static \ -%if 0%{suse_version} < 1200 - --disable-gssapi \ -%endif --libdir=/%{_lib} -make %{?_smp_mflags} +%make_build %{?_smp_mflags} %install # Don't strip .symtab to allow debugging