[packages/krb5] - added as-needed patch, so that -Wl,-as-needed is actually honoured - libresolv is required for thr

qboosh qboosh at pld-linux.org
Sun Feb 19 11:09:55 CET 2017


commit b1d8b70e18af4d1fd2797a7fa058e18a101cd88c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 19 11:11:45 2017 +0100

    - added as-needed patch, so that -Wl,-as-needed is actually honoured
    - libresolv is required for threaded lookups
    - use getconf to define LFS flags

 krb5-as-needed.patch | 13 +++++++++++++
 krb5.spec            | 35 +++++++++--------------------------
 2 files changed, 22 insertions(+), 26 deletions(-)
---
diff --git a/krb5.spec b/krb5.spec
index bc003e3..811c663 100644
--- a/krb5.spec
+++ b/krb5.spec
@@ -5,10 +5,6 @@
 # (s)he is on hers/his own.
 #				- baggins/at/pld-linux.org
 #
-# TODO:
-# - fix as-needed (move flags before libs in link commands)
-# - is =-lresolv in --with-netlib needed?
-#
 # Conditional build:
 %bcond_without	doc             # documentation [requires TeX]
 %bcond_without	audit		# audit plugin
@@ -43,6 +39,7 @@ Source18:	kpropd.acl
 Patch0:		%{name}-manpages.patch
 Patch1:		%{name}-audit.patch
 Patch2:		%{name}-db185.patch
+Patch3:		%{name}-as-needed.patch
 Patch4:		%{name}-ksu-path.patch
 # http://lite.mit.edu/
 Patch6:		%{name}-ktany.patch
@@ -56,7 +53,6 @@ URL:		http://web.mit.edu/kerberos/www/
 BuildRequires:	/bin/csh
 %{?with_audit:BuildRequires:	audit-libs-devel}
 BuildRequires:	autoconf
-BuildRequires:	automake
 BuildRequires:	bison
 %{?with_ldap:BuildRequires:	cyrus-sasl-devel >= 2}
 %{?with_system_db:BuildRequires:	db-devel}
@@ -75,6 +71,7 @@ BuildRequires:	libverto-devel
 BuildRequires:	ncurses-devel
 %{?with_ldap:BuildRequires:	openldap-devel >= 2.4.6}
 BuildRequires:	openssl-devel >= 1.0.0
+BuildRequires:	perl-base
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.268
 %{?with_tcl:BuildRequires:	tcl-devel}
@@ -86,7 +83,6 @@ BuildRequires:	sphinx-pdg
 %if %{with tests}
 BuildRequires:	cmocka-devel
 BuildRequires:	libverto-libev
-BuildRequires:	perl-base
 BuildRequires:	python >= 1:2.5
 # we have "online" tests disabled, so probably not needed
 #BuildRequires:	resolv_wrapper >= 1.1.5
@@ -396,6 +392,7 @@ Dokumentacja systemu MIT Kerberos V5 w formacie HTML.
 %patch0 -p1
 %patch1 -p1
 %{?with_system_db:%patch2 -p1}
+%patch3 -p1
 %patch4 -p1
 %patch6 -p1
 %patch11 -p1
@@ -407,27 +404,13 @@ Dokumentacja systemu MIT Kerberos V5 w formacie HTML.
 
 %build
 cd src
-# Get LFS support on systems that need it which aren't already 64-bit.
-%ifarch %{ix86} s390 ppc sparc
-CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64 -fPIC -I%{_includedir}/et -I%{_includedir}/ncurses"
-CPPFLAGS="-D_FILE_OFFSET_BITS=64 -I%{_includedir}/et -I%{_includedir}/ncurses"
-%else
-CFLAGS="%{rpmcflags} -fPIC -I%{_includedir}/et -I%{_includedir}/ncurses"
-CPPFLAGS="-I%{_includedir}/et -I%{_includedir}/ncurses"
-%endif
-
-top=$(pwd)
-for configurein in $(find -name configure.in -type f); do
-	cd $(dirname $configurein)
-	grep -q A._CONFIG_HEADER configure.in && %{__autoheader} -I "$top"
-	%{__autoconf} -I "$top"
-	cd $top
-done
-
+# Get LFS support on systems that need additional flags.
+LFS_CFLAGS="$(getconf LFS_CFLAGS)"
+CFLAGS="%{rpmcflags} $LFS_CFLAGS -fPIC -I%{_includedir}/et -I%{_includedir}/ncurses"
+CPPFLAGS="$LFS_CFLAGS -I%{_includedir}/et -I%{_includedir}/ncurses"
+%{__autoconf}
+%{__autoheader}
 %configure \
-	CC=%{__cc} \
-	CFLAGS="$CFLAGS" \
-	CPPFLAGS="$CPPFLAGS" \
 	--libexecdir=%{_libdir} \
 	--disable-rpath \
 	%{?with_audit:--enable-audit-plugin=simple} \
diff --git a/krb5-as-needed.patch b/krb5-as-needed.patch
new file mode 100644
index 0000000..2f4793c
--- /dev/null
+++ b/krb5-as-needed.patch
@@ -0,0 +1,13 @@
+--- krb5-1.15/src/config/shlib.conf.orig	2016-12-01 23:31:24.000000000 +0100
++++ krb5-1.15/src/config/shlib.conf	2017-02-19 10:36:34.400096062 +0100
+@@ -544,8 +544,8 @@
+ 
+ if test "${MAKE_SHLIB_COMMAND}" = "x" ; then
+   if test "${INIT_FINI_PREP}" != ":"; then
+-    MAKE_SHLIB_COMMAND="${INIT_FINI_PREP} && ${LDCOMBINE} -o \$@ \$\$objlist \$(SHLIB_EXPFLAGS) \$(LDFLAGS) ${LDCOMBINE_TAIL}"
++    MAKE_SHLIB_COMMAND="${INIT_FINI_PREP} && ${LDCOMBINE} -o \$@ \$\$objlist \$(LDFLAGS) \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
+   else
+-    MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(SHLIB_EXPFLAGS) \$(LDFLAGS) ${LDCOMBINE_TAIL}"
++    MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(LDFLAGS) \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
+   fi
+ fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/krb5.git/commitdiff/b1d8b70e18af4d1fd2797a7fa058e18a101cd88c



More information about the pld-cvs-commit mailing list