Bug#887308: mark kpackagetool5 Multi-Arch: foreign
Package: kpackagetool5
Version: 5.37.0-2
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
Control: affects -1 + src:kate
kate fails to cross build from source, because running kpackagetool5
fails:
| CMake Warning at /usr/lib/mips-linux-gnu/cmake/KF5Package/KF5PackageMacros.cmake:58 (message):
| couldn't generate metainfo for org.kde.plasma.katesessions:
| /usr/bin/kpackagetool5: 1: /usr/bin/kpackagetool5: Syntax error: "("
| unexpected
Some shell is trying to run the foreign ELF binary as a shell script and
fails. Unfortunately, it doesn't give the more useful "Exec format
error". Also cmake doesn't trap this error (which arguably is a policy
4.6 violation), so you don't notice the failure until the end of the
build when some file is missing (or you don't notice it at all).
If kpackagetool5 needs to be run, it needs to be installed for the build
architecture. The easy way of doing so is marking it "Multi-Arch:
foreign". The major remaining question is: Is such a marking correct?
That's difficult to answer unless you know what kpackagetool5 does. I
don't know what it does and the manual page is not very ... descriptive.
I looked around and as far as I can see, it deals with text formats such
as xml and json, but not with binary formats. If it was dealing with
binary formats, the question would be whether such formats are
architecture-dependent (e.g. endianess). I hope my cursory look is
sufficient here and ask you to review it. If it is, the attached patch
likely makes kate (and a pile more packages) cross build. If in doubt,
don't just apply my patch but help me better understand kpackagetool5.
Helmut
diff --minimal -Nru kpackage-5.37.0/debian/changelog kpackage-5.37.0/debian/changelog
--- kpackage-5.37.0/debian/changelog 2017-09-03 09:58:36.000000000 +0200
+++ kpackage-5.37.0/debian/changelog 2018-01-14 20:54:34.000000000 +0100
@@ -1,3 +1,11 @@
+kpackage (5.37.0-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Mark kpackagetool5 Multi-Arch: foreign. (Closes: #-1)
+ * Mark libkf5package-dev Multi-Arch: same.
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 14 Jan 2018 20:54:34 +0100
+
kpackage (5.37.0-2) sid; urgency=medium
* New revision
diff --minimal -Nru kpackage-5.37.0/debian/control kpackage-5.37.0/debian/control
--- kpackage-5.37.0/debian/control 2017-09-03 09:58:36.000000000 +0200
+++ kpackage-5.37.0/debian/control 2018-01-14 20:54:32.000000000 +0100
@@ -25,6 +25,7 @@
Package: kpackagetool5
Section: kde
Architecture: any
+Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Breaks: kpackagelauncherqml (<< 5.37),
libkf5declarative5 (<< 5.37),
@@ -57,6 +58,7 @@
Package: libkf5package-dev
Section: libdevel
Architecture: any
+Multi-Arch: same
Depends: kpackagetool5 (= ${binary:Version}),
libkf5coreaddons-dev (>= 5.37.0~),
libkf5package5 (= ${binary:Version}),
Reply to: