diff --git a/ci-scripts/template-vars.yaml b/ci-scripts/template-vars.yaml index 9f915c5..fe446cc 100644 --- a/ci-scripts/template-vars.yaml +++ b/ci-scripts/template-vars.yaml @@ -88,6 +88,7 @@ multiImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - src/opensuse/install/** - name: oracle-8-desktop base: core-oracle-8 @@ -101,6 +102,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: pinta base: core-ubuntu-focal dockerfile: dockerfile-kasm-pinta @@ -119,6 +121,15 @@ multiImages: changeFiles: - dockerfile-kasm-remmina - src/ubuntu/install/remmina/** + - name: slack + base: core-ubuntu-focal + dockerfile: dockerfile-kasm-slack + changeFiles: + - dockerfile-kasm-slack + - src/ubuntu/install/slack/** + - src/ubuntu/install/chrone/** + - src/ubuntu/install/tools/** + - src/ubuntu/install/cleanup/** - name: spiderfoot base: core-ubuntu-focal dockerfile: dockerfile-kasm-spiderfoot @@ -186,6 +197,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - name: ubuntu-focal-desktop-vpn base: core-ubuntu-focal dockerfile: dockerfile-kasm-ubuntu-focal-desktop-vpn @@ -211,6 +223,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - src/ubuntu/install/vpn/** - name: ubuntu-jammy-desktop base: core-ubuntu-jammy @@ -237,6 +250,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - name: vlc base: core-ubuntu-focal dockerfile: dockerfile-kasm-vlc @@ -261,6 +275,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: almalinux-9-desktop base: core-almalinux-9 dockerfile: dockerfile-kasm-almalinux-9-desktop @@ -272,6 +287,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: alpine-317-desktop base: core-alpine-317 dockerfile: dockerfile-kasm-alpine-317-desktop @@ -318,6 +334,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - name: debian-bookworm-desktop base: core-debian-bookworm dockerfile: dockerfile-kasm-debian-bookworm-desktop @@ -341,6 +358,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - name: fedora-37-desktop base: core-fedora-37 dockerfile: dockerfile-kasm-fedora-37-desktop @@ -352,6 +370,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: fedora-38-desktop base: core-fedora-38 dockerfile: dockerfile-kasm-fedora-38-desktop @@ -363,6 +382,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: kali-rolling-desktop base: core-kali-rolling dockerfile: dockerfile-kasm-kali-rolling-desktop @@ -388,6 +408,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: parrotos-5-desktop base: core-parrotos-5 dockerfile: dockerfile-kasm-parrotos-5-desktop @@ -415,6 +436,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: rockylinux-9-desktop base: core-rockylinux-9 dockerfile: dockerfile-kasm-rockylinux-9-desktop @@ -426,6 +448,7 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: super-tux-kart base: core-ubuntu-focal dockerfile: dockerfile-kasm-super-tux-kart diff --git a/dockerfile-kasm-almalinux-8-desktop b/dockerfile-kasm-almalinux-8-desktop index 5e21e4f..ce09479 100644 --- a/dockerfile-kasm-almalinux-8-desktop +++ b/dockerfile-kasm-almalinux-8-desktop @@ -30,6 +30,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/telegram/install_telegram.sh \ /oracle/install/obs/install_obs.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-almalinux-9-desktop b/dockerfile-kasm-almalinux-9-desktop index fd6386b..94511bd 100644 --- a/dockerfile-kasm-almalinux-9-desktop +++ b/dockerfile-kasm-almalinux-9-desktop @@ -28,6 +28,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-debian-bookworm-desktop b/dockerfile-kasm-debian-bookworm-desktop index 76b0b2b..f284e7a 100644 --- a/dockerfile-kasm-debian-bookworm-desktop +++ b/dockerfile-kasm-debian-bookworm-desktop @@ -31,6 +31,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ /ubuntu/install/terraform/install_terraform.sh \ /ubuntu/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/dockerfile-kasm-debian-bullseye-desktop b/dockerfile-kasm-debian-bullseye-desktop index 0a93584..1b4794e 100644 --- a/dockerfile-kasm-debian-bullseye-desktop +++ b/dockerfile-kasm-debian-bullseye-desktop @@ -31,6 +31,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ /ubuntu/install/terraform/install_terraform.sh \ /ubuntu/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/dockerfile-kasm-fedora-37-desktop b/dockerfile-kasm-fedora-37-desktop index 07be8dd..7444df1 100644 --- a/dockerfile-kasm-fedora-37-desktop +++ b/dockerfile-kasm-fedora-37-desktop @@ -28,6 +28,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-fedora-38-desktop b/dockerfile-kasm-fedora-38-desktop index 4f54be1..677b5d1 100644 --- a/dockerfile-kasm-fedora-38-desktop +++ b/dockerfile-kasm-fedora-38-desktop @@ -28,6 +28,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-opensuse-15-desktop b/dockerfile-kasm-opensuse-15-desktop index 8e838ff..92cb9bd 100644 --- a/dockerfile-kasm-opensuse-15-desktop +++ b/dockerfile-kasm-opensuse-15-desktop @@ -29,6 +29,7 @@ ENV SKIP_CLEAN=true \ /opensuse/install/terraform/install_terraform.sh \ /opensuse/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/langpacks/install_langpacks.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/dockerfile-kasm-oracle-8-desktop b/dockerfile-kasm-oracle-8-desktop index ef7d183..7b95ebe 100644 --- a/dockerfile-kasm-oracle-8-desktop +++ b/dockerfile-kasm-oracle-8-desktop @@ -30,6 +30,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-oracle-9-desktop b/dockerfile-kasm-oracle-9-desktop index 82100ca..170e531 100644 --- a/dockerfile-kasm-oracle-9-desktop +++ b/dockerfile-kasm-oracle-9-desktop @@ -29,6 +29,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-rockylinux-8-desktop b/dockerfile-kasm-rockylinux-8-desktop index 1553738..d895089 100644 --- a/dockerfile-kasm-rockylinux-8-desktop +++ b/dockerfile-kasm-rockylinux-8-desktop @@ -30,6 +30,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/telegram/install_telegram.sh \ /oracle/install/obs/install_obs.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-rockylinux-9-desktop b/dockerfile-kasm-rockylinux-9-desktop index 7f99c99..38f7ed9 100644 --- a/dockerfile-kasm-rockylinux-9-desktop +++ b/dockerfile-kasm-rockylinux-9-desktop @@ -28,6 +28,7 @@ ENV SKIP_CLEAN=true \ /oracle/install/terraform/install_terraform.sh \ /oracle/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/cleanup/cleanup.sh" # Copy install scripts diff --git a/dockerfile-kasm-ubuntu-focal-desktop b/dockerfile-kasm-ubuntu-focal-desktop index 4c5313d..2e35329 100644 --- a/dockerfile-kasm-ubuntu-focal-desktop +++ b/dockerfile-kasm-ubuntu-focal-desktop @@ -32,6 +32,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ /ubuntu/install/terraform/install_terraform.sh \ /ubuntu/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/dockerfile-kasm-ubuntu-focal-desktop-vpn b/dockerfile-kasm-ubuntu-focal-desktop-vpn index 847066c..e7b4800 100644 --- a/dockerfile-kasm-ubuntu-focal-desktop-vpn +++ b/dockerfile-kasm-ubuntu-focal-desktop-vpn @@ -32,6 +32,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ /ubuntu/install/terraform/install_terraform.sh \ /ubuntu/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ /ubuntu/install/vpn/install_vpn.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/dockerfile-kasm-ubuntu-jammy-desktop b/dockerfile-kasm-ubuntu-jammy-desktop index 6bd9487..e6da26a 100644 --- a/dockerfile-kasm-ubuntu-jammy-desktop +++ b/dockerfile-kasm-ubuntu-jammy-desktop @@ -32,6 +32,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ /ubuntu/install/terraform/install_terraform.sh \ /ubuntu/install/telegram/install_telegram.sh \ /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ /ubuntu/install/cleanup/cleanup.sh" diff --git a/src/ubuntu/install/slack/install_slack.sh b/src/ubuntu/install/slack/install_slack.sh index b4f4e23..5604f66 100644 --- a/src/ubuntu/install/slack/install_slack.sh +++ b/src/ubuntu/install/slack/install_slack.sh @@ -7,24 +7,35 @@ if [ "${ARCH}" == "arm64" ] ; then exit 0 fi -# This might prove fragile depending on how often slack changes it's -# website though they don't have a link to always getting the latest version. -# Perhaps a python script that parses the XML could be more robust -#slack_data=$(curl "https://slack.com/downloads/linux") -#version_data=$(grep -oPm1 '(?<=)[^<]+' <<< $slack_data) -#version=$(sed -n -e 's/Version //p' <<< $version_data) -#echo "Determined slack latest version to be: ${version}" - -# slack latest does not run with --no-sandbox, so we have to hard code to an older version. -version=4.12.2 +# This might prove fragile depending on how often slack changes it's website. +version=$(curl -q https://slack.com/downloads/linux | grep page-downloads__hero__meta-text__version | sed 's/.*Version //g' | cut -d "<" -f1 | head -1) +echo Detected slack version $version -# This path may not be accurate once arm64 support arrives. Specifically I don't know if it will still be under x64 -wget -q https://downloads.slack-edge.com/releases/linux/${version}/prod/x64/slack-desktop-${version}-${ARCH}.deb -apt-get update +if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|opensuse) ]]; then + + wget -q https://downloads.slack-edge.com/releases/linux/${version}/prod/x64/slack-${version}-0.1.el8.x86_64.rpm + + if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38) ]]; then + dnf localinstall -y slack-${version}-0.1.el8.x86_64.rpm + elif [[ "${DISTRO}" == "opensuse" ]]; then + wget https://slack.com/gpg/slack_pubkey_20230710.gpg + rpm --import slack_pubkey_20230710.gpg + zypper install -yn slack-${version}-0.1.el8.x86_64.rpm + else + yum localinstall -y slack-${version}-0.1.el8.x86_64.rpm + fi + + rm slack-${version}-0.1.el8.x86_64.rpm + +else + wget -q https://downloads.slack-edge.com/releases/linux/${version}/prod/x64/slack-desktop-${version}-${ARCH}.deb + apt-get update + apt-get install -y ./slack-desktop-${version}-${ARCH}.deb + rm slack-desktop-${version}-${ARCH}.deb +fi + -apt-get install -y ./slack-desktop-${version}-${ARCH}.deb -rm slack-desktop-${version}-${ARCH}.deb sed -i 's,/usr/bin/slack,/usr/bin/slack --no-sandbox,g' /usr/share/applications/slack.desktop cp /usr/share/applications/slack.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/slack.desktop