From 3ecd6f3e481d53e9f3139f6dc67ee964256cd159 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Wed, 14 Sep 2022 17:35:38 -0400 Subject: [PATCH] Work to use a common mechanism that functions in weston and when weston is not present. --- .../config/games/_Scan DOSBox Games.sh | 16 ++-- .../emulators/drastic/scripts/drastic.sh | 6 +- .../common/games/_Scan Build Engine Games.sh | 9 +-- .../config/games/_Scan ScummVM Games.sh | 13 ++-- packages/games/libretro/easyrpg/easyrpg.sh | 4 +- .../config/common/games/_Scan Quake Games.sh | 9 +-- packages/jelos/profile.d/02-distribution | 63 +++++++-------- packages/jelos/sources/autostart/autostart | 2 +- .../sources/autostart/common/004-upgrade | 4 +- packages/jelos/sources/post-update | 3 + packages/jelos/sources/scripts/backuptool | 6 +- packages/jelos/sources/scripts/error.sh | 4 +- packages/jelos/sources/scripts/factoryreset | 1 - .../jelos/sources/scripts/rom_system_split | 3 - packages/jelos/sources/scripts/run | 14 ++++ packages/jelos/sources/scripts/runemu.sh | 2 +- packages/jelos/sources/scripts/system-upgrade | 39 ++++------ packages/misc/modules/package.mk | 5 ++ packages/misc/modules/sources/351Files.sh | 1 - .../misc/modules/sources/Remove ._ Files.sh | 9 +-- packages/misc/modules/sources/Start PPSSPP.sh | 1 - .../misc/modules/sources/Start ScummVM.sh | 1 - packages/misc/modules/sources/gamelist.xml | 6 +- packages/sysutils/busybox/scripts/init | 11 ++- packages/sysutils/rclone/sources/cloud_backup | 16 ++-- .../sysutils/rclone/sources/cloud_restore | 16 ++-- packages/sysutils/systemd/package.mk | 4 +- packages/ui/emulationstation/package.mk | 2 +- .../wayland/weston/patches/002-console.patch | 78 +++++++++++++++++++ 29 files changed, 213 insertions(+), 135 deletions(-) create mode 100755 packages/jelos/sources/scripts/run create mode 100644 packages/wayland/weston/patches/002-console.patch diff --git a/packages/games/emulators/dosbox-sdl2/config/games/_Scan DOSBox Games.sh b/packages/games/emulators/dosbox-sdl2/config/games/_Scan DOSBox Games.sh index 34e28e6b6..8095bd5f9 100644 --- a/packages/games/emulators/dosbox-sdl2/config/games/_Scan DOSBox Games.sh +++ b/packages/games/emulators/dosbox-sdl2/config/games/_Scan DOSBox Games.sh @@ -9,17 +9,16 @@ echo -e $(date -u)" - Script started.\n" >> /tmp/logs/dosbox_scan.log EE_DEVICE=$(cat /ee_arch) -source /usr/bin/env.sh source /etc/profile rp_registerAllModules joy2keyStart -clear >/dev/console +clear #rm "/storage/.config/dosbox/games/*.conf" function create_launcher() { - echo "\nAdding $2..." >/dev/console + echo "\nAdding $2..." launcher_name="$1 ($2)" cp /storage/.config/dosbox/dosbox-SDL2.conf "/storage/.config/dosbox/games/$launcher_name.conf" cat <> "/storage/.config/dosbox/games/$launcher_name.conf" @@ -30,17 +29,17 @@ exit EOF } -echo "Scanning for games...\n" >/dev/console +echo "Scanning for games...\n" OIFS="$IFS" IFS=$'\n' for data_dir in $(find /storage/roms/pc/ -type d -name "*") do - echo "Testing (dir) $data_dir" >/dev/console + echo "Testing (dir) $data_dir" if [ -d "$data_dir" ]; then for executable in $(find "$data_dir" -iname "*.exe") do - echo "Testing (exe) $executable" >/dev/console + echo "Testing (exe) $executable" executable_case="$(basename "$executable" | tr '[:lower:]' '[:upper:]')" echo "Case $executable" >> /tmp/logs/dosbox_scan.log case "$executable_case" in @@ -66,7 +65,6 @@ do done fi done -echo "Restarting EmulationStation...\n" >/dev/console +echo "Restarting EmulationStation...\n" echo "Restarting EmulationStation..." >> /tmp/logs/dosbox_scan.log -systemctl restart ${UI_SERVICE} -clear >/dev/console +clear diff --git a/packages/games/emulators/drastic/scripts/drastic.sh b/packages/games/emulators/drastic/scripts/drastic.sh index 55411bbd1..60bb3e690 100644 --- a/packages/games/emulators/drastic/scripts/drastic.sh +++ b/packages/games/emulators/drastic/scripts/drastic.sh @@ -6,11 +6,11 @@ if [ ! -d "/storage/.config/drastic" ]; then -echo "Drastic emulator not installed." >/dev/console 2>&1 -echo "Please install through the Jelos Add Ons tool." >/dev/console 2>&1 +echo "Drastic emulator not installed." 2>&1 +echo "Please install through the Jelos Add Ons tool." 2>&1 sleep 5 -clear >/dev/console +clear else diff --git a/packages/games/emulators/raze/config/common/games/_Scan Build Engine Games.sh b/packages/games/emulators/raze/config/common/games/_Scan Build Engine Games.sh index 71a09da89..8ad1e8b48 100644 --- a/packages/games/emulators/raze/config/common/games/_Scan Build Engine Games.sh +++ b/packages/games/emulators/raze/config/common/games/_Scan Build Engine Games.sh @@ -25,8 +25,8 @@ SUPPORTED_GRP=( "PLATOONL.DAT" ) -clear >/dev/console -echo "Scanning for games..." >/dev/console +clear +echo "Scanning for games..." find_names=() for i in "${!SUPPORTED_GRP[@]}"; do if [[ "${i}" != 0 ]]; then @@ -43,7 +43,7 @@ grp_files=$(find "${BUILDENGINEPATH}" -mindepth 1 -type f \( "${find_names[@]}" # expansion GRP files are named alphabetically later than base game GRP files, # meaning we can get by with a simple lexical sort before processing. grp_files=$(echo "${grp_files}" | sort) -echo "Adding games..." >/dev/console +echo "Adding games..." while read -r grp_file; do abs_path=$(dirname "${grp_file}") path=${abs_path#"$BUILDENGINEPATH/"} @@ -63,5 +63,4 @@ while read -r grp_file; do -- end -- EOM done <<<"${grp_files}" -systemctl restart ${UI_SERVICE} -clear >/dev/console +clear diff --git a/packages/games/emulators/scummvmsa/config/games/_Scan ScummVM Games.sh b/packages/games/emulators/scummvmsa/config/games/_Scan ScummVM Games.sh index 2de077969..d69eb3968 100644 --- a/packages/games/emulators/scummvmsa/config/games/_Scan ScummVM Games.sh +++ b/packages/games/emulators/scummvmsa/config/games/_Scan ScummVM Games.sh @@ -6,10 +6,9 @@ . /etc/profile -clear >/dev/console -echo "Scanning for games..." >/dev/console -bash /usr/bin/start_scummvm.sh add >/dev/console -echo "Adding games..." >/dev/console -bash /usr/bin/start_scummvm.sh create >/dev/console -systemctl restart ${UI_SERVICE} -clear >/dev/console +clear +echo "Scanning for games..." +bash /usr/bin/start_scummvm.sh add +echo "Adding games..." +bash /usr/bin/start_scummvm.sh create +clear diff --git a/packages/games/libretro/easyrpg/easyrpg.sh b/packages/games/libretro/easyrpg/easyrpg.sh index edf7aad5b..22e08951a 100644 --- a/packages/games/libretro/easyrpg/easyrpg.sh +++ b/packages/games/libretro/easyrpg/easyrpg.sh @@ -25,7 +25,7 @@ install_bios() { SHASUM=$(echo $SHASUMS | tr '#' '\n' | awk '/'${BIOS}'/ {print $1}') if [ ! "${SHASUM}" == "${BINSUM}" ] then - echo "Checksum mismatch, please update the package." >/dev/console + echo "Checksum mismatch, please update the package." exit 1 fi if [[ "${BIOS}" =~ .zip$ ]] @@ -34,7 +34,7 @@ install_bios() { rm "${BIOS}" BIOS="$(echo ${BIOS} | sed "s#.zip#.exe#")" fi - /usr/bin/7z x "${BIOS}" >/dev/console + /usr/bin/7z x "${BIOS}" rm "${BIOS}" cd ${SOURCEPATH} } diff --git a/packages/games/libretro/tyrquake/config/common/games/_Scan Quake Games.sh b/packages/games/libretro/tyrquake/config/common/games/_Scan Quake Games.sh index e465cfbb9..400289b10 100644 --- a/packages/games/libretro/tyrquake/config/common/games/_Scan Quake Games.sh +++ b/packages/games/libretro/tyrquake/config/common/games/_Scan Quake Games.sh @@ -7,10 +7,10 @@ QUAKEPATH="/storage/roms/quake" -clear >/dev/console -echo "Scanning for games..." >/dev/console +clear +echo "Scanning for games..." pak_files=$(find "${QUAKEPATH}" -mindepth 1 -type f -iname pak0.pak) -echo "Adding games..." >/dev/console +echo "Adding games..." while read -r pak_file; do abs_path=$(dirname "${pak_file}") path=${abs_path#"$QUAKEPATH/"} @@ -30,5 +30,4 @@ while read -r pak_file; do -- end -- EOM done <<<"${pak_files}" -systemctl restart ${UI_SERVICE} -clear >/dev/console +clear diff --git a/packages/jelos/profile.d/02-distribution b/packages/jelos/profile.d/02-distribution index c43ec2c1c..3c51e2aca 100644 --- a/packages/jelos/profile.d/02-distribution +++ b/packages/jelos/profile.d/02-distribution @@ -4,15 +4,13 @@ . /etc/os-release -export PATH="$PATH:/usr/local/bin:/usr/bin:/storage/bin" +export PATH="/usr/bin:/usr/local/bin:/storage/bin:${PATH}" export SDL_GAMECONTROLLERCONFIG_FILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt" J_DIR="/storage/.config/system" J_CONF="${J_DIR}/configs/system.cfg" ES_CONF="/storage/.emulationstation/es_settings.cfg" -EE_DEVICE=${HW_DEVICE} - -JSLISTENCONF="/storage/.config/system/configs/jslisten.cfg" +JSLISTENCONF="${J_DIR}/configs/jslisten.cfg" get_setting() { if [ ! -z "${3}" ] @@ -62,42 +60,40 @@ set_audio() { } get_es_setting() { - echo $(sed -n "s|\s*<${1} name=\"${2}\" value=\"\(.*\)\" />|\1|p" ${ES_CONF}) + echo $(sed -n "s|\s*<${1} name=\"${2}\" value=\"\(.*\)\" />|\1|p" ${ES_CONF}) } check_bios() { + PLATFORM="${1}" + CORE="${2}" + EMULATOR="${3}" + ROMNAME="${4}" + LOG="${5}" -PLATFORM="${1}" -CORE="${2}" -EMULATOR="${3}" -ROMNAME="${4}" -LOG="${5}" + if [[ -z "$LOG" ]]; then + LOG="/var/log/exec.log" + cat /etc/motd > "$LOG" + fi -if [[ -z "$LOG" ]]; then - LOG="/var/log/exec.log" - cat /etc/motd > "$LOG" -fi + MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})" + if [ "$?" == "2" ]; then + # formating so it looks nice :) + PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards + PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found + PLATFORMNAME=$(echo $PLATFORMNAME | sed -e 's/\\n//g') -MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})" -if [ "$?" == "2" ]; then + if [[ -f "${LOG}" ]]; then + echo "${CORE} ${EMULATOR} ${ROMNAME}" >> $LOG + echo "${PLATFORMNAME} missing BIOS - Could not find all BIOS: " >> $LOG + echo "please make sure you copied the files into the corresponding folder " >> $LOG + echo "${MISSINGBIOS}" >> $LOG + fi + MISSINGBIOS=$(echo "$MISSINGBIOS" | sed -e 's/$/\\n/g') -# formating so it looks nice :) -PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards -PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found -PLATFORMNAME=$(echo $PLATFORMNAME | sed -e 's/\\n//g') - -if [[ -f "${LOG}" ]]; then -echo "${CORE} ${EMULATOR} ${ROMNAME}" >> $LOG -echo "${PLATFORMNAME} missing BIOS - Could not find all BIOS: " >> $LOG -echo "please make sure you copied the files into the corresponding folder " >> $LOG -echo "${MISSINGBIOS}" >> $LOG -fi - MISSINGBIOS=$(echo "$MISSINGBIOS" | sed -e 's/$/\\n/g') - - /usr/bin/error.sh "${PLATFORMNAME} missing BIOS" "Could not find all BIOS/files in /storage/roms, the game may not work:\n\n ${MISSINGBIOS}\n\nPlease make sure you copied the files into the corresponding folder." - error_process="$!" - pkill -P $error_process -fi + /usr/bin/error.sh "${PLATFORMNAME} missing BIOS" "Could not find all BIOS/files in /storage/roms, the game may not work:\n\n ${MISSINGBIOS}\n\nPlease make sure you copied the files into the corresponding folder." + error_process="$!" + pkill -P $error_process + fi } # read config files from /storage/.config/profile.d @@ -106,3 +102,4 @@ fi . $config fi done + diff --git a/packages/jelos/sources/autostart/autostart b/packages/jelos/sources/autostart/autostart index a196a27e9..77d872155 100755 --- a/packages/jelos/sources/autostart/autostart +++ b/packages/jelos/sources/autostart/autostart @@ -41,7 +41,7 @@ then done fi -clear >/dev/console 2>&1 >>${BOOTLOG} +clear 2>&1 >>${BOOTLOG} DEVICE_CPU_GOVERNOR=$(get_setting system.cpugovernor) ${DEVICE_CPU_GOVERNOR} 2>&1 >>${BOOTLOG} diff --git a/packages/jelos/sources/autostart/common/004-upgrade b/packages/jelos/sources/autostart/common/004-upgrade index 6d3f095e8..2e959a1bd 100755 --- a/packages/jelos/sources/autostart/common/004-upgrade +++ b/packages/jelos/sources/autostart/common/004-upgrade @@ -9,12 +9,12 @@ then if [ -e "/usr/share/post-update" ] then show_splash intro - echo -ne "\033[1000H\033[2K==> Preparing system.." >/dev/console + echo -ne "\033[1000H\033[2K==> Preparing system.." /usr/share/post-update fi rm /storage/.config/boot.hint touch /storage/.configured fi -clear >/dev/console +clear /usr/bin/show_splash intro 2>&1 >>${BOOTLOG} diff --git a/packages/jelos/sources/post-update b/packages/jelos/sources/post-update index 454313153..e3ec2b025 100644 --- a/packages/jelos/sources/post-update +++ b/packages/jelos/sources/post-update @@ -69,6 +69,9 @@ done ### Safe to make changes below this line. +# Default modules need to be updated to use the new stop/start ui function. +rsync -av /usr/config/modules/* /storage/.config/modules/ + # Swap es_input back to a writeable file so external controller configuration works properly. if [ -L "/storage/.config/emulationstation/es_input.cfg" ] then diff --git a/packages/jelos/sources/scripts/backuptool b/packages/jelos/sources/scripts/backuptool index 6da06f2c7..5c768c97e 100755 --- a/packages/jelos/sources/scripts/backuptool +++ b/packages/jelos/sources/scripts/backuptool @@ -4,6 +4,8 @@ # Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert) # Copyright (C) 2020 Fewtarius (https://github.com/fewtarius) +. /etc/profile + # NOTE: to customize your backups, create a backuptool.conf file in # /storage/.config like this: @@ -49,9 +51,7 @@ fi case "${1}" in "restore") - systemctl stop ${UI_SERVICE} unzip -o ${BACKUPFILE} -d / - systemctl start ${UI_SERVICE} ;; "backup") if [ -f ${BACKUPFILE} ] @@ -61,9 +61,7 @@ case "${1}" in mv ${BACKUPFILE} "${BACKUPFOLDER}/${ARCHIVEFILENAME}" fi [ -f "${BACKUPFILE}" ] && rm "${BACKUPFILE}" - [ -z "$2" ] && systemctl stop ${UI_SERVICE} zip -9 -r ${BACKUPFILE} \ ${COMPRESSLOCATIONS[@]} - [ -z "${2}" ] && systemctl start ${UI_SERVICE} ;; esac diff --git a/packages/jelos/sources/scripts/error.sh b/packages/jelos/sources/scripts/error.sh index e452ae30e..db010efe2 100755 --- a/packages/jelos/sources/scripts/error.sh +++ b/packages/jelos/sources/scripts/error.sh @@ -4,7 +4,7 @@ . /etc/profile -clear >/dev/console +clear if [ -n "$1" ] then text_viewer -w -e -t "BIOS ERROR" -m "$*" @@ -16,4 +16,4 @@ else fi fi -clear >/dev/console +clear diff --git a/packages/jelos/sources/scripts/factoryreset b/packages/jelos/sources/scripts/factoryreset index 426926ee8..74856e3ae 100755 --- a/packages/jelos/sources/scripts/factoryreset +++ b/packages/jelos/sources/scripts/factoryreset @@ -10,7 +10,6 @@ case "${1}" in cp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg ;; "ALL") - systemctl stop ${UI_SERVICE} cd / find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' \) -delete mkdir /storage/.config/ diff --git a/packages/jelos/sources/scripts/rom_system_split b/packages/jelos/sources/scripts/rom_system_split index 17dfe0d8a..a52869337 100755 --- a/packages/jelos/sources/scripts/rom_system_split +++ b/packages/jelos/sources/scripts/rom_system_split @@ -68,12 +68,9 @@ update_es_folders() { fi done } -systemctl stop ${UI_SERVICE} # check the external folders first update_es_folders "external" "${EXT_ROM_FOLDERS}" "${ES_LIST}" # next check the local folders # if there are duplicate folders in EXTERNAL, LOCAL ones will take preference update_es_folders "local" "${LOCAL_ROM_FOLDERS}" "${ES_LIST}" - -systemctl start ${UI_SERVICE} diff --git a/packages/jelos/sources/scripts/run b/packages/jelos/sources/scripts/run new file mode 100755 index 000000000..2352475a2 --- /dev/null +++ b/packages/jelos/sources/scripts/run @@ -0,0 +1,14 @@ +#!/bin/bash +. /etc/profile + +if [ "${UI_SERVICE}" = "weston.service" ] +then + weston-terminal --command="${1}" +else + systemctl stop ${UI_SERVICE} + ${1} >/dev/console 2>&1 +fi +if [ ! "${UI_SERVICE}" = "weston.service" ] +then + systemctl start ${UI_SERVICE} +fi diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index ab1e72331..823bb2bbf 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -195,7 +195,7 @@ function quit() { function clear_screen() { $VERBOSE && log "Clearing screen" - clear >/dev/console + clear } function bluetooth() { diff --git a/packages/jelos/sources/scripts/system-upgrade b/packages/jelos/sources/scripts/system-upgrade index 6d4ed26ad..5a12a49d4 100755 --- a/packages/jelos/sources/scripts/system-upgrade +++ b/packages/jelos/sources/scripts/system-upgrade @@ -46,26 +46,23 @@ check_space() { if [ "${MYSIZE}" -lt "${REQUIRED}" ] then NEEDED=$(( (${REQUIRED} - ${MYSIZE} ) / 1024 )) - echo -e "There is not enough free space available ${VOLNAME} to install this update. Free up an additional ${NEEDED}MB, or reflash the newer version." >/dev/console - echo "Exiting in 5 seconds..." >/dev/console && sleep 5 - systemctl start ${UI_SERVICE} & + echo -e "There is not enough free space available ${VOLNAME} to install this update. Free up an additional ${NEEDED}MB, or reflash the newer version." + echo "Exiting in 5 seconds..." && sleep 5 exit 1 fi } -systemctl stop ${UI_SERVICE} -clear >/dev/console +clear ONLINE_STATUS=$(check_network) if [ ! "${ONLINE_STATUS}" == true ] then - echo "System not online, cannot continue..." >/dev/console - echo "Exiting in 5 seconds..." >/dev/console && sleep 5 - systemctl start ${UI_SERVICE} & + echo "System not online, cannot continue..." + echo "Exiting in 5 seconds..." && sleep 5 exit 0 fi -echo -e "=> ${OS_NAME} UPGRADE UTILITY" >/dev/console +echo -e "=> ${OS_NAME} UPGRADE UTILITY" # Check storage @@ -76,32 +73,30 @@ check_space available .update GAMES 4096000 LATEST_RELEASE_TAG=$(curl -H 'Cache-Control: no-cache' -Ls "${GIT_API}/releases" | python -c "import sys, json; print(json.load(sys.stdin)[0]['tag_name'])") if [ "${OS_VERSION}" -ge "${LATEST_RELEASE_TAG}" ] && [ ! "${FORCE}" = "1" ] then - echo "No new updates are available..." >/dev/console - echo "Exiting in 5 seconds..." >/dev/console && sleep 5 - systemctl start ${UI_SERVICE} & + echo "No new updates are available..." + echo "Exiting in 5 seconds..." && sleep 5 exit 0 fi -echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" >/dev/console -curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar" 2>/dev/console -echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" >/dev/console -curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar.sha256" 2>/dev/console +echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" +curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar" +echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" +curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar.sha256" -echo -e "\nVerifying download, please wait..." >/dev/console +echo -e "\nVerifying download, please wait..." # Verify MYSUM=$(sha256sum ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION} | awk '{print $1}') DLSUM=$(cat ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256 | awk '{print $1}') if [ ! "${MYSUM}" == "${DLSUM}" ] then - echo "Verification failed, cleaning up and exiting..." >/dev/console + echo "Verification failed, cleaning up and exiting..." rm -f ${UPDATE_PATH}/* sleep 5 - clear >/dev/console - systemctl start ${UI_SERVICE} + clear exit 1 else - echo "Verification successful..." >/dev/console + echo "Verification successful..." fi if [ "${FORCE}" == "1" ] @@ -109,7 +104,7 @@ then set_setting updates.force 0 fi -echo -e "\nRebooting to complete OS upgrade..." >/dev/console +echo -e "\nRebooting to complete OS upgrade..." sync sleep 3 reboot diff --git a/packages/misc/modules/package.mk b/packages/misc/modules/package.mk index f7fdb1ebe..21fa076e7 100644 --- a/packages/misc/modules/package.mk +++ b/packages/misc/modules/package.mk @@ -22,5 +22,10 @@ makeinstall_target() { mkdir -p ${INSTALL}/usr/config/modules cp -rf ${PKG_DIR}/sources/* ${INSTALL}/usr/config/modules chmod 0755 ${INSTALL}/usr/config/modules/* + case ${ARCH} in + x86_64) + rm -f "${INSTALL}/usr/config/Start 32bit Retroarch.sh" + ;; + esac } diff --git a/packages/misc/modules/sources/351Files.sh b/packages/misc/modules/sources/351Files.sh index 4b7c73868..6f823e685 100755 --- a/packages/misc/modules/sources/351Files.sh +++ b/packages/misc/modules/sources/351Files.sh @@ -6,7 +6,6 @@ . /etc/profile jslisten set "killall 351Files" -source /usr/bin/env.sh joy2keyStart 351Files diff --git a/packages/misc/modules/sources/Remove ._ Files.sh b/packages/misc/modules/sources/Remove ._ Files.sh index 55071191b..d68a07829 100755 --- a/packages/misc/modules/sources/Remove ._ Files.sh +++ b/packages/misc/modules/sources/Remove ._ Files.sh @@ -5,10 +5,7 @@ # Copyright (C) 2020-present Fewtarius . /etc/profile -source /usr/bin/env.sh -clear >/dev/console -systemctl stop ${UI_SERVICE} -echo "Cleaning ._ files from /storage/roms" >/dev/console +clear +echo "Cleaning ._ files from /storage/roms" find /storage/roms -iname '._*' -exec rm -rf {} \; -clear >/dev/console -systemctl start ${UI_SERVICE} +clear diff --git a/packages/misc/modules/sources/Start PPSSPP.sh b/packages/misc/modules/sources/Start PPSSPP.sh index 3fe1d1155..1e87b4559 100755 --- a/packages/misc/modules/sources/Start PPSSPP.sh +++ b/packages/misc/modules/sources/Start PPSSPP.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2020-present Fewtarius -source /usr/bin/env.sh source /etc/profile jslisten set "killall PPSSPPSDL" diff --git a/packages/misc/modules/sources/Start ScummVM.sh b/packages/misc/modules/sources/Start ScummVM.sh index dc241fd37..3f9ea4b18 100755 --- a/packages/misc/modules/sources/Start ScummVM.sh +++ b/packages/misc/modules/sources/Start ScummVM.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2021-present 351ELEC -source /usr/bin/env.sh source /etc/profile jslisten set "killall scummvm" diff --git a/packages/misc/modules/sources/gamelist.xml b/packages/misc/modules/sources/gamelist.xml index 1c15798ea..72d5ef524 100755 --- a/packages/misc/modules/sources/gamelist.xml +++ b/packages/misc/modules/sources/gamelist.xml @@ -15,7 +15,7 @@ - ./cloud_backup.sh + run ./cloud_backup.sh Cloud Backup Backup your saves to a cloud drive. JELOS @@ -28,7 +28,7 @@ - ./cloud_restore.sh + run ./cloud_restore.sh Cloud Restore Restores your saves from a cloud drive. JELOS @@ -119,7 +119,7 @@ - ./Remove ._ Files.sh + run ./Remove ._ Files.sh Run Remove ._ Files Removes hidden ._ files created by the MacOS filesystem JELOS diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index e6eceac14..160219cc9 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -429,15 +429,15 @@ set_consolefont() { hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')" if [ "${hres}" -gt "0" ] && [ "${hres}" -lt "640" ] then - setfont -C /dev/tty0 ter-v12n.psf + setfont -C /dev/console ter-v12n.psf elif [ "${hres}" -ge "640" ] && [ "${hres}" -lt "720" ] then - setfont -C /dev/tty0 ter-v14n.psf + setfont -C /dev/console ter-v14n.psf elif [ "${hres}" -ge "720" ] && [ "${hres}" -lt "1080" ] then - setfont -C /dev/tty0 ter-v18n.psf + setfont -C /dev/console ter-v18n.psf else - setfont -C /dev/tty0 ter-v24n.psf + setfont -C /dev/console ter-v24n.psf fi fi } @@ -874,6 +874,9 @@ check_update() { #return 0 fi + redirect_output_to_screen + delete_descriptors + mkdir -p $UPDATE_DIR/.tmp &>/dev/null sync diff --git a/packages/sysutils/rclone/sources/cloud_backup b/packages/sysutils/rclone/sources/cloud_backup index 50985ba0a..36270d291 100755 --- a/packages/sysutils/rclone/sources/cloud_backup +++ b/packages/sysutils/rclone/sources/cloud_backup @@ -15,15 +15,15 @@ SYNCPATH="${SYNCPATH:=GAMES}" BACKUPPATH="${BACKUPPATH:=/storage/roms}" RSYNCOPTSBACKUP="${RSYNCOPTSBACKUP:=-raiv --prune-empty-dirs}" -echo -e "=> ${OS_NAME} CLOUD BACKUP UTILITY\n" >/dev/console +echo -e "=> ${OS_NAME} CLOUD BACKUP UTILITY\n" -echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1 -rclonectl mount ${MOUNTPATH} >/dev/console 2>&1 +echo "Mounting ${MOUNTPATH}" 2>&1 +rclonectl mount ${MOUNTPATH} 2>&1 -echo "Backing up data from ${BACKUPPATH} to ${MOUNTPATH}/${SYNCPATH}" >/dev/console 2>&1 -rsync ${RSYNCOPTSBACKUP} --include-from="${CONFIGPATH}/rsync-rules.conf" ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ >/dev/console 2>&1 +echo "Backing up data from ${BACKUPPATH} to ${MOUNTPATH}/${SYNCPATH}" 2>&1 +rsync ${RSYNCOPTSBACKUP} --include-from="${CONFIGPATH}/rsync-rules.conf" ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ 2>&1 -echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1 -rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1 +echo "Unmounting ${MOUNTPATH}" 2>&1 +rclonectl unmount ${MOUNTPATH} 2>&1 sleep 3 -clear >/dev/console +clear diff --git a/packages/sysutils/rclone/sources/cloud_restore b/packages/sysutils/rclone/sources/cloud_restore index 4a5cee4c1..085cb6fd3 100755 --- a/packages/sysutils/rclone/sources/cloud_restore +++ b/packages/sysutils/rclone/sources/cloud_restore @@ -15,15 +15,15 @@ SYNCPATH="${SYNCPATH:=GAMES}" BACKUPPATH="${BACKUPPATH:=/storage/roms}" RSYNCOPTSRESTORE="${RSYNCOPTSRESTORE:=-raiv}" -echo -e "=> ${OS_NAME} CLOUD RESTORE UTILITY\n" >/dev/console +echo -e "=> ${OS_NAME} CLOUD RESTORE UTILITY\n" -echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1 -rclonectl mount ${MOUNTPATH} >/dev/console 2>&1 +echo "Mounting ${MOUNTPATH}" 2>&1 +rclonectl mount ${MOUNTPATH} 2>&1 -echo "Restoring data from ${MOUNTPATH}/${SYNCPATH} to ${BACKUPPATH}" >/dev/console 2>&1 -rsync ${RSYNCOPTSRESTORE} --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ >/dev/console 2>&1 +echo "Restoring data from ${MOUNTPATH}/${SYNCPATH} to ${BACKUPPATH}" 2>&1 +rsync ${RSYNCOPTSRESTORE} --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ 2>&1 -echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1 -rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1 +echo "Unmounting ${MOUNTPATH}" 2>&1 +rclonectl unmount ${MOUNTPATH} 2>&1 sleep 3 -clear >/dev/console +clear diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 9b6bdef03..6677ad005 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -128,8 +128,8 @@ post_makeinstall_target() { safe_remove ${INSTALL}/usr/lib/udev/rules.d/73-seat-late.rules # remove getty units, we dont want a console - safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service - safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service + #safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service + #safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service safe_remove ${INSTALL}/usr/lib/systemd/system/container-getty@.service safe_remove ${INSTALL}/usr/lib/systemd/system/getty.target safe_remove ${INSTALL}/usr/lib/systemd/system/getty@.service diff --git a/packages/ui/emulationstation/package.mk b/packages/ui/emulationstation/package.mk index 45fda06bb..ab191048f 100644 --- a/packages/ui/emulationstation/package.mk +++ b/packages/ui/emulationstation/package.mk @@ -3,7 +3,7 @@ # Copyright (C) 2020-present Fewtarius PKG_NAME="emulationstation" -PKG_VERSION="1ee4be9" +PKG_VERSION="82e66a4" PKG_GIT_CLONE_BRANCH="main" PKG_REV="1" PKG_ARCH="any" diff --git a/packages/wayland/weston/patches/002-console.patch b/packages/wayland/weston/patches/002-console.patch new file mode 100644 index 000000000..8f167afcf --- /dev/null +++ b/packages/wayland/weston/patches/002-console.patch @@ -0,0 +1,78 @@ +diff -rupN weston-10.0.1.orig/clients/terminal.c weston-10.0.1/clients/terminal.c +--- weston-10.0.1.orig/clients/terminal.c 2022-09-14 09:35:54.928561932 -0400 ++++ weston-10.0.1/clients/terminal.c 2022-09-14 09:43:23.195349394 -0400 +@@ -56,6 +56,8 @@ static char *option_font; + static int option_font_size; + static char *option_term; + static char *option_shell; ++static char *option_cwd; ++static char *option_command; + + static struct wl_list terminal_list; + +@@ -3089,6 +3091,14 @@ terminal_run(struct terminal *terminal, + close(pipes[0]); + setenv("TERM", option_term, 1); + setenv("COLORTERM", option_term, 1); ++ ++ if (option_command) { ++ if (execl(path, path, "-c", option_command, NULL)) { ++ fprintf(stderr, "command '%s' couldn't executed: %m", ++ option_command); ++ } ++ } ++ + if (execl(path, path, "-l")) { + printf("exec failed: %s\n", strerror(errno)); + exit(EXIT_FAILURE); +@@ -3123,6 +3133,8 @@ static const struct weston_option termin + { WESTON_OPTION_STRING, "font", 0, &option_font }, + { WESTON_OPTION_INTEGER, "font-size", 0, &option_font_size }, + { WESTON_OPTION_STRING, "shell", 0, &option_shell }, ++ { WESTON_OPTION_STRING, "cwd", 0, &option_cwd }, ++ { WESTON_OPTION_STRING, "command", 0, &option_command }, + }; + + int main(int argc, char *argv[]) +@@ -3140,7 +3152,7 @@ int main(int argc, char *argv[]) + + option_shell = getenv("SHELL"); + if (!option_shell) +- option_shell = "/bin/bash"; ++ option_shell = "/bin/sh"; + + config_file = weston_config_get_name_from_env(); + config = weston_config_parse(config_file); +@@ -3148,6 +3160,7 @@ int main(int argc, char *argv[]) + weston_config_section_get_string(s, "font", &option_font, "monospace"); + weston_config_section_get_int(s, "font-size", &option_font_size, 14); + weston_config_section_get_string(s, "term", &option_term, "xterm"); ++ weston_config_section_get_string(s, "command", &option_command, NULL); + weston_config_destroy(config); + + if (parse_options(terminal_options, +@@ -3157,7 +3170,9 @@ int main(int argc, char *argv[]) + " --maximized or -m\n" + " --font=NAME\n" + " --font-size=SIZE\n" +- " --shell=NAME\n", argv[0]); ++ " --shell=NAME\n" ++ " --cwd=PATH\n" ++ " --command=CMDLINE\n", argv[0]); + return 1; + } + +@@ -3178,6 +3193,13 @@ int main(int argc, char *argv[]) + + wl_list_init(&terminal_list); + terminal = terminal_create(d); ++ ++ if (option_cwd) { ++ if(chdir(option_cwd) == -1) ++ fprintf(stderr, "failed to changing directory as %s: %m\n", ++ option_cwd); ++ } ++ + if (terminal_run(terminal, option_shell)) + exit(EXIT_FAILURE); +