Skip to content

Commit

Permalink
Merge branch 'volkszaehler:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamarqe authored May 31, 2024
2 parents ef32d57 + 0b24407 commit d49a7d0
Show file tree
Hide file tree
Showing 25 changed files with 327 additions and 96 deletions.
54 changes: 41 additions & 13 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,11 +29,13 @@ 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
sudo apt-get update
- name: update repo information
run: sudo apt-get update
- name: install devscripts
run: sudo apt-get install equivs devscripts pipx hub
- name: install dependencies
Expand Down Expand Up @@ -83,17 +85,41 @@ jobs:
needs: debuild
strategy:
matrix:
architecture: [armel, armhf, arm64, amd64]
os: [debian, raspbian]
distribution: [trixie, bookworm, bullseye]
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 @@ -106,18 +132,19 @@ 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 update
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 @@ -132,10 +159,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 @@ -162,7 +190,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 }}
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENDIF()

set(VZLOGGER_MAJOR_VERSION 0)
set(VZLOGGER_MINOR_VERSION 8)
set(VZLOGGER_SUB_VERSION 3)
set(VZLOGGER_SUB_VERSION 6)
set(VERSION_SEP "-")
set(VZLOGGER_SHORT_VERSION "${VZLOGGER_MAJOR_VERSION}${VERSION_SEP}${VZLOGGER_MINOR_VERSION}")
set(VZLOGGER_VERSION "${VZLOGGER_SHORT_VERSION}${VERSION_SEP}${VZLOGGER_SUB_VERSION}")
Expand Down Expand Up @@ -289,6 +289,10 @@ if( ENABLE_LOCAL AND NOT MICROHTTPD_FOUND )
Install microhttpd or call cmake -DMICROHTTPD_HOME=path_to_microhttpd_install")
endif( ENABLE_LOCAL AND NOT MICROHTTPD_FOUND )

if( ENABLE_OMS AND NOT OMS_SUPPORT)
message(WARNING "oms support not being enabled (libmbus not found)")
endif( ENABLE_OMS AND NOT OMS_SUPPORT)

