diff --git a/.github/actions/build-release-action/Dockerfile b/.github/actions/build-release-action/Dockerfile deleted file mode 100644 index 61a9d1f3..00000000 --- a/.github/actions/build-release-action/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -ARG IMAGE_VERSION_TAG -ARG NODE_VERSION - -FROM ubuntu:$IMAGE_VERSION_TAG - -LABEL maintainer="oetiker" \ - description="WG-wrangler builder" - -ENV DEBIAN_FRONTEND noninteractive - -ARG NODE_VERSION -RUN apt-get -y update && \ - apt-get -y install apt-utils curl && \ - curl https://deb.nodesource.com/setup_$NODE_VERSION | bash && \ - apt-get -u update && \ - apt-get -y install perl \ - make \ - gcc \ - devscripts \ - openssl \ - pkg-config \ - libssl-dev \ - debhelper \ - automake \ - nodejs \ - libkrb5-dev \ - libqrencode-dev \ - g++ \ - zlib1g-dev - -COPY make-deb.sh /make-deb.sh - -RUN chmod 777 /make-deb.sh - -ENTRYPOINT ["/make-deb.sh"] diff --git a/.github/actions/build-release-action/action.yaml b/.github/actions/build-release-action/action.yaml deleted file mode 100644 index 0ba93995..00000000 --- a/.github/actions/build-release-action/action.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: 'Docker release builder' -description: 'Build release packages using a docker image' - -inputs: - docker_file: - description: Target Docker file to build package - required: true - image_version_tag: - description: Tag which is prepended on the FROM directive - required: false - default: latest - node_version: - description: Node version for building the debian package - required: true - -outputs: - package_name: - description: name of the generated package - value: ${{ steps.run.outputs.package_name }} - -runs: - using: 'composite' - steps: - - id: build - name: Build Docker Image - run: | - docker build \ - --build-arg IMAGE_VERSION_TAG=${{inputs.image_version_tag}} \ - --build-arg NODE_VERSION=${{inputs.node_version}} \ - -f $(pwd)/.github/actions/build-release-action/${{inputs.docker_file}} \ - $(pwd)/.github/actions/build-release-action/ \ - -t deb_builder:latest - shell: bash - - id: run - name: Run Docker Image - run: docker run -v $(pwd):/github/workspace --workdir /github/workspace deb_builder:latest - shell: bash - - - diff --git a/.github/actions/build-release-action/make-deb.sh b/.github/actions/build-release-action/make-deb.sh deleted file mode 100755 index 61242670..00000000 --- a/.github/actions/build-release-action/make-deb.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -ex -cd /github/workspace/ - -# Overriding $HOME to prevent permissions issues when running on github actions -mkdir -p /tmp/home -chmod 0777 /tmp/home -export HOME=/tmp/home - -# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569 -mkdir -p deb_build_home -ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home -cd deb_build_home - -dh_clean -dpkg-buildpackage -us -uc -nc - -# set filename -release_code_name=$(lsb_release --codename | sed 's/Codename:\s*//') -package_name=$(basename ../*.deb | sed 's/.deb$//')_$release_code_name.deb -mv ../*.deb ../$package_name - -# set action output -echo "::set-output name=package_name::$package_name" \ No newline at end of file diff --git a/.github/workflows/build-deb.yaml b/.github/workflows/build-deb.yaml new file mode 100644 index 00000000..20b6d23f --- /dev/null +++ b/.github/workflows/build-deb.yaml @@ -0,0 +1,75 @@ +name: Build .deb packages + +on: + push: + tags: + - "v*" + + +jobs: + build_deb_packages: + strategy: + fail-fast: false + matrix: + include: + - distribution: debian + version: 10 + node_version: '16.x' + - distribution: debian + version: 11 + node_version: '18.x' + - distribution: ubuntu + version: 18.04 + node_version: '16.x' + - distribution: ubuntu + version: 20.04 + node_version: '18.x' + - distribution: ubuntu + version: 22.04 + node_version: '18.x' + + + runs-on: ubuntu-latest + name: Build package for ${{ matrix.distribution }} ${{ matrix.version }} + container: + image: ${{ matrix.distribution }}:${{ matrix.version }} + env: + DEBIAN_FRONTEND: noninteractive + # sneaky hack to make caches work because the cache action lives outside the container + options: --mount type=volume,dst=/__w/wgwrangler/wgwrangler/,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=${{ github.workspace }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node_version }} + - name: Install OS requirements + run: apt-get update && apt-get install -yq perl make gcc devscripts openssl pkg-config libssl-dev debhelper automake libkrb5-dev libqrencode-dev g++ zlib1g-dev + - name: Node Cache + id: node-cache + uses: actions/cache@v3 + with: + path: frontend/node_modules + key: ${{ matrix.distribution }}-node-${{ matrix.node_version }}-${{ hashFiles('package.json', '*/package.json','qx-lock.json', '*/qx-lock.json') }} + restore-keys: | + ${{ matrix.distribution }}-node-${{ matrix.node_version }}- + - name: CPAN cache + id: cpan_cache + uses: actions/cache@v3 + with: + path: thirdparty + key: ${{ matrix.distribution }}-cpan-${{ matrix.version }}-${{ hashFiles('cpanfile', '*/cpanfile', 'Makefile.am', '*/Makefile.am') }} + - name: Build package + id: build_package + run: bash make-deb.sh ${{ matrix.distribution }} ${{ matrix.version }} + - name: Release deb files + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ github.workspace }}/${{ steps.build_package.outputs.package_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml deleted file mode 100644 index ebfe25e2..00000000 --- a/.github/workflows/build-release.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: 'Build release' -on: - push: - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -jobs: - build_deb: - strategy: - fail-fast: false - matrix: - include: - - ubuntu: 18.04 - docker_file: Dockerfile - image_version_tag: '18.04' - node_version: '16.x' - - ubuntu: 20.04 - docker_file: Dockerfile - image_version_tag: '20.04' - node_version: '18.x' - - ubuntu: 22.04 - docker_file: Dockerfile - image_version_tag: '22.04' - node_version: '18.x' - - runs-on: ubuntu-latest - name: Package for Ubuntu ${{ matrix.image_version_tag }} with node ${{ matrix.node_version }} - steps: - - uses: actions/checkout@v2 - - name: Run docker build - id: build_package - uses: ./.github/actions/build-release-action - with: - docker_file: ${{ matrix.docker_file }} - image_version_tag: ${{ matrix.image_version_tag }} - node_version: ${{ matrix.node_version }} - - - name: Release deb files - uses: softprops/action-gh-release@v1 - with: - files: ${{ github.workspace }}/${{ steps.build_package.outputs.package_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index c92a871a..fdf49e65 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -34,20 +34,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - name: CPAN Cache id: cpan-cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: thirdparty key: ${{ matrix.os }}-cpan-${{ matrix.perl }}-${{ hashFiles('**/cpanfile') }} - name: Node Cache id: node-cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: frontend/node_modules key: ${{ matrix.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package.json') }} diff --git a/CHANGES b/CHANGES index 39e341b4..f226b128 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +wg-wrangler (0.3.0) unstable; urgency=medium + + * Fixed incorrect handling of #+comment tags + * Extended IPManager module, we now support address reservations and per interface defaults + + -- Tobias Bossert Wed, 22 Mar 2023 12:12:48 +0100 + wg-wrangler (0.2.3) unstable; urgency=medium * Raised wg-meta version to 0.3.3 to fix deadlock when calling the reload callback diff --git a/VERSION b/VERSION index 71790396..0d91a54c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.3 +0.3.0 diff --git a/build_local.sh b/build_local.sh index 43585ad5..3c482105 100644 --- a/build_local.sh +++ b/build_local.sh @@ -30,11 +30,6 @@ cp -r . /src cd /src -# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569 -mkdir -p deb_build_home -ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home -cd deb_build_home - dh_clean dpkg-buildpackage -us -uc -nc diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 39e341b4..00000000 --- a/debian/changelog +++ /dev/null @@ -1,60 +0,0 @@ -wg-wrangler (0.2.3) unstable; urgency=medium - - * Raised wg-meta version to 0.3.3 to fix deadlock when calling the reload callback - - -- Tobias Bossert Thu, 25 Dec 2022 11:35:59 +0100 - -wg-wrangler (0.2.2) unstable; urgency=medium - - * fixed ip suggestions - - -- Tobias Bossert Fri, 25 Nov 2022 20:57:23 +0100 - -wg-wrangler (0.2.1) unstable; urgency=medium - - * updated: Build dependency node.js to 18 LTS (ubuntu 20+22) 16LTS (ubuntu 18) - * updated: Callbackery to 0.42.4 - * updated: Added Ubuntu 22 as build target - - -- Tobias Bossert Fri, 25 Jul 2022 14:08:01 +0100 - - -wg-wrangler (0.2.0) unstable; urgency=medium - - * fixed: Validation on hidden field when adding a new peer - * fixed: Disabled Peer warning when editing a peer - * changed: lifted wg-meta compatibility to 0.3.x. This version may be incompatible to older (wg-meta) metadata! See changes of wg-meta - - -- Tobias Bossert Sun, 18 Jul 2021 13:48:02 +0200 - -wg-wrangler (0.1.4) unstable; urgency=medium - - * wg-wrangler: removed .pl extension from main "binary" (to make it compatible for apparmor profiles) - - -- Tobias Bossert Thu, 07 Apr 2021 15:59:06 +0200 - -wg-wrangler (0.1.3) unstable; urgency=medium - - * package: store config in /etc/opt/wg-wrangler, made systemd-service configurable - * wg-wrangler: migrated value attributes to getAllFieldValues() - - -- Tobias Bossert Thu, 07 Apr 2021 13:37:02 +0200 - -wg-wrangler (0.1.2) unstable; urgency=medium - - * package: added config options for the --listen argument - * development: Allow development without having wireguard installed - - -- Tobias Bossert Thu, 06 Apr 2021 15:56:58 +0200 - -wg-wrangler (0.1.1) unstable; urgency=medium - - * Initial deb release - - -- Tobias Bossert Thu, 30 Apr 2021 11:02:58 +0200 - -wg-wrangler (0.1.0) unstable; urgency=medium - - * Initial release - - -- Tobias Bossert Thu, 16 Apr 2021 09:02:58 +0200 diff --git a/debian/changelog b/debian/changelog new file mode 120000 index 00000000..3e8bc8c0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1 @@ +../CHANGES \ No newline at end of file diff --git a/make-deb.sh b/make-deb.sh new file mode 100755 index 00000000..d756b74b --- /dev/null +++ b/make-deb.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -ex + +DISTRIBUTION_NAME=$1 +DISTRIBUTION_VERSION=$2 + +# Overriding $HOME to prevent permissions issues when running on github actions +mkdir -p /tmp/home +chmod 0777 /tmp/home +export HOME=/tmp/home + +dh_clean +dpkg-buildpackage -us -uc -nc + +release_number=${DISTRIBUTION_VERSION/\./\_} +package_name=$(basename ../wg-wrangler_*.deb | sed 's/.deb$//')_${DISTRIBUTION_NAME}-${release_number}.deb +mv ../wg-wrangler_*.deb "$package_name" + +# set action output +echo "package_name=$package_name" >>$GITHUB_OUTPUT