Hello Helmut! On Tue, Aug 05, 2014 at 08:43:07PM +0200, Helmut Grohne wrote: > The experimental version of util-linux introduces new B-Ds. Notable are > libpam0g-dev and libsystemd-daemon-dev. [...] > Making build dependencies droppable is facilitated by using build > profiles (https://wiki.debian.org/BuildProfileSpec). Ideally, util-linux > would support a build mode that does not require systemd packages (and > pam) and only builds the library parts. It builds fewer binary packages, > but those packages it builds should be equal in functionality to the > existing packages. Building more than just the libraries is also ok as > long as the packages built do not differ in functionality. [...]
I guess something along the lines of the attached patch should be a start. It builds when using "dpkg-buildpackage -Pstage1" but please verify it actually solves the bootstrapping problems, see if there's a need for a cross profile and possibly see if there's anything that can be simplified and/or improved.... (An improvement suggestion for debhelper would be to teach dh_installman to skip installing manpages for packages skipped by the build profile.) Regards, Andreas Henriksson
diff --git a/debian/control b/debian/control index 555b53c..4607142 100644 --- a/debian/control +++ b/debian/control @@ -8,16 +8,16 @@ Build-Depends: autoconf, dpkg-dev (>=1.16.0), gettext, libncurses5-dev, - libpam0g-dev, + libpam0g-dev <!profile.stage1>, libselinux1-dev [linux-any], libslang2-dev (>=2.0.4), - libsystemd-daemon-dev [linux-any], - libsystemd-journal-dev [linux-any], + libsystemd-daemon-dev [linux-any] <!profile.stage1>, + libsystemd-journal-dev [linux-any] <!profile.stage1>, libtool, lsb-release, pkg-config, po-debconf, - systemd [linux-any], + systemd [linux-any] <!profile.stage1>, zlib1g-dev Section: base Priority: required @@ -32,6 +32,7 @@ Vcs-Git: git://git.debian.org/git/collab-maint/pkg-util-linux.git Package: util-linux Architecture: any +Build-Profiles: !stage1 Section: utils Essential: yes Pre-Depends: ${misc:Pre-Depends}, ${shlibs:Depends} @@ -48,6 +49,7 @@ Description: Miscellaneous system utilities Package: util-linux-locales Architecture: all +Build-Profiles: !stage1 Section: localization Priority: optional Depends: util-linux (>= ${source:Upstream-Version}), ${misc:Depends} @@ -61,6 +63,7 @@ Description: Locales files for util-linux Package: mount Architecture: linux-any +Build-Profiles: !stage1 Essential: yes Section: admin Pre-Depends: ${misc:Pre-Depends}, ${shlibs:Depends} @@ -73,6 +76,7 @@ Description: Tools for mounting and manipulating filesystems Package: bsdutils Architecture: any +Build-Profiles: !stage1 Essential: yes Section: utils Pre-Depends: ${misc:Pre-Depends}, ${shlibs:Depends} @@ -86,6 +90,7 @@ Description: basic utilities from 4.4BSD-Lite Package: fdisk-udeb Architecture: hurd-any linux-any +Build-Profiles: !stage1 Priority: extra Section: debian-installer Depends: ${misc:Depends}, ${shlibs:Depends} @@ -95,6 +100,7 @@ Description: Manually partition a hard drive (fdisk) Package: cfdisk-udeb Architecture: hurd-any linux-any +Build-Profiles: !stage1 Priority: extra Section: debian-installer Depends: ${misc:Depends}, ${shlibs:Depends} @@ -224,6 +230,7 @@ Description: Universally Unique ID library Package: uuid-runtime Architecture: any +Build-Profiles: !stage1 Section: libs Priority: optional Pre-Depends: libuuid1 (>= 2.25-5~), ${misc:Pre-Depends} @@ -275,6 +282,7 @@ Description: universally unique id library - headers and static libraries Package: util-linux-udeb Architecture: any +Build-Profiles: !stage1 Priority: optional Section: debian-installer Depends: ${misc:Depends}, ${shlibs:Depends} diff --git a/debian/rules b/debian/rules index 851b784..161d8dd 100755 --- a/debian/rules +++ b/debian/rules @@ -12,8 +12,12 @@ ifeq ($(DEB_HOST_ARCH_OS),linux) CONFOPTS += --enable-raw CONFOPTS += --with-selinux CONFOPTS += --enable-partx -CONFOPTS += --with-systemd CONFOPTS += --enable-tunelp +ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) + CONFOPTS += --without-systemd +else + CONFOPTS += --with-systemd +endif else CONFOPTS += --disable-pivot_root endif @@ -153,6 +157,7 @@ endif rm -rf debian/*-udeb/usr/share/doc override_dh_installman: +ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),) cat debian/util-linux.manpages debian/util-linux.manpages.linux-only > debian/util-linux.manpages.linux ifeq ($(DEB_HOST_ARCH),sparc) sed -i '/sfdisk/d' debian/*.manpages @@ -183,6 +188,7 @@ endif ifneq ($(DEB_HOST_ARCH_OS),linux) cd debian/util-linux/usr/share/man/man8 && mv mkswap.8 mkswap.linux.8 endif +endif override_dh_gencontrol: dh_gencontrol --package=bsdutils -- -v1:$(DEB_VERSION_UPSTREAM_REVISION)