From 40ed12913248dbab1c92bdb59a16704ff26c8a6d Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Aug 2024 22:07:12 +0900 Subject: [PATCH 1/6] WORKFLOW: tentative PR branch name fixes -fix2 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index e24636bd..60264ac1 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -81,14 +81,19 @@ jobs: # Check if the event is related to a pull request if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "pull_request_target" ]]; then - pr_number=$(echo "$GITHUB_REF" | awk -F'/' '{print $3}') - source_branch=$(curl -s "https://api.github.com/repos/RetroDECK/RetroDECK/pulls/$pr_number" | jq -r '.head.ref') - source_branch=${source_branch//\//-} # Replace '/' with '-' in the branch name + # Use GITHUB_HEAD_REF to get the source branch + source_branch="${GITHUB_HEAD_REF}" + + # Replace '/' with '-' in the branch name + source_branch=${source_branch//\//-} echo "[DEBUG] source branch is: $source_branch" - echo "TAG=PR-$pr_number-$(echo $source_branch-${{ env.buildid }} | sed 's/\//-/g')" >> $GITHUB_ENV - echo "MAKE_LATEST=false" >> $GITHUB_ENV # if it's a feature branch it will not marked as "latest" cooker version + + # Generate the tag for a pull request + echo "TAG=PR-$GITHUB_RUN_ID-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV + echo "MAKE_LATEST=false" >> $GITHUB_ENV # Not marked as the latest cooker version if it's a feature branch else - TAG="$MANIFEST_VERSION-${{ env.buildid }} | sed 's/\//-/g'" + # Generate the tag for non-pull request branches + TAG="$MANIFEST_VERSION-${{ env.buildid }}" echo "TAG=$TAG" >> $GITHUB_ENV echo "MAKE_LATEST=true" >> $GITHUB_ENV fi From 8726c03c21f46fd5015b261ec0c46b8accd1f794 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Aug 2024 22:13:22 +0900 Subject: [PATCH 2/6] WORKFLOW: added remove stuck mounts for Monkey's runner [skip ci] --- .github/workflows/cooker-selfhosted.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 60264ac1..4e232e33 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -37,7 +37,9 @@ jobs: # Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317 - name: Remove stuck mounts - run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/* + run: | + sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/* + sudo umount -f $HOME/actions-run/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/* continue-on-error: true - name: Generate a token for Rekku From 9bf1c2d886a879160c8f0ae3ed5115373588e55a Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Aug 2024 22:55:31 +0900 Subject: [PATCH 3/6] POST_UPDATE: restoring old 0.8.4b missing region --- functions/post_update.sh | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/functions/post_update.sh b/functions/post_update.sh index d5c72f5d..8fa5338e 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -374,6 +374,61 @@ post_update() { fi fi + # Check if the version is older than 0.8.4b + if [[ $(check_version_is_older_than "0.8.4b") == "true" ]]; then + # In version 0.8.4b, the following changes were made: + # - Recovery from a failed move of the themes, downloaded_media and gamelists folder to their new ES-DE locations (AGAIN) + + log d "Injecting the new retrodeck/ES-DE subdir into the retrodeck.cfg" + # Check if ES-DE already exists in media_folder or themes_folder + if grep -E '^(media_folder|themes_folder)=.*ES-DE' "$rd_conf"; then + log d "ES-DE path already exists in media_folder or themes_folder" + else + # Update the paths if ES-DE does not exist + sed -i -e '/media_folder=/s|retrodeck/|retrodeck/ES-DE/|g' -e '/themes_folder=/s|retrodeck/|retrodeck/ES-DE/|g' "$rd_conf" && log d "Injection successful" + fi + log d "$(grep media_folder "$rd_conf")" + log d "$(grep themes_folder "$rd_conf")" + conf_read + conf_write + + log i "Checking if ES-DE downloaded_media, gamelist, and themes folder must be migrated from \"$rdhome\" to \"$rdhome/ES-DE\" due to a RetroDECK Framework bug" + + # Use rsync to merge directories and overwrite existing files + if [[ -d "$rdhome/themes" ]]; then + rsync -a "$rdhome/themes/" "$rdhome/ES-DE/themes/" && log d "Move of \"$rdhome/themes\" to \"$rdhome/ES-DE/themes\" completed" + rm -rf "$rdhome/themes" # Remove the original directory after merging + else + log i "ES-DE themes appear to have already been migrated." + fi + + if [[ -d "$rdhome/downloaded_media" ]]; then + rsync -a "$rdhome/downloaded_media/" "$rdhome/ES-DE/downloaded_media/" && log d "Move of \"$rdhome/downloaded_media\" to \"$rdhome/ES-DE/downloaded_media\" completed" + rm -rf "$rdhome/downloaded_media" # Remove the original directory after merging + else + log i "ES-DE downloaded media appear to have already been migrated." + fi + + if [[ -d "$rdhome/gamelists" ]]; then + rsync -a "$rdhome/gamelists/" "$rdhome/ES-DE/gamelists/" && log d "Move of \"$rdhome/gamelists\" to \"$rdhome/ES-DE/gamelists\" completed" + rm -rf "$rdhome/gamelists" # Remove the original directory after merging + else + log i "ES-DE gamelists appear to have already been migrated." + fi + + if [[ -d "$rdhome/collections" ]]; then + rsync -a "$rdhome/collections/" "$rdhome/ES-DE/collections/" && log d "Move of \"$rdhome/collections\" to \"$rdhome/ES-DE/collections\" completed" + rm -rf "$rdhome/collections" # Remove the original directory after merging + else + log i "ES-DE collections appear to have already been migrated." + fi + + # Setting the correct variables once again + set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings" + set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings" + + fi + if [[ $(check_version_is_older_than "0.9.0b") == "true" ]]; then # Placeholder for version 0.9.0b From f12babdf0b9c0861088e5c43d2610888cd0549cf Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 09:38:46 +0900 Subject: [PATCH 4/6] RPCS3: updated firmware to 4.91 [skip ci] --- functions/global.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/global.sh b/functions/global.sh index f00f6914..b0a62c0f 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -45,7 +45,7 @@ remote_network_target_2="$rd_repo" remote_network_target_3="https://one.one.one.one" # The URL of a common internet target for testing network access helper_files_folder="$config/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version -rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP" +rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2024_0227_3694eb3fb8d9915c112e6ab41a60c69f/PS3UPDAT.PUP" RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org presets_dir="$config/retrodeck/presets" # Repository for all system preset config files git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub From 16c2c2a50e3a2272fe17f0c804241365b058591f Mon Sep 17 00:00:00 2001 From: MonkeyX Date: Sun, 25 Aug 2024 01:42:09 +0100 Subject: [PATCH 5/6] Removed need for BIOS tmp file for Godot (#919) Co-authored-by: Rekku --- functions/configurator_functions.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/functions/configurator_functions.sh b/functions/configurator_functions.sh index 32f11a7f..db7f9c4d 100644 --- a/functions/configurator_functions.sh +++ b/functions/configurator_functions.sh @@ -5,10 +5,6 @@ check_bios_files() { # There is a "basic" and "expert" mode which outputs different levels of data # USAGE: check_bios_files "mode" - if [[ -f "$godot_bios_files_checked" ]]; then - rm -f "$godot_bios_files_checked" # Godot data transfer temp files - fi - touch "$godot_bios_files_checked" while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc || [[ -n "$bios_file" ]]; do @@ -25,10 +21,10 @@ check_bios_files() { fi if [[ "$1" == "basic" ]]; then bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc") - echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file + echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" # Godot data transfer else bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc" "$bios_subdir" "$bios_hash") - echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" >> "$godot_bios_files_checked" # Godot data transfer temp file + echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" # Godot data transfer fi fi done < $bios_checklist From feed0a1e581ac3af75060118337f4926fe128760 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 14:02:05 +0900 Subject: [PATCH 6/6] WORKFLOW: reverting the pull_request_target as it was not building the PR code [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 4e232e33..2994d14e 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,7 +15,7 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: + pull_request: branches: - cooker*