* [ptxdist] [PATCH 2/2] krb5: add MIT Kerberos package
2017-11-06 14:05 [ptxdist] [PATCH 1/2] e2fsprogs: install headers and host tools Jan Luebbe
@ 2017-11-06 14:05 ` Jan Luebbe
0 siblings, 0 replies; 2+ messages in thread
From: Jan Luebbe @ 2017-11-06 14:05 UTC (permalink / raw)
To: ptxdist; +Cc: Jan Luebbe
This adds a package for the krb5 Kerberos implementation. The tools and
admin libraries (which are not required for servers) are only installed
when requested.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
rules/krb5.in | 37 +++++++++++++++++
rules/krb5.make | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 163 insertions(+)
create mode 100644 rules/krb5.in
create mode 100644 rules/krb5.make
diff --git a/rules/krb5.in b/rules/krb5.in
new file mode 100644
index 000000000000..c07edcbd0f35
--- /dev/null
+++ b/rules/krb5.in
@@ -0,0 +1,37 @@
+## SECTION=security
+
+menuconfig KRB5
+ tristate
+ select HOST_E2FSPROGS
+ select E2FSPROGS
+ select E2FSPROGS_LIBCOM_ERR
+ select E2FSPROGS_LIBSS
+ select OPENSSL
+ select LIBEDIT
+ prompt "Kerberos"
+ help
+ This is the MIT implementation of the Kerberos network authentication
+ protocol.
+
+if KRB5
+
+config KRB5_ADMIN_LIBS
+ bool
+ prompt "enable admin libraries (libkadm5clnt & libkadm5srv)"
+
+config KRB5_CLIENT_TOOLS
+ bool
+ prompt "enable client tools"
+
+config KRB5_ADMIN_TOOLS
+ bool
+ select KRB5_ADMIN_LIBS
+ prompt "enable admin tools (kinit & kadmin)"
+
+config KRB5_EXAMPLES
+ bool
+ prompt "enable example tools"
+ help
+ This installs gss-client, gss-server, sclient and sserver.
+
+endif
diff --git a/rules/krb5.make b/rules/krb5.make
new file mode 100644
index 000000000000..c9dabfb087bc
--- /dev/null
+++ b/rules/krb5.make
@@ -0,0 +1,126 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Jan Luebbe <jlu@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_KRB5) += krb5
+
+#
+# Paths and names
+#
+KRB5_VERSION := 1.15.2
+KRB5_MD5 := b160f72161c730897dc7689f876b6e2a
+KRB5 := krb5-$(KRB5_VERSION)
+KRB5_SUFFIX := tar.gz
+KRB5_URL := https://web.mit.edu/kerberos/dist/krb5/1.15/$(KRB5).$(KRB5_SUFFIX)
+KRB5_SOURCE := $(SRCDIR)/$(KRB5).$(KRB5_SUFFIX)
+KRB5_DIR := $(BUILDDIR)/$(KRB5)
+KRB5_LICENSE := MIT
+
+KRB5_SUBDIR := src
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+KRB5_PATH := PATH=$(CROSS_PATH)
+KRB5_CONF_ENV := \
+ $(CROSS_ENV) \
+ krb5_cv_attr_constructor_destructor=yes,yes \
+ ac_cv_func_regcomp=yes \
+ ac_cv_printf_positional=yes \
+ ac_cv_file__etc_environment=yes \
+ ac_cv_file__etc_TIMEZONE=no
+
+#
+# autoconf
+#
+KRB5_CONF_TOOL := autoconf
+KRB5_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-dns-for-realm \
+ --enable-delayed-initialization \
+ --enable-thread-support \
+ --disable-rpath \
+ --disable-athena \
+ --disable-audit-plugin \
+ --enable-kdc-lookaside-cache \
+ --disable-asan \
+ --enable-pkinit \
+ --without-size-optimizations \
+ --with-system-et \
+ --with-system-ss \
+ --without-system-db \
+ --without-netlib \
+ --without-hesiod \
+ --without-ldap \
+ --without-tcl \
+ --without-vague-errors \
+ --with-crypto-impl=openssl \
+ --with-prng-alg=fortuna \
+ --with-pkinit-crypto-impl=openssl \
+ --with-tls-impl=openssl \
+ --with-libedit \
+ --without-readline \
+ --without-system-verto
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/krb5.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, krb5)
+ @$(call install_fixup, krb5,PRIORITY,optional)
+ @$(call install_fixup, krb5,SECTION,base)
+ @$(call install_fixup, krb5,AUTHOR,"Jan Luebbe <jlu@pengutronix.de>")
+ @$(call install_fixup, krb5,DESCRIPTION,missing)
+
+ @$(call install_lib, krb5, 0, 0, 0644, libgssapi_krb5)
+ @$(call install_lib, krb5, 0, 0, 0644, libgssrpc)
+ @$(call install_lib, krb5, 0, 0, 0644, libk5crypto)
+ @$(call install_lib, krb5, 0, 0, 0644, libkdb5)
+ @$(call install_lib, krb5, 0, 0, 0644, libkrb5)
+ @$(call install_lib, krb5, 0, 0, 0644, libkrb5support)
+
+ifdef PTXCONF_KRB5_ADMIN_LIBS
+ @$(call install_lib, krb5, 0, 0, 0644, libkadm5clnt_mit)
+ @$(call install_lib, krb5, 0, 0, 0644, libkadm5srv_mit)
+endif
+
+ifdef PTXCONF_KRB5_CLIENT_TOOLS
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kdestroy)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/klist)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kpasswd)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kswitch)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/ksu)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/ktutil)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kvno)
+endif
+
+ifdef PTXCONF_KRB5_ADMIN_TOOLS
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kadmin)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kinit)
+endif
+
+ifdef PTXCONF_KRB5_EXAMPLES
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/gss-client)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/sclient)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/sbin/gss-server)
+ @$(call install_copy, krb5, 0, 0, 0755, -, /usr/sbin/sserver)
+endif
+
+ @$(call install_finish, krb5)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread