Skip to content

Commit

Permalink
Switch to compat 12. Remove vestiges of stretch support.
Browse files Browse the repository at this point in the history
This switches us to using dh_installsystemd, and fixes some
service-restart-on-upgrade paths.

compat 12 was introduced in buster, so this won't work on
stretch, but we no longer support stretch so that's OK.

Also work around debhelper bug #989155 on buster/bullseye.
  • Loading branch information
mutability committed Nov 3, 2023
1 parent eaab9d0 commit f054648
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 12 deletions.
7 changes: 7 additions & 0 deletions debian-bullseye/dump978-fa.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

# Work around Debian bug #989155
if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'dump978-fa.service' >/dev/null || true
fi
7 changes: 7 additions & 0 deletions debian-bullseye/skyaware978.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

# Work around Debian bug #989155
if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'skyaware978.service' >/dev/null || true
fi
7 changes: 7 additions & 0 deletions debian-buster/dump978-fa.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

# Work around Debian bug #989155
if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'dump978-fa.service' >/dev/null || true
fi
7 changes: 7 additions & 0 deletions debian-buster/skyaware978.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

# Work around Debian bug #989155
if [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'skyaware978.service' >/dev/null || true
fi
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
12
6 changes: 4 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Source: dump978-fa
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver@mutability.co.uk>
Build-Depends: debhelper(>=10), libboost-system-dev, libboost-program-options-dev, libboost-regex-dev, libboost-filesystem-dev, libsoapysdr-dev
Maintainer: Oliver Jowett <oliver[email protected]>
Build-Depends: debhelper(>=12), libboost-system-dev, libboost-program-options-dev, libboost-regex-dev, libboost-filesystem-dev, libsoapysdr-dev
Standards-Version: 3.9.3
Homepage: http://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump978.git

Package: dump978-fa
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Recommends: skyaware978, soapysdr-module-rtlsdr
Description: ADS-B UAT Ground Station System
Expand All @@ -19,6 +20,7 @@ Package: skyaware978
Replaces: skyview978 (<< 3.7.2~)
Breaks: skyview978 (<< 3.7.2~)
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lighttpd
Description: Local web interface for dump978
.
Expand Down
7 changes: 3 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ override_dh_auto_build:
override_dh_installinit:
dh_installinit --no-stop-on-upgrade --no-restart-after-upgrade

override_dh_systemd_start:
dh_systemd_start --no-stop-on-upgrade --no-restart-after-upgrade --name=dump978-fa.service
dh_systemd_start --no-stop-on-upgrade --no-restart-after-upgrade --name=skyaware978.service
override_dh_installsystemd:
dh_installsystemd --no-restart-after-upgrade

%:
dh $@ --with=systemd
dh $@
6 changes: 1 addition & 5 deletions prepare-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ FILES=$(find $TOP -mindepth 1 -maxdepth 1 -name .git -prune -o -name 'debian*' -
mkdir -p $OUT
cp -a $FILES $OUT
cp -a $TOP/debian $OUT
[ -d $TOP/debian-$DIST ] && cp -a $TOP/debian-$DIST/* $OUT/debian/

case "$DIST" in
stretch)
echo "Updating changelog for stretch backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo9+ --force-distribution --distribution stretch-backports "Automated backport build for stretch"
;;

buster)
echo "Updating changelog for buster backport build" >&2
dch --changelog $OUT/debian/changelog --local ~bpo10+ --force-distribution --distribution buster-backports "Automated backport build for buster"
Expand Down

0 comments on commit f054648

Please sign in to comment.