summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@fedoraproject.org>2007-02-28 20:35:53 +0000
committerNalin Dahyabhai <nalin@fedoraproject.org>2007-02-28 20:35:53 +0000
commitda1eb7f05721df5ea52f15714f1d63b4c0037537 (patch)
tree3a34e36c2f7293addd9d101dee0d839ce9d19315
parent4aefd50874a2708ff78ca97d8aa9ff65cfb27e66 (diff)
downloadkrb5-da1eb7f05721df5ea52f15714f1d63b4c0037537.tar.gz
krb5-da1eb7f05721df5ea52f15714f1d63b4c0037537.tar.xz
krb5-da1eb7f05721df5ea52f15714f1d63b4c0037537.zip
- add patch to build semi-useful static libraries, but don't apply it
unless we need them
-rw-r--r--krb5-1.6-sort-of-static.patch81
-rw-r--r--krb5.spec18
2 files changed, 99 insertions, 0 deletions
diff --git a/krb5-1.6-sort-of-static.patch b/krb5-1.6-sort-of-static.patch
new file mode 100644
index 0000000..b22a5b9
--- /dev/null
+++ b/krb5-1.6-sort-of-static.patch
@@ -0,0 +1,81 @@
+Allow static libraries to be built. Force plugins to only be built as
+shared objects. This doesn't *really* fix static linking, but it should
+parallel glibc and its nsswitch modules -- applications can pull in
+static copies of this library, but they'll still try to use any
+available plugins. The current set of plugin interfaces include KDC
+location (used by clients), preauthentication plugins (used by clients
+and KDCs), and KDB plugins (used by KDCs).
+
+N.B. This is only a stop-gap for systems which used to include krb5 1.5
+(which we packaged with static libraries enabled) and are now being
+upgraded to 1.6, and I expect to stop bothering for future releases.
+
+--- krb5-1.6/src/plugins/kdb/db2/configure.in 2005-10-27 05:38:05.000000000 -0400
++++ krb5-1.6/src/plugins/kdb/db2/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,5 +1,6 @@
+ K5_AC_INIT(configure.in)
+ enable_shared=yes
++enable_static=no
+ build_dynobj=yes
+ CONFIG_RULES
+ AC_CHECK_HEADERS(unistd.h)
+--- krb5-1.6/src/plugins/kdb/db2/libdb2/configure.in 2006-04-24 20:29:56.000000000 -0400
++++ krb5-1.6/src/plugins/kdb/db2/libdb2/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,5 +1,7 @@
+ K5_AC_INIT(db/db.c)
+ AC_CONFIG_HEADER(include/config.h include/db-config.h)
++enable_shared=yes
++enable_static=no
+ build_dynobj=yes
+ CONFIG_RULES
+
+--- krb5-1.6/src/plugins/kdb/ldap/libkdb_ldap/configure.in 2006-08-31 17:17:34.000000000 -0400
++++ krb5-1.6/src/plugins/kdb/ldap/libkdb_ldap/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,4 +1,7 @@
+ K5_AC_INIT(configure.in)
++enable_shared=yes
++enable_static=no
++build_dynobj=yes
+ CONFIG_RULES
+ AC_CHECK_HEADERS(unistd.h)
+ AC_TYPE_MODE_T
+--- krb5-1.6/src/plugins/locate/python/configure.in 2006-01-10 19:36:36.000000000 -0500
++++ krb5-1.6/src/plugins/locate/python/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,5 +1,6 @@
+ K5_AC_INIT(configure.in)
+ enable_shared=yes
++enable_static=no
+ build_dynobj=yes
+ CONFIG_RULES
+ AC_CHECK_HEADERS(Python.h python2.3/Python.h)
+--- krb5-1.6/src/plugins/preauth/wpse/configure.in 2006-10-03 15:07:17.000000000 -0400
++++ krb5-1.6/src/plugins/preauth/wpse/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,5 +1,6 @@
+ K5_AC_INIT(configure.in)
+ enable_shared=yes
++enable_static=no
+ build_dynobj=yes
+ CONFIG_RULES
+
+--- krb5-1.6/src/plugins/preauth/cksum_body/configure.in 2006-10-03 15:07:17.000000000 -0400
++++ krb5-1.6/src/plugins/preauth/cksum_body/configure.in 2007-02-28 14:51:14.000000000 -0500
+@@ -1,5 +1,6 @@
+ K5_AC_INIT(configure.in)
+ enable_shared=yes
++enable_static=no
+ build_dynobj=yes
+ CONFIG_RULES
+
+--- krb5-1.6/src/aclocal.m4 2006-10-02 18:50:10.000000000 -0400
++++ krb5-1.6/src/aclocal.m4 2007-02-28 14:51:14.000000000 -0500
+@@ -1226,10 +1226,6 @@
+ AC_ARG_ENABLE([static],, ,
+ [enable_static=$default_static])
+
+-if test "$enable_static" = yes; then
+- AC_MSG_ERROR([Sorry, static libraries do not work in this release.])
+-fi
+-
+ if test "$enable_static" = no && test "$krb5_force_static" != yes; then
+ AC_MSG_NOTICE([disabling static libraries])
+ LIBLINKS=
diff --git a/krb5.spec b/krb5.spec
index 6feb9f5..93f6b1e 100644
--- a/krb5.spec
+++ b/krb5.spec
@@ -9,6 +9,9 @@
# This'll be made unconditional at some point.
%define split_workstation 1
+# This'll be pulled out at some point.
+%define build_static 0
+
Summary: The Kerberos network authentication system.
Name: krb5
Version: 1.6
@@ -72,6 +75,7 @@ Patch41: krb5-1.2.7-login-lpass.patch
Patch44: krb5-1.4.3-enospc.patch
Patch45: krb5-1.5-gssinit.patch
Patch46: krb5-1.6-fix-sendto_kdc-memset.dif
+Patch47: krb5-1.6-sort-of-static.patch
License: MIT, freely distributable.
URL: http://web.mit.edu/kerberos/www/
@@ -184,6 +188,10 @@ installed on systems which are meant provide these services.
%endif
%changelog
+* Wed Feb 28 2007 Nalin Dahyabhai <nalin@redhat.com>
+- add patch to build semi-useful static libraries, but don't apply it unless
+ we need them
+
* Mon Feb 19 2007 Nalin Dahyabhai <nalin@redhat.com>
- make profile.d scriptlets mode 644 instead of 755 (part of #225974)
@@ -1054,6 +1062,9 @@ installed on systems which are meant provide these services.
%patch44 -p1 -b .enospc
%patch45 -p1 -b .gssinit
%patch46 -p0 -b .kpasswd
+%if %{build_static}
+%patch47 -p1 -b .sort-of-static
+%endif
cp src/krb524/README README.krb524
gzip doc/*.ps
@@ -1109,6 +1120,9 @@ CPPFLAGS="`echo $DEFINES $INCLUDES`"
OPENLDAP_PLUGIN="$OPENLDAP_PLUGIN" \
SS_LIB="-lss -lcurses" \
--enable-shared \
+%if %{build_static}
+ --enable-static \
+%endif
--bindir=%{krb5prefix}/bin \
--mandir=%{krb5prefix}/man \
--sbindir=%{krb5prefix}/sbin \
@@ -1549,6 +1563,10 @@ exit 0
%{_libdir}/libkrb5.so
%{_libdir}/libkrb5support.so
+%if %{build_static}
+%{_libdir}/*.a
+%endif
+
%{krb5prefix}/bin/krb5-config
%{krb5prefix}/bin/sclient
%{krb5prefix}/man/man1/krb5-config.1*