Bug#752407: krb5: Allow bootstrapping without LDAP
Control: block -1 by 763766 Hi, On Tue, 8 Jul 2014 00:11:09 +0300 Peter Pentchev r...@ringlet.net wrote: I've also attached a new version of the patch that adds build-time support for the stage1 build profile (no !profile.stage1 yet) that has been rebased onto the new version of the master branch; it is also available from https://gitorious.org/roam-debian-bootstrap/krb5-debian/commits/roam-stage1-build-3 I'll send the full control profile syntax one to the other bug right away. the syntax for the Build-Profiles field was changed during the bootstrap sprint in paris [1,2]. Attached patch is updated to reflect those changes. As the patch requires debhelper to understand the new syntax, this bug is blocked by that bug in debhelper. In contrast to the patch for #752409 (which is marked as block by this bug) this patch does use the new build profile syntax in the Build-Depends field and thus can be applied before Jessie is released. cheers, josch [1] https://wiki.debian.org/Sprints/2014/BootstrapSprint [2] https://wiki.debian.org/BuildProfileSpec diff -Nru krb5-1.13~alpha1+dfsg/debian/changelog krb5-1.13~alpha1+dfsg/debian/changelog --- krb5-1.13~alpha1+dfsg/debian/changelog 2014-09-12 00:02:46.0 +0200 +++ krb5-1.13~alpha1+dfsg/debian/changelog 2014-10-07 11:50:36.0 +0200 @@ -1,3 +1,14 @@ +krb5 (1.13~alpha1+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * While building, check the DEB_BUILD_PROFILES variable for stage1 and, if +found, disable the LDAP functionality and skip the LDAP-related parts of +the build and installation. Add build profile annotations to debian/control. +Based on patch by Peter Pentchev +Closes: #752407 + + -- Johannes Schauer j.scha...@email.de Tue, 07 Oct 2014 11:41:41 +0200 + krb5 (1.13~alpha1+dfsg-1) experimental; urgency=low [ Jelmer Vernooij ] diff -Nru krb5-1.13~alpha1+dfsg/debian/control krb5-1.13~alpha1+dfsg/debian/control --- krb5-1.13~alpha1+dfsg/debian/control 2014-09-12 00:02:46.0 +0200 +++ krb5-1.13~alpha1+dfsg/debian/control 2014-10-07 11:49:59.0 +0200 @@ -1,7 +1,8 @@ Source: krb5 Section: net Priority: standard -Build-Depends: debhelper (= 8.1.3), byacc | bison, +# For stage1 builds, remove the libldap2-dev dependency. +Build-Depends: debhelper (= 9.FIXME), byacc | bison, comerr-dev, docbook-to-man, doxygen, libkeyutils-dev [linux-any], libldap2-dev, libncurses5-dev, libssl-dev, ss-dev, @@ -56,6 +57,7 @@ Package: krb5-kdc-ldap Architecture: any Priority: extra +Build-Profiles: !stage1 Depends: ${misc:Depends}, ${shlibs:Depends}, krb5-kdc (= ${binary:Version}) Description: MIT Kerberos key server (KDC) LDAP plugin Kerberos is a system for authenticating users and services on a network. diff -Nru krb5-1.13~alpha1+dfsg/debian/rules krb5-1.13~alpha1+dfsg/debian/rules --- krb5-1.13~alpha1+dfsg/debian/rules 2014-09-12 00:02:46.0 +0200 +++ krb5-1.13~alpha1+dfsg/debian/rules 2014-10-07 11:41:32.0 +0200 @@ -51,6 +51,16 @@ LIB_PACKAGES = libkrb5-3 libgssapi-krb5-2 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libgssrpc4 \ libkrb5support0 libk5crypto3 libkrad0 +ifneq (,$(filter stage1,$(DEB_BUILD_PROFILES))) +KRB5_SKIP_LDAP=1 +endif + +ifeq (,$(KRB5_SKIP_LDAP)) +CONFIGURE_LDAP=--with-ldap +else +CONFIGURE_LDAP=--without-ldap +endif + # We touch each configure and Autoconf-related file so that we do not attempt # to use Autoconf. The cache is used by the Embdebian project for cross # compiles. @@ -66,7 +76,7 @@ cd build $(FLAGS) ../src/configure \ --prefix=/usr --localstatedir=/etc --mandir=/usr/share/man \ --with-system-et --with-system-ss --disable-rpath \ - --enable-shared --with-ldap --without-tcl \ + --enable-shared $(CONFIGURE_LDAP) --without-tcl \ --with-system-verto \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --sysconfdir=/etc \ @@ -114,11 +124,15 @@ cd build $(MAKE) install DESTDIR=`pwd`/../debian/tmp install -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/krb5 $(CURDIR)/debian/tmp/etc/insserv/overrides +ifeq (,$(KRB5_SKIP_LDAP)) install -m644 debian/krb5-kdc-ldap.insserv-override debian/tmp/etc/insserv/overrides/krb5-kdc - install -m644 $(CURDIR)/debian/README.mech.d $(CURDIR)/debian/libgssapi-krb5-2/etc/gss/mech.d/README mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libkdb_ldap* \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/krb5/ rm -f $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/krb5/libkdb_ldap*.so +else + rm -f $(CURDIR)/debian/tmp/usr/share/man/man8/kdb5_ldap_util.8 +endif + install -m644 $(CURDIR)/debian/README.mech.d $(CURDIR)/debian/libgssapi-krb5-2/etc/gss/mech.d/README mv $(CURDIR)/debian/tmp/usr/bin/krb5-config \ $(CURDIR)/debian/tmp/usr/bin/krb5-config.mit mv $(CURDIR)/debian/tmp/usr/share/man/man1/krb5-config.1 \
Bug#752407: krb5: Allow bootstrapping without LDAP
clone 752407 -1 retitle -1 krb5: Move doxygen to Build-Depends-Indep block 752407 by -1 user bootst...@debian.org usertags -1 bootstrap thanks On Sun, Jul 06, 2014 at 01:37:50PM -0400, Benjamin Kaduk wrote: On Mon, 23 Jun 2014, Peter Pentchev wrote: As part of this year's Bootstrappable Debian Google Summer of Code project I took a look at krb5 to break a circular build dependency as noted in the Feedback Arc Set section of http://bootstrap.debian.net/amd64/ and, more specifically, at http://bootstrap.debian.net/source/krb5.html and the version-specific pages linked from it. There are two primary goals to my work on this GSoC project: With krb5 all of this may be achieved by building without LDAP support in the stage1 build profile and thus dropping the libldap2-dev build dependency. Attached is a patch that implements the first part - it I see also a cycle involving doxygen; this should be easy to remove by postponing the build of krb5-doc until after stage1 is complete. Actually this one is even easier to fix - since krb5-doc is an arch:all package, it will not be built in arch-only builds on the buildds, and it will not be built in a bootstrap build at all; the architecture-independent packages are taken from the Debian archive as-is. Thus, the fact that doxygen is only needed for the build of the arch:all packages means that it may safely be moved to B-D-I. So what do you think about the attached patch that does exactly that - moves doxygen to B-D-I? It's also available at https://gitorious.org/roam-debian-bootstrap/krb5-debian/commits/roam-indep I've also attached a new version of the patch that adds build-time support for the stage1 build profile (no !profile.stage1 yet) that has been rebased onto the new version of the master branch; it is also available from https://gitorious.org/roam-debian-bootstrap/krb5-debian/commits/roam-stage1-build-3 I'll send the full control profile syntax one to the other bug right away. Thanks for looking into this! G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@freebsd.org p.penc...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 From 3c53be54cd828b10f7395a314d597438043a2d79 Mon Sep 17 00:00:00 2001 From: Peter Pentchev r...@ringlet.net Date: Mon, 7 Jul 2014 23:42:23 +0300 Subject: [PATCH] Move doxygen to Build-Depends-Indep. This also removes a build dependency loop as shown on the version-specific pages linked from http://bootstrap.debian.net/source/krb5.html --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index aacaa8e..ec707e0 100644 --- a/debian/control +++ b/debian/control @@ -2,11 +2,11 @@ Source: krb5 Section: net Priority: standard Build-Depends: debhelper (= 8.1.3), byacc | bison, - comerr-dev, docbook-to-man, doxygen, + comerr-dev, docbook-to-man, libkeyutils-dev [linux-any], libldap2-dev, libncurses5-dev, libssl-dev, ss-dev, libverto-dev (= 0.2.4), pkg-config -build-depends-indep: python-cheetah, python-lxml, python-sphinx, doxygen-latex +build-depends-indep: python-cheetah, python-lxml, python-sphinx, doxygen-latex, doxygen Standards-Version: 3.9.5 Maintainer: Sam Hartman hartm...@debian.org Uploaders: Russ Allbery r...@debian.org, Benjamin Kaduk ka...@mit.edu -- 2.0.0 From 851637b01c69383ec9edd2fbd07b8257b728c795 Mon Sep 17 00:00:00 2001 From: Peter Pentchev r...@ringlet.net Date: Mon, 17 Mar 2014 17:12:17 +0200 Subject: [PATCH] A first try at adding stage1 support. In stage 1, remove the libldap2-dev build dependency as outlined in the feedback arc set section of http://bootstrap.debian.net/amd64/ While building, check the DEB_BUILD_PROFILES variable for stage1 and, if found, disable the LDAP functionality and skip the LDAP-related parts of the build and installation. --- debian/control | 1 + debian/rules | 73 -- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/debian/control b/debian/control index ec707e0..4594b71 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,7 @@ Source: krb5 Section: net Priority: standard +# For stage1 builds, remove the libldap2-dev dependency. Build-Depends: debhelper (= 8.1.3), byacc | bison, comerr-dev, docbook-to-man, libkeyutils-dev [linux-any], libldap2-dev, diff --git a/debian/rules b/debian/rules index 80d1092..a15ae9b 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,19 @@ EXCLUDE = -Xtmac.doc -Xexamples/krb5 -Xgnats/mit -Xkrb5-send-pr \ LIB_PACKAGES = libkrb5-3 libgssapi-krb5-2 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-7 libgssrpc4 \ libkrb5support0 libk5crypto3 libkrad0 +ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES))) +DH_EXCLUDE= +else +KRB5_SKIP_LDAP=1 +DH_EXCLUDE=-Nkrb5-kdc-ldap +endif + +ifeq (,$(KRB5_SKIP_LDAP)) +CONFIGURE_LDAP=--with-ldap +else
Bug#752407: krb5: Allow bootstrapping without LDAP
On Mon, 23 Jun 2014, Peter Pentchev wrote: As part of this year's Bootstrappable Debian Google Summer of Code project I took a look at krb5 to break a circular build dependency as noted in the Feedback Arc Set section of http://bootstrap.debian.net/amd64/ and, more specifically, at http://bootstrap.debian.net/source/krb5.html and the version-specific pages linked from it. There are two primary goals to my work on this GSoC project: With krb5 all of this may be achieved by building without LDAP support in the stage1 build profile and thus dropping the libldap2-dev build dependency. Attached is a patch that implements the first part - it I see also a cycle involving doxygen; this should be easy to remove by postponing the build of krb5-doc until after stage1 is complete. -Ben -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#752407: krb5: Allow bootstrapping without LDAP
Source: krb5 Version: 1.12.1+dfsg-3 Severity: wishlist Tags: patch Hi, First of all, thanks for taking care of MIT Kerberos in Debian! As part of this year's Bootstrappable Debian Google Summer of Code project I took a look at krb5 to break a circular build dependency as noted in the Feedback Arc Set section of http://bootstrap.debian.net/amd64/ and, more specifically, at http://bootstrap.debian.net/source/krb5.html and the version-specific pages linked from it. There are two primary goals to my work on this GSoC project: - The first goal is to modify some packages so that they may be built in some limited way (nocheck, binary-only, or build profiles like stage1) without some of their usual build dependencies. In most cases this is caused by one or more dependency loops between binary and source packages, so that a source package requires for its building, directly or indirectly, one of its own binary packages to be already built. The modifications make the source build in a limited fashion (not generating documentation, not running tests, not building some of the binary packages) so that this may happen with only the rest of the build dependencies, so Debian may be bootstrapped on a new architecture starting from a very few cross-built toolchain packages and then moving along, source package by source package. - The second goal, which is actually closely related to the first, is that in the process of modifications, any changes (some files not regenerated, others not built at all) can be made with binary package level granularity. This means that if a binary package is built at all during a limited build, then it must have the same contents as the same binary package resulting from a full build. The point here is to avoid breakage if other packages in the archive depend on some functionality provided by the omitted files; if so, it should be obvious that the functionality is missing, and the clearest way to do that is by omitting a full binary package or, rather, delaying its build until the rest of the build dependencies are present. With krb5 all of this may be achieved by building without LDAP support in the stage1 build profile and thus dropping the libldap2-dev build dependency. Attached is a patch that implements the first part - it checks for stage1 in the DEB_BUILD_PROFILES environment variable and omits the LDAP pieces of the build and the krb5-kdc-ldap binary package. This still means that the build dependency must be removed by hand in such builds; I will file a separate bug that adds build profile annotations to the control file, but it will have to wait until the Debian archive infrastructure actually supports these annotations. The modifications in this patch may be made right now and will already help the bootstrapping effort. If anything should go wrong with the patch, it is available at https://gitorious.org/roam-debian-bootstrap/krb5-debian/commits/roam-stage1-build-2 Thanks again for your work on MIT Kerberos and on Debian in general! G'luck, Peter -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores) Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- Peter Pentchev r...@ringlet.net r...@freebsd.org p.penc...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 From 67ca225a9bfff9a6e970993ea5af678664d1d602 Mon Sep 17 00:00:00 2001 From: Peter Pentchev r...@ringlet.net Date: Mon, 17 Mar 2014 17:12:17 +0200 Subject: [PATCH] A first try at adding stage1 support. In stage 1, remove the libldap2-dev build dependency as outlined in the feedback arc set section of http://bootstrap.debian.net/amd64/ While building, check the DEB_BUILD_PROFILES variable for stage1 and, if found, disable the LDAP functionality and skip the LDAP-related parts of the build and installation. --- debian/control | 1 + debian/rules | 73 -- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/debian/control b/debian/control index aacaa8e..e94b26b 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,7 @@ Source: krb5 Section: net Priority: standard +# For stage1 builds, remove the libldap2-dev dependency. Build-Depends: debhelper (= 8.1.3), byacc | bison, comerr-dev, docbook-to-man, doxygen, libkeyutils-dev [linux-any], libldap2-dev, diff --git a/debian/rules b/debian/rules index ca517fc..49ebb20 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,19 @@ EXCLUDE = -Xtmac.doc -Xexamples/krb5 -Xgnats/mit -Xkrb5-send-pr \ LIB_PACKAGES = libkrb5-3 libgssapi-krb5-2 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-7 libgssrpc4 \ libkrb5support0 libk5crypto3 libkrad0 +ifeq