Unverified Commit 589d37f9 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Make logo replacement conditional (#853)

parent 90748e28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,5 +20,5 @@ jobs:
        uses: hadolint/hadolint-action@v3.3.0
        with:
          dockerfile: Dockerfile
          ignore: DL3008,DL3003
          ignore: DL3008,DL3003,DL3006
          failure-threshold: warning
+2 −2
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ RUN set -eu && \
    wget "https://github.com/novnc/noVNC/archive/refs/heads/master.tar.gz" -O /tmp/novnc.tar.gz -q --timeout=10 && \
    tar -xf /tmp/novnc.tar.gz -C /tmp/ && \
    cd "/tmp/noVNC-master" && \
    mv app core vendor package.json *.html /usr/share/novnc && \
    mv app core vendor package.json ./*.html /usr/share/novnc && \
    unlink /etc/nginx/sites-enabled/default && \
    sed -i 's/^worker_processes.*/worker_processes 1;/' /etc/nginx/nginx.conf && \
    echo "$VERSION_ARG" > /run/version && \
@@ -54,7 +54,7 @@ RUN set -eu && \

COPY --chmod=755 ./src /run/
COPY --chmod=755 ./web /var/www/
COPY --chmod=755 --from=src /utk.bin /run
COPY --chmod=755 --from=src /utk.bin /run/
COPY --chmod=664 ./web/conf/defaults.json /usr/share/novnc
COPY --chmod=664 ./web/conf/mandatory.json /usr/share/novnc
COPY --chmod=744 ./web/conf/nginx.conf /etc/nginx/default.conf
+3 −1
Original line number Diff line number Diff line
@@ -70,8 +70,10 @@ case "${BOOT_MODE,,}" in
    if [ ! -s "$DEST.rom" ] || [ ! -f "$DEST.rom" ]; then
      [ ! -s "$OVMF/$ROM" ] || [ ! -f "$OVMF/$ROM" ] && error "UEFI boot file ($OVMF/$ROM) not found!" && exit 44
      cp "$OVMF/$ROM" "$DEST.rom"
      if [[ "${LOGO:-}" != [Nn]* ]]; then
        /run/utk.bin "$DEST.rom" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.rom"
      fi
    fi

    if [ ! -s "$DEST.vars" ] || [ ! -f "$DEST.vars" ]; then
      [ ! -s "$OVMF/$VARS" ] || [ ! -f "$OVMF/$VARS" ]&& error "UEFI vars file ($OVMF/$VARS) not found!" && exit 45
+3 −3
Original line number Diff line number Diff line
@@ -78,8 +78,8 @@ getURL() {
      if [[ "$ret" == "url" ]]; then
        body=$(pipe "https://getfedora.org/releases.json") || exit 65
        version=$(echo "$body" | jq -r 'map(.version) | unique | .[]' | sed 's/ /_/g' | sed '/_Beta/d' | sort -r | head -n 1)
        url=$(echo "$body" | jq -r "map(select(.arch==\"x86_64\" and .version==\"${version}\" and .variant==\"Workstation\" and .subvariant==\"Workstation\" )) | .[].link")
        arm=$(echo "$body" | jq -r "map(select(.arch==\"aarch64\" and .version==\"${version}\" and .variant==\"Workstation\" and .subvariant==\"Workstation\" )) | .[].link")
        url=$(echo "$body" | jq -r "map(select(.arch==\"x86_64\" and .version==\"${version}\" and .variant==\"Workstation\" and .subvariant==\"Workstation\" )) | .[].link" | grep -m 1 .iso)
        arm=$(echo "$body" | jq -r "map(select(.arch==\"aarch64\" and .version==\"${version}\" and .variant==\"Workstation\" and .subvariant==\"Workstation\" )) | .[].link" | grep -m 1 .iso)
      fi ;;
    "gentoo" | "gentoolinux" | "gentoo-linux" )
      name="Gentoo Linux"
@@ -177,7 +177,7 @@ getURL() {
        body=$(pipe "https://api.launchpad.net/devel/ubuntu/series") || exit 65
        version=$(echo "$body" | jq -r '.entries | .[] | select(.status=="Current Stable Release").version')
        url="https://releases.ubuntu.com/${version}/ubuntu-${version}-desktop-amd64.iso"
        arm="https://cdimage.ubuntu.com/releases/${version}/release/ubuntu-${version}desktop-arm64.iso"
        arm="https://cdimage.ubuntu.com/releases/${version}/release/ubuntu-${version}-desktop-arm64.iso"
      fi ;;
    "ubuntus" | "ubuntu-server")
      name="Ubuntu Server"