Bug#894297: [PATCH] cyrus-sasl2: please add build-profile support
Package: cyrus-sasl2
Version: 2.1.27~101-g0780600+dfsg-3
Severity: wishlist
Tags: patch
X-Debbugs-CC: debian-riscv@lists.debian.org
User: debian-riscv@lists.debian.org
Usertags: riscv64
Hello,
we are in the process of bootstrapping a Debian port for the
riscv64 architecture (https://wiki.debian.org/RISC-V). The
cyrus-sasl2 package is part of the build-dependency chain for the
essential package set, so we need to build it to be able to
complete the bootstrap process.
Cyrus-sasl2 is involved in a circular dependency chain whose
untangling requires building the package in multiple steps with
reduced functionality and reduced build-dependencies. To achieve
that, debian/rules currently supports passing a number of options
(no-sql, no-ldap and no-gssapi) in $(DEB_BUILD_OPTIONS). This
mechanism has the limitation that it requires manually adjusting the
build-dependency list based on the options set and makes it hard to
autobuild the package in a bootstrapping context. The use of
build-profiles (https://wiki.debian.org/BuildProfileSpec) would make
this process quite a bit easier. Attached is a patch that adds
build-profile support to the packge while keeping the original
$(DEB_BUILD_OPTIONS)-based mechanism in place.
The build profile names follow the "extension namespace" conventions
from the build profile specification:
DEB_BUILD_OPTIONS -> build-profile name
-----------------------------------------
no-sql -> pkg.cyrus-sasl2.nosql
no-ldap -> pkg.cyrus-sasl2.noldap
no-gssapi -> pkg.cyrus-sasl2.nogssapi
It would be very helpful for our bootstrapping efforts if you could
upload a version of the cyrus-sasl2 package with this patch applied to
unstable in the near future. For a standard build the patch changes
nothing, so there should be no significant risk in applying it.
JFTR one thing that I have found while testing the patch: the three
options/profiles are in practice not completely independent from each
other. The main purpose of the no-gssapi option is to remove the
dependency on kerberos, but if the package is built with SQL support
(i.e. pkg.cyrus-sasl2.nogssapi is set but pkg.cyrus-sasl2.nosql is
not), libpq5 by default pulls in krb5 nonetheless. The same limitation
applies to the existing mechanism, so this isn't a regression compared
to what we have now. It definitely makes sense to have separate
options/profiles for no-gssapi and no-sql though, as postgresql
supports a stage1 build without krb5 for bootstrapping purposes and in
this case they are really independent from each other.
Regards,
Karsten
--
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
diff -Nur cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig/debian/control cyrus-sasl2-2.1.27~101-g0780600+dfsg/debian/control
--- cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig/debian/control
+++ cyrus-sasl2-2.1.27~101-g0780600+dfsg/debian/control
@@ -11,17 +11,17 @@
autotools-dev,
chrpath,
debhelper (>= 9),
- default-libmysqlclient-dev | libmysqlclient-dev,
+ default-libmysqlclient-dev <!pkg.cyrus-sasl2.nosql> | libmysqlclient-dev <!pkg.cyrus-sasl2.nosql>,
dh-autoreconf,
docbook-to-man,
groff-base,
- heimdal-multidev,
- krb5-multidev,
+ heimdal-multidev <!pkg.cyrus-sasl2.nogssapi>,
+ krb5-multidev <!pkg.cyrus-sasl2.nogssapi>,
libdb-dev,
- libkrb5-dev,
- libldap2-dev,
+ libkrb5-dev <!pkg.cyrus-sasl2.nogssapi>,
+ libldap2-dev <!pkg.cyrus-sasl2.noldap>,
libpam0g-dev,
- libpq-dev,
+ libpq-dev <!pkg.cyrus-sasl2.nosql>,
libsqlite3-dev,
libssl-dev,
po-debconf,
@@ -119,6 +119,7 @@
Depends: libsasl2-modules (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
+Build-Profiles: <!pkg.cyrus-sasl2.noldap>
Description: Cyrus SASL - pluggable authentication modules (LDAP)
This is the Cyrus SASL API implementation, version 2.1. See package
libsasl2-2 and RFC 2222 for more information.
@@ -145,6 +146,7 @@
Depends: libsasl2-modules (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
+Build-Profiles: <!pkg.cyrus-sasl2.nosql>
Description: Cyrus SASL - pluggable authentication modules (SQL)
This is the Cyrus SASL API implementation, version 2.1. See package
libsasl2-2 and RFC 2222 for more information.
@@ -160,6 +162,7 @@
${misc:Depends},
${shlibs:Depends}
Conflicts: libsasl2-modules-gssapi-heimdal
+Build-Profiles: <!pkg.cyrus-sasl2.nogssapi>
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.
@@ -189,6 +192,7 @@
${misc:Depends},
${shlibs:Depends}
Conflicts: libsasl2-modules-gssapi-mit
+Build-Profiles: <!pkg.cyrus-sasl2.nogssapi>
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.
diff -Nur cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig/debian/rules cyrus-sasl2-2.1.27~101-g0780600+dfsg/debian/rules
--- cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig/debian/rules 2016-12-31 14:59:34.000000000 +0000
+++ cyrus-sasl2-2.1.27~101-g0780600+dfsg/debian/rules 2018-03-28 11:38:07.664062976 +0000
@@ -37,7 +37,7 @@
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|')
# SQL support may be turned off during the build, but is on by default.
-ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS))$(findstring pkg.cyrus-sasl2.nosql,$(DEB_BUILD_PROFILES)))
CONFIGURE_SQL=--enable-sql
else
CONFIGURE_SQL=--disable-sql
@@ -45,7 +45,7 @@
endif
# LDAP support may be turned off during the build, but is on by default.
-ifeq (,$(findstring no-ldap,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring no-ldap,$(DEB_BUILD_OPTIONS))$(findstring pkg.cyrus-sasl2.noldap,$(DEB_BUILD_PROFILES)))
CONFIGURE_LDAP=--with-ldap
CONFIGURE_LDAPDB=--enable-ldapdb
else
@@ -55,7 +55,7 @@
endif
# GSSAPI support may be turned off during the build, but is on by default
-ifeq (,$(findstring no-gssapi,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring no-gssapi,$(DEB_BUILD_OPTIONS))$(findstring pkg.cyrus-sasl2.nogssapi,$(DEB_BUILD_PROFILES)))
CONFIGURE_GSSAPI=--enable-gssapi
else
CONFIGURE_GSSAPI=--disable-gssapi
@@ -206,7 +206,7 @@
# Alter the rpath of certain binaries and shared libraries.
chrpath -d debian/tmp/usr/sbin/sasldblistusers2 \
debian/tmp/usr/sbin/saslpasswd2
-ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring no-sql,$(DEB_BUILD_OPTIONS))$(findstring pkg.cyrus-sasl2.nosql,$(DEB_BUILD_PROFILES)))
chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sasl2/libsql.so.*.*.*
endif
Reply to: