diff --git a/.drone.yml b/.drone.yml index 6e0f41f4..003a176a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -71,6 +71,7 @@ steps: - test -d .ci/build && rm -r .ci/build + - name: ffdd-ubuntu2004-build image: ubuntu:20.04 commands: @@ -94,22 +95,18 @@ steps: recursive: false delete: false -# -# u22.04 can't build uci -# use u20.04 build for u22.04 - -#- name: ffdd-ubuntu2004-clear -# image: ubuntu:20.04 -# commands: -# - test -d .ci/build && rm -r .ci/build +- name: ffdd-ubuntu2004-clear + image: ubuntu:20.04 + commands: + - test -d .ci/build && rm -r .ci/build -#- name: ffdd-ubuntu2204-build -# image: ubuntu:22.04 -# commands: -# - cd .ci -# - bash install_deps.sh -# - bash build_uci.sh +- name: ffdd-ubuntu2204-build + image: ubuntu:22.04 + commands: + - cd .ci + - bash install_deps.sh + - bash build_uci.sh - name: ffdd-ubuntu2204-deploy image: drillster/drone-rsync @@ -131,3 +128,32 @@ steps: image: ubuntu:22.04 commands: - test -d .ci/build && rm -r .ci/build + + +- name: ffdd-ubuntu2404-build + image: ubuntu:24.04 + commands: + - cd .ci + - bash install_deps.sh + - bash build_uci.sh + +- name: ffdd-ubuntu2404-deploy + image: drillster/drone-rsync + settings: + hosts: + from_secret: HOST + port: + from_secret: PORT + key: + from_secret: SSH_PRIVATE_KEY + user: + from_secret: USER + source: .ci/build/*.deb + target: /var/www/files/server/packages/ubuntu24/ + recursive: false + delete: false + +- name: ffdd-ubuntu2404-clear + image: ubuntu:24.04 + commands: + - test -d .ci/build && rm -r .ci/build diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50ee2548..58a2484f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ docker:ffdd-debian11: ffdd-debian11-staging: stage: deploy - image: debian:11 + image: debian:12 only: - master dependencies: @@ -58,7 +58,7 @@ docker:ffdd-debian12: ffdd-debian12-staging: stage: deploy - image: debian:11 + image: debian:12 only: - master dependencies: @@ -75,6 +75,7 @@ ffdd-debian12-staging: - docker2 + docker:ffdd-ubuntu2004: except: - schedules @@ -93,7 +94,7 @@ docker:ffdd-ubuntu2004: ffdd-ubuntu2004-staging: stage: deploy - image: debian:11 + image: debian:12 only: - master dependencies: @@ -126,9 +127,9 @@ docker:ffdd-ubuntu2204: tags: - docker2 -ffdd-ubuntu2004-staging: +ffdd-ubuntu2204-staging: stage: deploy - image: debian:11 + image: debian:12 only: - master dependencies: @@ -143,3 +144,38 @@ ffdd-ubuntu2004-staging: - rsync -avz -e "ssh -p $PORT" .ci/build/* "$USER"@"$HOST":"$RPATH"/ubuntu22/ tags: - docker2 + + +docker:ffdd-ubuntu2404: + except: + - schedules + image: ubuntu:24.04 + stage: build + script: + - cd .ci + - bash install_deps.sh + - bash build_uci.sh + artifacts: + paths: + - .ci/build/*.deb + expire_in: 24 hour + tags: + - docker2 + +ffdd-ubuntu2404-staging: + stage: deploy + image: debian:12 + only: + - master + dependencies: + - docker:ffdd-ubuntu2404 + before_script: + - apt-get update -y && apt-get install -y openssh-client rsync + - eval $(ssh-agent -s) + - mkdir -p ~/.ssh ; chmod 700 ~/.ssh + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - ssh-keyscan -p "$PORT" "$HOST" >> ~/.ssh/known_hosts + script: + - rsync -avz -e "ssh -p $PORT" .ci/build/* "$USER"@"$HOST":"$RPATH"/ubuntu24/ + tags: + - docker2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 68305e05..2ca00c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Freifunk Dresden: ffdd-server - Changelog `current version:` ![calver](https://img.shields.io/github/v/release/freifunk-dresden/ffdd-server?include_prereleases) +## version 1.6.0rc1 + - add support for ubuntu 24.04 (LTS) + ## version 1.5.1rc1 - fix salt installation and change to new salt repo - install 'saltext-apache' extensions to replace deprecated 'apache' functionality in salt - add persistent keepalive for wireguard vpn gateway connections - - update dns for vpn5 and vpn21 + - update bind (dns) zonefiles - fix monitorix sources ## version 1.5.0 diff --git a/init_server.sh b/init_server.sh index b9fda423..6708f55e 100755 --- a/init_server.sh +++ b/init_server.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#version="1.5.1" +#version="1.6.0" # check if user has set the environment variable REV, then use this REV="T_RELEASE_latest" # means git rev/branch/tag @@ -33,16 +33,17 @@ install_uci() { libuci='libuci_20200427_amd64.deb' uci='uci_20200427_amd64.deb' - pkgs=("$libubox" "$libuci" "$uci") + PKGS=("$libubox" "$libuci" "$uci") + DIST="$1" - for PKG in "${pkgs[@]}"; do + for PKG in "${PKGS[@]}"; do PKG_NAME="$(echo "$PKG" | cut -d'_' -f 1)" PKG_VERSION="$(echo "$PKG" | cut -d'_' -f 2 | grep -o '[0-9]*')" # check pkg is not installed or has another version if [ "$(dpkg-query -W -f='${Status}' "$PKG_NAME" 2>/dev/null | grep -c "ok installed")" -eq 0 ] || \ [ "$(dpkg-query -W -f='${Version}' "$PKG_NAME")" != "$PKG_VERSION" ]; then TEMP_DEB="$(mktemp)" && - wget -O "$TEMP_DEB" "$DL_URL/$1/$PKG" && + wget -O "$TEMP_DEB" "$DL_URL/$DIST/$PKG" && dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB" fi @@ -74,7 +75,7 @@ print_not_supported_os() { printf 'OS is not supported! (for more Informations read the Repository README.md)\n' printf 'Supported OS List:\n' printf ' - Debian (11/12)\n' - printf ' - Ubuntu Server LTS (20.04/22.04)\n' + printf ' - Ubuntu Server LTS (20.04/22.04/24.04)\n' exit 1 } @@ -231,6 +232,9 @@ elif [ "$os_id" = 'ubuntu' ]; then 22.04*) PKGMNGR='apt-get' install_uci ubuntu22 ;; + 24.04*) PKGMNGR='apt-get' + install_uci ubuntu24 + ;; *) print_not_supported_os ;; esac printf '\nOK.\n' diff --git a/salt/freifunk/base/bmxd/init.sls b/salt/freifunk/base/bmxd/init.sls index 8d893262..2efce22d 100644 --- a/salt/freifunk/base/bmxd/init.sls +++ b/salt/freifunk/base/bmxd/init.sls @@ -25,6 +25,9 @@ bmxd: {% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'jammy' %} - bmxd: {{ freifunk_dl_url }}/ubuntu22/bmxd-{{ bmxd_version }}-ubuntu-jammy-amd64.deb +{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'noble' %} + - bmxd: {{ freifunk_dl_url }}/ubuntu24/bmxd-{{ bmxd_version }}-ubuntu-noble-amd64.deb + {% endif %} diff --git a/salt/freifunk/base/devel.sls b/salt/freifunk/base/devel.sls index 0e146fb0..1edb3bf0 100644 --- a/salt/freifunk/base/devel.sls +++ b/salt/freifunk/base/devel.sls @@ -12,22 +12,16 @@ devel: - libssl-dev - libnacl-dev - libjson-c-dev - -{% if grains['os'] == 'Ubuntu' and grains['oscodename'] == 'focal' %} - - libcurl4 {# dep. to build fastd2 #} - libmnl-dev -{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'jammy' %} - - libcurl4 - {# dep. to build fastd2 #} - - libmnl-dev - -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} +{% if grains['os'] == 'Ubuntu' and grains['oscodename'] == 'noble' %} + - libcurl4t64 +{% else %} - libcurl4 - {# dep. to build fastd2 #} - - libmnl-dev +{% endif %} +{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} {# workaround for fastd libjson-c-dev #} /usr/lib/x86_64-linux-gnu/libjson-c.so.3: file.symlink: @@ -35,13 +29,4 @@ devel: - force: true - require: - pkg: libjson-c-dev - -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %} - - libcurl4 - {# dep. to build fastd2 #} - - libmnl-dev - -{% else %} - - libcurl3 - {% endif %} diff --git a/salt/freifunk/base/install_pkg.sls b/salt/freifunk/base/install_pkg.sls index 74f59909..8ad6d816 100644 --- a/salt/freifunk/base/install_pkg.sls +++ b/salt/freifunk/base/install_pkg.sls @@ -50,22 +50,6 @@ install_pkg: - jq -{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} - - python-apt-common - - iptraf-ng -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %} - - python-apt-common - - iptraf-ng -{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'jammy' %} - - python3-apt - - python3-pycurl - - iptraf-ng -{% else %} - - python-apt - - iptraf -{% endif %} - - {% if grains['os'] == 'Debian' %} - firmware-linux {% elif grains['os'] == 'Ubuntu' %} @@ -75,5 +59,18 @@ install_pkg: {% if grains['os'] == 'Ubuntu' and grains['oscodename'] == 'focal' %} + - python-apt - python-pycurl + - iptraf +{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'jammy' %} + - python3-apt + - python3-pycurl + - iptraf-ng +{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'noble' %} + - python3-apt + - python3-pycurl + - iptraf-ng +{% if grains['os'] == 'Debian' %} + - python-apt-common + - iptraf-ng {% endif %} diff --git a/salt/freifunk/base/uci/init.sls b/salt/freifunk/base/uci/init.sls index 1d5c8cd5..1331961c 100644 --- a/salt/freifunk/base/uci/init.sls +++ b/salt/freifunk/base/uci/init.sls @@ -55,6 +55,11 @@ uci: - libuci: {{ freifunk_dl_url }}/ubuntu22/libuci_{{ libuci_version }}_amd64.deb - uci: {{ freifunk_dl_url }}/ubuntu22/uci_{{ uci_version }}_amd64.deb +{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'noble' %} + - libubox: {{ freifunk_dl_url }}/ubuntu24/libubox_{{ libubox_version }}_amd64.deb + - libuci: {{ freifunk_dl_url }}/ubuntu24/libuci_{{ libuci_version }}_amd64.deb + - uci: {{ freifunk_dl_url }}/ubuntu24/uci_{{ uci_version }}_amd64.deb + {% endif %} uci_ldconfig: