Skip to content

Commit

Permalink
commit 20220503.30a59103
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRausty committed May 3, 2022
1 parent 292a696 commit 39bbb99
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .conf/VERSIONID
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.546
2.0.547
8 changes: 4 additions & 4 deletions archlinuxconfig.bash
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,9 @@ if [ "\$AURHLPR" = pbget ]
then
command -v "\$AURHLPR" >/dev/null || {
[ -f /run/lock/${INSTALLDIR##*/}/gpg1D1F0DC78F173680.lock ] || { printf '\\e[0m%s\\n' "Command '\$SRPTNM' is running command 'gpg --keyserver keyserver.ubuntu.com --recv-keys 1D1F0DC78F173680'..." && gpg --keyserver keyserver.ubuntu.com --recv-keys 1D1F0DC78F173680 && :>/run/lock/${INSTALLDIR##*/}/gpg1D1F0DC78F173680.lock ; }
makeaurpython3xcpf
makeaurpython3xcgf
makeaurpython3memoizedb
makeaurpython3xcpf
makeaurpython3aur
makeaurpm2ml
}
Expand All @@ -990,9 +990,9 @@ then
command -v "\$AURHLPR" >/dev/null || {
makeaurpackagequery
[ -x /usr/bin/aria2c ] || { pc aria2 || pci aria2 ; }
makeaurpython3xcpf
makeaurpython3xcgf
makeaurpython3memoizedb
makeaurpython3xcpf
makeaurpm2ml
}
fi
Expand Down Expand Up @@ -1961,12 +1961,12 @@ _MODdotfile_
}

_PREPMOTS_() {
if [[ "$CPUABI" = "$CPUABIX8664" ]]
if [[ "$ARCTEVAR" = "$CPUABIX8664" ]]
then
MOTTECBBS="BBS: bbs.archlinux.org"
MOTTECGIT="github.com/archlinux"
MOTTECIRC="wiki.archlinux.org/index.php/IRC_channel"
elif [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]]
elif [[ "$ARCTEVAR" = "$CPUABIX86" ]]
then
MOTTECBBS="BBS: bbs.archlinux32.org"
MOTTECGIT="github.com/archlinux32"
Expand Down
2 changes: 1 addition & 1 deletion espritfunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _MRCOUNTRIESx86_() {
MRCOUNTRIESx86=("Belarus" "France" "Germany" "Greece" "Russia" "Switzerland" "United States")
}

_MRCOUNTRIESx86-64_() {
_MRCOUNTRIESx86_64_() {
MRCOUNTRIESx86_64=("Worldwide" "Australia" "Austria" "Bangladesh" "Belarus" "Belgium" "Bosnia and Herzegovina" "Brazil" "Bulgaria" "Canada" "Chile" "China" "Colombia" "Croatia" "Czechia" "Denmark" "Ecuador" "Finland" "France" "Georgia" "Germany" "Greece" "Hong Kong" "Hungary" "Iceland" "India" "Indonesia" "Iran" "Ireland" "Israel" "Italy" "Japan" "Kazakhstan" "Kenya" "Latvia" "Lithuania" "Luxembourg" "Moldova" "Netherlands" "New Caledonia" "New Zealand" "North Macedonia" "Norway" "Pakistan" "Paraguay" "Philippines" "Poland" "Portugal" "Romania" "Russia" "Serbia" "Singapore" "Slovakia" "Slovenia" "South Africa" "South Korea" "Spain" "Sweden" "Switzerland" "Taiwan" "Thailand" "Turkey" "Ukraine" "United Kingdom" "United States" "Vietnam")
}

Expand Down
48 changes: 24 additions & 24 deletions initkeyfunctions.bash

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions knownconfigurations.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ECHOSYNC="" ## insert 'echo' to only suppress 'pacman' syncing instructions fr
KEEP=0 ## change to 0 to keep downloaded image; Testing the installation process repeatedly can be made easier and lighter on your Internet bandwidth and SAR with 'KEEP=0' and this fragment of code 'mkdir ~/arch; cp ~/ArchLinux*.tar.gz* ~/arch/' and similar. The variable KEEP when changed to 0 (true) will keep the downloaded image and md5 files instead of deleting them for later reuse. The root file system image and md5 files can be saved and used again on subsequent installs.
USECACHEDIR=0 ## change to 0 to use cache directory; When changed to 0 this installation script uses a cache directory defined in `necessaryfunctions.bash` that can be used to cache all of the installation files in order to save wireless bandwidth upon subsequent reinstallation. Variable `KEEP=1` should be changed to 0 also in order to keep the downloaded image file and md5 files. The downloaded image and md5 files should be moved to CACHEDIR along with files in INSTALLDIR/var/cache/pacman/pkg in order to avoid subsequent redownloading of these files for reinstalling the entire system.
CACHLCTN="/storage/emulated/0" ## change to external sdcard path if desired.
CACHEDIR="$CACHLCTN/Android/data/com.termux/files/cache/archlinux/$CACHECPBI/"
CACHEDIR="$CACHLCTN/Android/data/com.termux/files/cache/archlinux/$ARCTEVAR/"
PREFIXDATAFILES="$CACHLCTN/Android/data/com.termux/"
# KID=1 ## do not change, not user configurable; Used for testing, timing and development. For timing Arch Linux in PRoot, uncomment and then run script TermuxArch/scripts/frags/stdoutbench.sh in Arch Linux PRoot for timing Arch Linux in PRoot.
## If there are system image files available not listed here please open an issue and a pull request.
Expand Down Expand Up @@ -64,7 +64,7 @@ RPATH="iso/2017.03.01"
_MAKESYSTEM_
}

_X86-64_() { # IFILE is read from md5sums.txt
_X86_64_() { # IFILE is read from md5sums.txt
CMIRROR="mirror.rackspace.com"
RPATH="archlinux/iso/latest"
_MAKESYSTEM_
Expand All @@ -87,7 +87,7 @@ fi
PROOTSTMNT+="--kill-on-exit --sysvipc --link2symlink -i \"\$2:wheel\" -0 -r $INSTALLDIR "
if [[ "${QEMUCR:-}" == 0 ]]
then
PROOTSTMNT+="-q $PREFIX/bin/qemu-${ARCHITEC/x86-64/x86_64} "
PROOTSTMNT+="-q $PREFIX/bin/qemu-$ARCTEVAR "
fi
## Function _PR00TSTRING_ which creates the PRoot init statement PROOTSTMNT uses associative arrays. Page https://www.gnu.org/software/bash/manual/html_node/Arrays.html has information about BASH arrays and is also available at https://www.gnu.org/software/bash/manual/ this link.
declare -A PRSTARR # associative array
Expand Down
9 changes: 4 additions & 5 deletions maintenanceroutines.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ done

_PPLCACHEDIR_() {
printf '\e[0;32mPopulating from cache files. \e[1;32mBEGUN\n\e[0;32mThe \e[1;32m%s\e[0;32m command can be used to populate the cache. The command \e[1;32m%s\e[0;32m will repopulate the installation package files from the cache directory and update the TermuxArch files to the newest published version.\n\e[1;32m' "'trim'" "'${0##*/} ref'"
{ cd "$CACHEDIR" && printf '%s' "cd $CACHEDIR && " ; } || { cd "$PREFIXDATAFILES" && mkdir -p "$CACHEDIRSUFIX" && cd "$CACHEDIR" && printf '%s\n' "cd $PREFIXDATAFILES && mkdir -p $CACHEDIRSUFIX && cd $CACHEDIR && " ; } || exit 196
[ -d "$CACHEDIRSUFIX" ] || { mkdir -p "$CACHEDIRSUFIX" && printf '%s' "mkdir -p $CACHEDIRSUFIX && " ; }
{ [ -e "$CACHEDIR" ] && cd "$CACHEDIR" && printf '%s' "cd $CACHEDIR && " ; } || { cd "$PREFIXDATAFILES" && mkdir -p "$PREFIXDATAFILESUFIX" && cd "$CACHEDIR" && printf '%s\n' "cd $PREFIXDATAFILES && mkdir -p $PREFIXDATAFILESUFIX && cd $CACHEDIR && " ; } || exit 196
cd "$INSTALLDIR" && printf '%s\n' "cd $INSTALLDIR" || exit 196
find "$CACHEDIR" -type f -name "*tar.gz*" -exec ln -s {} \; 2>/dev/null
[ -d "$INSTALLDIR"/var/cache/pacman/pkg ] || { mkdir -p "$INSTALLDIR"/var/cache/pacman/pkg && printf '%s' "mkdir -p $INSTALLDIR/var/cache/pacman/pkg && " ; }
Expand Down Expand Up @@ -229,7 +228,7 @@ USSPACE="${USRSPACE: : -1}"
fi
if [[ "$USSPACE" -lt "800" ]] && [[ "$CPUABI" = "$CPUABIX8664" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for x86-64 architecture is 800M of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for x86_64 architecture is 800M of free user space.\\e[0m\\n"
fi
if [[ "$USSPACE" -lt "600" ]] && { [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]] ; }
then
Expand Down Expand Up @@ -258,7 +257,7 @@ else
SPACEMESSAGE=""
fi
else
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot is more than 1.5G for aarch64, more than 1.25G for armv7, 800M for x86-64 and 600M of free user space for x86 architecture.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot is more than 1.5G for aarch64, more than 1.25G for armv7, 800M for x86_64 and 600M of free user space for x86 architecture.\\e[0m\\n"
fi
}

Expand All @@ -284,7 +283,7 @@ elif [[ "$CPUABI" = "$CPUABIX8664" ]]
then
if [[ "$USRSPACE" -lt "800000" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for x86-64 architecture is 800M of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE NOTICE! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for x86_64 architecture is 800M of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
Expand Down
36 changes: 26 additions & 10 deletions necessaryfunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,36 @@
################################################################################
_PRNT_ () { printf "%s\\n" "$1" ; } # print message with one trialing newline
_PRT_ () { printf "%s" "$1" ; } # print message with no trialing newline

[ "$CPUABI" = i386 ] && CPUABI="x86"
CACHECPBI="${CPUABI/_/-}"
CACHEDIRSUFIX="var/cache/pacman/pkg/"
_QEMUCFCK_() {
if [[ -f "$INSTALLDIR/$STARTBIN" ]] && grep proot "$INSTALLDIR/$STARTBIN" | grep -m1 qemu 1>/dev/null
then # set installed qemu architecture
ARCTEVAR="$(grep proot "$INSTALLDIR/$STARTBIN" | grep -m1 qemu)"
ARCTEVAR="$(cut -d" " -f1 <<< ${ARCTEVAR#*qemu-})"
[ "${ARCTEVAR:-}" = x86 ] && ARCTEVAR="i386"
for RCTFVR in ${ALLRCTFVR[@]}
do
if [ "$RCTFVR" = "${ARCTEVAR:-}" ]
then
INCOMM="qemu-user-${ARCTEVAR:-}" && QEMUCR=0
break
fi
done
fi
[ -z ${ARCTEVAR:-} ] && ARCTEVAR="$CPUABI"
printf "Detected architecture is %s; Install architecture is set to %s.\\n" "$CPUABI" "$ARCTEVAR"
}
_QEMUCFCK_
BINFNSTP="finishsetup.bash"
CACHEDIRSUFIX="var/cache/pacman/pkg/"
LC_TYPE=("LANG" "LANGUAGE" "LC_ADDRESS" "LC_COLLATE" "LC_CTYPE" "LC_IDENTIFICATION" "LC_MEASUREMENT" "LC_MESSAGES" "LC_MONETARY" "LC_NAME" "LC_NUMERIC" "LC_PAPER" "LC_TELEPHONE" "LC_TIME")
PREFIXDATAFILESUFIX="files/cache/archlinux/$CACHECPBI/var/cache/pacman/pkg/"
PREFIXDATAFILESUFIX="files/cache/archlinux/$ARCTEVAR/var/cache/pacman/pkg/"
TXPRQUON="Termux PRoot with QEMU"
TXPRQUON="Termux PRoot"
UNAMER="$(uname -r)"

_CALLSYSTEM_() {
declare COUNTER=""
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = "${CPUABIX8664//_/-}" ]] || [[ "$CPUABI" = i386 ]]
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = i386 ]]
then
_GETIMAGE_ ||:
else
Expand Down Expand Up @@ -68,9 +84,9 @@ _DETECTSYSTEM64_
elif [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]]
then
_I686_
elif [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = "${CPUABIX8664//_/-}" ]]
elif [[ "$CPUABI" = "$CPUABIX8664" ]]
then
_X86-64_
_X86_64_
else
_PRINTMISMATCH_
fi
Expand Down Expand Up @@ -235,7 +251,7 @@ _FIXOWNER_
}
_PREPROOT_() {
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = "${CPUABIX8664//_/-}" ]] || [[ "$CPUABI" = i386 ]]
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = i386 ]]
then
proot --link2symlink -0 bsdtar -p -xf "$IFILE" --strip-components 1 ||:
else
Expand All @@ -256,7 +272,7 @@ AL32MRLT="https://git.archlinux32.org/packages/plain/core/pacman-mirrorlist/mirr
printf "\\e[0m\\n%s\\n" "Updating ${ALMLLOCN##*/} from $AL32MRLT."
curl --retry 4 "$AL32MRLT" -o "$ALMLLOCN" || curl --retry 4 "$AL32MRLT" -o "$ALMLLOCN"
_DOMIRROR_
elif [[ "$CPUABI" = "$CPUABIX8664" ]] || [[ "$CPUABI" = "${CPUABIX8664//_/-}" ]]
elif [[ "$CPUABI" = "$CPUABIX8664" ]]
then
AL64MRLT="https://www.archlinux.org/mirrorlist/all/"
printf "\\e[0m\\n%s\\n" "Updating ${ALMLLOCN##*/} from $AL64MRLT."
Expand Down
8 changes: 4 additions & 4 deletions printoutstatements.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FLHDR1[1]=""
FLHDR1[2]="set -Eeuo pipefail"
FLHDR1[3]="shopt -s extglob nullglob globstar"
FLHDR1[4]="unset LD_PRELOAD"
FLHDR1[5]="VERSIONID=2.0.545"
FLHDR1[5]="VERSIONID=2.0.546"
FLHDR1[6]="SRPTNM=\"\${0##*/}\""
FLHDRP[0]="## BEGIN #####################################################################"
FLHDRP[1]=""
Expand All @@ -31,10 +31,10 @@ TRPEXIT[2]=" printf \"\""
TRPEXIT[3]=" if [[ \"\$RV\" = 0 ]]"
TRPEXIT[4]=" then"
TRPEXIT[5]=" printf \"\\\\e[0;32mTermuxArch command \\\\e[1;32m'%s'\\\\e[0;32m version %s\\\\e[1;34m: \\\\e[1;32mDONE 🏁\\\\e[0m\\\\n\" \"\$STRNRG\" \"\$VERSIONID\""
TRPEXIT[6]=" printf \"\\\\e]2; %s: DONE 🏁 \007\" \"\$STRNRG\""
TRPEXIT[6]=" printf \"\\\\e]2;%s\007\" \"\$STRNRG: DONE 🏁 \""
TRPEXIT[7]=" else"
TRPEXIT[8]=" printf \"\\\\e[0;32mTermuxArch command \\\\e[1;32m'%s'\\\\e[0;32m version %s\\\\e[0m [Exit Signal %s]\\\\e[1;34m: \\\\e[1;32mDONE 🏁\\\\e[0m\\\\n\" \"\$STRNRG\" \"\$VERSIONID\" \"\$RV\""
TRPEXIT[9]=" printf \"\033]2; %s [Exit Signal %s]: DONE 🏁 \007\" \"\$STRNRG\" \"\$RV\""
TRPEXIT[9]=" printf \"\033]2;%s\007\" \"\$STRNRG [Exit Signal \$RV]: DONE 🏁 \""
TRPEXIT[10]=" fi"
TRPEXIT[11]=" printf \"\\e[?25h\\e[0m\""
TRPEXIT[12]=" set +Eeuo pipefail"
Expand Down Expand Up @@ -237,7 +237,7 @@ fi

