[Debian-on-mobile-maintainers] [Git][DebianOnMobile-team/squeekboard][wip/a-wai/work-around-ppc64el] d/rules: don't build tests on ppc64el

Arnaud Ferraris (@a-wai) gitlab at salsa.debian.org
Wed Jul 13 13:51:50 BST 2022



Arnaud Ferraris pushed to branch wip/a-wai/work-around-ppc64el at Debian On Mobile / squeekboard


Commits:
fc5c2828 by Arnaud Ferraris at 2022-07-13T14:51:31+02:00
d/rules: don't build tests on ppc64el

Due to a rust bug on ppc64el[1], `squeekboard-test-layout` fails to
build properly, causing the whole build to fail on this architecture.
This prevents newer versions of the package to migrate to testing.

This commit ensures the build succeeds by:
- not building tests on ppc64el
- ensuring `squeekboard-test-layout` isn't built if tests are disabled
- adjusting `squeekboard-devel.install` so the absence of this binary
  doesn't cause an error

This is, however, merely a workaround and investigating a proper fix is
still needed.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1757548

- - - - -


4 changed files:

- + debian/patches/build-only-build-squeekboard-test-layout-if-tests-are-ena.patch
- + debian/patches/series
- debian/rules
- debian/squeekboard-devel.install


Changes:

=====================================
debian/patches/build-only-build-squeekboard-test-layout-if-tests-are-ena.patch
=====================================
@@ -0,0 +1,51 @@
+From: Arnaud Ferraris <arnaud.ferraris at collabora.com>
+Date: Tue, 12 Jul 2022 18:21:09 +0200
+Subject: build: only build squeekboard-test-layout if tests are enabled
+
+---
+ src/meson.build   | 3 ++-
+ tools/meson.build | 2 ++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index af33418..b3e1b35 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -66,6 +66,7 @@ rslibs = custom_target(
+     depends: cargo_toml,
+ )
+ 
++if get_option('tests')
+ build_rstests = custom_target(
+     'build_rstests',
+     build_by_default: false,
+@@ -90,6 +91,7 @@ test(
+     timeout: 900,
+     depends: [build_rstests, cargo_toml],
+ )
++endif
+ 
+ libsqueekboard = static_library('libsqueekboard',
+   sources,
+@@ -115,4 +117,3 @@ squeekboard = executable('squeekboard',
+     '-DEEKBOARD_COMPILATION=1',
+     '-DEEK_COMPILATION=1'],
+ )
+-
+diff --git a/tools/meson.build b/tools/meson.build
+index 75a7e17..e558c7d 100644
+--- a/tools/meson.build
++++ b/tools/meson.build
+@@ -6,6 +6,7 @@ entry = configure_file(
+     install_dir: bindir,
+ )
+ 
++if get_option('tests')
+ test_layout = custom_target('squeekboard-test-layout',
+     build_by_default: true,
+     # meson doesn't track all inputs, cargo does
+@@ -18,3 +19,4 @@ test_layout = custom_target('squeekboard-test-layout',
+     install_dir: bindir,
+     depends: cargo_toml,
+ )
++endif


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+build-only-build-squeekboard-test-layout-if-tests-are-ena.patch


=====================================
debian/rules
=====================================
@@ -18,6 +18,12 @@ endif
 # so it doesn't need to be explicitly taken care of.
 export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
 
+ifeq ($(DEB_HOST_ARCH),ppc64el)
+  TESTS_FLAG = false
+else
+  TESTS_FLAG = true
+endif
+
 %:
 	dh $@ --builddirectory=_build --buildsystem=meson
 
@@ -31,6 +37,6 @@ build-arch:
 # sure we build with the relevant dependencies and code paths for
 # our case
 override_dh_auto_configure:
-	dh_auto_configure -- -Dnewer=true
+	dh_auto_configure -- -Dnewer=true -Dtests=$(TESTS_FLAG)
 
 override_dh_autoreconf:


=====================================
debian/squeekboard-devel.install
=====================================
@@ -1,2 +1 @@
-usr/bin/squeekboard-test-layout usr/bin
-usr/bin/squeekboard-entry usr/bin
+usr/bin/squeekboard-* usr/bin



View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/squeekboard/-/commit/fc5c2828f5a56250fe3ba97d2ebd15dc0312c930

-- 
View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/squeekboard/-/commit/fc5c2828f5a56250fe3ba97d2ebd15dc0312c930
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-on-mobile-maintainers/attachments/20220713/681ec0a1/attachment-0001.htm>


More information about the Debian-on-mobile-maintainers mailing list