summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.forgejo/workflows/deb.yml53
-rw-r--r--debian/changelog103
-rw-r--r--debian/compat1
-rw-r--r--debian/control20
-rw-r--r--debian/copyright26
-rw-r--r--debian/libeduvpn-common.install1
-rwxr-xr-xdebian/rules35
-rw-r--r--debian/source/format1
-rwxr-xr-xprepare_release.sh7
9 files changed, 247 insertions, 0 deletions
diff --git a/.forgejo/workflows/deb.yml b/.forgejo/workflows/deb.yml
new file mode 100644
index 0000000..7e0b2dd
--- /dev/null
+++ b/.forgejo/workflows/deb.yml
@@ -0,0 +1,53 @@
+name: Build Deb Packages
+
+on:
+ push:
+ branches:
+ - '**'
+ release:
+ types: [published]
+
+jobs:
+ build-deb:
+ name: Deb build for ${{ matrix.image }} ${{ matrix.arch }}
+ strategy:
+ matrix:
+ image:
+ - "debian:bookworm"
+ - "debian:trixie"
+ - "ubuntu:jammy"
+ - "ubuntu:noble"
+ - "ubuntu:plucky"
+ - "ubuntu:questing"
+ # Add arm64 here for ARM builds
+ arch:
+ - "amd64"
+ runs-on: codeberg-small-lazy
+ container:
+ image: codeberg.org/jwijenbergh/debbuilder-${{ matrix.image }}-${{ matrix.arch }}
+ steps:
+ - name: Checkout Repository
+ run: git clone --depth 1 -b ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} common
+
+ - name: Install build dependencies
+ run: |
+ cd common
+ sudo apt-get update
+ sudo apt-get build-dep -y .
+
+ - name: Build Deb package
+ run: |
+ cd common
+ dpkg-buildpackage -us -uc
+
+ - name: Upload Deb
+ if: github.event_name == 'release' && secrets.PACKAGE_TOKEN != ''
+ run: |
+ OWNER="${{ github.repository_owner }}"
+ CODENAME="$(lsb_release -cs)"
+ for DEB in $(find . -type f -name "*.deb"); do
+ echo "uploading Deb: ${DEB}"
+ curl --user "${OWNER}:${{ secrets.PACKAGE_TOKEN }}" \
+ --upload-file "${DEB}" \
+ "${{ github.server_url }}/api/packages/${OWNER}/debian/pool/${CODENAME}/main/upload?sign=true"
+ done
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..345929a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,103 @@
+python3-eduvpn-common (4.0.0-1) unstable; urgency=medium
+
+ * Update to upstream 4.0.0
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Thu, 09 Oct 2025 15:07:10 +0000
+
+python3-eduvpn-common (3.0.0-1) unstable; urgency=medium
+
+ * Update to upstream 3.0.0
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Fri, 18 Apr 2025 10:12:31 +0200
+
+python3-eduvpn-common (2.1.0-2) unstable; urgency=medium
+
+ * Rebuild for new Go
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Thu, 31 Oct 2024 15:40:48 +0100
+
+python3-eduvpn-common (2.1.0-1) unstable; urgency=medium
+
+ * Update to upstream 2.1.0
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 30 Jul 2024 10:20:49 +0200
+
+python3-eduvpn-common (2.0.2-1) unstable; urgency=medium
+
+ * Update to upstream 2.0.2
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 25 Jun 2024 15:31:51 +0200
+
+python3-eduvpn-common (2.0.1-1) unstable; urgency=medium
+
+ * Update to upstream 2.0.1
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Thu, 06 Jun 2024 17:29:55 +0200
+
+python3-eduvpn-common (2.0.0-1) unstable; urgency=medium
+
+ * Update to upstream 2.0.0
+ * Set GOCACHE temp dir for go clean
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Wed, 05 Jun 2024 07:12:04 +0200
+
+python3-eduvpn-common (1.2.1-1) unstable; urgency=medium
+
+ * Update to upstream 1.2.1
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Fri, 24 May 2024 17:23:02 +0200
+
+python3-eduvpn-common (1.2.0-3) unstable; urgency=medium
+
+ * Rebuild for new Go versions
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Mon, 13 May 2024 12:11:33 +0200
+
+python3-eduvpn-common (1.2.0-2) unstable; urgency=medium
+
+ * Rebuild for noble and new Go versions from tuxed.net backport repo
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Thu, 25 Apr 2024 21:14:00 +0200
+
+python3-eduvpn-common (1.2.0-1) unstable; urgency=medium
+
+ * Update version to 1.2.0
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Fri, 08 Dec 2023 20:47:40 +0100
+
+python3-eduvpn-common (1.1.2-1) unstable; urgency=medium
+
+ * Update version to 1.1.2
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Fri, 01 Sep 2023 19:54:55 +0200
+
+python3-eduvpn-common (1.1.1-1) unstable; urgency=medium
+
+ * Update version to 1.1.1
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 29 Aug 2023 20:16:47 +0200
+
+python3-eduvpn-common (1.1.0-1) unstable; urgency=medium
+
+ * Update version to 1.1.0
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 18 Apr 2023 16:12:38 +0200
+
+python3-eduvpn-common (1.0.0-3) unstable; urgency=medium
+
+ * export PYBUILD_NAME instead of defining a variable
+ * remove py3dist-overrides
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 07 Mar 2023 18:49:41 +0100
+
+python3-eduvpn-common (1.0.0-2) unstable; urgency=medium
+
+ * Add eduvpn_common name in py3dist-overrides
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Tue, 07 Mar 2023 17:09:27 +0100
+
+python3-eduvpn-common (1.0.0-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> Wed, 01 Mar 2023 17:26:40 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6f19de2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: python3-eduvpn-common
+Section: python
+Priority: optional
+Maintainer: Jeroen Wijenbergh <jeroen.wijenbergh@geant.org>
+Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-setuptools, python3-wheel, golang (>= 1.18)
+Standards-Version: 4.5.1
+Homepage: https://codeberg.org/eduVPN/eduvpn-common
+X-Python3-Version: >= 3.6
+
+Package: libeduvpn-common
+Architecture: any
+Depends: ${misc:Depends}
+Description: EduVPN common Go library
+ The shared library for eduVPN.
+
+Package: python3-eduvpn-common
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}, libeduvpn-common
+Description: Python wrapper for the eduVPN common library
+ The Python wrapper for the shared library.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..dd996d2
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,26 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: eduvpn-common
+Source: https://codeberg.org/eduVPN/eduvpn-common
+
+Files: *
+Copyright: 2024 The Commons Conservancy eduVPN Programme <jeroen.wijenbergh@geant.org>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/debian/libeduvpn-common.install b/debian/libeduvpn-common.install
new file mode 100644
index 0000000..4a351ac
--- /dev/null
+++ b/debian/libeduvpn-common.install
@@ -0,0 +1 @@
+lib/libeduvpn_common-*.so usr/lib
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..73c1724
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE = 1
+
+export PYBUILD_NAME=eduvpn-common
+PYWRAPPER_PATH := wrappers/python
+DEB_VERSION := $(shell dpkg-parsechangelog --show-field=Version | cut -d '+' -f1 | cut -d '-' -f1)
+
+
+override_dh_auto_install:
+ dh_auto_install --sourcedirectory $(PYWRAPPER_PATH)
+
+%:
+ dh $@ --with python3 --buildsystem=pybuild
+
+
+override_dh_auto_test:
+
+
+override_dh_auto_clean:
+ dh_auto_clean --sourcedirectory $(PYWRAPPER_PATH)
+
+ GOCACHE="/tmp" go clean
+
+override_dh_auto_configure:
+ dh_auto_configure --sourcedirectory $(PYWRAPPER_PATH)
+
+override_dh_auto_build:
+ dh_auto_build --sourcedirectory $(PYWRAPPER_PATH)
+
+ # Make go library
+ GOCACHE="/tmp" CGO_ENABLED="1" go build -o lib/libeduvpn_common-$(DEB_VERSION).so -tags=release -buildmode=c-shared ./exports
+
+
+override_dh_builddeb:
+ dh_builddeb -- -Zxz
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/prepare_release.sh b/prepare_release.sh
index 91ab23a..89d621e 100755
--- a/prepare_release.sh
+++ b/prepare_release.sh
@@ -19,6 +19,11 @@ if ! command -v "gofumpt" &>/dev/null; then
exit 1
fi
+if ! command -v "dch" &>/dev/null; then
+ echo "please install dch to update the debian/changelog"
+ exit 1
+fi
+
if [ "$(git tag -l "${PROJECT_VERSION}")" ]; then
echo "Version: ${PROJECT_VERSION} already has a tag"
exit 1
@@ -44,6 +49,8 @@ if [[ $(git diff) ]]; then
git commit -m "Format: Run Ruff"
fi
+dch -v ${PROJECT_VERSION} --distribution unstable "New version"
+
# Replace version number
# replace in internal/commonver
sed -i "s/const Version = \".*\"/const Version = \"${PROJECT_VERSION}\"/" internal/commonver/commonver.go