[hamradio-commits] [dump1090-mutability] 13/172: Update packaging to build a -mutability package.
Matteo F. Vescovi
mfv at moszumanska.debian.org
Sun Jan 28 13:45:41 UTC 2018
This is an automated email from the git hooks/post-receive script.
mfv pushed a commit to branch master
in repository dump1090-mutability.
commit 8d98031493f4b99378acb515dbe1aef0d96a3bcb
Author: Oliver Jowett <oliver at mutability.co.uk>
Date: Sat Dec 6 21:47:46 2014 +0000
Update packaging to build a -mutability package.
---
debian/changelog | 15 +++----------
debian/control | 13 ++++++-----
debian/copyright | 6 ++---
debian/dump1090-mr.install | 1 -
...1090-mr.default => dump1090-mutability.default} | 17 ++++++++++----
.../{dump1090-mr.init => dump1090-mutability.init} | 26 +++++++++++++++++-----
debian/dump1090-mutability.install | 2 ++
...-mr.logrotate => dump1090-mutability.logrotate} | 2 +-
...90-mr.postinst => dump1090-mutability.postinst} | 2 +-
debian/lighttpd/90-dump1090.conf | 13 +++++++++++
debian/rules | 8 +++----
11 files changed, 67 insertions(+), 38 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3e071ad..922504c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,14 +1,5 @@
-dump1090-mr (1.08.2302.14+1-2) unstable; urgency=medium
+dump1090-mutability (1.08.2302.14+1-mu-1) UNRELEASED; urgency=medium
- * Pass --name / --user to start-stop-daemon when starting
- * Log to /var/log/dump1090-mr.log (configurable via LOGFILE)
- * Log stats once an hour by default (configurable via STATS_INTERVAL)
- * Include a logrotate configuration
+ * Initial release.
- -- Oliver Jowett <oliver at mutability.co.uk> Sat, 06 Dec 2014 18:37:12 +0000
-
-dump1090-mr (1.08.2302.14+1-1) unstable; urgency=medium
-
- * Initial package release.
-
- -- Oliver Jowett <oliver at mutability.co.uk> Fri, 05 Dec 2014 22:55:41 +0000
+ -- Oliver Jowett <oliver at mutability.co.uk> Sat, 06 Dec 2014 19:44:44 +0000
diff --git a/debian/control b/debian/control
index 012b733..d27ff82 100644
--- a/debian/control
+++ b/debian/control
@@ -1,13 +1,13 @@
-Source: dump1090-mr
+Source: dump1090-mutability
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver at mutability.co.uk>
-Build-Depends: debhelper(>=8), net-tools, librtlsdr-dev
+Build-Depends: debhelper(>=8), librtlsdr-dev
Standards-Version: 3.9.3
-Homepage: https://github.com/MalcolmRobb/dump1090
-Vcs-Git: https://github.com/mutability/dump1090.git -b mr-pi-package
+Homepage: https://github.com/mutability/dump1090
+Vcs-Git: https://github.com/mutability/dump1090.git
-Package: dump1090-mr
+Package: dump1090-mutability
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, net-tools, adduser
Description: ADS-B Ground Station System for RTL-SDR
@@ -17,4 +17,5 @@ Description: ADS-B Ground Station System for RTL-SDR
Includes a mini-webserver that you can access to see aircraft in the vicinity
of your receiver.
.
- This is a packaging of MalcomRobb's fork of the original dump1090 version.
+ This is a packaging of the "mutability" fork of dump1090 that includes
+ sampling at 2.4MHz and other improvements.
diff --git a/debian/copyright b/debian/copyright
index ce72a3f..29d539b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,10 +1,10 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dump1090
-Upstream-Contact: https://github.com/MalcolmRobb
-Source: https://github.com/MalcolmRobb/dump1090
+Upstream-Contact: Oliver Jowett <oliver at mutability.co.uk>
+Source: https://github.com/mutability/dump1090
Files: *
-Copyright: Salvatore Sanfilippo, Malcom Robb and other contributors.
+Copyright: Salvatore Sanfilippo, Malcom Robb, Oliver Jowett and other contributors.
License: BSD-3-Clause
Files: debian/*
diff --git a/debian/dump1090-mr.install b/debian/dump1090-mr.install
deleted file mode 100644
index 8feea8a..0000000
--- a/debian/dump1090-mr.install
+++ /dev/null
@@ -1 +0,0 @@
-public_html/* usr/share/dump1090-mr
diff --git a/debian/dump1090-mr.default b/debian/dump1090-mutability.default
similarity index 83%
rename from debian/dump1090-mr.default
rename to debian/dump1090-mutability.default
index c5a4cce..6f10d61 100644
--- a/debian/dump1090-mr.default
+++ b/debian/dump1090-mutability.default
@@ -1,4 +1,4 @@
-# Defaults for dump1090-mr
+# Defaults for dump1090-mutability
# This is a POSIX shell fragment
# Set to "yes" to start dump1090 on boot.
@@ -8,7 +8,7 @@ START_DUMP1090="no"
DUMP1090_USER="dump1090"
# Logfile to log to
-#LOGFILE="/var/log/dump1090-mr.log"
+#LOGFILE="/var/log/dump1090-mutability.log"
#
# The following options are all optional - defaults if not provided are
@@ -31,6 +31,9 @@ DUMP1090_USER="dump1090"
# RTLSDR frequency correction in PPM
#PPM=0
+# If yes, enable sampling at 2.4MHz. Otherwise, 2.0MHz is used.
+#OVERSAMPLE=no
+
#
# Decoding options
#
@@ -79,8 +82,8 @@ DUMP1090_USER="dump1090"
# Minimum output buffer size per write, in bytes.
#NET_OUTPUT_SIZE=5
-# Maximum buffering time before writing. In units of approx 64ms (don't ask..).
-#NET_OUTPUT_RATE=5
+# Maximum buffering time before writing, in seconds.
+#NET_OUTPUT_INTERVAL=1
# TCP buffer size order. Power-of-two based - buffer size is 2^(n+16).
#NET_BUFFER=0
@@ -95,5 +98,11 @@ DUMP1090_USER="dump1090"
# Interval (in seconds) between logging stats to the logfile. 0 disables.
#STATS_INTERVAL=3600
+# Path to write json state to (for use with an external webserver). Blank disables.
+#JSON_DIR=/run/dump1090-mutability
+
+# Interval between writing json state (in seconds). 0 disables.
+#JSON_INTERVAL=1
+
# Additional options that are passed to the Daemon.
#EXTRA_ARGS=""
diff --git a/debian/dump1090-mr.init b/debian/dump1090-mutability.init
similarity index 85%
rename from debian/dump1090-mr.init
rename to debian/dump1090-mutability.init
index 77e70fc..5ee95be 100644
--- a/debian/dump1090-mr.init
+++ b/debian/dump1090-mutability.init
@@ -1,11 +1,11 @@
#!/bin/sh
### BEGIN INIT INFO
-# Provides: dump1090-mr
+# Provides: dump1090-mutability
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: dump1090 daemon (MalcolmRobb variant)
+# Short-Description: dump1090 daemon (mutability variant)
# Description: Receives ADS-B messages from a RTLSDR dongle
# and makes them available to other applications via
# a variety of network protocols.
@@ -15,8 +15,8 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="dump1090-mr daemon"
-NAME=dump1090-mr
+DESC="dump1090-mutability daemon"
+NAME=dump1090-mutability
DAEMON=/usr/bin/$NAME
ARGS="--quiet"
PIDFILE=/var/run/$NAME.pid
@@ -32,6 +32,7 @@ LOGFILE=/var/log/$NAME.log
DEVICE=0
GAIN=max
PPM=0
+OVERSAMPLE=no
FIX_CRC=no
PHASE_ENHANCE=no
AGGRESSIVE=no
@@ -45,7 +46,7 @@ BEAST_INPUT_PORT=30004
BEAST_OUTPUT_PORT=30005
NET_HEARTBEAT=60
NET_OUTPUT_SIZE=5
-NET_OUTPUT_RATE=5
+NET_OUTPUT_INTERVAL=1
NET_BUFFER=0
BIND_ADDRESS=
STATS_INTERVAL=3600
@@ -68,6 +69,7 @@ case "x$GAIN" in
*) ARGS="$ARGS --gain $GAIN" ;;
esac
if [ "x$PPM" != "x0" ]; then ARGS="$ARGS --ppm $PPM"; fi
+if [ "x$OVERSAMPLE" != "x0" ]; then ARGS="$ARGS --oversample"; fi
# decoder:
if [ "x$FIX_CRC" = "xyes" ]; then ARGS="$ARGS --fix"; fi
@@ -85,12 +87,14 @@ if [ "x$BEAST_INPUT_PORT" != "x30004" ]; then ARGS="$ARGS --net-bi-port $BEAST_I
if [ "x$BEAST_OUTPUT_PORT" != "x30005" ]; then ARGS="$ARGS --net-bo-port $BEAST_OUTPUT_PORT"; fi
if [ "x$NET_HEARTBEAT" != "x60" ]; then ARGS="$ARGS --net-heartbeat $NET_HEARTBEAT"; fi
if [ "x$NET_OUTPUT_SIZE" != "x0" ]; then ARGS="$ARGS --net-ro-size $NET_OUTPUT_SIZE"; fi
-if [ "x$NET_OUTPUT_RATE" != "x0" ]; then ARGS="$ARGS --net-ro-rate $NET_OUTPUT_RATE"; fi
+if [ "x$NET_OUTPUT_INTERVAL" != "x0" ]; then ARGS="$ARGS --net-ro-interval $NET_OUTPUT_INTERVAL"; fi
if [ "x$NET_BUFFER" != "x0" ]; then ARGS="$ARGS --net-buffer $NET_BUFFER"; fi
if [ -n "$BIND_ADDRESS" ]; then ARGS="$ARGS --net-bind-address $BIND_ADDRESS"; fi
# misc:
if [ "x$STATS_INTERVAL" != "x0" ]; then ARGS="$ARGS --stats-every $STATS_INTERVAL"; fi
+if [ "x$JSON_DIR" != "x" ]; then ARGS="$ARGS --write-json $JSON_DIR"; fi
+if [ "x$JSON_INTERVAL" != "x1" ]; then ARGS="$ARGS --write-json-every $JSON_INTERVAL"; fi
if [ -n "$EXTRA_ARGS" ]; then ARGS="$ARGS $EXTRA_ARGS"; fi
# Load the VERBOSE setting and other rcS variables
@@ -118,6 +122,16 @@ do_start()
start-stop-daemon --start --quiet --pidfile $PIDFILE --name $NAME --user $DUMP1090_USER --exec $DAEMON --test > /dev/null \
|| return 1
+
+
+ # create JSON_DIR with the appropriate permissions
+ # (it is on /run by default, so will be lost on reboot)
+ if [ "x$JSON_DIR" != "x" ]; then
+ if [ ! -e $JSON_DIR ]; then
+ (mkdir $JSON_DIR && chmod 0755 $JSON_DIR && chown $DUMP1090_USER $JSON_DIR) || log_warning_msg "Failed to create $JSON_DIR"
+ fi
+ fi
+
start-stop-daemon --start --quiet --pidfile $PIDFILE --name $NAME --user $DUMP1090_USER --chuid $DUMP1090_USER --make-pidfile --background --no-close --exec $DAEMON -- \
$ARGS >>$LOGFILE 2>&1 \
|| return 2
diff --git a/debian/dump1090-mutability.install b/debian/dump1090-mutability.install
new file mode 100644
index 0000000..d1e444b
--- /dev/null
+++ b/debian/dump1090-mutability.install
@@ -0,0 +1,2 @@
+public_html/* usr/share/dump1090-mutability
+debian/lighttpd/* etc/lighttpd/conf-available
diff --git a/debian/dump1090-mr.logrotate b/debian/dump1090-mutability.logrotate
similarity index 51%
rename from debian/dump1090-mr.logrotate
rename to debian/dump1090-mutability.logrotate
index f421184..0a4f6ad 100644
--- a/debian/dump1090-mr.logrotate
+++ b/debian/dump1090-mutability.logrotate
@@ -1,4 +1,4 @@
-/var/log/dump1090-mr.log {
+/var/log/dump1090-mutability.log {
weekly
rotate 4
copytruncate
diff --git a/debian/dump1090-mr.postinst b/debian/dump1090-mutability.postinst
similarity index 90%
rename from debian/dump1090-mr.postinst
rename to debian/dump1090-mutability.postinst
index e727c02..b0fd8f3 100644
--- a/debian/dump1090-mr.postinst
+++ b/debian/dump1090-mutability.postinst
@@ -20,7 +20,7 @@ set -e
case "$1" in
configure)
- adduser --system --home /usr/share/dump1090-mr --no-create-home --quiet dump1090
+ adduser --system --home /usr/share/dump1090-mutability --no-create-home --quiet dump1090
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/lighttpd/90-dump1090.conf b/debian/lighttpd/90-dump1090.conf
new file mode 100644
index 0000000..a12f0eb
--- /dev/null
+++ b/debian/lighttpd/90-dump1090.conf
@@ -0,0 +1,13 @@
+# Allows access to the static files that provide the dump1090 map view,
+# and also to the dynamically-generated json parts that contain aircraft
+# data and are periodically written by the dump1090 daemon.
+
+url.redirect += (
+ "^/dump1090/$" => "/dump1090/gmap.html",
+ "^/dump1090$" => "/dump1090/gmap.html"
+)
+
+alias.url += (
+ "/dump1090/data/" => "/run/dump1090-mutability/",
+ "/dump1090/" => "/usr/share/dump1090-mutability/"
+)
diff --git a/debian/rules b/debian/rules
index 38f129b..cf81ca1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,13 +15,13 @@ DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
override_dh_auto_build:
- dh_auto_build -- 'EXTRACFLAGS=-DHTMLPATH=\"/usr/share/dump1090-mr\"'
+ dh_auto_build -- 'EXTRACFLAGS=-DHTMLPATH=\"/usr/share/dump1090-mutability\"'
override_dh_install:
dh_install
- install -d debian/dump1090-mr/usr/bin
- cp -a dump1090 debian/dump1090-mr/usr/bin/dump1090-mr
- cp -a view1090 debian/dump1090-mr/usr/bin/view1090-mr
+ install -d debian/dump1090-mutability/usr/bin
+ cp -a dump1090 debian/dump1090-mutability/usr/bin/dump1090-mutability
+ cp -a view1090 debian/dump1090-mutability/usr/bin/view1090-mutability
%:
dh $@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090-mutability.git
More information about the pkg-hamradio-commits
mailing list