From 1023f17bbf1ba7a5f98a5ce05b413cca818b7b5b Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 21 Apr 2024 20:32:02 +0900 Subject: [PATCH 1/4] WORKFLOW: removed the nighlty worklfow [skip ci] --- .../workflows => old/removed-workflows}/cooker-selfhosted.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.github/workflows => old/removed-workflows}/cooker-selfhosted.yml (100%) diff --git a/.github/workflows/cooker-selfhosted.yml b/old/removed-workflows/cooker-selfhosted.yml similarity index 100% rename from .github/workflows/cooker-selfhosted.yml rename to old/removed-workflows/cooker-selfhosted.yml From a1fa8049cc6a5009a257355d2138d9727e91754e Mon Sep 17 00:00:00 2001 From: Libretto <> Date: Sun, 21 Apr 2024 22:31:32 +0200 Subject: [PATCH 2/4] Add build dependencies for more distros --- automation_tools/install_dependencies.sh | 29 ++++++++++++++++++-- developer_toolbox/build_retrodeck_locally.sh | 3 -- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/automation_tools/install_dependencies.sh b/automation_tools/install_dependencies.sh index 91503927..66edb4a6 100755 --- a/automation_tools/install_dependencies.sh +++ b/automation_tools/install_dependencies.sh @@ -1,6 +1,29 @@ #!/bin/bash -# This scritp is installing the required dependencies to correctly run the pipeline and buold the flatpak +# This script is installing the required dependencies to correctly run the pipeline and build the flatpak + +# rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want) +for pkg_manager in apt pacman rpm-ostree dnf; do + command -v "$pkg_manager" &> /dev/null && result="$pkg_manager" && break +done + +case $result in + apt) + sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq + ;; + pacman) + sudo pacman -S --noconfirm flatpak flatpak-builder p7zip xmlstarlet bzip2 + ;; + rpm-ostree) + echo "When using a distro with rpm-ostree, you shouldn't build directly on the host. Try using a distrobox." + exit 1 + ;; + dnf) + sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl + ;; + *) + echo "Package manager $result not supported. Please open an issue." + ;; +esac -sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo -flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo \ No newline at end of file +flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo diff --git a/developer_toolbox/build_retrodeck_locally.sh b/developer_toolbox/build_retrodeck_locally.sh index 9682e3bd..85b9e90e 100755 --- a/developer_toolbox/build_retrodeck_locally.sh +++ b/developer_toolbox/build_retrodeck_locally.sh @@ -2,9 +2,6 @@ # WARNING: run this script from the project root folder, not from here!! -# TODO: FEDORA -# sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl - git submodule update --init --recursive export GITHUB_WORKSPACE="." From 9f69f9a9546d80cff7aa43fcd7d45965ca37b02f Mon Sep 17 00:00:00 2001 From: Libretto <> Date: Sun, 21 Apr 2024 22:41:19 +0200 Subject: [PATCH 3/4] Build deps: Unset result variable before use --- automation_tools/install_dependencies.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation_tools/install_dependencies.sh b/automation_tools/install_dependencies.sh index 66edb4a6..0243fc15 100755 --- a/automation_tools/install_dependencies.sh +++ b/automation_tools/install_dependencies.sh @@ -1,6 +1,8 @@ #!/bin/bash # This script is installing the required dependencies to correctly run the pipeline and build the flatpak +unset result + # rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want) for pkg_manager in apt pacman rpm-ostree dnf; do command -v "$pkg_manager" &> /dev/null && result="$pkg_manager" && break From 6deef1d40ae106a92d2b78f666bf4cae4c0f7ddf Mon Sep 17 00:00:00 2001 From: Libretto <> Date: Sun, 21 Apr 2024 23:49:16 +0200 Subject: [PATCH 4/4] Build deps: Clearer variable names --- automation_tools/install_dependencies.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/automation_tools/install_dependencies.sh b/automation_tools/install_dependencies.sh index 0243fc15..3daa4edb 100755 --- a/automation_tools/install_dependencies.sh +++ b/automation_tools/install_dependencies.sh @@ -1,14 +1,14 @@ #!/bin/bash # This script is installing the required dependencies to correctly run the pipeline and build the flatpak -unset result +unset pkg_mgr # rpm-ostree must be checked before dnf because a dnf (wrapper) command also works on rpm-ostree distros (not what we want) -for pkg_manager in apt pacman rpm-ostree dnf; do - command -v "$pkg_manager" &> /dev/null && result="$pkg_manager" && break +for potential_pkg_mgr in apt pacman rpm-ostree dnf; do + command -v "$potential_pkg_mgr" &> /dev/null && pkg_mgr="$potential_pkg_mgr" && break done -case $result in +case "$pkg_mgr" in apt) sudo apt install -y flatpak flatpak-builder p7zip-full xmlstarlet bzip2 curl jq ;; @@ -23,7 +23,7 @@ case $result in sudo dnf install -y flatpak flatpak-builder p7zip p7zip-plugins xmlstarlet bzip2 curl ;; *) - echo "Package manager $result not supported. Please open an issue." + echo "Package manager $pkg_mgr not supported. Please open an issue." ;; esac