/hg/icedtea6: 2 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Fri Aug 30 06:34:30 PDT 2013


changeset a1615ed5b8de in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a1615ed5b8de
author: Andrew John Hughes <gnu.andrew at redhat.com>
date: Fri Aug 30 01:03:30 2013 +0100

	RH991170: java does not use correct kerberos credential cache

	2013-08-29  Andrew John Hughes  <gnu.andrew at redhat.com>

		* Makefile.am:
		(ICEDTEA_PATCHES): Add new patch.
		* NEWS: Mention RH991170.
		* patches/alternative_krb5_cache.patch:
		Backport from IcedTea 2.x which retrieves the
		Kerberos cache name using a Kerberos library call.


changeset f9e660ea2227 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f9e660ea2227
author: Andrew John Hughes <gnu.andrew at redhat.com>
date: Fri Aug 30 14:34:17 2013 +0100

	PR1535: Allow use of system Kerberos to obtain cache location

	2013-08-30  Andrew John Hughes  <gnu.andrew at redhat.com>

		* Makefile.am:
		(ICEDTEA_PATCHES): Add new patch.
		(ICEDTEA_ENV): Set SYSTEM_KRB5, KRB5_LIBS
		and KRB5_CFLAGS.
		* acinclude.m4:
		(IT_CHECK_FOR_KERBEROS): Add --enable-system-kerberos
		option (on by default) which checks for libkrb5 and
		the krb5.h header.
		* configure.ac: Invoke IT_CHECK_FOR_KERBEROS.
		* patches/alternative_krb5_cache_fixup.patch:
		Fix previous Kerberos patch to fall back on old
		method of using /tmp/krb5cc_<uid> and to allow
		the LDFLAGS for Kerberos to be specified.
		* INSTALL: Updated.
		* NEWS: Likewise.


diffstat:

 ChangeLog                                  |   27 ++
 INSTALL                                    |    5 +-
 Makefile.am                                |   11 +-
 NEWS                                       |    2 +
 acinclude.m4                               |   26 ++
 configure.ac                               |    2 +
 patches/alternative_krb5_cache.patch       |  332 +++++++++++++++++++++++++++++
 patches/alternative_krb5_cache_fixup.patch |  128 +++++++++++
 8 files changed, 531 insertions(+), 2 deletions(-)

diffs (truncated from 609 to 500 lines):

diff -r b79ee332e4f6 -r f9e660ea2227 ChangeLog
--- a/ChangeLog	Wed Aug 28 23:12:48 2013 +0100
+++ b/ChangeLog	Fri Aug 30 14:34:17 2013 +0100
@@ -1,3 +1,30 @@
+2013-08-30  Andrew John Hughes  <gnu.andrew at redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patch.
+	(ICEDTEA_ENV): Set SYSTEM_KRB5, KRB5_LIBS
+	and KRB5_CFLAGS.
+	* acinclude.m4:
+	(IT_CHECK_FOR_KERBEROS): Add --enable-system-kerberos
+	option (on by default) which checks for libkrb5 and
+	the krb5.h header.
+	* configure.ac: Invoke IT_CHECK_FOR_KERBEROS.
+	* patches/alternative_krb5_cache_fixup.patch:
+	Fix previous Kerberos patch to fall back on old
+	method of using /tmp/krb5cc_<uid> and to allow
+	the LDFLAGS for Kerberos to be specified.
+	* INSTALL: Updated.
+	* NEWS: Likewise.
+
+2013-08-29  Andrew John Hughes  <gnu.andrew at redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patch.
+	* NEWS: Mention RH991170.
+	* patches/alternative_krb5_cache.patch:
+	Backport from IcedTea 2.x which retrieves the
+	Kerberos cache name using a Kerberos library call.
+
 2013-08-28  Andrew John Hughes  <gnu.andrew at redhat.com>
 
 	* Makefile.am: Add new patch.
diff -r b79ee332e4f6 -r f9e660ea2227 INSTALL
--- a/INSTALL	Wed Aug 28 23:12:48 2013 +0100
+++ b/INSTALL	Fri Aug 30 14:34:17 2013 +0100
@@ -161,7 +161,6 @@
 
 * --enable-pulse-java: Build the PulseAudio sound provider.
 * --disable-xrender: Don't include the XRender pipeline.
-* --enable-nio2: Include the NIO2 backport.
 * --enable-systemtap: Include support for tracing using systemtap.
 * --enable-nss: Enable the NSS security provider.
 * --enable-cacao: Replace HotSpot with the CACAO VM.
