[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787044: libdebian-installer: please make new Build-Depends: check optional via build profiles



On Thu, May 28, 2015 at 07:05:52AM +0200, Helmut Grohne wrote:
> You may be aware that libdebian-installer is considered transitively
> build-essential. In practise, this means that it needs to be cross
> buildable. The most recent upload of version 0.100 added a new build
> dependency on check. The usage of check can already be disabled by
> setting DEB_BUILD_OPTIONS=nocheck, which helps with cross building.
> However it still requires check to be installed and thus cross built.
> This can be avoided by marking the dependency as optional by adding a
> "<!nocheck>" build profile[1] to it. The nocheck profile is meant to
> complement DEB_BUILD_OPTIONS=nocheck on the dependency level.

The check package recently introduced a cycle with subunit and lots of
stuff, so the <!nocheck> profile has become inevitable for
libdebian-installer. Furthermore, my original patch no longer works as
configure now checks for check. This seems to be a regression introduced
in version 0.101.

So I am updating the patch to make DEB_BUILD_OPTIONS=nocheck not require
the check package to be present.

If you are still uneasy about introducing the <!nocheck> profile into
your Build-Depends, please apply the remaining changes in your next
upload anyway. Note that all buildds are running jessie since DC15 and
thus support build profiles.

Helmut
diff -Nru libdebian-installer-0.101/Makefile.am libdebian-installer-0.101+nmu1/Makefile.am
--- libdebian-installer-0.101/Makefile.am
+++ libdebian-installer-0.101+nmu1/Makefile.am
@@ -1,6 +1,9 @@
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = doc include src test
+SUBDIRS = doc include src
+if ENABLE_CHECK
+SUBDIRS += test
+endif
 
 pkgconfigdir = ${libdir}/pkgconfig
 pkgconfig_DATA = \
diff -Nru libdebian-installer-0.101/configure.ac libdebian-installer-0.101+nmu1/configure.ac
--- libdebian-installer-0.101/configure.ac
+++ libdebian-installer-0.101+nmu1/configure.ac
@@ -7,9 +7,14 @@
 
 AC_CHECK_FUNCS(memrchr)
 
+AC_ARG_ENABLE([check],AS_HELP_STRING([--disable-check],[Disable running the test suite]))
+
 AC_CHECK_PROGS(DOXYGEN, doxygen, true)
 
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
+AS_IF([test "x$enable_check" != xno],[
+	PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
+])
+AM_CONDITIONAL([ENABLE_CHECK],[test "x$enable_check" != xno])
 
 LIBRARY_VERSION_MAJOR=4
 LIBRARY_VERSION_MINOR=0
diff -Nru libdebian-installer-0.101/debian/changelog libdebian-installer-0.101+nmu1/debian/changelog
--- libdebian-installer-0.101/debian/changelog
+++ libdebian-installer-0.101+nmu1/debian/changelog
@@ -1,3 +1,10 @@
+libdebian-installer (0.101+nmu1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Make Build-Depends: check optional via <!nocheck> profile.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Mon, 24 Aug 2015 19:20:35 +0200
+
 libdebian-installer (0.101) unstable; urgency=medium
 
   [ Martin Michlmayr ]
diff -Nru libdebian-installer-0.101/debian/control libdebian-installer-0.101+nmu1/debian/control
--- libdebian-installer-0.101/debian/control
+++ libdebian-installer-0.101+nmu1/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
 Uploaders: Bastian Blank <waldi@debian.org>, Colin Watson <cjwatson@debian.org>, Christian Perrier <bubulle@debian.org>, Steve McIntyre <93sam@debian.org>
-Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 9), dh-autoreconf, doxygen, pkg-config, check
+Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 9), dh-autoreconf, doxygen, pkg-config, check <!nocheck>
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=d-i/libdebian-installer.git
 Vcs-Git: git://anonscm.debian.org/d-i/libdebian-installer.git
diff -Nru libdebian-installer-0.101/debian/rules libdebian-installer-0.101+nmu1/debian/rules
--- libdebian-installer-0.101/debian/rules
+++ libdebian-installer-0.101+nmu1/debian/rules
@@ -16,6 +16,11 @@
 
 export CFLAGS
 
+ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+override_dh_auto_configure:
+	dh_auto_configure -- --disable-check
+endif
+
 override_dh_auto_build:
 	dh_auto_build
 	$(MAKE) -C build/doc doc

Reply to: