Ticket #10: x86_64.diff
| File x86_64.diff, 12.2 kB (added by Jan-Nik, 8 months ago) |
|---|
-
release/autopackage-build
old new 409 409 410 410 tar -c --bzip2 --file "autopackage.tar.bz2" "autopackage/" 411 411 ! "$autopackage_silent" && out "finished." 412 # copy to native x86 architecture directory for downloading 413 mkdir -p "$target/x86" 414 cp -f "autopackage.tar.bz2" "$target/x86/" 412 # copy to native architecture directory for downloading 413 414 cpu_architecture="x86" 415 if [[ $(uname -m) == "x86_64" ]]; then cpu_architecture="x86_64"; fi 416 417 mkdir -p "$target/$cpu_architecture" 418 cp -f "autopackage.tar.bz2" "$target/$cpu_architecture/" 415 419 ! "$autopackage_silent" && out " " 416 420 417 cd "$target/ x86"421 cd "$target/$cpu_architecture" 418 422 ! "$autopackage_silent" && out "Moved tools package to $PWD/autopackage.tar.bz2 ." 419 423 420 424 rm -fr "$apkg_build_dir" -
makepackage
old new 694 694 return 1 695 695 fi 696 696 697 if [[ "$CPUARCHITECTURES" != "x86" ]] && [[ "$CPUARCHITECTURES" != "" ]]; then698 red; outn "ERROR: "; normal; out "Sorry, autopackage is x86 only for now. Please do not request non-x86 architectures."699 return 1700 fi701 697 702 703 698 # ********************************************************** 704 699 # 2.4 Set Meta Defaults 705 700 # ********************************************************** … … 750 745 COMPRESSION="bzip2" 751 746 fi 752 747 753 CPUARCHITECTURE=x86 754 CPUARCHITECTURES=x86 748 cpu_architecture=x86 749 if [[ $(uname -r) == "x86_64" ]]; then 750 cpu_architecture=x86_64 751 fi 752 if [[ -n $CPUARCHITECTURE ]]; then 753 red; outn "WARNING: "; normal; out "CPUArchitecture is deprecated. Use CPUArchitectures instead." 754 else 755 CPUARCHITECTURE=$cpu_architecture 756 fi 757 758 CPUARCHITECTURES=$cpu_architecture 755 759 756 760 # determine interface version and normalize 757 761 local interfaceversion_major=`getMajor "$INTERFACEVERSION"` … … 903 907 stub=$( echo "$stub" | replaceStr "%SoftwareVersion%" "$SOFTWAREVERSION" ) 904 908 stub=$( echo "$stub" | replaceStr "%InterfaceVersion%" "$INTERFACEVERSION" ) 905 909 stub=$( echo "$stub" | replaceStr "%PackageVersion%" "$PACKAGEVERSION" ) 906 stub=$( echo "$stub" | replaceStr "%CPUArchitecture %" "$CPUARCHITECTURE" )910 stub=$( echo "$stub" | replaceStr "%CPUArchitectures%" "$CPUARCHITECTURES" ) 907 911 stub=$( echo "$stub" | replaceStr "%AutopackageTarget%" "$AUTOPACKAGETARGET" ) 908 912 909 913 # Make the built package require the current autopackage version -
share/apkg-script-utils
old new 419 419 420 420 421 421 ## 422 # _getLibraryPath <LIBRARY> 423 # LIBRARY: The name of the library 424 # Outputs: Paths of the library 425 # Returns: non-zero if the library isn't found at all 426 # 427 # Get's the path of a library and automatically filters by the architecture. 428 # For example if $cpu_architecture is "x86_64" it will return the path of the 64 bit library. 429 # If $cpu_architecture is "x86" or isn't set, only 32 bit libraries will be returned. 430 ### START GETLIBRARYPATHS 431 function _getLibraryPaths() { 432 local lib="" 433 lib=$1 434 if [[ "$lib" == "" ]]; then 435 err "must specify the library to check for" 436 popOptE 437 return 1 438 fi 439 440 local cacheresult 441 cacheresult=$( /sbin/ldconfig -p | grep "${lib}\(\.[[:digit:]\.]*\)\?$" | awk 'BEGIN {FS=" => "} { print $2 }' | while read; do test -f "$REPLY" && echo $REPLY; done ) 442 local libpathresult=`_scanLDLibPath "${lib}"` 443 local liblist=`echo -e "${libpathresult}\n${cacheresult}" | grep "\(.\)" | sort | uniq` 444 local result=""; 445 if [[ "$liblist" == "" ]]; then warn "$1 not found"; popOptE; return 1; fi; # not found in cache 446 447 # make sure that libraries in $liblist are compatible with our architecture 448 local proper_architecture=false 449 450 local oIFS="$IFS" 451 IFS=$'\n'; 452 453 local l 454 local -a liblist_array 455 liblist_array=($liblist); 456 liblist="" 457 for l in "${liblist_array[@]}"; do 458 if isLibrary32 "$l"; then 459 if [[ "$cpu_architecture" != "x86_64" ]]; then 460 proper_architecture=true 461 liblist=$(echo -e "$liblist$l\n") 462 fi 463 else 464 if [[ "$cpu_architecture" == "x86_64" ]]; then 465 proper_architecture=true 466 liblist=$(echo -e "$liblist$l\n") 467 fi 468 fi 469 done 470 471 IFS="$oIFS" 472 473 echo $liblist 474 } 475 ### END GETLIBRARYPATHS 476 477 ## 422 478 # testForLib [-v] [-i] LibraryName 423 479 # -v: Verbose mode. Print each version number out on stdout. 424 480 # -i: Print each unique interface version found on stdout. … … 471 527 return 1 472 528 fi 473 529 474 local cacheresult 475 cacheresult=$( /sbin/ldconfig -p | grep "${lib}\(\.[[:digit:]\.]*\)\?$" | awk 'BEGIN {FS=" => "} { print $2 }' | while read; do test -f "$REPLY" && echo $REPLY; done ) 476 trace cacheresult=$cacheresult 477 local libpathresult=`_scanLDLibPath "${lib}"` 478 trace libpathresult=$libpathresult 479 local liblist=`echo -e "${libpathresult}\n${cacheresult}" | grep "\(.\)" | sort | uniq` 480 local result=""; 481 if [[ "$liblist" == "" ]]; then warn "$1 not found"; popOptE; return 1; fi; # not found in cache 482 trace liblist=$liblist 530 liblist=$(_getLibraryPaths $lib) 483 531 484 # make sure that libraries in $liblist are only valid 32-bit libs485 local found_32bit=false486 487 local oIFS="$IFS"488 IFS=$'\n';489 490 local l491 local -a liblist_array492 liblist_array=($liblist);493 for l in "${liblist_array[@]}"; do494 if isLibrary32 "$l"; then495 found_32bit=true496 break;497 fi498 done499 500 IFS="$oIFS"501 502 trace $found_32bit503 504 if ! $found_32bit; then505 warn "only 64-bit libraries were found, returning 1"506 popOptE;507 return 1508 fi509 510 if ! $verbose && ! $verbose_i; then511 popOptE512 return 0513 fi514 515 532 # we want to loop over the results until we find a library that matches the required version 516 533 ( 517 534 echo "$liblist" | while read; do … … 3360 3377 # Checks the system C library for the given version symbols. The missing symbols, if any 3361 3378 # will be output to stdout. 3362 3379 function _checkForGlibcVersions() { 3363 if isLibrary32 /lib/libc.so.6; then 3364 dumpverdefs32 /lib/libc.so.6 $@ 3380 local lib=$(_getLibraryPaths libc.so.6) 3381 #FIXME: _getLibraryPaths might return more then one path 3382 3383 if isLibrary32 $lib; then 3384 dumpverdefs32 $lib $@ 3365 3385 else 3366 dumpverdefs64 /lib/libc.so.6$@3386 dumpverdefs64 $lib $@ 3367 3387 fi 3368 3388 } 3389 3369 3390 3370 3391 ## 3371 3392 # getPythonLibDir -
share/apkg-dep
old new 377 377 378 378 # Verify package matches machine cpu architecture 379 379 c=$( echo "$header" | grep CPUArchitecture | sed 's/# CPUArchitecture //' ) 380 trace package cpuarchitecture is \"$c\" 381 if [[ "$cpu_architecture" != "$c" ]]; then 380 if [[ $c != "" ]]; then 381 trace package cpuarchitecture is \"$c\" 382 if [[ "$cpu_architecture" != "$c" ]]; then 383 continue 384 fi 385 fi 386 # TODO: I haven't tested this: 387 c=$( echo "$header" | grep CPUArchitectures | sed 's/# CPUArchitectures //' ) 388 trace package cpuarchitectures are \"$c\" 389 local found=false 390 for a in $c; do 391 if [[ "$a" == "$c" ]]; then found=true; fi 392 done 393 if ! $found; then 382 394 continue 383 395 fi 384 396 -
share/backend.template
old new 97 97 98 98 # check if binary is usable on target machine, if not error 99 99 found=false 100 x86found=false 100 101 for a in $CPUARCHITECTURES; do 101 102 if [[ "$a" == "$cpu_architecture" ]]; then 102 103 found=true 104 break 103 105 fi 106 if [[ "$a" == "x86" ]]; then 107 x86found=true 108 fi 104 109 done 105 110 if ! $found; then 106 err failed cpu architecture payload check 107 __cleanup_backend 108 exit 1 111 if $x86found && [[ "$cpu_architecture" == "x86_64" ]]; then 112 # if we are on x86_64 we are able to run x86 code 113 cpu_architecture="x86" 114 trace cpu architecture changed to x86 115 found=true 116 break 117 else 118 err failed cpu architecture payload check 119 __cleanup_backend 120 exit 1 121 fi 109 122 fi 110 123 trace passed cpu architecture payload check 111 124 -
share/apkg-funclib
old new 403 403 # like Fedora. But, it's not right for pure64 distros like 404 404 # Debian/Ubuntu or Gentoo 405 405 406 i386 | i486 | i586 | i686 | x86_64 |athlon)406 i386 | i486 | i586 | i686 | athlon) 407 407 export cpu_architecture="x86";; 408 x86_64) 409 export cpu_architexture="x86_64";; 408 410 409 411 esac 410 412 fi … … 2206 2208 # check CPU arch is OK before we run any native code 2207 2209 needed_archs=$( echo "$tmp" | sed -n '1p' ) 2208 2210 local found=false 2211 local x86found=false 2209 2212 for a in $needed_archs; do 2210 2213 if [[ "$a" == "$cpu_architecture" ]]; then found=true; fi 2214 if [[ "$a" == "x86" ]]; then x86found=true; fi 2211 2215 done 2212 2216 trace "needed: $needed_archs arch: $cpu_architecture x86found: $x86found found: $found" 2213 2217 if ! $found; then 2214 2215 # arch command is not consistent like ia32.linux != i686 so use uname 2216 locateCommand uname 2217 this_arch=`"$lc_location" -m` 2218 out 2219 out "$intl_UNSUPPORTED_CPU_ARCH" "$needed_archs" "$this_arch" 2220 out 2221 unset this_arch 2222 return 1 2218 if $x86found && [[ "$cpu_architecture" == "x86_64" ]]; then 2219 # if we are on x86_64 we are able to run x86 code 2220 cpu_architecture="x86" 2221 trace cpu architecture changed to x86 2222 found=true 2223 else 2224 # arch command is not consistent like ia32.linux != i686 so use uname 2225 locateCommand uname 2226 this_arch=`"$lc_location" -m` 2227 out 2228 out "$intl_UNSUPPORTED_CPU_ARCH" "$needed_archs" "$this_arch" 2229 out 2230 unset this_arch 2231 return 1 2232 fi 2223 2233 fi 2224 2234 2225 2235 trace passed cpu arch test -
share/installer.template
old new 24 24 25 25 %ErrorMessage% 26 26 27 # are we on 32bit (or 64bit + compat libs?)28 locateCommand uname29 cpu_architecture=`"$lc_location" -m`30 case "$cpu_architecture" in31 i386 | i486 | i586 | i686 )32 export cpu_architecture="x86";;33 esac34 35 if [[ "$cpu_architecture" != "x86" ]]; then36 if [ ! -d /usr/lib32 ]; then37 errorMessage "Sorry, Autopackage only supports x86 32-bit systems, or 64-bit systems with compatibility libraries installed. Please install the compatibility libraries and rerun install." "Error Installing Autopackage"38 rm -rf "$WORKING_DIRECTORY"39 exit 140 fi41 fi42 43 27 # setup XDG configuration variables scoped for autopackage 44 28 # 45 29 # AUTOPACKAGE_CONFIG_HOME User configuration directory -
share/installer.2.template
old new 24 24 25 25 %ErrorMessage% 26 26 27 # are we on 32bit (or 64bit + compat libs?)28 locateCommand uname29 cpu_architecture=`"$lc_location" -m`30 case "$cpu_architecture" in31 i386 | i486 | i586 | i686 )32 export cpu_architecture="x86";;33 esac34 35 if [[ "$cpu_architecture" != "x86" ]]; then36 if [ ! -d /usr/lib32 ]; then37 errorMessage "Sorry, Autopackage only supports x86 32-bit systems, or 64-bit systems with compatibility libraries installed. Please install the compatibility libraries and rerun install." "Error Installing Autopackage"38 rm -rf "$WORKING_DIRECTORY"39 exit 140 fi41 fi42 43 27 # setup XDG configuration variables scoped for autopackage 44 28 # 45 29 # AUTOPACKAGE_CONFIG_HOME User configuration directory
