Skip to content

Commit

Permalink
Applied libsml changes adding Raspian build
Browse files Browse the repository at this point in the history
  • Loading branch information
narc-Ontakac2 committed Mar 30, 2024
1 parent c03f9b7 commit 7cea393
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 20 deletions.
51 changes: 37 additions & 14 deletions .github/workflows/debuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
KEYSERVER: keyserver.ubuntu.com
# Cloudsmith package repository
KEYFILE: /usr/share/keyrings/volkszaehler-volkszaehler-org-project-archive-keyring.gpg
CLOUDURL: https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/deb/debian
CLOUDURL: https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/deb
CLOUD_KEY_ID: 21DBDAC56DF44DA1
REPO: volkszaehler/volkszaehler-org-project

Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: add cloudsmith repo
run: |
LISTENTRY="deb [signed-by=$KEYFILE] $CLOUDURL trixie main"
LISTENTRY="deb [signed-by=$KEYFILE] $CLOUDURL/debian trixie main"
echo "$LISTENTRY" | sudo tee -a /etc/apt/sources.list
gpg --keyserver $KEYSERVER --recv-key $CLOUD_KEY_ID
sudo -E gpg -v --output "$KEYFILE" --export $CLOUD_KEY_ID
Expand Down Expand Up @@ -85,19 +85,41 @@ jobs:
needs: debuild
strategy:
matrix:
architecture: [armel, armhf, arm64, amd64]
os: [debian, raspbian]
distribution: [trixie, bookworm, bullseye]
runs-on: ubuntu-latest
architecture: [armhf, arm64, amd64]
exclude:
- os: raspbian
architecture: arm64
- os: raspbian
architecture: amd64
- os: raspbian
distribution: trixie
include:
- mirrorsite: http://ftp2.de.debian.org/debian/
- mirrorsite: http://mirror.netcologne.de/raspbian/raspbian/
os: raspbian
- keyring: debian-archive-keyring
- keyring: raspbian-archive-keyring
os: raspbian
runs-on: ubuntu-latest
environment: main
env:
PBRT: /var/cache/pbuilder
steps:
- name: update repo information
run: sudo apt-get update
- name: install archive keyring
run: |
if [[ ${{ matrix.os }} == raspbian ]]; then
wget http://raspbian.raspberrypi.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb
sudo apt-get install ./raspbian-archive-keyring_20120528.2_all.deb
else
sudo apt-get install debian-archive-keyring
fi
- name: install pbuilder
run: |
sudo apt-get install pbuilder qemu-user-static \
debian-archive-keyring hub
sudo apt-get install pbuilder mmdebstrap qemu-user-static pipx hub
# Needed for the release download
- uses: actions/checkout@v4
- name: Set env
Expand All @@ -110,18 +132,18 @@ jobs:
ls -l
- name: configure pbuilder
run: |
echo "MIRRORSITE=http://ftp2.de.debian.org/debian/
echo "MIRRORSITE=${{ matrix.mirrorsite }}
HOOKDIR=$PBRT/hooks" | \
sudo tee /root/.pbuilderrc
sudo mkdir -p $PBRT/hooks
echo "#!/bin/sh
apt-get -y install gnupg debian-archive-keyring ca-certificates
apt-get -y install gnupg ${{ matrix.keyring }} ca-certificates
apt-key adv --keyserver $KEYSERVER --recv-keys $SIGNING_KEY_ID" | \
sudo tee $PBRT/hooks/G70Keys
sudo chmod a+x $PBRT/hooks/G70Keys
# OTHERMIRRORS can't do signed-by
echo "#!/bin/sh
LISTENTRY=\"deb [signed-by=$KEYFILE] $CLOUDURL ${{ matrix.distribution }} main\"
LISTENTRY=\"deb [signed-by=$KEYFILE] $CLOUDURL/${{ matrix.os }} ${{ matrix.distribution }} main\"
gpg --keyserver $KEYSERVER --recv-key $CLOUD_KEY_ID
gpg -v --output '$KEYFILE' --export $CLOUD_KEY_ID
echo \"\$LISTENTRY\" >> /etc/apt/sources.list
Expand All @@ -136,10 +158,11 @@ jobs:
run: |
sudo pbuilder create --architecture ${{ matrix.architecture }} \
--distribution ${{ matrix.distribution }} \
--debootstrap qemu-debootstrap \
--basetgz $PBRT/current.tgz \
--debootstrapopts --keyring=/usr/share/keyrings/debian-archive-keyring.gpg
- name: pbuild ${{ matrix.architecture }} ${{ matrix.distribution }}
--debootstrap mmdebstrap \
--debootstrapopts \
--keyring=/usr/share/keyrings/${{ matrix.keyring }}.gpg
- name: pbuild ${{ matrix.os }} ${{ matrix.architecture }} ${{ matrix.distribution }}
# https://stackoverflow.com/questions/70435286/resource-not-accessible-by-integration-on-github-post-repos-owner-repo-ac
run: |
VERSION="${GITHUB_REF##*/v}"
Expand All @@ -166,7 +189,7 @@ jobs:
CHANGES_FILE="$PBRT/result/${PKG}_${VERSION}_${{ matrix.architecture }}.changes"
for DEB in $(dcmd --deb $CHANGES_FILE); do
cloudsmith push deb \
${REPO}/debian/${{ matrix.distribution }} "$DEB"
done
${REPO}/${{ matrix.os }}/${{ matrix.distribution }} "$DEB"
done
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ You can start it:
where /home/pi/projects/vzlogger-docker is the path to the directory containing the vzlogger.conf file and
/dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_D30A8U6N-if00-port0 is your device. You can pass several devices if you have them.

