diff --git a/ci-scripts/junit.tpl b/ci-scripts/junit.tpl index e3d95fa..00e2aa7 100644 --- a/ci-scripts/junit.tpl +++ b/ci-scripts/junit.tpl @@ -10,7 +10,7 @@ {{- end -}} {{ range .Vulnerabilities }} - <{{ if .FixedVersion -}}error{{- else -}}skipped{{- end }} message="{{ escapeXML .Title }}" type="description">Upgrade {{ .PkgName }} to {{ .FixedVersion }} - {{ escapeXML .Description }} + <{{ if not .FixedVersion -}}passed{{- else if (eq .Vulnerability.Severity "CRITICAL") -}}failure{{- else if (eq .Vulnerability.Severity "HIGH") -}}error{{- else -}}skipped{{- end }} message="{{ escapeXML .Title }}" type="description">Upgrade {{ .PkgName }} to {{ .FixedVersion }} - {{ escapeXML .Description }} {{- end }} diff --git a/dockerfile-kasm-core-alpine b/dockerfile-kasm-core-alpine index f7a9483..8654d58 100644 --- a/dockerfile-kasm-core-alpine +++ b/dockerfile-kasm-core-alpine @@ -41,6 +41,10 @@ ENV DISTRO=$DISTRO \ WORKDIR $HOME RUN mkdir -p $HOME/Desktop +### Setup package rules +COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/ +RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/ + ### Install custom fonts COPY ./src/ubuntu/install/fonts $INST_SCRIPTS/fonts/ RUN bash $INST_SCRIPTS/fonts/install_custom_fonts.sh && rm -rf $INST_SCRIPTS/fonts/ diff --git a/dockerfile-kasm-core-suse b/dockerfile-kasm-core-suse index f5997c6..457318d 100644 --- a/dockerfile-kasm-core-suse +++ b/dockerfile-kasm-core-suse @@ -45,6 +45,10 @@ ENV HOME=/home/kasm-default-profile \ WORKDIR $HOME RUN mkdir -p $HOME/Desktop +### Setup package rules +COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/ +RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/ + ### Install custom fonts COPY ./src/ubuntu/install/fonts $INST_SCRIPTS/fonts/ RUN bash $INST_SCRIPTS/fonts/install_custom_fonts.sh && rm -rf $INST_SCRIPTS/fonts/ diff --git a/src/ubuntu/install/package_rules/package_rules.sh b/src/ubuntu/install/package_rules/package_rules.sh index 0a50182..d24f31b 100644 --- a/src/ubuntu/install/package_rules/package_rules.sh +++ b/src/ubuntu/install/package_rules/package_rules.sh @@ -18,3 +18,19 @@ elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then yum reinstall -y \ glibc-common fi + +echo "Upgrading packages from upstream base image" +if [[ "${DISTRO}" == @(centos|oracle7) ]] ; then + yum update -y +elif [[ "${DISTRO}" == @(fedora37|fedora38|oracle8|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9) ]]; then + dnf upgrade -y --refresh +elif [ "${DISTRO}" == "opensuse" ]; then + zypper --non-interactive patch --auto-agree-with-licenses +elif [ "${DISTRO}" == "alpine" ]; then + apk update + apk add --upgrade apk-tools + apk upgrade --available +else + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y +fi \ No newline at end of file