@@ -172,6 +171,10 @@
 * --with-rhino: Include Javascript support using Rhino.
 * --with-additional-vms=vm-list: Additional VMs to build using the system described
   below.
+* --enable-lcms2: Use LCMS 2 backport from OpenJDK 7 rather than LCMS 1.
+* --enable-system-kerberos: Link against the system Kerberos library and
+  query it at runtime to obtain the cache location, rather than using a
+  hardcoded value.
 
 Testing
 =======
diff -r b79ee332e4f6 -r f9e660ea2227 Makefile.am
--- a/Makefile.am	Wed Aug 28 23:12:48 2013 +0100
+++ b/Makefile.am	Fri Aug 30 14:34:17 2013 +0100
@@ -736,7 +736,9 @@
 	patches/hotspot/original/7197906-handle_32_bit_shifts.patch \
 	patches/sparc-trapsfix.patch \
 	patches/print_lsb_release.patch \
-	patches/openjdk/6893617-cnctx_always_uses_default_orb.patch
+	patches/openjdk/6893617-cnctx_always_uses_default_orb.patch \
+	patches/alternative_krb5_cache.patch \
+	patches/alternative_krb5_cache_fixup.patch
 
 if WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
@@ -1035,6 +1037,13 @@
 	RHINO_JAR="$(abs_top_builddir)/rhino/rhino.jar"
 endif
 
+if USE_SYSTEM_KERBEROS
+ICEDTEA_ENV += \
+	SYSTEM_KRB5="true" \
+	KRB5_LIBS="${KRB5_LIBS}" \
+	KRB5_CFLAGS="${KRB5_CFLAGS}"
+endif
+
 # OpenJDK ecj build environment.
 ICEDTEA_ENV_ECJ = $(ICEDTEA_ENV) \
 	ALT_OUTPUTDIR="$(ECJ_BUILD_OUTPUT_DIR)" \
diff -r b79ee332e4f6 -r f9e660ea2227 NEWS
--- a/NEWS	Wed Aug 28 23:12:48 2013 +0100
+++ b/NEWS	Fri Aug 30 14:34:17 2013 +0100
@@ -25,6 +25,8 @@
   - PR1188: ASM Interpreter and Thumb2 JIT javac miscompile modulo reminder on armel.
   - PR1318: Fix automatic enabling of the Zero build on non-JIT architectures which don't use CACAO or JamVM.
   - RH902004: very bad performance with E-Porto Add-In für OpenOffice Writer installed (hs23 only)
+  - RH991170: java does not use correct kerberos credential cache
+  - PR1535: Allow use of system Kerberos to obtain cache location
 * JamVM
   - JSR 335: Lambda Expressions
   - JEP 171: Implement fence methods in sun.misc.Unsafe
diff -r b79ee332e4f6 -r f9e660ea2227 acinclude.m4
--- a/acinclude.m4	Wed Aug 28 23:12:48 2013 +0100
+++ b/acinclude.m4	Fri Aug 30 14:34:17 2013 +0100
@@ -2071,3 +2071,29 @@
   AM_CONDITIONAL(ENABLE_LCMS2, test x"${ENABLE_LCMS2}" = "xyes")
   AC_SUBST(ENABLE_LCMS2)
 ])
+
+dnl Check for Kerberos library in order to lookup cache location at runtime.
+AC_DEFUN_ONCE([IT_CHECK_FOR_KERBEROS],
+[
+  AC_MSG_CHECKING([whether to use the system Kerberos install])
+  AC_ARG_ENABLE([system-kerberos],
+	      [AS_HELP_STRING(--enable-system-kerberos,use the system kerberos [[default=yes]])],
+  [
+    ENABLE_SYSTEM_KERBEROS="${enableval}"
+  ],
+  [
+    ENABLE_SYSTEM_KERBEROS="yes"
+  ])
+  AC_MSG_RESULT(${ENABLE_SYSTEM_KERBEROS})
+  if test x"${ENABLE_SYSTEM_KERBEROS}" = "xyes"; then
+    dnl Check for krb5 header and library.
+    AC_CHECK_LIB([krb5], [krb5_cc_default],
+        , [AC_MSG_ERROR([Could not find Kerberos library; install Kerberos or build with --disable-system-kerberos to use the default cache location.])])
+    AC_CHECK_HEADER([krb5.h],
+        , [AC_MSG_ERROR([Could not find Kerberos header; install Kerberos or build with --disable-system-kerberos to use the default cache location.])])
+    KRB5_LIBS="-lkrb5"
+    AC_SUBST(KRB5_LIBS)
+  fi
+  AM_CONDITIONAL(USE_SYSTEM_KERBEROS, test x"${ENABLE_SYSTEM_KERBEROS}" = "xyes")
+  AC_SUBST(ENABLE_SYSTEM_KERBEROS)
+])
diff -r b79ee332e4f6 -r f9e660ea2227 configure.ac
--- a/configure.ac	Wed Aug 28 23:12:48 2013 +0100
+++ b/configure.ac	Fri Aug 30 14:34:17 2013 +0100
@@ -291,6 +291,8 @@
 
 IT_ENABLE_LCMS2
 