Debian Packages
Debian and Raspbian Packages
-------------

[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat-square)](https://cloudsmith.com)

We now build debian packages for amd64, armhf and arm64 as part of our releases.
The ones attached to the release are meant for trixie. These and packages for
bookworm and bullseye are also provided through a repository graciously provided by
[Cloudsmith](https://cloudsmith.com).
We now build Debian packages for amd64, armhf and arm64 and Raspbian packages
for armhf as part of our releases. Unfortunately Debian armhf packages do not
run on Raspberry Pi 1 although the architecture on the RPi is named armhf.
Using Raspian armhf packages fixes that.

The ones attached to the release are meant for debian trixie. These and
packages for bookworm and bullseye are also provided through a repository
graciously provided by [Cloudsmith](https://cloudsmith.com).

Those debian packages are built with MQTT support.

Expand All @@ -62,7 +66,9 @@ This boils down to adding a file to /etc/apt/sources.list.d/ containing
deb [signed-by=/usr/share/keyrings/volkszaehler-volkszaehler-org-project-archive-keyring.gpg] https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/deb/debian bookworm main
deb-src [signed-by=/usr/share/keyrings/volkszaehler-volkszaehler-org-project-archive-keyring.gpg] https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/deb/debian bookworm main
```
(replace bookworm with your current distro) and retrieving the key as a trusted one
You need to replace bookworm with your distro and debian with raspbian in case
you are using an RPi 1. You also need to retrieve our repository key as a
trusted one.
```
curl -1sLf "https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/gpg.21DBDAC56DF44DA1.key" | \
gpg --dearmor > /usr/share/keyrings/volkszaehler-volkszaehler-org-project-archive-keyring.gpg
Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
vzlogger (0.8.4) unstable; urgency=medium

* Added build for Raspbian.
* Removed armel architecture.
* Renamed service user to _vzlogger

-- Joachim Zobel <jz-2017@heute-morgen.de> Sat, 30 Mar 2024 06:24:25 +0100

vzlogger (0.8.3) unstable; urgency=medium

* Added armel as release architecture
Expand Down

0 comments on commit 7cea393

Please sign in to comment.