ソースを参照

Packaging cleanup

* Declare compliance with policy 4.7.0
* Update watch file
* Update install dependencies
* Update origin in patches
* Re-format shell scripts
* Remove conffile transition needed for the stretch release
* Update lintian override
Christoph Biedl 4 週間 前
コミット
9d7c24406a

+ 2 - 2
debian/control

@@ -1,7 +1,7 @@
 Source: pptpd
 Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Homepage: http://poptop.sourceforge.net/dox/
-Standards-Version: 4.5.1
+Standards-Version: 4.7.0
 Vcs-Browser: https://git.in-ulm.de/cbiedl/pptpd
 Vcs-Git: https://git.in-ulm.de/cbiedl/pptpd.git
 Build-Depends: debhelper-compat (= 13),
@@ -14,9 +14,9 @@ Section: net
 
 Package: pptpd
 Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends},
 Depends: ${misc:Depends}, ${shlibs:Depends},
     bcrelay,
-    lsb-base,
     netbase,
 Description: PoPToP Point to Point Tunneling Server
  This implements a Virtual Private Networking Server (VPN) that is

+ 1 - 1
debian/patches/cherry-pick.1.4.0-10-g6adffc1.bcrelay-fix-typo.patch

@@ -1,5 +1,5 @@
 Subject: Bcrelay: fix typo
-Origin: 1.4.0-10-g6adffc1
+Origin: upstream, 1.4.0-10-g6adffc1
 Upstream-Author: James Cameron <quozl@laptop.org>
 Date: Thu Oct 16 08:08:13 2014 +1100
 

+ 1 - 1
debian/patches/cherry-pick.1.4.0-11-g4ea2db6.ff.bcrelay-c-replace-sprintf-with-snprintf.patch

@@ -1,5 +1,5 @@
 Subject: Cherry-pick 1.4.0-11-g4ea2db6 ff. to fix sprintf usage
-Origin:
+Origin: upstream,
     commit 4ea2db6028cc1079aa84ac1b92e23ba8a7ce9d8e
     commit 2521c45c19106722f299c66d4e0ef86ff7486b54
     commit eee8ad1adece7cc5dfcadaa3cf838cfaf0b01b05

+ 1 - 1
debian/patches/cherry-pick.1.4.0-14-gb84360b.pptpctrl-exit-when-bailing.patch

@@ -1,5 +1,5 @@
 Subject: Pptpctrl: exit when bailing
-Origin: 1.4.0-14-gb84360b
+Origin: upstream, 1.4.0-14-gb84360b
 Upstream-Author: James Cameron <quozl@laptop.org>
 Date: Sat Oct 18 15:08:00 2014 +1100
 

+ 1 - 1
debian/patches/cherry-pick.1.4.0-16-g0c0ad67.check-for-remote-ip-duplicates-in-pptpd-conf.patch

@@ -1,5 +1,5 @@
 Subject: Check for remote IP duplicates in pptpd.conf
-Origin: 1.4.0-16-g0c0ad67
+Origin: upstream, 1.4.0-16-g0c0ad67
 Upstream-Author: Christoph Biedl <sourceforge.bnwi@manchmal.in-ulm.de>
 Date: Fri Jul 8 13:51:42 2016 +1000
 

+ 1 - 1
debian/patches/cherry-pick.1.4.0-18-gd7b9552.fix-segfault-in-pptpctrl-argument-parser.patch

@@ -1,5 +1,5 @@
 Subject: Fix segfault in pptpctrl argument parser
-Origin: 1.4.0-18-gd7b9552
+Origin: upstream, 1.4.0-18-gd7b9552
 Upstream-Author: Christoph Biedl <sourceforge.bnwi@manchmal.in-ulm.de>
 Date: Fri Jul 8 14:03:18 2016 +1000
 

+ 1 - 1
debian/patches/cherry-pick.1.4.0-20-g4da603d.propagate-cc-to-subdirectories.patch

@@ -1,5 +1,5 @@
 Subject: Propagate CC to subdirectories
-Origin: 1.4.0-20-g4da603d
+Origin: upstream, 1.4.0-20-g4da603d
 Upstream-Author: Helmut Grohne <helmut@subdivi.de>
 Date: Wed Jan 3 06:37:56 2018 +1100
 Bug-Debian: https://bugs.debian.org/886160

