--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: schroot FTCBFS: multiple reasons
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Sun, 23 Sep 2018 20:41:28 +0200
- Message-id: <20180923184127.GA20204@alf.mars>
Source: schroot
Version: 1.6.10-5
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
schroot fails to cross build from source. The immediate reason is that
it configures for the build architecture and thus fails finding
dependencies that are only requested for the host architecture. Using
dh_auto_configure fixes that.
Then it fails configuring, because it uses check_cxx_source_runs and
that doesn't work at all for cross compilation. The check for cppunit
can be converted to check_cxx_source_compiles without loss in precision.
The regex check looses precision, but on Debian std::regex works
sufficiently well for all architectures, so assuming that it works
during cross compilation seems like a reasonable assumption and native
builds continue to use the thorough check.
Finally it runs tests despite DEB_BUILD_OPTIONS=nocheck. Tests fail.
Properly checking the nocheck option fixes that.
After all of these, schroot cross builds successfully. Please consider
applying the attached patch.
Helmut
diff --minimal -Nru schroot-1.6.10/debian/changelog schroot-1.6.10/debian/changelog
--- schroot-1.6.10/debian/changelog 2018-06-06 11:29:14.000000000 +0200
+++ schroot-1.6.10/debian/changelog 2018-09-23 13:50:19.000000000 +0200
@@ -1,3 +1,13 @@
+schroot (1.6.10-5.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Let dh_auto_configure pass cross flags to cmake.
+ + cross.patch: Avoid check_cxx_source_runs.
+ + Support DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 23 Sep 2018 13:50:19 +0200
+
schroot (1.6.10-5) unstable; urgency=medium
* Orphan packages, this fixes the bouncing maintainer email. Closes: #899851
diff --minimal -Nru schroot-1.6.10/debian/patches/cross.patch schroot-1.6.10/debian/patches/cross.patch
--- schroot-1.6.10/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ schroot-1.6.10/debian/patches/cross.patch 2018-09-23 13:50:19.000000000 +0200
@@ -0,0 +1,46 @@
+--- schroot-1.6.10.orig/CMakeLists.txt
++++ schroot-1.6.10/CMakeLists.txt
+@@ -96,7 +96,7 @@
+ # Configure testing
+ SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
+ SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} cppunit)
+-check_cxx_source_runs(
++check_cxx_source_compiles(
+ "#include <cppunit/ui/text/TestRunner.h>
+
+ int main() {
+--- schroot-1.6.10.orig/cmake/regex-checks.cmake
++++ schroot-1.6.10/cmake/regex-checks.cmake
+@@ -3,7 +3,23 @@
+ function(regex_test namespace header library outvar outlib)
+ set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${library})
+- check_cxx_source_runs(
++
++ if (CMAKE_CROSSCOMPILING)
++ message(WARNING "Using simplified regex check for cross compilation. Assuming that regex implementations work correctly.")
++ check_cxx_source_compiles(
++"#include <${header}>
++
++int main() {
++ ${namespace} foo(\"x\");
++ ${namespace} bar(\"x\", ${namespace}::extended);
++ std::string test(\"x\");
++ ${namespace}_search(test, foo);
++ ${namespace}_match(test, foo);
++ return 0;
++}"
++${outvar})
++ else(CMAKE_CROSSCOMPILING)
++ check_cxx_source_runs(
+ "#include <${header}>
+ #include <iostream>
+
+@@ -43,6 +59,7 @@
+ return 0;
+ }"
+ ${outvar})
++ endif(CMAKE_CROSSCOMPILING)
+
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
+
diff --minimal -Nru schroot-1.6.10/debian/patches/series schroot-1.6.10/debian/patches/series
--- schroot-1.6.10/debian/patches/series 2018-06-06 11:29:14.000000000 +0200
+++ schroot-1.6.10/debian/patches/series 2018-09-23 13:50:19.000000000 +0200
@@ -9,3 +9,4 @@
Unmount-everything-that-we-can-instead-of-giving-up.patch
fix-killprocs.patch
fix-bash-completion.patch
+cross.patch
diff --minimal -Nru schroot-1.6.10/debian/rules schroot-1.6.10/debian/rules
--- schroot-1.6.10/debian/rules 2018-06-06 11:29:14.000000000 +0200
+++ schroot-1.6.10/debian/rules 2018-09-23 13:50:19.000000000 +0200
@@ -44,14 +44,10 @@
override_dh_auto_configure: debian/build/CMakeCache.txt
debian/build/CMakeCache.txt: CMakeLists.txt
- mkdir -p $(dir $@)
- cd $(dir $@) ; \
- GTEST_ROOT="$(CURDIR)/debian/build/gtest" \
- CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
- CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_SYSCONFDIR=/etc \
- -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ GTEST_ROOT="$(CURDIR)/debian/build/gtest" \
+ CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
+ dh_auto_configure --builddirectory=$(dir $@) -- \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DSCHROOT_LIBEXEC_DIR=/$(LIBDIR)/schroot \
-Ddebug=OFF -Ddchroot=OFF -Ddchroot-dsa=OFF \
@@ -86,8 +82,10 @@
# Lintian overrides
mkdir -p $(CURDIR)/debian/schroot/usr/share/lintian/overrides
cp $(CURDIR)/debian/schroot.lintian-overrides $(CURDIR)/debian/schroot/usr/share/lintian/overrides/schroot
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Requires fakeroot, so tests need running here.
$(MAKE) -C debian/build test ARGS=-V
+endif
install-indep: build-indep $(DH_INSTALL_FILES)
dh $@ $(DH_OPTIONS)
--- End Message ---
--- Begin Message ---
Source: schroot
Source-Version: 1.6.10-7
We believe that the bug you reported is fixed in the latest version of
schroot, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 909445@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Steve Langasek <vorlon@debian.org> (supplier of updated schroot package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 03 Jan 2020 21:13:37 +0000
Source: schroot
Binary: schroot schroot-common schroot-dbgsym
Architecture: source all amd64
Version: 1.6.10-7
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Steve Langasek <vorlon@debian.org>
Description:
schroot - Execute commands in a chroot environment
schroot-common - common files for schroot
Closes: 857470 909445 947919
Changes:
schroot (1.6.10-7) unstable; urgency=medium
.
* QA upload.
* debian/patches/zfs-snapshot-support.patch: add support for a zfs-
snapshot backend. Closes: #947919.
* Suggest btrfs-progs instead of obsolete btrfs-tools.
Closes: #857470.
.
[ Helmut Grohne ]
* Fix FTCBFS: (Closes: #909445)
+ Let dh_auto_configure pass cross flags to cmake.
+ cross.patch: Avoid check_cxx_source_runs.
+ Support DEB_BUILD_OPTIONS=nocheck.
Checksums-Sha1:
58b92f51f19cea4fc3eba681add9df955abaa2fe 2200 schroot_1.6.10-7.dsc
4fdc25606d2e211c23579a6523bd92b597a29690 82524 schroot_1.6.10-7.debian.tar.xz
eb7e753d0b81613f21b45451aa9b791ab7408426 244432 schroot-common_1.6.10-7_all.deb
be3a39664e4730eee5d0b7b4dc01ad924aaa8876 23318944 schroot-dbgsym_1.6.10-7_amd64.deb
fabdcb654e24d7239435de88e4234a1e97126287 9322 schroot_1.6.10-7_amd64.buildinfo
c25558e091e31cab984ecbae2e5e32cb93d669b5 808080 schroot_1.6.10-7_amd64.deb
Checksums-Sha256:
a38d86f2436eb7a909bf705c5f09c1426ca2a6aee62d12bb800854dba1ef8572 2200 schroot_1.6.10-7.dsc
d51a67c8b7647d4beeaa54c875b5a95be1460e361173ea2a0601f9eaa77da3be 82524 schroot_1.6.10-7.debian.tar.xz
cfe18855cf225891848e1559357a6d759ae40d80d317e97f01a00d42f473c1d8 244432 schroot-common_1.6.10-7_all.deb
680b03713aa9298435ee4c24a2d0e990846e26d26d50e87b684ac369fdfcb7d2 23318944 schroot-dbgsym_1.6.10-7_amd64.deb
32ee761f44db87fd8f2db78a2b4437b1840348b36844b03f4b0e8fd33aa6c392 9322 schroot_1.6.10-7_amd64.buildinfo
e0b6c8c938323bee7af473a52663d3de13020fab2026fc0279f2ba37dccbb7e0 808080 schroot_1.6.10-7_amd64.deb
Files:
82388d2800f9dbed8e56e4fe8d5ade7a 2200 admin optional schroot_1.6.10-7.dsc
b59143e70eeb5536537441501b68e06c 82524 admin optional schroot_1.6.10-7.debian.tar.xz
f734e9b6926fe7f26c7a532830fe4a85 244432 admin optional schroot-common_1.6.10-7_all.deb
8339aa28ac56b868c4f624c5095646d1 23318944 debug optional schroot-dbgsym_1.6.10-7_amd64.deb
bcdf5f9b73c00a4f6c86fc2aa3ef15e5 9322 admin optional schroot_1.6.10-7_amd64.buildinfo
84225daad309ec65e0df9b61a3b1a4ed 808080 admin optional schroot_1.6.10-7_amd64.deb
-----BEGIN PGP SIGNATURE-----
iQJGBAEBCgAwFiEErEg/aN5yj0PyIC/KVo0w8yGyEz0FAl4PsYESHHZvcmxvbkBk
ZWJpYW4ub3JnAAoJEFaNMPMhshM9YboQAJ/DUp7bpKjrLQVIe/4XrmipaTShYW0Q
n8bWsjxprgyKbJRS2jycPISyNZzjcTFBoT3OaGm09CJmfUD9oWTynjoihe9Ty5HL
B4d1soAVLflo0KW0mrc4m/s3aFrzydYEEYMpMG/tkceXh+qtj3ahnKLmENJBDxop
R8TASFAWYQ3VXvWPfBOC+m/ROSPqkFO3iV3tLXk/sf04QTrONxrUfHpmE8DuibwI
2CII3nQpTFzjZLAAk/Qu2I7vtT1aBMcXSZyzKIqZoAICmShHbgLne3OTgPIjZhJ9
B8IRGDzznzEsrjkuZp3ddRQjq0kDx/oCZuWFB4jrujXvDAo2yKD7BNeoN9EQGpz4
6UUk54bZfRv/J3qM/B7lUuaIWIGOsQipeNLZasSJ0d+7SEoAuTsbijSafepR7HfF
QuU7sY8EI+hhQGk+E9GKBXlYWkuqb+RKDOZFXZIKIrPHstBkYodHA5ZIhlRfKCOd
BO3WV6bVyek1/OVrkH8KMI6nuCogw98o3kT+gYg/m59KLXyNejAPMMP4wKqAwvJp
W9UTw3iwfb/oz+5fzh8GyDnyPvnbKDx3uX24T6u37y4QVJ3Y768hkZm5cAUoTJSC
IqBqJpLPFLfVSkcURQ+C1fll9rXqqEXODK3RpolC8Ec4gXyf83T1QoAuhvxIuVgJ
FD1PJE2buvKs
=hTq0
-----END PGP SIGNATURE-----
--- End Message ---