From 45ffdf4f06cf03d69e6f44ad988beacd69f4044a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Sun, 3 Nov 2024 17:37:44 +0100 Subject: [PATCH] Update support for Fedora to version 41 and drop support for version 40 across workflows, Dockerfiles, and documentation --- .github/workflows/1.5.yml | 2 +- .github/workflows/beta.yml | 5 +++-- .github/workflows/dev.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/staging.yml | 2 +- CHANGELOG.md | 1 + README.md | 2 +- docs/integrations.md | 2 +- src/deps/install.sh | 2 +- src/linux/Dockerfile-fedora | 9 ++++++--- src/linux/fpm-fedora | 4 ++-- tests/linux/Dockerfile-fedora | 2 +- 12 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/1.5.yml b/.github/workflows/1.5.yml index fc888e7de..9f5874c3a 100644 --- a/.github/workflows/1.5.yml +++ b/.github/workflows/1.5.yml @@ -208,7 +208,7 @@ jobs: package_arch: x86_64 separator: "-" suffix: "1." - version: 40 + version: 41 package: rpm - linux: el package_arch: x86_64 diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index f79f3cea4..2e14b176a 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -147,7 +147,8 @@ jobs: needs: [create-arm, wait-builds] strategy: matrix: - image: [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] + image: + [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] include: - release: beta - image: bunkerweb @@ -198,7 +199,7 @@ jobs: - linux: fedora separator: "-" suffix: "1." - version: 40 + version: 41 package: rpm - linux: el separator: "-" diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 4bda15cf5..1706c6e56 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -210,7 +210,7 @@ jobs: package_arch: x86_64 separator: "-" suffix: "1." - version: 40 + version: 41 package: rpm - linux: el package_arch: x86_64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8103707be..08b0e30b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -211,7 +211,7 @@ jobs: - linux: fedora separator: "-" suffix: "1." - version: 40 + version: 41 package: rpm - linux: el separator: "-" diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index b6147c1ea..e2ad39a4c 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -244,7 +244,7 @@ jobs: package_arch: x86_64 separator: "-" suffix: "1." - version: 40 + version: 41 package: rpm - linux: el package_arch: x86_64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f08592d7..7994e5f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - [SCHEDULER] Refactor the scheduler to use the `BUNKERWEB_INSTANCES` (previously known as `OVERRIDE_INSTANCES`) environment variable instead of an integration specific system - [AUTOCONF] Add new `NAMESPACES` environment variable to allow setting the namespaces to watch for the autoconf feature which makes it possible to use multiple autoconf instances in the same cluster while keeping the configuration separated - [AUTOCONF] Add new `USE_KUBERNETES_FQDN` environment variable to allow using the full qualified domain name of the services in Kubernetes instead of the ip address for the hostname of instances (default is yes) +- [LINUX] Support Fedora 41 and drop support of Fedora 40 - [UI] Start refactoring the UI to make it more modular and easier to maintain - [UI] Add a `remember me` feature to the login page so that the user can stay logged in for a longer period of time (expires after 31 days) - [UI] Add new `TOTP_SECRETS` setting to encrypt the TOTP secrets in the database (if not set, we generate a random amount of secrets via passlib.totp) - ⚠ We highly recommend setting this setting to a custom value to prevent the secrets from being erased when the volumes are deleted diff --git a/README.md b/README.md index abb33fbd7..77d9b3238 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,7 @@ List of supported Linux distros : - Debian 12 "Bookworm" - Ubuntu 22.04 "Noble" - Ubuntu 24.04 "Jammy" -- Fedora 40 +- Fedora 41 - RHEL 8.9 - RHEL 9.4 diff --git a/docs/integrations.md b/docs/integrations.md index e08b31ee2..0a344ef02 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -323,7 +323,7 @@ Supported Linux distributions for BunkerWeb (amd64/x86_64 and arm64/aarch64 arch - Debian 12 "Bookworm" - Ubuntu 22.04 "Jammy" - Ubuntu 24.04 "Noble" -- Fedora 40 +- Fedora 41 - Red Hat Enterprise Linux (RHEL) 8.9 - Red Hat Enterprise Linux (RHEL) 9.4 diff --git a/src/deps/install.sh b/src/deps/install.sh index 3838c2e38..87404f2cd 100644 --- a/src/deps/install.sh +++ b/src/deps/install.sh @@ -202,7 +202,7 @@ CONFARGS="${CONFARGS/-Os -fomit-frame-pointer -g/-Os}" CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt=-Wl/--with-ld-opt='-lpcre -Wl'/")" CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt='-Wl/--with-ld-opt='-lpcre -Wl/")" if [ "$OS" = "fedora" ] ; then - CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt='.*'/--with-ld-opt=-lpcre/" | sed "s/--with-cc-opt='.*'//")" + CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt='.*'/--with-ld-opt=-lpcre/" | sed "s/--with-cc-opt='.*'//" | sed "s/--without-engine//")" fi # Set CFALGS diff --git a/src/linux/Dockerfile-fedora b/src/linux/Dockerfile-fedora index 730139991..2d44c4e79 100644 --- a/src/linux/Dockerfile-fedora +++ b/src/linux/Dockerfile-fedora @@ -1,4 +1,4 @@ -FROM fedora:40@sha256:d0207dbb078ee261852590b9a8f1ab1f8320547be79a2f39af9f3d23db33735e AS builder +FROM fedora:41@sha256:3ec60eb34fa1a095c0c34dd37cead9fd38afb62612d43892fcf1d3425c32bc1e AS builder ENV OS=fedora ENV NGINX_VERSION=1.26.2 @@ -7,7 +7,7 @@ ENV NGINX_VERSION=1.26.2 RUN dnf update -y && \ dnf install -y curl gnupg2 ca-certificates redhat-lsb-core make gcc && \ dnf install -y --setopt=install_weak_deps=False python3 python3-devel python3-pip brotli brotli-devel gperftools-devel perl libxslt-devel libxml2 yajl yajl-devel libxslt bash gd gd-devel gcc-c++ kernel-devel znc-modtcl libmpc-devel gmp-devel gawk mpfr-devel libtool pcre-devel automake autoconf readline-devel gcc make openssl-devel git zlib-devel libxml2-devel pkgconf libcurl-devel geoip-devel lmdb-devel && \ - dnf install --enablerepo=updates-testing nginx-${NGINX_VERSION} -y + dnf install nginx-${NGINX_VERSION} -y WORKDIR /tmp/bunkerweb/deps @@ -53,7 +53,7 @@ COPY src/scheduler scheduler COPY src/VERSION VERSION COPY src/ui ui -FROM fedora:40@sha256:d0207dbb078ee261852590b9a8f1ab1f8320547be79a2f39af9f3d23db33735e +FROM fedora:41@sha256:3ec60eb34fa1a095c0c34dd37cead9fd38afb62612d43892fcf1d3425c32bc1e # Set default umask to prevent huge recursive chmod increasing the final image size RUN umask 027 @@ -101,6 +101,9 @@ COPY src/linux/fpm-fedora /usr/share/.fpm COPY --chmod=644 src/linux/*.service /lib/systemd/system/ COPY --chmod=644 src/linux/bunkerweb.logrotate /etc/logrotate.d/bunkerweb +# TMP patch for fpm +RUN sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb + # Generate RPM at startup VOLUME /data WORKDIR /usr/share/ diff --git a/src/linux/fpm-fedora b/src/linux/fpm-fedora index 0e055f77d..daf8012b9 100644 --- a/src/linux/fpm-fedora +++ b/src/linux/fpm-fedora @@ -3,8 +3,8 @@ --license agpl3 --version %VERSION% --architecture %ARCH% ---depends bash --depends python3 --depends 'nginx >= 1:1.26.2' --depends 'nginx < 1:1.27.0' --depends 'nginx-mod-stream >= 1:1.26.2' --depends 'nginx-mod-stream < 1:1.27.0' --depends libcurl-devel --depends libxml2 --depends yajl --depends lmdb-libs --depends geoip-devel --depends gd --depends sudo --depends procps --depends lsof --depends pcre --depends libpq --depends libcap --depends openssl --depends logrotate --depends mysql --depends postgresql --depends sqlite3 --depends unzip ---description "BunkerWeb %VERSION% for Fedora 40" +--depends bash --depends python3 --depends 'nginx = 2:1.26.2' --depends 'nginx-mod-stream = 2:1.26.2' --depends libcurl-devel --depends libxml2 --depends yajl --depends lmdb-libs --depends geoip-devel --depends gd --depends sudo --depends procps --depends lsof --depends pcre --depends libpq --depends libcap --depends openssl --depends logrotate --depends mysql --depends postgresql --depends sqlite3 --depends unzip +--description "BunkerWeb %VERSION% for Fedora 41" --url "https://www.bunkerweb.io" --maintainer "Bunkerity " --before-install /usr/share/bunkerweb/scripts/beforeInstall.sh diff --git a/tests/linux/Dockerfile-fedora b/tests/linux/Dockerfile-fedora index e11de4739..9f13fb1fb 100644 --- a/tests/linux/Dockerfile-fedora +++ b/tests/linux/Dockerfile-fedora @@ -1,4 +1,4 @@ -FROM fedora:40@sha256:d0207dbb078ee261852590b9a8f1ab1f8320547be79a2f39af9f3d23db33735e +FROM fedora:41@sha256:3ec60eb34fa1a095c0c34dd37cead9fd38afb62612d43892fcf1d3425c32bc1e ENV container=docker ENV NGINX_VERSION=1.26.2