aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2019-11-09 20:36:12 +0000
committerPascal Terjan <pterjan@mageia.org>2019-11-09 20:36:53 +0000
commit2f7839906c14b2fb76f6fe5666354d9a12651f08 (patch)
treed126ccf42b2fa1f2d34358ea4f61dd01784492ab
parent763a90e2947389be2c4fae11f33d1cb401aa837d (diff)
downloadiurt-2f7839906c14b2fb76f6fe5666354d9a12651f08.tar
iurt-2f7839906c14b2fb76f6fe5666354d9a12651f08.tar.gz
iurt-2f7839906c14b2fb76f6fe5666354d9a12651f08.tar.bz2
iurt-2f7839906c14b2fb76f6fe5666354d9a12651f08.tar.xz
iurt-2f7839906c14b2fb76f6fe5666354d9a12651f08.zip
Use setarch linux32 rather than target arch
$ setarch --list uname26 linux32 linux64 armv7l
-rw-r--r--NEWS4
-rwxr-xr-xlib/Iurt/Ulri.pm6
2 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 4cc8ecc..8ed98d8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
-- ulri: always call setarch rather than only when target is i586, this allows
- to build for 32bit arm on aarch64 for example.
+- ulri: call setarch for all 32bit targets rather than only when target is
+ i586, this allows to build for 32bit arm on aarch64.
- emi: store in the .upload which architectures were uploaded to know if
non mandatory ones are done.
diff --git a/lib/Iurt/Ulri.pm b/lib/Iurt/Ulri.pm
index d085514..c9ec44e 100755
--- a/lib/Iurt/Ulri.pm
+++ b/lib/Iurt/Ulri.pm
@@ -80,8 +80,10 @@ sub build_package {
plog('DEBUG', "Will compile only with media $media_to_add");
$cmd =~ s!__MEDIA__!$media_to_add!g;
- #- force the requested arch, this allows to build 32 bits package on 64 bit hosts
- $cmd = "setarch $arch $cmd";
+ #- force 32bit if needed, this allows to build 32 bits package on 64 bit hosts
+ if ($arch =~ /^(i.86|armv5tl|armv7hl)/) {
+ $cmd = "setarch linux32 $cmd";
+ }
plog('DEBUG', "Build $pkgs");
ssh($remote, "'echo PID=\$\$; exec $cmd $pkgs &>$prefix_dir/log/botcmd.\$(date +%s).\$(hostname -s).log' > $temp &");