Compare commits

...
1 Commits
Author SHA1 Message Date
bart 496920fddb Add package installation testing to Gitea workflow and fix package metadata
Build, Test and Publish Debian Packages / Build Packages (push) Failing after 21s
Build, Test and Publish Debian Packages / Test Package Installation (push) Skipped
Build, Test and Publish Debian Packages / Publish to eendoe repository (push) Skipped
2026-10-20 22:01:16 +02:00
13 changed files with 188 additions and 10373 deletions
+58 -2
View File
@@ -1,4 +1,4 @@
name: Build and Publish Debian Packages name: Build, Test and Publish Debian Packages
on: on:
push: push:
@@ -9,6 +9,10 @@ on:
- 'sources/**' - 'sources/**'
- 'buildpackages.sh' - 'buildpackages.sh'
- '.gitea/workflows/**' - '.gitea/workflows/**'
pull_request:
branches:
- main
- master
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -35,9 +39,61 @@ jobs:
name: debian-packages name: debian-packages
path: staging/*.deb path: staging/*.deb
test-install:
name: Test Package Installation
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download built artifacts
uses: actions/download-artifact@v4
with:
name: debian-packages
path: staging
- name: Install system runtime dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv ffmpeg
- name: Test install eendoe-repository
run: |
echo "=== Installing eendoe-repository ==="
sudo apt-get install -y ./staging/eendoe-repository-*.deb
dpkg -s eendoe-repository | grep -q "Status: install ok installed"
test -f /etc/apt/sources.list.d/eendoe.list
echo "eendoe-repository: OK"
- name: Test install eendoe-srs
run: |
echo "=== Installing eendoe-srs ==="
sudo apt-get install -y ./staging/eendoe-srs-*.deb
dpkg -s eendoe-srs | grep -q "Status: install ok installed"
test -x /usr/share/srs/objs/srs
echo "eendoe-srs: OK"
- name: Test install eendoe-hyperdeck
run: |
echo "=== Installing eendoe-hyperdeck ==="
sudo apt-get install -y ./staging/eendoe-hyperdeck-*.deb
dpkg -s eendoe-hyperdeck | grep -q "Status: install ok installed"
test -d /usr/share/hyperdeck
test -f /etc/hyperdeck/config.json
test -f /usr/lib/systemd/system/hyperdeck.service
python3 -m py_compile /usr/share/hyperdeck/main.py
echo "eendoe-hyperdeck: OK"
- name: Test package uninstall and cleanup
run: |
echo "=== Testing package removal ==="
sudo apt-get remove -y eendoe-hyperdeck eendoe-srs eendoe-repository
echo "Package removal: OK"
publish: publish:
name: Publish to eendoe repository name: Publish to eendoe repository
needs: build needs: [build, test-install]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push' if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps: steps:
+31 -21
View File
@@ -1,31 +1,41 @@
#!/bin/sh #!/bin/sh
set -e
CONTROL_FILE=$(ls -1 *.control 2>/dev/null | head -n 1)
if [ -z "$CONTROL_FILE" ]; then
echo "Fout: Geen .control bestand gevonden in $(pwd)" >&2
exit 1
fi
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' "$CONTROL_FILE")
DETECTED_VERSION=$(awk '/^Version: /{print $NF}' "$CONTROL_FILE")
# Version resolution: CLI arg > ENV var > .control version > default 0.1.0
if [ -n "$1" ]; then
VERSION="$1"
elif [ -n "$PACKAGE_VERSION" ]; then
VERSION="$PACKAGE_VERSION"
elif [ -n "$VERSION" ]; then
VERSION="$VERSION"
elif [ "$DETECTED_VERSION" != "{VERSION}" ] && [ -n "$DETECTED_VERSION" ]; then
VERSION="$DETECTED_VERSION"
else
VERSION="0.1.0"
fi
mkdir -p "packaging/$PACKAGE_NAME/DEBIAN"
sed "s/{VERSION}/${VERSION}/" "$CONTROL_FILE" > "packaging/$PACKAGE_NAME/DEBIAN/control"
CONTROL_FILE=$(ls -1 *.control) ARCH=$(awk '/^Architecture: /{print $NF}' "packaging/$PACKAGE_NAME/DEBIAN/control")
ARCH="${ARCH:-all}"
DEB_FILENAME="${PACKAGE_NAME}-${VERSION}_${ARCH}.deb"
echo "Using control file $CONTROL_FILE" echo "Building package: $PACKAGE_NAME ($VERSION) [$ARCH] -> $DEB_FILENAME"
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' $CONTROL_FILE)
VERSION=$(awk '/^Version: /{print $NF}' $CONTROL_FILE)
# Build debian binary package
dpkg-deb --build "packaging/$PACKAGE_NAME" "$DEB_FILENAME"
# Cleanup temporary control file
rm -f "packaging/$PACKAGE_NAME/DEBIAN/control"
# tag git repo echo "Succesvol gebouwd: $DEB_FILENAME"
# git tag -f release-${VERSION}
echo "Building package $PACKAGE_NAME ($VERSION): $PACKAGE_NAME-${VERSION}_all.deb"
# VERSION
sed "s/{VERSION}/${VERSION}/" $PACKAGE_NAME.control > packaging/$PACKAGE_NAME/DEBIAN/control
#create debian package
dpkg --build packaging/$PACKAGE_NAME $PACKAGE_NAME-${VERSION}_all.deb
# dpkg-sig -k 14AF7F05 --sign builder icosi-${VERSION}_all.deb
echo "clean up"
rm packaging/$PACKAGE_NAME/DEBIAN/control
@@ -1,7 +1,7 @@
Package: eendoe-hyperdeck Package: eendoe-hyperdeck
Version: {VERSION} Version: 0.15.2
Section: utils Section: utils
Maintainer: nl.eendoe.bart Maintainer: nl.eendoe.bart
Architecture: all Architecture: all
Depends: python3, python3-pip, ffmpeg, eendoe-srs Depends: python3, python3-pip, python3-venv, ffmpeg, eendoe-srs
Description: Eendoe hyperdeck client module Description: Eendoe hyperdeck client module
@@ -1,39 +1,41 @@
#!/bin/bash #!/bin/bash
set -e
#set -e
case "$1" in case "$1" in
configure|abort-upgrade) configure|abort-upgrade)
id -u vid &>/dev/null || useradd --system -m -s /bin/bash vid
id -u vid &>/dev/null || useradd --system -m vid # Setup virtualenv for python dependencies to comply with PEP 668 on Debian 12 / Ubuntu 24.04+
VENV_DIR="/usr/share/hyperdeck/venv"
runuser -l vid -c "pip3 install -r /usr/share/hyperdeck/requirements.txt" if [ ! -d "$VENV_DIR" ]; then
python3 -m venv "$VENV_DIR" 2>/dev/null || python3 -m venv --system-site-packages "$VENV_DIR" 2>/dev/null || true
fi
if [ -x "$VENV_DIR/bin/pip" ]; then
"$VENV_DIR/bin/pip" install -q -r /usr/share/hyperdeck/requirements.txt || true
chown -R vid:vid "$VENV_DIR" || true
else
pip3 install -r /usr/share/hyperdeck/requirements.txt --break-system-packages 2>/dev/null || \
pip3 install -r /usr/share/hyperdeck/requirements.txt 2>/dev/null || true
fi
FILE="/etc/hyperdeck/config.json" FILE="/etc/hyperdeck/config.json"
SOURCEFILE="/usr/share/hyperdeck/config.json.orig" SOURCEFILE="/usr/share/hyperdeck/config.json.orig"
if [ -f "$FILE" ]; then if [ ! -f "$FILE" ]; then
echo "$FILE exists."
else
mkdir -p /etc/hyperdeck/ mkdir -p /etc/hyperdeck/
echo "Copy default config" echo "Copy default config"
cp "$SOURCEFILE" "$FILE" cp "$SOURCEFILE" "$FILE"
chmod 744 "$FILE" chmod 744 "$FILE"
fi fi
# Register and enable systemd service if running under systemd
if systemctl is-system-running &>/dev/null || [ -d /run/systemd/system ]; then
systemd-notify --booted systemctl daemon-reload 2>/dev/null || true
if [ "$?" -eq 0 ] systemctl enable hyperdeck 2>/dev/null || true
then
echo "Systemd running, registering service"
systemctl daemon-reload && systemctl enable hyperdeck
else
echo "Systemd not running, skipping"
fi fi
mkdir -p /var/log/hyperdeck/ mkdir -p /var/log/hyperdeck/
chown vid:vid "/var/log/hyperdeck/" chown vid:vid "/var/log/hyperdeck/" 2>/dev/null || true
echo "Installation done" echo "Installation done"
;; ;;
+31 -21
View File
@@ -1,31 +1,41 @@
#!/bin/sh #!/bin/sh
set -e
CONTROL_FILE=$(ls -1 *.control 2>/dev/null | head -n 1)
if [ -z "$CONTROL_FILE" ]; then
echo "Fout: Geen .control bestand gevonden in $(pwd)" >&2
exit 1
fi
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' "$CONTROL_FILE")
DETECTED_VERSION=$(awk '/^Version: /{print $NF}' "$CONTROL_FILE")
# Version resolution: CLI arg > ENV var > .control version > default 0.1.0
if [ -n "$1" ]; then
VERSION="$1"
elif [ -n "$PACKAGE_VERSION" ]; then
VERSION="$PACKAGE_VERSION"
elif [ -n "$VERSION" ]; then
VERSION="$VERSION"
elif [ "$DETECTED_VERSION" != "{VERSION}" ] && [ -n "$DETECTED_VERSION" ]; then
VERSION="$DETECTED_VERSION"
else
VERSION="0.1.0"
fi
mkdir -p "packaging/$PACKAGE_NAME/DEBIAN"
sed "s/{VERSION}/${VERSION}/" "$CONTROL_FILE" > "packaging/$PACKAGE_NAME/DEBIAN/control"
CONTROL_FILE=$(ls -1 *.control) ARCH=$(awk '/^Architecture: /{print $NF}' "packaging/$PACKAGE_NAME/DEBIAN/control")
ARCH="${ARCH:-all}"
DEB_FILENAME="${PACKAGE_NAME}-${VERSION}_${ARCH}.deb"
echo "Using control file $CONTROL_FILE" echo "Building package: $PACKAGE_NAME ($VERSION) [$ARCH] -> $DEB_FILENAME"
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' $CONTROL_FILE)
VERSION=$(awk '/^Version: /{print $NF}' $CONTROL_FILE)
# Build debian binary package
dpkg-deb --build "packaging/$PACKAGE_NAME" "$DEB_FILENAME"
# Cleanup temporary control file
rm -f "packaging/$PACKAGE_NAME/DEBIAN/control"
# tag git repo echo "Succesvol gebouwd: $DEB_FILENAME"
# git tag -f release-${VERSION}
echo "Building package $PACKAGE_NAME ($VERSION): $PACKAGE_NAME-${VERSION}_all.deb"
# VERSION
sed "s/{VERSION}/${VERSION}/" $PACKAGE_NAME.control > packaging/$PACKAGE_NAME/DEBIAN/control
#create debian package
dpkg --build packaging/$PACKAGE_NAME $PACKAGE_NAME-${VERSION}_all.deb
# dpkg-sig -k 14AF7F05 --sign builder icosi-${VERSION}_all.deb
echo "clean up"
rm packaging/$PACKAGE_NAME/DEBIAN/control
+31 -21
View File
@@ -1,31 +1,41 @@
#!/bin/sh #!/bin/sh
set -e
CONTROL_FILE=$(ls -1 *.control 2>/dev/null | head -n 1)
if [ -z "$CONTROL_FILE" ]; then
echo "Fout: Geen .control bestand gevonden in $(pwd)" >&2
exit 1
fi
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' "$CONTROL_FILE")
DETECTED_VERSION=$(awk '/^Version: /{print $NF}' "$CONTROL_FILE")
# Version resolution: CLI arg > ENV var > .control version > default 0.1.0
if [ -n "$1" ]; then
VERSION="$1"
elif [ -n "$PACKAGE_VERSION" ]; then
VERSION="$PACKAGE_VERSION"
elif [ -n "$VERSION" ]; then
VERSION="$VERSION"
elif [ "$DETECTED_VERSION" != "{VERSION}" ] && [ -n "$DETECTED_VERSION" ]; then
VERSION="$DETECTED_VERSION"
else
VERSION="0.1.0"
fi
mkdir -p "packaging/$PACKAGE_NAME/DEBIAN"
sed "s/{VERSION}/${VERSION}/" "$CONTROL_FILE" > "packaging/$PACKAGE_NAME/DEBIAN/control"
CONTROL_FILE=$(ls -1 *.control) ARCH=$(awk '/^Architecture: /{print $NF}' "packaging/$PACKAGE_NAME/DEBIAN/control")
ARCH="${ARCH:-all}"
DEB_FILENAME="${PACKAGE_NAME}-${VERSION}_${ARCH}.deb"
echo "Using control file $CONTROL_FILE" echo "Building package: $PACKAGE_NAME ($VERSION) [$ARCH] -> $DEB_FILENAME"
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' $CONTROL_FILE)
VERSION=$(awk '/^Version: /{print $NF}' $CONTROL_FILE)
# Build debian binary package
dpkg-deb --build "packaging/$PACKAGE_NAME" "$DEB_FILENAME"
# Cleanup temporary control file
rm -f "packaging/$PACKAGE_NAME/DEBIAN/control"
# tag git repo echo "Succesvol gebouwd: $DEB_FILENAME"
# git tag -f release-${VERSION}
echo "Building package $PACKAGE_NAME ($VERSION): $PACKAGE_NAME-${VERSION}_all.deb"
# VERSION
sed "s/{VERSION}/${VERSION}/" $PACKAGE_NAME.control > packaging/$PACKAGE_NAME/DEBIAN/control
#create debian package
dpkg --build packaging/$PACKAGE_NAME $PACKAGE_NAME-${VERSION}_all.deb
# dpkg-sig -k 14AF7F05 --sign builder icosi-${VERSION}_all.deb
echo "clean up"
rm packaging/$PACKAGE_NAME/DEBIAN/control
+2 -2
View File
@@ -1,7 +1,7 @@
Package: eendoe-srs Package: eendoe-srs
Version: {VERSION} Version: 0.0.1
Section: utils Section: utils
Maintainer: nl.eendoe.bart Maintainer: nl.eendoe.bart
Architecture: all Architecture: amd64
Depends: python3, python3-pip, ffmpeg Depends: python3, python3-pip, ffmpeg
Description: Eendoe Hyperdeck SRS module Description: Eendoe Hyperdeck SRS module
@@ -1 +0,0 @@
vid-35m3s3d
File diff suppressed because it is too large Load Diff
@@ -1 +0,0 @@
27563
Binary file not shown.
Binary file not shown.