# add clean-all target that removes the cached files from cmake as well (see e.g. issue #186)
add_custom_target(clean-all
COMMAND ${CMAKE_BUILD_TOOL} clean
Expand Down
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,60 @@ 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 Raspberry Pi OS 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. Armel, which would be
needed for Debian on RPi 1 hardware, is not supported.

[Raspberry Pi OS packages for armhf](
https://cloudsmith.io/~volkszaehler/repos/volkszaehler-org-project/packages/?q=distribution%3Araspbian+AND+architecture%3Aarmhf)
are also part of our releases. Unfortunately
Debian armhf packages do not run on Raspberry Pi 1 although the architecture
has been named armhf in Raspbian. Using "Raspbian armhf" packages fixes that.
For RPi 2 and above Debian packages run on Raspberry Pi OS.

Those debian packages are built with MQTT support.
Our packages are built with MQTT support, but without OMS support.

The packages attached to the release are meant for Debian trixie. The full set
of packages is provided through a repository graciously provided by
[Cloudsmith](https://cloudsmith.com).

The setup of the repository is also
[explained by Cloudsmith](https://cloudsmith.io/~volkszaehler/repos/volkszaehler-org-project/setup/#formats-deb).
This boils down to adding a file to /etc/apt/sources.list.d/ containing
The easy way to do it is running
```
curl -1sLf \
'https://dl.cloudsmith.io/public/volkszaehler/volkszaehler-org-project/setup.deb.sh' \
| sudo -E bash
```
If you do it the easy way you should however be aware of the high amount of
trust you put into cloudsmith not beeing compromised. As an alternative there
is the manual way to achive the same result. That starts with 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
```

After that you can do the usual
```
apt update
apt install vzlogger
```

An official Debian vzlogger package is currently in unstable.


Mailing List
-------------
If you have questions, contact the volkszaehler mailing lists:
Expand Down
34 changes: 27 additions & 7 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
vzlogger (0.8.6) unstable; urgency=medium

* Release as base for an official Debian release

-- Joachim Zobel <[email protected]> Thu, 16 May 2024 21:35:26 +0200

vzlogger (0.8.5) unstable; urgency=medium

* Fixed missing user name rename in logrotate configuration.

-- Joachim Zobel <[email protected]> Sun, 21 Apr 2024 07:03:21 +0200

vzlogger (0.8.4) unstable; urgency=medium

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

-- Joachim Zobel <[email protected]> Sat, 30 Mar 2024 06:24:25 +0100

vzlogger (0.8.3) unstable; urgency=medium

* Added armel as release architecture
* Added armel as release architecture

-- Joachim Zobel <[email protected]> Tue, 31 Oct 2023 15:38:49 +0100

vzlogger (0.8.2) unstable; urgency=medium

* Fixed service running as root
* Fixed service running as root

-- Joachim Zobel <[email protected]> Tue, 23 May 2023 06:18:00 +0200

vzlogger (0.8.1) unstable; urgency=low

* Latest version

-- Joachim Zobel <[email protected]> Sat, 21 Jan 2023 19:52:01 +0100
Expand All @@ -23,21 +43,21 @@ vzlogger (0.3.5) stable; urgency=low
-- Justin Otherguy (signing key for debian packages only) <[email protected]> Tue, 08 Oct 2013 21:28:01 +0200

vzlogger (0.3.4-rc1) stable; urgency=low

* updated version to reflect changes in CMakeLists.txt

-- Justin Otherguy (signing key for debian packages only) <[email protected]> Wed, 15 Apr 2013 23:19:01 +0200

vzlogger (0.3.3-rc3) stable; urgency=low

* removed a warning in vzlogger.postinst (thx to RG)

-- Justin Otherguy (signing key for debian packages only) <[email protected]> Wed, 14 Apr 2013 23:45:01 +0200

vzlogger (0.3.3-rc2) stable; urgency=low

* minor clean-up in default config

-- Justin Otherguy (signing key for debian packages only) <[email protected]> Wed, 10 Apr 2013 23:45:01 +0200

vzlogger (0.3.3-rc1) stable; urgency=low
Expand Down
1 change: 1 addition & 0 deletions debian/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vzlogger.8
27 changes: 20 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ Source: vzlogger
Section: net
Priority: optional
Maintainer: Joachim Zobel <[email protected]>
Build-Depends: debhelper (>= 12), pkg-config (>= 0.25),
libjson-c-dev (>= 0.9), libcurl4-openssl-dev (>= 7.19),
libmicrohttpd-dev (>= 0.4.6), libsml-dev (>= 1.0), cmake, libsasl2-dev,
libssl-dev, libgcrypt-dev, libgnutls28-dev, uuid-dev, libunistring-dev,
libgmock-dev, libgtest-dev, pandoc, libmosquitto-dev
Standards-Version: 4.6.1
Build-Depends: debhelper (>= 12),
pkgconf,
libjson-c-dev,
libcurl4-openssl-dev,
libmicrohttpd-dev (>= 0.4.6),
libsml-dev (>= 1.0),
cmake,
libsasl2-dev,
libssl-dev,
libgcrypt-dev,
libgnutls28-dev,
uuid-dev,
libunistring-dev,
libgmock-dev,
libgtest-dev,
pandoc,
libmosquitto-dev
Standards-Version: 4.6.2
Rules-Requires-Root: no
Homepage: http://wiki.volkszaehler.org/software/controller/vzlogger
Vcs-Git: https://github.com/volkszaehler/vzlogger.git
Vcs-Browser: https://github.com/volkszaehler/vzlogger

Package: vzlogger
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, libsml1
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Pre-Depends: ${misc:Pre-Depends}
Description: program for logging measurements to a volkszaehler.org middleware
vzlogger...
Expand Down
40 changes: 35 additions & 5 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ Copyright: Copyright 2011 Steffen Vogel <[email protected]>
Copyright (c) 2011, DAI-Labor, TU-Berlin
Copyright 2011 Fraunhofer ITWM
Copyright (c) 2015, 2018 Matthias Behr
Copyright (c) 2011 - 2023, The volkszaehler.org project
License: GPL-3
Copyright (c) 2011 - 2024, The volkszaehler.org project
License: GPL-3.0-or-later

Files: modules/GetGitRevisionDescription.cmake*
Copyright: Copyright Iowa State University 2009-2010.
License: BSL-1.0

Files: debian/*
Copyright: Copyright 2011 Steffen Vogel <[email protected]>
Copyright 2023 Joachim Zobel <[email protected]>
License: GPL-3
Copyright 2023 - 2024 Joachim Zobel <[email protected]>
License: GPL-3.0-or-later

License: GPL-3
License: GPL-3.0-or-later
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand All @@ -34,3 +38,29 @@ License: GPL-3
License version 3 can be found in the file
`/usr/share/common-licenses/GPL-3'.

License: BSL-1.0
Boost Software License - Version 1.0 - August 17th, 2003
.
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
.
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
.
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


Loading

0 comments on commit d49a7d0

Please sign in to comment.