+IT_CHECK_FOR_KERBEROS
+
 dnl pkgconfig cannot be used to find these headers and libraries.
 AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
 	,[AC_MSG_ERROR("CUPS headers were not found -
diff -r b79ee332e4f6 -r f9e660ea2227 patches/alternative_krb5_cache.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/alternative_krb5_cache.patch	Fri Aug 30 14:34:17 2013 +0100
@@ -0,0 +1,332 @@
+diff -Nru openjdk.orig/jdk/make/sun/security/krb5/internal/ccache/Makefile openjdk/jdk/make/sun/security/krb5/internal/ccache/Makefile
+--- openjdk.orig/jdk/make/sun/security/krb5/internal/ccache/Makefile	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/jdk/make/sun/security/krb5/internal/ccache/Makefile	2013-08-29 18:23:03.264241145 +0100
+@@ -0,0 +1,48 @@
++#
++# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2013 Red Hat, Inc. and/or its affiliates.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.  Oracle designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Oracle in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++
++BUILDDIR = ../../../../..
++PACKAGE = sun.security.krb5.internal.ccache
++PRODUCT = sun
++include $(BUILDDIR)/common/Defs.gmk
++
++#
++# Java Files
++#
++AUTO_FILES_JAVA_DIRS = sun/security/krb5/internal/ccache
++
++ifeq ($(PLATFORM), $(filter $(PLATFORM),linux solaris))
++FILES_export = sun/security/krb5/internal/ccache/FileCredentialsCache.java
++FILES_c = krb5ccache.c
++LIBRARY = j2krb5
++
++vpath %.c \
++  $(PLATFORM_SRC)/native/sun/security/krb5/internal/ccache
++
++include $(BUILDDIR)/common/Library.gmk
++
++OTHER_LDLIBS = $(LIBDL) $(JVMLIB) -lkrb5
++endif # PLATFORM
+diff -Nru openjdk.orig/jdk/make/sun/security/Makefile openjdk/jdk/make/sun/security/Makefile
+--- openjdk.orig/jdk/make/sun/security/Makefile	2012-10-26 19:25:42.000000000 +0100
++++ openjdk/jdk/make/sun/security/Makefile	2013-08-29 18:25:01.210077070 +0100
+@@ -1,5 +1,6 @@
+ #
+ # Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2013 Red Hat, Inc. and/or its affiliates.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ #
+ # This code is free software; you can redistribute it and/or modify it
+@@ -52,6 +53,12 @@
+   endif
+ endif
+ 
++# Build krb5/internal/ccache only on Linux and Solaris platforms.
++KRB5_CCACHE =
++ifeq ($(PLATFORM), $(filter $(PLATFORM),linux solaris))
++  KRB5_CCACHE = krb5/internal/ccache
++endif
++
+ # Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
+ MSCAPI =
+ ifeq ($(PLATFORM), windows)
+@@ -61,7 +68,7 @@
+ endif
+ 
+ SUBDIRS = other action util tools jgss krb5 smartcardio $(PKCS11) \
+-          $(JGSS_WRAPPER) $(MSCAPI)
++          $(JGSS_WRAPPER) $(MSCAPI) $(KRB5_CCACHE)
+ 
+ all build clean clobber::
+ 	$(SUBDIRS-loop)
+diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java openjdk/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
+--- openjdk.orig/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	2012-10-26 19:26:06.000000000 +0100
++++ openjdk/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	2013-08-29 20:33:06.093698688 +0100
+@@ -1,5 +1,6 @@
+ /*
+  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2013 Red Hat, Inc. and/or its affiliates.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -43,7 +44,6 @@
+ import java.io.FileOutputStream;
+ import java.io.BufferedReader;
+ import java.io.InputStreamReader;
+-import java.lang.reflect.*;
+ 
+ /**
+  * CredentialsCache stores credentials(tickets, session keys, etc) in a
+@@ -63,6 +63,8 @@
+     private Vector<Credentials> credentialsList;
+     private static String dir;
+     private static boolean DEBUG = Krb5.DEBUG;
++    private static boolean alreadyLoaded = false;
++    private static boolean alreadyTried = false;
+ 
+     public static synchronized FileCredentialsCache acquireInstance(
+                 PrincipalName principal, String cache) {
+@@ -356,14 +358,14 @@
+      * Returns path name of the credentials cache file.
+      * The path name is searched in the following order:
+      *
+-     * 1. /tmp/krb5cc_<uid> on unix systems
++     * 1. location specified by Kerberos API on unix systems
+      * 2. <user.home>/krb5cc_<user.name>
+      * 3. <user.home>/krb5cc (if can't get <user.name>)
+      */
+ 
+     public static String getDefaultCacheName() {
+         String stdCacheNameComponent = "krb5cc";
+-        String name;
++        String name = null;
+         // get cache name from system.property
+ 
+         String osname =
+@@ -382,26 +384,46 @@
+          */
+ 
+         if (osname != null) {
+-            String cmd = null;
+-            String uidStr = null;
+-            long uid = 0;
+-
+             if (osname.startsWith("SunOS") ||
+                 (osname.startsWith("Linux"))) {
+                 try {
+-                    Class<?> c = Class.forName
+-                        ("com.sun.security.auth.module.UnixSystem");
+-                    Constructor<?> constructor = c.getConstructor();
+-                    Object obj = constructor.newInstance();
+-                    Method method = c.getMethod("getUid");
+-                    uid =  ((Long)method.invoke(obj)).longValue();
+-                    name = File.separator + "tmp" +
+-                        File.separator + stdCacheNameComponent + "_" + uid;
+-                    if (DEBUG) {
+-                        System.out.println(">>>KinitOptions cache name is " +
+-                                           name);
++                    // Load the native code if necessary
++                    if (!alreadyTried) {
++                        // See if there's any native code to load
++                        try {
++                            ensureLoaded();
++                        } catch (Exception e) {
++                            if (DEBUG) {
++                                System.out.println("Could not load native Kerberos bridge");
++                                e.printStackTrace();
++                            }
++                            alreadyTried = true;
++                        }
++                    }
++                    if (alreadyLoaded) {
++                        // There is some native code
++                        if (DEBUG) {
++                           System.out.println(">> Look up native default credential cache");
++                        }
++                        // Query the native Kerberos API for the cache location
++                        name = nativeGetDefaultCacheName();
++                    }
++
++                    /*
++                     * We require the default cache location to be a file name.
++                     * DIR: can point to a cache collection, while DIR:: points
++                     * to a specific cache file.
++                     *  
++                     * http://k5wiki.kerberos.org/wiki?title=Projects/Client_principal_selection&oldid=4118
++                     */
++                    if (name.startsWith("FILE:") || name.startsWith("DIR::")) {
++                        name = name.substring(5);
++                        if (DEBUG) {
++                            System.out.println(">>>KinitOptions cache name is " +
++                                    name);
++                        }
++                        return name;
+                     }
+-                    return name;
+                 } catch (Exception e) {
+                     if (DEBUG) {
+                         System.out.println("Exception in obtaining uid " +
+@@ -445,6 +467,8 @@
+ 
+         return name;
+     }
++    
++    private native static String nativeGetDefaultCacheName() throws Exception;
+ 
+     public static String checkValidation(String name) {
+         String fullname = null;
+@@ -526,4 +550,16 @@
+         }
+         return null;
+     }
++    
++    private static void ensureLoaded() {
++        java.security.AccessController.doPrivileged(
++                new java.security.PrivilegedAction<Void> () {
++                    public Void run() {
++                            System.loadLibrary("j2krb5");
++                        return null;
++                    }
++                });
++        alreadyLoaded = true;
++    }
++    
+ }
+diff -Nru openjdk.orig/jdk/src/solaris/native/sun/security/krb5/internal/ccache/krb5ccache.c openjdk/jdk/src/solaris/native/sun/security/krb5/internal/ccache/krb5ccache.c
+--- openjdk.orig/jdk/src/solaris/native/sun/security/krb5/internal/ccache/krb5ccache.c	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/jdk/src/solaris/native/sun/security/krb5/internal/ccache/krb5ccache.c	2013-08-29 18:23:03.264241145 +0100
+@@ -0,0 +1,111 @@
++/*
++ * Copyright (c) 2013 Red Hat Inc. and/or its affiliates.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.  Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++#define _GNU_SOURCE
++
++#include <krb5.h>
++#include <stdlib.h>
++#include <stdio.h>
++
++#include "sun_security_krb5_internal_ccache_FileCredentialsCache.h"
++
++static void handle_error(JNIEnv *env, krb5_context context, krb5_error_code err, const char *func_name);
++static jint throw_Exception(JNIEnv *env, const char *class_name, const char *message);
++
++/*
++ * Class:     sun_security_krb5_internal_ccache_FileCredentialsCache
++ * Method:    nativeGetDefaultCacheName
++ * Signature: ()Ljava/lang/String;
++ */
++JNIEXPORT jstring JNICALL Java_sun_security_krb5_internal_ccache_FileCredentialsCache_nativeGetDefaultCacheName
++(JNIEnv *env, jclass krbcredsClass)
++{
++    krb5_context context;
++    krb5_error_code err;
++    krb5_ccache cache;
++    const char *cc_type, *cc_name;
++    char *cc_full_name;
++    jstring result;
++
++    /* Need a krb5_context to proceed further */
++    err = krb5_init_context(&context);
++    if (err) {
++        handle_error(env, context, err, "krb5_init_context");
++        return NULL;
++    }
++
++    /* Get the default credential cache.
++     * We intentionally do not use krb5_cc_default_name because when the cache
++     * is a collection, krb5_cc_default_name returns the collection directory.
++     * By using krb5_cc_default and then krb5_cc_get_name, we get the primary
++     * cache file within the collection. */
++    err = krb5_cc_default(context, &cache);
++    if (err) {
++        handle_error(env, context, err, "krb5_cc_default");
++        krb5_free_context(context);
++        return NULL;
++    }
++
++    /* Get the type and name of the default cache and construct a string
++     * of the form 'type:name'. */
++    cc_type = krb5_cc_get_type(context, cache);
++    cc_name = krb5_cc_get_name(context, cache);
++    if (asprintf(&cc_full_name, "%s:%s", cc_type, cc_name) < 0) {
++        throw_Exception(env, "java/lang/OutOfMemoryError", "Unable to construct credential cache string");
++        krb5_free_context(context);
++        return NULL;
++    }
++
++    result = (*env)->NewStringUTF(env, cc_full_name);
++
++    free(cc_full_name);
++    krb5_free_context(context);
++    return result;
++}
++
++static void handle_error(JNIEnv *env, krb5_context context, krb5_error_code err, const char *func_name) {
++    const char *err_msg;
++    char *result;
++
++    err_msg = krb5_get_error_message(context, err);
++    if (asprintf(&result, "%s: %s", func_name, err_msg) < 0) {
++        throw_Exception(env, "java/lang/OutOfMemoryError", "Unable to construct error message");
++        return;
++    }
++    throw_Exception(env, "java/lang/Exception", result);
++
++    free(result);
++    krb5_free_error_message(context, err_msg);
++}
++
++static jint throw_Exception(JNIEnv *env, const char *class_name, const char *message) {
++    jclass class;
++
++    class = (*env)->FindClass(env, class_name);
++    if (class == NULL) {
++        return -1;
++    }
++    return (*env)->ThrowNew(env, class, message);
++}
diff -r b79ee332e4f6 -r f9e660ea2227 patches/alternative_krb5_cache_fixup.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/alternative_krb5_cache_fixup.patch	Fri Aug 30 14:34:17 2013 +0100
@@ -0,0 +1,128 @@
+diff -Nru openjdk.orig/jdk/make/jdk_generic_profile.sh openjdk/jdk/make/jdk_generic_profile.sh
+--- openjdk.orig/jdk/make/jdk_generic_profile.sh	2013-08-30 02:41:17.276807687 +0100
++++ openjdk/jdk/make/jdk_generic_profile.sh	2013-08-30 12:11:12.428923185 +0100
+@@ -467,5 +467,14 @@
+ export LCMS_CFLAGS
+ export LCMS_LIBS
+ 
++# Export variables for system krb5
++# KRB5_CFLAGS and KRB5_LIBS tell the compiler how to compile and
++# link against Kerberos
++if [ "${KRB5_LIBS}" = "" ] ; then
++    KRB5_LIBS="-lkrb5"
++fi
++export KRB5_LIBS
++
+ # IcedTea defaults; use system libraries
+ export USE_SYSTEM_LCMS=true
++export SYSTEM_KRB5=true
+diff -Nru openjdk.orig/jdk/make/sun/security/krb5/internal/ccache/Makefile openjdk/jdk/make/sun/security/krb5/internal/ccache/Makefile



More information about the distro-pkg-dev mailing list