Source: m2crypto Version: 0.46.2-3 Tags: patch User: [email protected] Usertags: cross-satisfiability
m2crypto cannot be cross built from source, because its sphinx dependencies are not satisfiable. Fortunately, there already is an arch:all documentation package, so skipping sphinx during arch-only builds (such as cross builds) solves this problem. The implementation is slightly tricky due to the use of PYBUILD_AFTER_BUILD. This variable needs to become conditional and the interpolation needs to happen in the nested makefile call inside the override. Otherwise dh_listpackages lists all packages. I'm attaching a patch for your convenience. Do you see a better solution? I attempted verifying it using reproducible builds and that seems to work out except that the documentation itself is not reproducible. Helmut
diff -Nru m2crypto-0.46.2/debian/changelog m2crypto-0.46.2/debian/changelog --- m2crypto-0.46.2/debian/changelog 2026-02-14 23:28:14.000000000 +0100 +++ m2crypto-0.46.2/debian/changelog 2026-02-23 11:18:20.000000000 +0100 @@ -1,3 +1,10 @@ +m2crypto (0.46.2-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Skip documentation build in arch-only build. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 23 Feb 2026 11:18:20 +0100 + m2crypto (0.46.2-3) unstable; urgency=medium * Team upload diff -Nru m2crypto-0.46.2/debian/control m2crypto-0.46.2/debian/control --- m2crypto-0.46.2/debian/control 2026-02-14 23:10:59.000000000 +0100 +++ m2crypto-0.46.2/debian/control 2026-02-23 11:18:18.000000000 +0100 @@ -6,16 +6,17 @@ debhelper-compat (= 13), dh-sequence-python3, libssl-dev, - links <!nodoc>, openssl <!nocheck>, python3-all-dev, - python3-docutils <!nodoc>, python3-parameterized <!nocheck>, python3-pytest <!nocheck>, python3-setuptools, + swig (>= 1.3.40), +Build-Depends-Indep: + links <!nodoc>, + python3-docutils <!nodoc>, python3-sphinx <!nodoc>, python3-sphinx-rtd-theme <!nodoc>, - swig (>= 1.3.40), Standards-Version: 4.7.3 Homepage: https://sr.ht/~mcepl/m2crypto/ Vcs-Git: https://salsa.debian.org/python-team/packages/m2crypto.git diff -Nru m2crypto-0.46.2/debian/rules m2crypto-0.46.2/debian/rules --- m2crypto-0.46.2/debian/rules 2026-02-14 23:10:59.000000000 +0100 +++ m2crypto-0.46.2/debian/rules 2026-02-23 11:18:20.000000000 +0100 @@ -4,7 +4,6 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all export PYBUILD_TEST_ARGS=--ignore tests/test_ssl.py -export PYBUILD_AFTER_BUILD=PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' python3 -m sphinx -N doc html export OPENSSL_CONF=$(CURDIR)/debian/openssl.cnf @@ -15,7 +14,15 @@ %: dh $@ --buildsystem=pybuild -override_dh_installdocs: +override_dh_auto_build: +ifneq (,$(filter python-m2crypto-doc,$(shell dh_listpackages))) + PYBUILD_AFTER_BUILD='PYTHONPATH={build_dir} http_proxy="127.0.0.1:9" python3 -m sphinx -N doc html' \ + dh_auto_build +else + dh_auto_build +endif + +override_dh_installdocs-indep: rst2html -r 5 README.rst .pybuild/README.html LC_LANG=C.UTF-8 links -dump .pybuild/README.html > .pybuild/README dh_installdocs -A .pybuild/README

