Hi Daniel,

Sorry for not responding to this in so long.

On Tue, Sep 24, 2013 at 09:31:36AM -0700, Daniel Schepler wrote:
During bootstrapping, I need to break the Build-Depends cycle openldap ->
heimdal-dev -> libldap2-dev.  The attached patch allows this.

Thanks for the patch! Comments below.

(There's also a small part that's not qualified by ifeq ($(DEB_BUILD_PROFILE),stage1) as it seems like a minor bug to me that the build process depends on the previous shlibs file for libldap-2.4-2.)

Reported separately as #742841, fixed in 2.4.40-1.

+ifeq ($(DEB_BUILD_PROFILE),stage1)

In the time since your original message, it looks like this was renamed to DEB_BUILD_PROFILES (plural).

I guess we should also use 'filter' (as in the wiki example), in case multiple profiles (not just 'stage1') are active?

+DH_PACKAGE_EXCLUDES = -Nslapd-smbk5pwd

I don't think this is necessary. The Heimdal support in smbk5pwd is not mandatory; we just have to build it with DO_KRB5 undefined, and suppress linking against the Heimdal libs somehow.

+ifneq ($(DEB_BUILD_PROFILE),stage1)
        $(MAKE) -C contrib/slapd-modules/smbk5pwd
+endif

So maybe:

        $(MAKE) -C contrib/slapd-modules/smbk5pwd DEFS='-DDO_SAMBA -DDO_SHADOW'

HEIMDAL_{INC,LIB} are already empty since krb5-config.heimdal is not available, and the error from missing it is apparently not fatal.

I think we also want a debian/control hunk, right? Is the build-profiles syntax supported for uploading to the archive these days?

What do you think about the attached patch?

thanks,
Ryan
>From 42254c107fe315cdb2dc07c657b669ab1c3d0f96 Mon Sep 17 00:00:00 2001
From: Ryan Tandy <[email protected]>
Date: Tue, 25 Aug 2015 18:16:30 +0000
Subject: [PATCH] Build stage1 profile without Heimdal (#724518)

---
 debian/control | 2 +-
 debian/rules   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 917639f..33215da 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 9),
  libgnutls28-dev, unixodbc-dev, libncurses5-dev, libperl-dev (>= 5.8.0),
  libsasl2-dev, libslp-dev, libltdl-dev | libltdl3-dev (>= 1.4.3),
  libwrap0-dev, perl, po-debconf,
- groff-base, time, heimdal-multidev,
+ groff-base, time, heimdal-multidev <!stage1>,
  dh-autoreconf
 Build-Conflicts: libbind-dev, bind-dev, libicu-dev, autoconf2.13
 Standards-Version: 3.9.6
diff --git a/debian/rules b/debian/rules
index 33a9901..8642875 100755
--- a/debian/rules
+++ b/debian/rules
@@ -87,7 +87,13 @@ override_dh_auto_configure:
 
 override_dh_auto_build:
 	dh_auto_build -- $(MAKEVARS)
+ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
+	# break a dependency loop by dropping Heimdal support
+	$(MAKE) -C contrib/slapd-modules/smbk5pwd DEFS='-DDO_SAMBA -DDO_SHADOW'
+else
+	# build smbk5pwd with all features
 	$(MAKE) -C contrib/slapd-modules/smbk5pwd
+endif
 	$(MAKE) -C contrib/slapd-modules/autogroup
 	$(MAKE) -C contrib/slapd-modules/lastbind
 	$(MAKE) -C contrib/slapd-modules/passwd/sha2
-- 
2.5.0

Reply via email to