_PRINTPROOTERROR_() {
printf "\\e[0;34m\\n%s\\n\\n%s\\n\\n%s\\e[0m\\n\\n" "If error ' proot info: vpid 1: terminated with signal 11 ' is found, ensure that all the software is up to date. After updating all software, including Android software, please reference these links in order to find a resolution if updating Termux app and Termux packages and Android device software was unsuccessful:" " * https://github.com/termux/proot/issues?q=\"proot info: vpid 1: terminated with signal 11\"" " * https://github.com/termux/termux-packages/issues?q=\"proot info: vpid 1: terminated with signal 11\""
printf "\\e[0;34m\\n%s\\n\\n\e[0m" "If error ' proot info: vpid 1: terminated with signal 4 ' is found, please create a 'qbind.prs' from file 'bindexample.prs' in directory '$INSTALLDIR/var/binds/' in order to complete the QEMU configuration by running command '${0##*/} r' after creating and editing the 'qbind.prs' file."
printf "\\e[0;34m\\n%s\\n\\n\e[0m" "If error ' proot info: vpid 1: terminated with signal 4 ' is found, please create a 'qbind.prs' from file 'bindexample.prs' in directory '$INSTALLDIR/var/binds/' in order to complete the QEMU configuration by running command '${0##*/} r' after creating and editing a 'qbind.prs' file."
printf "\\e[0;34m\\n%s\\n\\n%s\\n\\n%s\\e[0m\\n\\n" "If error ' env ... not found ' is found, ensure that all the software is up to date. After updating, please reference these links in order to find a resolution if updating Termux app and Termux packages was unsuccessful:" " * https://github.com/termux/proot/issues?q=\"env\"+\"not+found\"" " * https://github.com/termux/termux-packages/issues?q=\"not+found\"+\"proot\""
}

Expand Down
Loading

1 comment on commit 39bbb99

@SDRausty
Copy link
Owner Author

@SDRausty SDRausty commented on 39bbb99 May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.