Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
rpmrebuild
> sfos_arch_detection.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File sfos_arch_detection.patch of Package rpmrebuild
Common subdirectories: a/locale and b/locale Common subdirectories: a/man and b/man Common subdirectories: a/plugins and b/plugins diff -u a/rpmrebuild.sh b/rpmrebuild.sh --- a/rpmrebuild.sh 2021-01-17 15:03:59.000000000 +0100 +++ b/rpmrebuild.sh 2022-09-01 12:35:36.636984806 +0200 @@ -163,7 +163,12 @@ { Debug '(CheckArch)' # current architecture - local cur_arch=$( uname -m) + local cur_arch + if [ -e /etc/ssu/ssu.ini ]; then # Sailfish OS arm 32bit userland on 64bit kernel + cur_arch=$( awk 'BEGIN {FS="="} /^arch/ {print $2}' /etc/ssu/ssu.ini ) + else + cur_arch=$( uname -m) + fi # pac_arch is got from RpmArch RpmArch @@ -174,8 +179,19 @@ change_arch="";; '(none)') change_arch="";; + # work around setarch not knowing about armv7hl *) - change_arch="setarch $pac_arch";; + change_arch="setarch $pac_arch" + if ! setarch "$pac_arch" -R true 2>/dev/null; then + Debug " architecture '$pac_arch' not supported by setarch" + if [ "$pac_arch" = "aarch64" ]; then + change_arch=linux64 + else + change_arch=linux32 + fi + Debug "using '$change_arch' instead." + fi + ;; esac Debug " change_arch=$change_arch" return