+ 1 - 1
debian/patches/cherry-pick.1.4.0-22-gb77d92c.build-fixes-for-ppp-2-5.patch

@@ -1,5 +1,5 @@
 Subject: Build fixes for ppp-2.5
-Origin: 1.4.0-22-gb77d92c
+Origin: upstream, 1.4.0-22-gb77d92c
 Upstream-Author: Chris Boot <bootc@debian.org>
 Date: Mon Nov 27 20:43:56 2023 +1100
 

+ 73 - 70
debian/pptpd.init

@@ -1,4 +1,5 @@
 #!/bin/sh
+
 ### BEGIN INIT INFO
 # Provides:          pptpd
 # Required-Start:    $remote_fs $syslog
@@ -10,96 +11,98 @@
 ### END INIT INFO
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC='PoPToP Point to Point Tunneling Server'
-NAME=pptpd
-DAEMON="/usr/sbin/$NAME"
+description='PoPToP Point to Point Tunneling Server'
+name=pptpd
+daemon="/usr/sbin/$name"
 DAEMON_OPTS=''
-PIDFILE='/var/run/pptpd.pid'
-SCRIPTNAME="/etc/init.d/$NAME"
+pid_file='/var/run/pptpd.pid'
+script_name="/etc/init.d/$name"
 
-[ -x "$DAEMON" ] || exit 0
+[ -x "$daemon" ] || exit 0
 
-[ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"
+# shellcheck source=debian/pptpd.default
+[ -r "/etc/default/$name" ] && . "/etc/default/$name"
 
 . /lib/init/vars.sh
 
 . /lib/lsb/init-functions
 
-do_start()
-{
+do_start() {
     start-stop-daemon --start --quiet \
-                --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null \
-        || return 1
+        --pidfile "$pid_file" --exec "$daemon" --test >/dev/null ||
+        return 1
+    # shellcheck disable=SC2086 # We have to trust the default file
     start-stop-daemon --start --quiet \
-                --pidfile "$PIDFILE" --exec "$DAEMON" -- $DAEMON_OPTS \
-        || return 2
+        --pidfile "$pid_file" --exec "$daemon" -- $DAEMON_OPTS ||
+        return 2
 }
 
-do_stop()
-{
-    [ -f "$PIDFILE" ] || return 1
+do_stop() {
+    local retval
+
+    [ -f "$pid_file" ] || return 1
     start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
-        --pidfile "$PIDFILE" --name "$NAME"
-    RETVAL="$?"
-    [ "$RETVAL" = 2 ] && return 2
+        --pidfile "$pid_file" --name "$name"
+    retval="$?"
+    [ "$retval" = 2 ] && return 2
     start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \
-        --exec "$DAEMON"
+        --exec "$daemon"
     [ "$?" = 2 ] && return 2
     # Many daemons don't delete their pidfiles when they exit.
-    rm -f "$PIDFILE"
-    return "$RETVAL"
+    rm -f "$pid_file"
+    return "$retval"
 }
 
 case "$1" in
-start)
-    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-    do_start
-    case "$?" in
-        0|1)
-            [ "$VERBOSE" != 'no' ] && log_end_msg 0
-            ;;
-        2)
-            [ "$VERBOSE" != 'no' ] && log_end_msg 1
-            ;;
-    esac
-    ;;
-stop)
-    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-    do_stop
-    case "$?" in
-        0|1)
-            [ "$VERBOSE" != 'no' ] && log_end_msg 0
-            ;;
-        2)
-            [ "$VERBOSE" != 'no' ] && log_end_msg 1
-            ;;
-    esac
-    ;;
-status)
-    status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
-    ;;
-restart|force-reload)
-    log_daemon_msg "Restarting $DESC" "$NAME"
-    do_stop
-    case "$?" in
-        0|1)
-            do_start
-            case "$?" in
-                0) log_end_msg 0 ;;
-                1) log_end_msg 1 ;; # Old process is still running
-                *) log_end_msg 1 ;; # Failed to start
-            esac
-            ;;
-        *)
-            # Failed to stop
-            log_end_msg 1
-            ;;
+    start)
+        [ "$VERBOSE" != 'no' ] && log_daemon_msg "Starting $description" "$name"
+        do_start
+        case "$?" in
+            0 | 1)
+                [ "$VERBOSE" != 'no' ] && log_end_msg 0
+                ;;
+            2)
+                [ "$VERBOSE" != 'no' ] && log_end_msg 1
+                ;;
+        esac
+        ;;
+    stop)
+        [ "$VERBOSE" != 'no' ] && log_daemon_msg "Stopping $description" "$name"
+        do_stop
+        case "$?" in
+            0 | 1)
+                [ "$VERBOSE" != 'no' ] && log_end_msg 0
+                ;;
+            2)
+                [ "$VERBOSE" != 'no' ] && log_end_msg 1
+                ;;
+        esac
+        ;;
+    status)
+        status_of_proc -p "$pid_file" "$daemon" "$name" && exit 0 || exit $?
+        ;;
+    restart | force-reload)
+        log_daemon_msg "Restarting $description" "$name"
+        do_stop
+        case "$?" in
+            0 | 1)
+                do_start
+                case "$?" in
+                    0) log_end_msg 0 ;;
+                    1) log_end_msg 1 ;; # Old process is still running
+                    *) log_end_msg 1 ;; # Failed to start
+                esac
+                ;;
+            *)
+                # Failed to stop
+                log_end_msg 1
+                ;;
         esac
