Source: liblognorm
Version: 2.0.5-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: cross-satisfiability

liblognorm fails to satisfy its cross build dependencies, because its
dependency on python-sphinx is unsatisfiable. Fixing this seems
non-trivial, but there is a different solution: Move it to
Build-Depends-Indep. This is only possible if the documentation is moved
to an Architecture: all package. The attached patch demonstrates that.

I think splitting a liblognorm-doc package is a useful trade-off:
 * It makes liblognorm cross buildable.
 * The size of the documentation dominates the size of the -dev package.
   Yet for building something against liblognorm, the documentation is
   not required. For many common scenarios, we'll get a smaller
   installation set (both in terms of package count and size).
 * Marking liblognorm-dev Multi-Arch: same will become easier as we
   don't have to worry about reproducible documentation.

If you concur with this, please split out liblognorm-doc.

Helmut
diff --minimal -Nru liblognorm-2.0.5/debian/changelog 
liblognorm-2.0.5/debian/changelog
--- liblognorm-2.0.5/debian/changelog   2018-04-29 11:52:22.000000000 +0200
+++ liblognorm-2.0.5/debian/changelog   2019-06-16 11:36:24.000000000 +0200
@@ -1,3 +1,10 @@
+liblognorm (2.0.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Split out liblognorm-doc package. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 16 Jun 2019 11:36:24 +0200
+
 liblognorm (2.0.5-1) unstable; urgency=medium
 
   * New upstream version 2.0.5
diff --minimal -Nru liblognorm-2.0.5/debian/control 
liblognorm-2.0.5/debian/control
--- liblognorm-2.0.5/debian/control     2018-04-29 11:49:30.000000000 +0200
+++ liblognorm-2.0.5/debian/control     2019-06-16 11:36:24.000000000 +0200
@@ -8,6 +8,7 @@
     libxml2-dev,
     libestr-dev,
     libfastjson-dev,
+Build-Depends-Indep:
     python-sphinx (>= 1.0.7+dfsg) | python3-sphinx
 Standards-Version: 3.9.8
 Section: libs
@@ -20,9 +21,9 @@
 Architecture: any
 Depends: liblognorm5 (= ${binary:Version}),
     ${misc:Depends},
-    ${sphinxdoc:Depends},
     libfastjson-dev,
     libestr-dev
+Recommends: liblognorm-doc
 Description: log normalizing library - development files
  Liblognorm is an event and log normalization library that is capable of
  real-time processing. It provides the capability to normalize events to
@@ -30,6 +31,20 @@
  .
  This package contains the development files.
 
+Package: liblognorm-doc
+Section: doc
+Architecture: all
+Multi-Arch: foreign
+Depends:
+    ${misc:Depends},
+    ${sphinxdoc:Depends},
+Description: log normalizing library - developer documentation
+ Liblognorm is an event and log normalization library that is capable of
+ real-time processing. It provides the capability to normalize events to
+ a set of standard formats.
+ .
+ This package contains the development documentation.
+
 Package: liblognorm5
 Section: libs
 Architecture: any
diff --minimal -Nru liblognorm-2.0.5/debian/liblognorm-dev.docs 
liblognorm-2.0.5/debian/liblognorm-dev.docs
--- liblognorm-2.0.5/debian/liblognorm-dev.docs 2015-03-25 18:03:51.000000000 
+0100
+++ liblognorm-2.0.5/debian/liblognorm-dev.docs 1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
-doc/_build/html
diff --minimal -Nru liblognorm-2.0.5/debian/liblognorm-doc.docs 
liblognorm-2.0.5/debian/liblognorm-doc.docs
--- liblognorm-2.0.5/debian/liblognorm-doc.docs 1970-01-01 01:00:00.000000000 
+0100
+++ liblognorm-2.0.5/debian/liblognorm-doc.docs 2015-03-25 18:03:51.000000000 
+0100
@@ -0,0 +1 @@
+doc/_build/html
diff --minimal -Nru liblognorm-2.0.5/debian/rules liblognorm-2.0.5/debian/rules
--- liblognorm-2.0.5/debian/rules       2016-08-09 09:07:24.000000000 +0200
+++ liblognorm-2.0.5/debian/rules       2019-06-16 11:36:24.000000000 +0200
@@ -9,10 +9,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DOPACKAGES = $(shell dh_listpackages)
+
 export DEB_BUILD_HARDENING=1
 
 override_dh_auto_configure:
-       dh_auto_configure -- --enable-docs --enable-compile-warnings=yes
+       dh_auto_configure -- --$(if $(filter 
liblognorm-doc,$(DOPACKAGES)),en,dis)able-docs --enable-compile-warnings=yes
 
 override_dh_auto_build:
        [ -d "doc/_static" ] || mkdir "doc/_static"; \
@@ -23,4 +25,5 @@
        dh_compress -X.rst -X.js -X.html -X.txt
 
 %:
-       dh $@ --with=autoreconf,sphinxdoc
+       dh $@ --with=autoreconf $(DH_ADDONS)
+build binary %-indep: DH_ADDONS=--with=sphinxdoc

Reply via email to