mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] krb5: add MIT Kerberos package
@ 2017-11-10 13:52 Jan Luebbe
  0 siblings, 0 replies; only message in thread
From: Jan Luebbe @ 2017-11-10 13:52 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   |  38 +++++++++++++++++
 rules/krb5.make | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 167 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..2af9d2e0e3ad
--- /dev/null
+++ b/rules/krb5.in
@@ -0,0 +1,38 @@
+## SECTION=security
+
+menuconfig KRB5
+	tristate
+	select HOST_E2FSPROGS
+	select E2FSPROGS
+	select E2FSPROGS_LIBCOM_ERR
+	select E2FSPROGS_LIBSS
+	select OPENSSL
+	select LIBEDIT
+	select KEYUTILS if KRB5_CLIENT_TOOLS
+	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..a47907e39022
--- /dev/null
+++ b/rules/krb5.make
@@ -0,0 +1,129 @@
+# -*-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
+# ----------------------------------------------------------------------------
+
+# keyutils is only useful for the client case
+
+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 \
+	ac_cv_header_keyutils_h=$(call ptx/ifdef, PTXCONF_KRB5_CLIENT_TOOLS, yes, 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] only message in thread

only message in thread, other threads:[~2017-11-10 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 13:52 [ptxdist] [PATCH v2] krb5: add MIT Kerberos package Jan Luebbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox