[Pkg-cyrus-sasl2-commits] [cyrus-sasl2] 01/03: Reinstate Heimdal Kerberos support (Closes: #849706)
Ondřej Surý
ondrej at debian.org
Sat Dec 31 15:28:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
ondrej pushed a commit to branch master
in repository cyrus-sasl2.
commit f382638d18a1e1e75560076d0cb1482e0b4dc613
Author: Ondřej Surý <ondrej at sury.org>
Date: Sat Dec 31 15:14:20 2016 +0100
Reinstate Heimdal Kerberos support (Closes: #849706)
---
debian/control | 33 ++++++++------
debian/libsasl2-dev.examples | 2 +-
debian/libsasl2-modules-gssapi-heimdal.install | 1 +
...bsasl2-modules-gssapi-heimdal.lintian-overrides | 2 +
debian/rules | 50 ++++++++++++++++------
5 files changed, 61 insertions(+), 27 deletions(-)
diff --git a/debian/control b/debian/control
index 4dc8aca..19c82d0 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Build-Depends: automake (>= 1:1.14),
dh-autoreconf,
docbook-to-man,
groff-base,
+ heimdal-multidev,
krb5-multidev,
libdb-dev,
libkrb5-dev,
@@ -25,6 +26,7 @@ Build-Depends: automake (>= 1:1.14),
libssl-dev,
po-debconf,
quilt
+Build-Conflicts: heimdal-dev
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-cyrus-sasl2/cyrus-sasl2.git
Vcs-Git: git://anonscm.debian.org/pkg-cyrus-sasl2/cyrus-sasl2.git
Homepage: http://www.cyrusimap.org/
@@ -35,7 +37,7 @@ Priority: optional
Architecture: any
Depends: db-util,
libsasl2-2 (>= ${binary:Version}),
- lsb-base (>= 3.0-6),
+ lsb-base (>= 3.0-6),
${misc:Depends},
${shlibs:Depends}
Description: Cyrus SASL - administration programs for SASL users database
@@ -78,8 +80,8 @@ Description: Cyrus SASL - authentication abstraction library
negotiated, a security layer is inserted between the protocol and the
connection. See RFC 2222 for more information.
.
- Any of: ANONYMOUS, CRAM-MD5, DIGEST-MD5, GSSAPI (MIT Kerberos 5),
- NTLM, OTP, PLAIN, or LOGIN can be used.
+ Any of: ANONYMOUS, CRAM-MD5, DIGEST-MD5, GSSAPI (MIT or Heimdal
+ Kerberos 5), NTLM, OTP, PLAIN, or LOGIN can be used.
Package: libsasl2-modules
Priority: optional
@@ -87,7 +89,7 @@ Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${shlibs:Depends}
-Suggests: libsasl2-modules-gssapi-mit,
+Suggests: libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal,
libsasl2-modules-ldap,
libsasl2-modules-otp,
libsasl2-modules-sql
@@ -157,8 +159,7 @@ Multi-Arch: same
Depends: libsasl2-modules (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
-Conflicts: libsasl2-modules-gssapi-heimdal (<< 2.1.26-72-g88d82a3+dfsg-1~)
-Replaces: libsasl2-modules-gssapi-heimdal (<< 2.1.26-72-g88d82a3+dfsg-1~)
+Conflicts: libsasl2-modules-gssapi-heimdal
Description: Cyrus SASL - pluggable authentication modules (GSSAPI)
This is the Cyrus SASL API implementation, version 2.1. See package
libsasl2-2 and RFC 2222 for more information.
@@ -181,12 +182,16 @@ Description: Cyrus SASL - development files for authentication abstraction libra
support. It is needed for development purposes only.
Package: libsasl2-modules-gssapi-heimdal
-Architecture: all
-Section: oldlibs
+Architecture: any
+Multi-Arch: same
Priority: extra
-Depends: libsasl2-modules (>= ${source:Version}),
- libsasl2-modules-gssapi-mit (>= 2.1.26-69-g4c8e3f2+dfsg-1~),
- ${misc:Depends}
-Description: Pluggable Authentication Modules for SASL (transitional)
- The Heimdal Kerberos 5 library has been removed from Debian, so this
- is only the transitional package.
+Depends: libsasl2-modules (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends}
+Conflicts: libsasl2-modules-gssapi-mit
+Description: Pluggable Authentication Modules for SASL (GSSAPI)
+ This is the Cyrus SASL API implementation, version 2.1. See package
+ libsasl2-2 and RFC 2222 for more information.
+ .
+ This package provides the GSSAPI plugin, compiled with the Heimdal
+ Kerberos 5 library.
diff --git a/debian/libsasl2-dev.examples b/debian/libsasl2-dev.examples
index 4cd6ec5..710eb23 100644
--- a/debian/libsasl2-dev.examples
+++ b/debian/libsasl2-dev.examples
@@ -1,3 +1,3 @@
sample/*.c
sample/*.h
-build/config.h
+build-mit/config.h
diff --git a/debian/libsasl2-modules-gssapi-heimdal.install b/debian/libsasl2-modules-gssapi-heimdal.install
new file mode 100644
index 0000000..97255a8
--- /dev/null
+++ b/debian/libsasl2-modules-gssapi-heimdal.install
@@ -0,0 +1 @@
+usr/lib/*/sasl2/libgssapiv2.so*
diff --git a/debian/libsasl2-modules-gssapi-heimdal.lintian-overrides b/debian/libsasl2-modules-gssapi-heimdal.lintian-overrides
new file mode 100644
index 0000000..63dc3fc
--- /dev/null
+++ b/debian/libsasl2-modules-gssapi-heimdal.lintian-overrides
@@ -0,0 +1,2 @@
+# We do not link the GPL code we ship with openssl; it's a separate utility
+libsasl2-modules-gssapi-heimdal binary: possible-gpl-code-linked-with-openssl
diff --git a/debian/rules b/debian/rules
index 6b15b1d..3738ddc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,6 +24,15 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,defs
+
# Save Berkeley DB used for building the package
BDB_VERSION ?= $(shell LC_ALL=C dpkg-query -l 'libdb[45].[0-9]-dev' | grep ^ii | sed -e 's|.*\s\libdb\([45]\.[0-9]\)-dev\s.*|\1|')
@@ -50,7 +59,8 @@ ifeq (,$(findstring no-gssapi,$(DEB_BUILD_OPTIONS)))
CONFIGURE_GSSAPI=--enable-gssapi
else
CONFIGURE_GSSAPI=--disable-gssapi
- DH_PACKAGE_EXCLUDES += -Nlibsasl2-modules-gssapi-mit
+ DH_PACKAGE_EXCLUDES += -Nlibsasl2-modules-gssapi-mit \
+ -Nlibsasl2-modules-gssapi-heimdal
endif
CONFIGURE_COMMON_OPTIONS= \
@@ -90,6 +100,14 @@ CONFIGURE_COMMON_OPTIONS= \
--sysconfdir=/etc \
--with-devrandom=/dev/urandom
+# Some convenience variables
+export TMPBUILD_MIT := $(CURDIR)/build-mit
+export TMPBUILD_HEIMDAL := $(CURDIR)/build-heimdal
+export MIT_LDFLAGS := $(shell krb5-config.mit --libs gssapi | sed -e 's/ -l.*//')
+export MIT_CPPFLAGS := $(shell krb5-config.mit --cflags gssapi)
+export HEIMDAL_LDFLAGS := $(shell krb5-config.heimdal --libs gssapi | sed -e 's/ -l.*//')
+export HEIMDAL_CPPFLAGS := $(shell krb5-config.heimdal --cflags gssapi)
+
AUTOFILES=acinclude.m4 aclocal.m4 config/config.sub config/config.guess \
config/ltmain.sh config/libtool.m4
@@ -101,7 +119,8 @@ TMPBUILD=$(CURDIR)/build
dh $@ --with=quilt --with=autotools_dev --with=autoreconf $(DH_PACKAGE_EXCLUDES)
override_dh_auto_clean:
- dh_auto_clean -B$(TMPBUILD)
+ dh_auto_clean -B$(TMPBUILD_MIT)
+ dh_auto_clean -B$(TMPBUILD_HEIMDAL)
rm -f $(CURDIR)/sample/sample-client \
$(CURDIR)/sample/sample-server
@@ -118,26 +137,32 @@ override_dh_auto_clean:
# Remove generated man pages
-rm -f sasl-sample-client.8 sasl-sample-server.8 gen-auth.1
- -rm -r $(TMPBUILD)
+ # Remove build directories
+ rm -rf $(TMPBUILD_MIT) $(TMPBUILD_HEIMDAL)
override_dh_auto_configure:
- LDFLAGS="$(LDFLAGS) -L/usr/lib/mit-krb5 -Wl,-z,defs" \
- CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I/usr/include/mit-krb5" \
- dh_auto_configure -B$(TMPBUILD) -- $(CONFIGURE_COMMON_OPTIONS) --with-gss_impl=mit
+ LDFLAGS="$(LDFLAGS) $(HEIMDAL_LDFLAGS)" \
+ CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) $(HEIMDAL_CPPFLAGS)" \
+ dh_auto_configure -B$(TMPBUILD_HEIMDAL) -- $(CONFIGURE_COMMON_OPTIONS) --with-gss_impl=heimdal
+
+ LDFLAGS="$(LDFLAGS) $(MIT_LDFLAGS)" \
+ CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) $(MIT_CPPFLAGS)" \
+ dh_auto_configure -B$(TMPBUILD_MIT) -- $(CONFIGURE_COMMON_OPTIONS) --with-gss_impl=mit
# Record the build-time settings for later reference
echo 'To build this package, configure was called as follows:' \
> debian/README.configure-options
- grep with\ options config.status | sed -e \
+ grep with\ options $(TMPBUILD_MIT)/config.status | sed -e \
's/^.*options \\"/configure /;s/\\"$///' \
>> debian/README.configure-options
override_dh_auto_build:
- dh_auto_build -B$(TMPBUILD) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
+ dh_auto_build -B$(TMPBUILD_HEIMDAL) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
+ dh_auto_build -B$(TMPBUILD_MIT) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
# Build sample-{client,server}
- $(MAKE) -f $(CURDIR)/debian/sample/Makefile -C $(CURDIR)/sample T=$(TMPBUILD)
+ $(MAKE) -f $(CURDIR)/debian/sample/Makefile -C $(CURDIR)/sample T=$(TMPBUILD_MIT)
# Build the sasl-sample-client and sasl-sample-server man pages.
/usr/bin/docbook-to-man debian/sasl-sample-client.sgml \
@@ -148,7 +173,8 @@ override_dh_auto_build:
/usr/bin/pod2man --stderr debian/gen-auth/gen-auth >gen-auth.1
override_dh_auto_install:
- dh_auto_install -B$(TMPBUILD) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
+ dh_auto_install -B$(TMPBUILD_HEIMDAL) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
+ dh_auto_install -B$(TMPBUILD_MIT) -- sasldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2
# Remove static plugins - they are useless
rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/*.a
@@ -214,5 +240,5 @@ override_dh_makeshlibs:
dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2 $(DH_PACKAGE_EXCLUDES)
override_dh_auto_test:
- cd $(TMPBUILD)/saslauthd && $(MAKE) testsaslauthd
- cd $(TMPBUILD)/utils && $(MAKE) testsuite
+ cd $(TMPBUILD_MIT)/saslauthd && $(MAKE) testsaslauthd
+ cd $(TMPBUILD_MIT)/utils && $(MAKE) testsuite
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cyrus-sasl2/cyrus-sasl2.git
More information about the Pkg-cyrus-sasl2-commits
mailing list