diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 22af286..07fc029 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SYSLOG_NG_MAIN\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ + EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:'"syslog-ng"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" diff --git a/Dockerfile b/Dockerfile index 4571678..e68d0f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:3.16 ARG BUILD_DATE ARG VERSION @@ -11,7 +11,7 @@ RUN \ apk add -U --upgrade --no-cache \ curl && \ if [ -z ${SYSLOG_NG_VERSION+x} ]; then \ - SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ + SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ fi && \ apk add -U --upgrade --no-cache \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 425b7cf..6aea8fa 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16 ARG BUILD_DATE ARG VERSION @@ -11,7 +11,7 @@ RUN \ apk add -U --upgrade --no-cache \ curl && \ if [ -z ${SYSLOG_NG_VERSION+x} ]; then \ - SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \ + SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ fi && \ apk add -U --upgrade --no-cache \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 1d02b2b..724e34f 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16 ARG BUILD_DATE ARG VERSION @@ -11,7 +11,7 @@ RUN \ apk add -U --upgrade --no-cache \ curl && \ if [ -z ${SYSLOG_NG_VERSION+x} ]; then \ - SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/main/armhf/APKINDEX.tar.gz" | tar -xz -C /tmp \ + SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/main/armhf/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ fi && \ apk add -U --upgrade --no-cache \ diff --git a/Jenkinsfile b/Jenkinsfile index 4ec05c7..942b9a4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,8 +25,8 @@ pipeline { DEV_DOCKERHUB_IMAGE = 'lsiodev/syslog-ng' PR_DOCKERHUB_IMAGE = 'lspipepr/syslog-ng' DIST_IMAGE = 'alpine' - DIST_TAG = '3.15' - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/main/' + DIST_TAG = '3.16' + DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/main/' DIST_REPO_PACKAGES = 'syslog-ng' MULTIARCH = 'true' CI='true' diff --git a/README.md b/README.md index 812b782..33435e4 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **01.10.22:** - Rebase to Alpine 3.16, migrate to s6v3. * **18.12.21:** - Rebase to Alpine 3.15. * **01.07.21:** - Rebase to Alpine 3.14. * **26.05.21:** - Initial release. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 846097d..6fd94c1 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -15,8 +15,8 @@ repo_vars: - DEV_DOCKERHUB_IMAGE = 'lsiodev/syslog-ng' - PR_DOCKERHUB_IMAGE = 'lspipepr/syslog-ng' - DIST_IMAGE = 'alpine' - - DIST_TAG = '3.15' - - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/main/' + - DIST_TAG = '3.16' + - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/main/' - DIST_REPO_PACKAGES = 'syslog-ng' - MULTIARCH = 'true' - CI='true' diff --git a/readme-vars.yml b/readme-vars.yml index 15eb166..428ac76 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -45,6 +45,7 @@ app_setup_block: | # changelog changelogs: + - { date: "01.10.22:", desc: "Rebase to Alpine 3.16, migrate to s6v3." } - { date: "18.12.21:", desc: "Rebase to Alpine 3.15." } - { date: "01.07.21:", desc: "Rebase to Alpine 3.14." } - { date: "26.05.21:", desc: "Initial release." } diff --git a/root/defaults/syslog-ng.conf b/root/defaults/syslog-ng.conf index 797d433..2a37b6d 100644 --- a/root/defaults/syslog-ng.conf +++ b/root/defaults/syslog-ng.conf @@ -2,7 +2,7 @@ # Default syslog-ng.conf file which collects all local logs into a # single file called /var/log/messages tailored to container usage. -@version: 3.29 +@version: 3.35 @include "scl.conf" source s_local { diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config deleted file mode 100644 index cd04e23..0000000 --- a/root/etc/cont-init.d/50-config +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/with-contenv bash - -#Copy defaults -if [ ! -f "/config/syslog-ng.conf" ]; then - cp -a /defaults/syslog-ng.conf /config/syslog-ng.conf -fi - -chown -R abc:abc \ - /config \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-syslog-ng-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-syslog-ng-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/run b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/run new file mode 100755 index 0000000..57ec82c --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/run @@ -0,0 +1,31 @@ +#!/usr/bin/with-contenv bash + +#Copy defaults +if [[ ! -f "/config/syslog-ng.conf" ]]; then + cp -a /defaults/syslog-ng.conf /config/syslog-ng.conf +fi + +if [[ -f "/config/syslog-ng.conf" ]] && [[ $(grep "@version: 3.29" "/config/syslog-ng.conf") ]]; then + SYSLOG_VERSION=$(syslog-ng --version | grep "Config version" | awk -F ':' '{print $2}' | tr -d '[:space:]') +cat <<-EOF +******************************************************** +******************************************************** +* * +* !!!! * +* WARNING: Configuration file format is too old, * +* syslog-ng is running in compatibility mode. * +* * +* To upgrade the configuration, please review any * +* warnings about incompatible changes in the log. * +* * +* Once completed change the @version header at the * +* top of the configuration file to "${SYSLOG_VERSION}" * +* * +* * +******************************************************** +******************************************************** +EOF +fi + +chown -R abc:abc \ + /config diff --git a/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/type b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/up b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/up new file mode 100644 index 0000000..89a0ddc --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-syslog-ng-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/consumer-for b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/consumer-for new file mode 100644 index 0000000..685030d --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/consumer-for @@ -0,0 +1 @@ +svc-syslog-ng \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/pipeline-name b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/pipeline-name new file mode 100644 index 0000000..100bdb6 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/pipeline-name @@ -0,0 +1 @@ +pipeline-syslog-ng \ No newline at end of file diff --git a/root/etc/services.d/syslog-ng/log/run b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/run similarity index 86% rename from root/etc/services.d/syslog-ng/log/run rename to root/etc/s6-overlay/s6-rc.d/log-syslog-ng/run index f9c1c5b..0faa636 100755 --- a/root/etc/services.d/syslog-ng/log/run +++ b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/log/ \ No newline at end of file + s6-setuidgid abc s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/log/ diff --git a/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/type b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/type new file mode 100644 index 0000000..1780f9f --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/log-syslog-ng/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/producer-for b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/producer-for new file mode 100644 index 0000000..bebc1a7 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/producer-for @@ -0,0 +1 @@ +log-syslog-ng \ No newline at end of file diff --git a/root/etc/services.d/syslog-ng/run b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/run similarity index 100% rename from root/etc/services.d/syslog-ng/run rename to root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/run diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/type b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-syslog-ng/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-syslog-ng-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-syslog-ng-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/log-syslog-ng b/root/etc/s6-overlay/s6-rc.d/user/contents.d/log-syslog-ng new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-syslog-ng b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-syslog-ng new file mode 100644 index 0000000..e69de29