From acb26fd9800b75a790ea23fa3891476632d51fc4 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 18 Jul 2023 01:26:17 +0100 Subject: [PATCH] Added Debian packaging so far --- debian/changelog | 5 + debian/control | 18 ++ debian/copyright | 33 +++ debian/dirs | 1 + debian/gitlab-ci.yml | 6 + debian/install | 1 + debian/linbpq.service | 10 + debian/manpages/qsstv.1 | 21 ++ debian/patches/makefile | 21 ++ debian/patches/series | 1 + debian/postinst | 16 ++ debian/rules | 8 + debian/source/format | 1 + debian/source/include-binaries | 5 + debian/source/lintian-overrides | 0 debian/templates/linbpq.conf | 425 ++++++++++++++++++++++++++++++++ 16 files changed, 572 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/gitlab-ci.yml create mode 100644 debian/install create mode 100644 debian/linbpq.service create mode 100644 debian/manpages/qsstv.1 create mode 100644 debian/patches/makefile create mode 100644 debian/patches/series create mode 100644 debian/postinst create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/include-binaries create mode 100644 debian/source/lintian-overrides create mode 100644 debian/templates/linbpq.conf diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..b22f34e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +linbpq (6.0.23.77-1) UNRELEASED; urgency=medium + + * Initial release. (Closes: #XXXXXX) + + -- Dave Hibberd Tue, 18 Jul 2023 01:23:31 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..279ef32 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: linbpq +Section: hamradio +Priority: optional +Maintainer: Debian Hamradio Maintainers +Uploaders: + Dave Hibberd , +Standards-Version: 4.6.1.0 +Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/linbpq +Vcs-Git: https://salsa.debian.org/debian-hamradio-team/linbpq.git +Homepage: http://users.telenet.be/on4qz +Build-Depends: debhelper-compat (= 13), libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev +Rules-Requires-Root: no + +Package: linbpq +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Packet node and ax25 stack + LINBPQ is a Linux version of the BPQ32 Node, BBS and Chat Server components. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2231b00 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: linBPQ +Upstream-Contact: Johan Maes +Source: http://users.telenet.be/on4qz/ + +Files: * +Copyright: 1990-2022 G8BPQ +License: GPL-3 + +Files: debian/* +Copyright: 2016-2021 Dave Hibberd +License: GPL-3 + +File: debian/linbpq.service +Copyright: Tom Fanning M0LTE +License: GPL-3 + +License: GPL-3 + 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 + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + The GPL License which applies to this package can be found on your Debian + system at /usr/share/common-licenses/GPL-3. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..5cac53f --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +opt/oarc/bpq diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml new file mode 100644 index 0000000..cd460cf --- /dev/null +++ b/debian/gitlab-ci.yml @@ -0,0 +1,6 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +reprotest: + extends: .test-reprotest-diffoscope diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..0c14e94 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +debian/templates/linbpq.conf opt/oarc/bpq diff --git a/debian/linbpq.service b/debian/linbpq.service new file mode 100644 index 0000000..bb29a9a --- /dev/null +++ b/debian/linbpq.service @@ -0,0 +1,10 @@ +[Unit] +After=network.target + +[Service] +ExecStart=/opt/oarc/linbpq/linbpq +WorkingDirectory=/opt/oarc/linbpq +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/debian/manpages/qsstv.1 b/debian/manpages/qsstv.1 new file mode 100644 index 0000000..ae54783 --- /dev/null +++ b/debian/manpages/qsstv.1 @@ -0,0 +1,21 @@ +.TH QSSTV 1 + +.SH NAME +qsstv \- Qt based slow scan television and fax + +.SH SYNOPSIS +.B qsstv + +.SH DESCRIPTION +.B qsstv +is a program for sending and receiving slow-scan TV and fax. +These are modes used by hamradio operators. +Qsstv uses a soundcard to send and receive images. + +.SH SEE ALSO +The qsstv documentation is available from +http://users.telenet.be/on4qz/qsstv/manual + +.SH FILES +Settings for qsstv are saved in +.I $HOME/qsstv.conf diff --git a/debian/patches/makefile b/debian/patches/makefile new file mode 100644 index 0000000..d663e6c --- /dev/null +++ b/debian/patches/makefile @@ -0,0 +1,21 @@ +--- a/makefile ++++ b/makefile +@@ -29,11 +29,15 @@ + + linbpq: $(OBJS) + gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz -lpthread -lconfig -lpcap -o linbpq +- sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq ++# setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq ++ ++install: ++ install -b -m 755 -D -d debian/linbpq/opt/oarc/bpq ++ install -b -m 755 -s -p linbpq debian/linbpq/opt/oarc/bpq + + -include *.d + + clean : +- rm *.d +- rm linbpq $(OBJS) ++ rm -f *.d ++ rm -f linbpq $(OBJS) + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f0be4dd --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +makefile diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..49d5770 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ "$1" = configure ]; then +# If we have setcap is installed, set the requirements +# which allows us to install our binaries without the setuid +# bit. + if command -v setcap > /dev/null; then + setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbq + else + echo "Setcap failed on /usr/sbin/linbpq, Features may be limited" >&2 + fi + else + echo "Setcap is not installed, Features may be limited" >&2 +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b802fff --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +#export DEB_BUILD_MAINT_OPTIONS=hardening=+all +CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +CFLAGS += -fcommon + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 0000000..e5c9b0a --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1,5 @@ +debian/templates/CQ_1.templ +debian/templates/simple_replay.templ +debian/templates/im_reply.templ +debian/templates/CQ_2.templ +debian/templates/comment.templ diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..e69de29 diff --git a/debian/templates/linbpq.conf b/debian/templates/linbpq.conf new file mode 100644 index 0000000..59f1666 --- /dev/null +++ b/debian/templates/linbpq.conf @@ -0,0 +1,425 @@ +; +; +; CONFIGURATION FILE FOR G8BPQ SWITCH SOFTWARE +; +; The order of parameters in not important, but they +; all must be specified - there are no defaults +; +PASSWORD=ABCDEFGHILKLMNOPQRSTUVWXY ; SYSOP Passord + +LOCATOR=IO68VL ; Enable Map Reporting +MAPCOMMENT=BPQ32 Test Node
Skigersta, Isle of Lewis + +; +; +; BBS enables the Application support system. If you have specified any of the APPLnCALLS, +; you should set BBS to 1. +; +BBS=1 ; INCLUDE BBS SUPPORT +; +; NODE +NODE=1 ; INCLUDE SWITCH SUPPORT + + + +; The NODES and ROUTES tables can be saved, so that they can be reloaded when the software is restarted, +; rather than having to wait for the tables to be rebuilt. There is a program SAVENODES.exe and a command +; to the BPQ32 console to to this. By Setting AUTOSAVE=1, the tables will be saved each time the softare closes + +AUTOSAVE=1 ; Save Nodes File before exiting + +; +; Station Identification. +; +; If a user connects to the NODE Callsign or Alias, he is linked +; to the switch code, and can use normal NetRom/TheNet commands +; +; If he connects to an Application Callsign or Alias he will be connected +; directly to the corresponding application. If not available, the connect will +; be rejected. See the section on Application Calls towards the bottom of the file for +; more information. +; +; Note that for compatibility with the DOS version, and older versions of BPQ32, BBSCALL is an alias for APPL1CALL, +; and BBSALIAS is an alias for APPL1ALIAS. If both BBSCALL and APPL1CALL are specified, the BBSCALL will be ignored. +; + +NODECALL=G8BPQ-2 ; NODE CALLSIGN +NODEALIAS=BPQ + +; 'ID' MESSAGE - SENT EVERY IDINTERVAL MINS +; +; WILL BE ADDRESSED FROM THE PORT CALLSIGN (IF DEFINED) +; ELSE FROM THE NODE CALL +; +; The main purpose of this is to satisfy the requrements of those administations that require a regular station +; identification in the same mode as used for communication. + +IDMSG: +Network node (BPQ) +*** +; + +; 'I' COMMAND TEXT +; +; +INFOMSG: +G8BPQ Win32 Test Switch, Skigersta, Isle of Lewis. +*** + +; BTEXT is the default beacon sent by the Node. Note that application programs may change this, or +; generate their own beacons. + +; An APRS compatible position may be included. + +BTEXT: +=5828.54N/00612.69W- {BPQ32} +G8BPQ's Test Node +*** + +IDINTERVAL=15 ; 'ID' BROADCAST INTERVAL (UK Regs require an AX25 ID every 15 mins) +BTINTERVAL=15 ; BTEXT is sent at this interval + +; +; CTEXT - Normally will only be sent when someone connects to +; the NODE ALIAS at level 2. If FULL_CTEXT is set to 1, it +; will be sent to all connectees. Note that this could confuse BBS +; forwarding connect scripts. +; +CTEXT: +Welcome to G8BPQ's Test Switch in Skigersta +Type ? for list of available commands. +*** + +FULL_CTEXT=0 ; SEND CTEXT TO EVERYBODY + +HFCTEXT=BPQ32 Node, Skigersta + +; Network System Parameters. +; +; These are my values. Many other node sysops use other values. If in doubt, liase with +; those running nodes that you link to + +OBSINIT=5 ; INITIAL OBSOLESCENCE VALUE +OBSMIN=4 ; MINIMUM TO BROADCAST +NODESINTERVAL=60 ; 'NODES' INTERVAL IN MINS + +L3TIMETOLIVE=25 ; MAX L3 HOPS +L4RETRIES=4; ; LEVEL 4 RETRY COUNT +; +L4TIMEOUT=60; ; LEVEL 4 TIMEOUT +L4DELAY=10 ; LEVEL 4 DELAYED ACK TIMER +L4WINDOW=4 ; DEFAULT LEVEL 4 WINDOW +; +MINQUAL=140 ; MINIMUM QUALITY TO ADD TO NODES TABLE + + + +; The following MAX params set the limits for various tables. +; +; Although significantly larger values can be used, a common area is used +; for these tables and the buffer pool, so don't increase them more than +; necessary. + +MAXLINKS=100 ; MAX LEVEL 2 LINKS (UP,DOWN AND INTERNODE) +MAXNODES=300; ; MAX NODES IN SYSTEM +MAXROUTES=30 ; MAX ADJACENT NODES +MAXCIRCUITS=150 ; NUMBER OF L4 CIRCUITS + + + +BUFFERS=999 ; PACKET BUFFERS - 999 MEANS ALLOCATE AS MANY + ; AS POSSIBLE - NORMALLY ABOUT 600, DEPENDING + ; ON OTHER TABLE SIZES +; +; TNC DEFAULT PARAMS +; +PACLEN=236 ; MAX PACKET SIZE +; +; PACLEN is a problem! The ideal size depends on the link(s) over +; which a packet will be sent. For a session involving another node, +; we have no idea what is at the far end. Ideally each node should have +; the capability to combine and then refragment messages to suit each +; link segment - maybe when there are more of my nodes about than 'real' +; ones, i'll do it. When the node is accessed directly, things are a +; bit easier, as we know at least something about the link. +; So there are two PACLEN params, one here and +; one in the PORTS section. This one is used to set the initial value +; for sessions via other nodes, and for sessions initiated from here. +; The other is used for incoming direct (Level 2) sessions. In all cases +; the Node PACLEN command can be used to override the defaults. +; +; 236 is the largest that can be sent over a NETROM link without fragmetation. +; so don't go above this unless you don't have ant NETROM links. +; +; Level 2 Parameters +; +; Most Level 2 parametes are specified in the PORTS section' +; +T3=180 ; LINK VALIDATION TIMER (3 MINS) +IDLETIME=900 ; IDLE LINK SHUTDOWN TIMER (15 MINS) +; +; +HIDENODES=0 ; IF SET TO 1, NODES STARTING WITH # WILL + ; ONLY BE DISPLAYED BY A NODES * COMMAND +; +; THE *** LINKED COMMAND IS INTENDED FOR USE BY GATEWAY SOFTWARE, AND +; CONCERN HAS BEEN EXPRESSED THAT IT COULD BE MISUSED. I RECOMMEND THAT +; IT IS DISABLED IF NOT NEEDED. +; +ENABLE_LINKED=A ; CONTROLS PROCESSING OF *** LINKED COMMAND + ; Y ALLOWS UNRESTRICTED USE + ; A ALLOWS USE BY APPLICATION PROGRAM + ; N (OR ANY OTHER VALUE) DISABLE +; +; AX25 PORT DEFINITIONS +; +; These define the external links - normally to radios, but possibly +; to other computers, modems, etc. +; + +; The KISS protocol supports dual port TNC's such as the KAM and KPC4. +; You should define two port entries with the same IO addr +; and SPEED - set CHANNEL=A for the first and B for the second. +; +; Note that all timer values are in ms intervals. Most TNC's +; use different units for the various timers, so be careful! +; +; All parameters should be set for all ports, but not all +; drivers support all features. For instance, the NETROM driver +; does not use the TXDELAY, SLOTTIME and PERSIST values. The NETROM +; driver only works in FULL DUPLEX mode, and the HDLC only in +; HALF DUPLEX. +;; +; CWID works only on DRSI and PC120 cards, and can be suppressed +; by omitting the parameter. +; +; BECAUSE OF OUR ODD LICENCING CONDITIONS YOU MAY WISH TO BAN +; CONNECTIONS TO THE BBS CALLSIGN ON SOME PORTS - USERS MAY STILL +; CONNECT USING L4, OR CONNECT TO THE NODE ADDR, AND USE BBS +; COMMAND. PUT 'BBSFLAG=NOBBS' TO ACTIVATE THIS FUNCTION. +; 'BBSFLAG=BBSOK', OR NO PARM, MEANS BEHAVE AS NORMAL +; +; You can have an extra callsign and alias for each +; port for user access only. The callsigns defined in NODECALL and +; BBSCALL are used for all networking activity. +; + +PORT + ID=LOOPBACK + TYPE=INTERNAL + PROTOCOL=KISS + CHANNEL=A + QUALITY=0 + MAXFRAME=6 + FULLDUP=0 + FRACK=10000 + RESPTIME=3000 + RETRIES=10 + PACLEN=200 + TXDELAY=500 + SLOTTIME=100 + PERSIST=64 + DIGIFLAG=1 + UNPROTO=FBB +ENDPORT + +PORT + ID=AXIP Link + TYPE=EXTERNAL + DLLNAME=BPQAXIP.DLL + QUALITY=200 + MAXFRAME=4 + FRACK=5000 + RESPTIME=1000 + RETRIES=10 + PACLEN=236 + MINQUAL=150 + UNPROTO=FBB ; DEFAULT UNPROTO ADDR + BCALL=GM8BPQ ; Call for Beacons + + CONFIG + + UDP 10093 # Optional. Enables UDP support, and defines the port + # AX.IP listens on. You can specify more than one + # UDP line if you need to listen on more than one port + + MHEARD # Optional - opens a window to display a "Heard List" + + BROADCAST NODES + + MAP G8BPQ-7 G8BPQ.NO-IP.COM UDP 10093 B + + ; Steve Conrad, VE9SC, provides a service which displays a map of BPQMailChat + ; nodes dynamically updated: http://guardian.no-ip.org/bpqmap/ChatNetwork.htm + ; The following line causes your Chat Node to be included on the map. + + MAP DUMMY chatmap.g8bpq.net UDP 10090 + +ENDPORT + +PORT + ID=BPQEther Link + TYPE=EXTERNAL + DLLNAME=BPQETHER.DLL + QUALITY=200 + IOADDR=2 + CHANNEL=A + MAXFRAME=7 + FRACK=5000 + RESPTIME=1000 + RETRIES=10 + PACLEN=236 + MINQUAL=255 + UNPROTO=MAIL ; DEFAULT UNPROTO ADDR + + CONFIG + + TXMODE BPQ # BPQ or RLI + RXMODE BPQ # BPQ or RLI + TYPE 08FF # Ethernet Type + DEST 01-42-50-51-00-00 # Target Ethernet Addr - Multicast as used in DOS BPQCODE + SOURCE 02-FF-60-BA-5C-9E # Source Ethernet Addr + ADAPTER \Device\NPF_{959094A1-C20D-4FFD-AF68-D43229E4854B} # Adapter Name + +ENDPORT + +; +; WINMOR Port +; +PORT + ID=WINMOR Port 1 + TYPE=EXTERNAL + DLLNAME=WINMOR.DLL + INTERLOCK=4 + CONFIG + ADDR 127.0.0.1 8506 PTT DTR + RIGCONTROL COM61 4800 ICOM IC718 5E 5 3.573/u1nA1 7.077/u1 10.133/u1 10.146/u1wA3 14.1105/u1w + CWID True + BW 1600 + DRIVELEVEL 100 + BUSYLOCK False + +ENDPORT + +PORT + ID=KAM PACTOR COM 100 + TYPE=EXTERNAL + PROTOCOL=PACTOR + IOADDR=64 + SPEED=9600 + DLLNAME=KAMPACTOR.DLL + QUALITY=0 + INTERLOCK=4 + + CONFIG ; Driver-Specific Configuration + + APPL RMS ; Autoconnect to BPQ32 RMS Application + RIGCONTROL COM2 19200 ICOM IC700 70 4 14.103/U1W 14.112/U1 18.1/U1N 10.12/L1 + + + OLDMODE ; Optional - Causes controller to be set to PACTOR mode instead of TOR mode + XMITLVL 50/35; + +ENDPORT + +PORT + ID=SCS PACTOR COM 103 + DRIVER=SCSPACTOR + COMPORT=103 + SPEED=38400 + PORTCALL=GM8BPQ + + CONFIG ; Driver-Specific Configuration + + APPL RMS ; Autoconnect to BPQ32 RMS Application + RIGCONTROL COM2 19200 ICOM IC700 70 4 14.103/U1W 14.112/U1 18.1/U1N 10.12/L1 + + + PSKA 140 ; PSK TX Output level. + FSKA 100 ; TX Level for FSK modes. + +ENDPORT + +PORT + ID=KISS COM53 + TYPE=ASYNC + PROTOCOL=KISS + COMPORT=53 + SPEED=9600 + INTLEVEL=4 + CHANNEL=A + QUALITY=0 + MAXFRAME=6 + FULLDUP=0 + FRACK=10000 + RESPTIME=3000 + RETRIES=10 + PACLEN=200 + TXDELAY=500 + SLOTTIME=100 + PERSIST=64 + DIGIFLAG=1 +; +; KISSOPTIONS=ACKMODE +; KISSOPTIONS=POLLED,CHECKSUM + + UNPROTO=FBB +ENDPORT + +PORT + ID=VKISS COM2 Link to MIXW + DRIVER=BPQVKISS + QUALITY=200 + COMPORT=2 + CHANNEL=A + MAXFRAME=4 + FRACK=5000 + RESPTIME=1000 + RETRIES=10 + PACLEN=120 + DIGIFLAG=1 + DIGIMASK=65535 ; Digi UI Frames to all ports + +ENDPORT + + + +PORT + ID=AGW Port 1 + DRIVER=BPQtoAGW + QUALITY=0 + IOADDR=1F41 + CHANNEL=A + MAXFRAME=4 + FRACK=7000 + RESPTIME=1000 + RETRIES=10 + PACLEN=120 + UNPROTO=MAIL ; DEFAULT UNPROTO ADDR +; +ENDPORT + + +ROUTES: +; +; ROUTES TO LOCK IN +; +; specify Callsign, Quality and Port. You can now also specify +; MAXFRAME, FRACK, PACLEN (in that order) to override the port +; defaults. +; +; +AE5E-14,200,2,0,0,0,2 ; No Keepalives +;G4RFG,0,1 ; Marginal, So lock out by setting QUALITY = 0 +;G0GDR-1,100,2,1,6000,100 ; not always very good, so MAXFRAME = 1 +*** +; +; APPLICATIONS SUPPORTED +; +; NAMES STARTING WITH * ARE NOT INCLUDED IN 'VALID COMMANDS' DISPALY +; + +APPLICATION 1,RMS,,GM8BPQ-10,BPQRMS,0 +APPLICATION 2,CHAT,,G8BPQ-4,BPQCHT,255 +APPLICATION 3,FBB,,GM8BPQ-3,BPQFBB,0 +APPLICATION 4,BBS,,G8BPQ,BPQBBS,255