-    ;;
-*)
-    echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-    exit 3
-    ;;
+        ;;
+    *)
+        echo "Usage: $script_name {start|stop|status|restart|force-reload}" >&2
+        exit 3
+        ;;
 esac
 
 exit 0

+ 1 - 1
debian/pptpd.lintian-overrides

@@ -1,3 +1,3 @@
 
 # side effect of teardown, see https://bugs.debian.org/700868
-pptpd: init.d-script-possible-missing-stop etc/init.d/pptpd 0 6
+pptpd: init.d-script-possible-missing-stop 0 6 [etc/init.d/pptpd]

+ 13 - 20
debian/pptpd.postinst

@@ -2,27 +2,20 @@
 
 set -e
 
-dpkg-maintscript-helper mv_conffile \
-    /etc/modprobe.d/pptpd.conf \
-    /etc/modules-load.d/pptpd.conf \
-    1.4.0-9~ \
-    -- "$@"
-
 case "$1" in
-configure)
-    # load the module configured in /etc/modules-load.d/pptpd.conf
-    if [ -d /run/systemd/system ] ; then
-        deb-systemd-invoke restart systemd-modules-load.service
-    else
-        modprobe nf_nat_pptp 2>/dev/null || true
-    fi
-    ;;
-abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-*)
-    echo "postinst called with unknown argument '$1'"
-    exit 1
-    ;;
+    configure)
+        # load the module configured in /etc/modules-load.d/pptpd.conf
+        if [ -d /run/systemd/system ]; then
+            deb-systemd-invoke restart systemd-modules-load.service
+        else
+            modprobe nf_nat_pptp 2>/dev/null || true
+        fi
+        ;;
+    abort-upgrade | abort-remove | abort-deconfigure) ;;
+    *)
+        echo "postinst called with unknown argument '$1'"
+        exit 1
+        ;;
 esac
 
 #DEBHELPER#

+ 0 - 12
debian/pptpd.postrm

@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dpkg-maintscript-helper mv_conffile \
-    /etc/modprobe.d/pptpd.conf \
-    /etc/modules-load.d/pptpd.conf \
-    1.4.0-9~ \
-    -- "$@"
-
-#DEBHELPER#
-exit 0

+ 0 - 12
debian/pptpd.preinst

@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dpkg-maintscript-helper mv_conffile \
-    /etc/modprobe.d/pptpd.conf \
-    /etc/modules-load.d/pptpd.conf \
-    1.4.0-9~ \
-    -- "$@"
-
-#DEBHELPER#
-exit 0

+ 2 - 2
debian/watch

@@ -1,3 +1,3 @@
-version=3
+version=4
 http://qa.debian.org/watch/sf.php/poptop/ \
-(?:.*/|.*=|)pptpd[\-\._](\d\S*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz)(?:/\S*)?
+(?:.*/|.*=|)@PACKAGE@[\-\._](\d\S*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz)(?:/\S*)?