Good morning/evening/afternoon/night, I am currently trying to package python-libtmux, that has different errors in the %checks on different architectures. I figured out which checks fail on which architecture and wrapped them in separate %ifarch sections:
# Failing tests on armv7l # https://github.com/tmux-python/libtmux/issues/479 %ifarch armv7l %pytest -k 'not ( \ test_capture_pane \ or test_function_times_out \ or test_function_times_out_no_rise \ or test_new_window_with_environment[environment0] \ or test_new_window_with_environment[environment1] \ or test_select_window \ )' %endif
However, the armv7l section is never used when building for "openSUSE Tumbleweed armv7l". The build log shows many different things regarding the architecture:
[ 0s] Using BUILD_ARCH=armv7l:armv6l:armv5tel [ 0s] Building python-libtmux for project 'home:ojkastl_buildservice:libtmux_bugreports' repository 'openSUSE_Tumbleweed' arch 'armv7l' srcmd5 'def7c83c25c69087de1ed1cde6ee11e4'
[ 11s] 2nd stage started in virtual machine [ 11s] machine type: aarch64
[ 11s] 2nd stage started in virtual machine [ 11s] machine type: armv8l
[ 18s] build target is armv7hl-suse-linux [ 18s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --target=armv7hl-suse-linux --undefine _enable_debug_packages --define 'disturl obs://build.opensuse.org/home:ojkastl_buildservice:libtmux_bugreports/openSUSE_Tumbleweed/def7c83c25c69087de1ed1cde6ee11e4-python-libtmux' /home/abuild/rpmbuild/SOURCES/python-libtmux.spec [ 20s] Building target platforms: armv7hl-suse-linux [ 20s] Building for target armv7hl-suse-linux
But in the end it falls back to the default:
[ 30s] + echo 'DEBUGGING BUILDARCH is NOT aarch64 aarch64_ilp32 armv8l aarch64:aarch64_ilp32:armv8l ppc64:ppc ppc64 ppc ppc64le armv7l armv6l armv5tel armv7l:armv6l:armv5tel' [ 30s] DEBUGGING BUILDARCH is NOT aarch64 aarch64_ilp32 armv8l aarch64:aarch64_ilp32:armv8l ppc64:ppc ppc64 ppc ppc64le armv7l armv6l armv5tel armv7l:armv6l:armv5tel [ 30s] + uname -a [ 30s] Linux obs-arm-10 6.1.7-1-default #1 SMP PREEMPT_DYNAMIC Wed Jan 18 11:12:34 UTC 2023 (872045c) armv7l armv7l armv7l GNU/Linux [ 30s] + IGNORED_TESTS='not (test_capture_pane_start or test_function_times_out_no_rise or test_function_times_out_no_raise_assert)'
I already tried to add things like armv6l armv5tel armv7l:armv6l:armv5tel to the %ifarch, but that did not help. What have I missed? Is this due to some cross-compilation used in OBS? How to properly detect armv7l? The package in question is (currently containing lots of debugging code not yet cleaned up):
https://build.opensuse.org/package/show/home:ojkastl_buildservice:libtmux_bu... Kind Regards, Johannes
Side note: I used several separate %ifarch conditions followed by a %ifnarch mentioning all of the architectures used before in the %ifarch conditions. I have not found any trace of %elsearch or %elifarch or anything like that, i.e. some kind of if-elseif-else-statement or case-like statement. If there is such a thing, please point me at it, I would like to make this more readable... :-) -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537