tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mit-krb5/builtin.mk problems on solaris
Le 29/10/13 12:50, Jonathan Perkin a écrit :
Thanks for working on this. There is a small amount of fallout from
these changes, due to some packages expecting that krb5-config accepts
particular arguments.
The failure is:
/usr/bin/krb5-config: Unknown option `gssapi' -- use `--help' for usage
and affects the following packages, ordered by number of dependent
packages broken:
x11/kdelibs3 (147)
security/gsasl (3)
security/py-Kerberos (2)
www/ap-auth-kerb (2)
chat/ctrlproxy (1)
devel/tla (1)
One option here is to generate a small krb5-config wrapper as part of
the builtin.mk which strips out the gssapi argument before passing on
to the real krb5-config. You can see an example of how to do this in
the security/openssl/builtin.mk file where it generates .pc files.
If you get a chance to look at this it would be appreciated,
especially for x11/kdelibs3 which is currently the top broken package
on SunOS.
Thanks,
Hi Jonathan,
Thanks for you feedback. The following is my first attempt and I'd
like any observations please...
I couldn't build kdelibs3, although it seems to get the kerberos parts
okay, the error seems with qt3 (abi=32):
if test "$ret" = 0; then echo '#include "kshortcutdialog_simple.moc"' >>
kshortcutdialog_simple.cpp; else rm -f kshortcutdialog_simple.cpp ; exit $ret ; fi
/usr/bin/bash: line 3: 265026 Segmentation Fault (core dumped)
/opt/local/qt3/bin/uic -nounload -tr tr2i18n -i kshortcutdialog_simple.h
./kshortcutdialog_simple.ui > kshortcutdialog_simple.cpp.temp
Makefile:2628: recipe for target 'kshortcutdialog_simple.cpp' failed
But I seem to be able to build gnome-vfs, gsasl and postgresql93-client
(at least) alright.
For example, the following is my updated psql:
richard@devzone:~/src/pkgsrc/databases/postgresql93$ git diff .
diff --git a/databases/postgresql93/options.mk
b/databases/postgresql93/options.mk
index c83b745..a5d6423 100644
--- a/databases/postgresql93/options.mk
+++ b/databases/postgresql93/options.mk
@@ -29,16 +29,10 @@ CONFIGURE_ARGS+= --with-gssapi
.if !empty(PKG_OPTIONS:Mkerberos)
. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --with-krb5
-
-CHECK_BUILTIN.${KRB5_TYPE}:= yes
-.include "../../security/${KRB5_TYPE}/builtin.mk"
-CHECK_BUILTIN.${KRB5_TYPE}:= no
-
-. if !empty(USE_BUILTIN.${KRB5_TYPE}:M[yY][eE][sS]) && \
- exists(${SH_KRB5_CONFIG})
-CFLAGS_KRB5!= ${SH_KRB5_CONFIG} --cflags
-CPPFLAGS+= ${CFLAGS_KRB5}
-. endif
+. if ${OPSYS} == "SunOS"
+CFLAGS_KRB5!= krb5-config --cflags
+CPPFLAGS+= ${CFLAGS_KRB5}
+. endif
.endif
###
and for gnome-vfs:
richard@devzone:~/src/pkgsrc/sysutils/gnome-vfs$ git diff .
diff --git a/sysutils/gnome-vfs/distinfo b/sysutils/gnome-vfs/distinfo
index c276a58..d56de08 100644
--- a/sysutils/gnome-vfs/distinfo
+++ b/sysutils/gnome-vfs/distinfo
@@ -5,7 +5,7 @@ RMD160 (gnome-vfs-2.24.4.tar.bz2) =
6a5952bea02dfc96782b6f1129fe765f5313a75b
Size (gnome-vfs-2.24.4.tar.bz2) = 1890370 bytes
SHA1 (patch-aa) = a5a3ac6be3e2a888eaaab108807d2aff651e62db
SHA1 (patch-ab) = 6320180870f234a150dfe40f8f990deec7a2a0b5
-SHA1 (patch-ae) = 42f8f07f8729ad1fb88bd9f0032d7450c6d2c8c5
+SHA1 (patch-ae) = ad11b95749b99f4f38eff6a0e73a2e5c2a770692
SHA1 (patch-af) = 6724c4a43d0d9525f5361ba7380c91adbf656e56
SHA1 (patch-ai) = 6afefb35bfe3fc37e84048b95ccc272a01542ec2
SHA1 (patch-am) = 4e037da71db0d3aae236475a0f2ead12738f35f9
diff --git a/sysutils/gnome-vfs/patches/patch-ae
b/sysutils/gnome-vfs/patches/patch-ae
index eb49d9b..beff0af 100644
--- a/sysutils/gnome-vfs/patches/patch-ae
+++ b/sysutils/gnome-vfs/patches/patch-ae
@@ -26,24 +26,6 @@ the gssapi option, and need an explicit -lgss
return 0;
}
_ACEOF
-@@ -15717,9 +15719,14 @@ fi
-
-
- if test "x$KRB5_CONFIG" != "xnone"; then
-- GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
-- GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
--
-+ # make sure krb5-config supports gssapi option
-+ if $KRB5_CONFIG --libs gssapi 2>&1 | grep "Unknown option" > /dev/null
; then
-+ GSSAPI_LIBS="`${KRB5_CONFIG} --libs` -lgss"
-+ GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags`"
-+ else
-+ GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
-+ GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
-+ fi
- saved_CPPFLAGS="$CPPFLAGS"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $GSSAPI_LIBS"
@@ -17533,7 +17540,7 @@ $as_echo "#define HAVE_SAMBA /**/" >>con
msg_samba="yes"
additionally, for scmcvs
richard@devzone:~/src/pkgsrc/devel/scmcvs$ cvs diff
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/scmcvs/options.mk,v
retrieving revision 1.6
diff -u -r1.6 options.mk
--- options.mk 14 Oct 2013 06:51:02 -0000 1.6
+++ options.mk 1 Nov 2013 07:50:47 -0000
@@ -11,6 +11,13 @@
CONFIGURE_ARGS+= --enable-pam
CONFIGURE_ARGS+= --with-gssapi=${KRB5BASE}
CONFIGURE_ARGS+= --with-krb4=${KRB5BASE}
+. if ${OPSYS} == "SunOS"
+CFLAGS_KRB5!= krb5-config --cflags
+. if !empty(CFLAGS_KRB5:M*/usr/include/kerberosv5)
+CPPFLAGS+= ${CFLAGS_KRB5}
+LIBS+= -lgss
+. endif
+. endif
.else
CONFIGURE_ARGS+= --without-gssapi
.endif
(in hindsight, I could probably do similar for postgresql.., as this
example only updates CPPFLAGS if builtin mit-krb5 is used.)
diff --git a/security/mit-krb5/builtin.mk b/security/mit-krb5/builtin.mk
index f51b739..0c7bbb9 100644
--- a/security/mit-krb5/builtin.mk
+++ b/security/mit-krb5/builtin.mk
@@ -80,14 +80,24 @@ MAKEVARS+= USE_BUILTIN.mit-krb5
CHECK_BUILTIN.mit-krb5?= no
.if !empty(CHECK_BUILTIN.mit-krb5:M[nN][oO])
. if !empty(USE_BUILTIN.mit-krb5:M[yY][eE][sS])
-KRB5_CONFIG?= ${SH_KRB5_CONFIG}
-ALL_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
-BUILDLINK_CPPFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --cflags
-BUILDLINK_LDFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --libs
-. if ${OPSYS} == "SunOS"
-BUILDLINK_LDFLAGS.mit-krb5+= -lgss
-. endif
-. endif
+BUILDLINK_TARGETS+= fake-krb5-config
+
+_FAKE_KRB5_CONFIG=${BUILDLINK_DIR}/bin/krb5-config
+fake-krb5-config:
+ ${RUN} \
+ src=../../security/mit-krb5/files/krb5-config-wrapper; \
+ dst=${_FAKE_KRB5_CONFIG}; \
+ if [ ! -f $${dst} ]; then \
+ ${ECHO_BUILDLINK_MSG} "Creating $${dst}"; \
+ ${ECHO} "#!${SH}" > $${dst}; \
+ ${SED} -e s,@KRB5_CONFIG@,${SH_KRB5_CONFIG:Q},\
+ $${src} >> $${dst};\
+ ${CHMOD} +x $${dst}; \
+ fi
+
+KRB5_CONFIG?= ${_FAKE_KRB5_CONFIG}
+ALL_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
+. endif
.endif # CHECK_BUILTIN.mit-krb5
diff --git a/security/mit-krb5/files/krb5-config-wrapper
b/security/mit-krb5/files/krb5-config-wrapper
new file mode 100644
index 0000000..00fcf8d
--- /dev/null
+++ b/security/mit-krb5/files/krb5-config-wrapper
@@ -0,0 +1,17 @@
+#
+# krb5-config-wrapper for builtin krb5-config
+#
+# fake krb5-config supports gssapi option (e.g. solaris)
+KRB5_CONFIG=@KRB5_CONFIG@
+SED=sed
+GREP=grep
+REGSSAPI="^.*gssapi.*$"
+if [[ "$*" =~ $REGSSAPI ]]; then
+ if $KRB5_CONFIG gssapi 2>&1 | $GREP "Unknown option" > /dev/null ; then
+ $KRB5_CONFIG ${*#gssapi} | $SED -e 's/-lkrb5/-lkrb5 -lgss/'
+ else
+ $KRB5_CONFIG "$@"
+ fi
+else
+ $KRB5_CONFIG "$@"
+fi
Home |
Main Index |
Thread Index |
Old Index