Browse Source

TT#124273 pkg: use backports scripts to generate different flavours

* pkg/deb/debian should be the only source
* pkg/deb/debian/backports: scripts to generate differences

This way is quite easy to maintain different versions, the
differences are managed via scripts

Change-Id: I0ac3a35fe3facf005564141563e2fb11b73cbefc
mika/coverity
Victor Seva 4 years ago
parent
commit
6e7aab6f70
136 changed files with 75 additions and 2867 deletions
  1. +0
    -15
      pkg/deb/bullseye/.gitignore
  2. +0
    -2
      pkg/deb/bullseye/clean
  3. +0
    -147
      pkg/deb/bullseye/control
  4. +0
    -18
      pkg/deb/bullseye/control.modules.in
  5. +0
    -36
      pkg/deb/bullseye/copyright
  6. +0
    -7
      pkg/deb/bullseye/dkms.conf.in
  7. +0
    -6
      pkg/deb/bullseye/rtpengine-daemon.default
  8. +0
    -117
      pkg/deb/bullseye/rtpengine-daemon.init
  9. +0
    -3
      pkg/deb/bullseye/rtpengine-daemon.install
  10. +0
    -1
      pkg/deb/bullseye/rtpengine-daemon.links
  11. +0
    -1
      pkg/deb/bullseye/rtpengine-daemon.manpages
  12. +0
    -38
      pkg/deb/bullseye/rtpengine-daemon.postinst
  13. +0
    -16
      pkg/deb/bullseye/rtpengine-daemon.service
  14. +0
    -1
      pkg/deb/bullseye/rtpengine-dev.install
  15. +0
    -101
      pkg/deb/bullseye/rtpengine-iptables-setup
  16. +0
    -46
      pkg/deb/bullseye/rtpengine-kernel-dkms.postinst
  17. +0
    -32
      pkg/deb/bullseye/rtpengine-kernel-dkms.prerm
  18. +0
    -1
      pkg/deb/bullseye/rtpengine-kernel-source.links
  19. +0
    -11
      pkg/deb/bullseye/rtpengine-recording-daemon.default
  20. +0
    -2
      pkg/deb/bullseye/rtpengine-recording-daemon.dirs
  21. +0
    -112
      pkg/deb/bullseye/rtpengine-recording-daemon.init
  22. +0
    -3
      pkg/deb/bullseye/rtpengine-recording-daemon.install
  23. +0
    -1
      pkg/deb/bullseye/rtpengine-recording-daemon.links
  24. +0
    -1
      pkg/deb/bullseye/rtpengine-recording-daemon.manpages
  25. +0
    -20
      pkg/deb/bullseye/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service
  26. +0
    -16
      pkg/deb/bullseye/rtpengine-recording-daemon.service
  27. +0
    -42
      pkg/deb/bullseye/rtpengine-recording-nfs-setup
  28. +0
    -4
      pkg/deb/bullseye/rtpengine-utils.install
  29. +0
    -2
      pkg/deb/bullseye/rtpengine.docs
  30. +0
    -70
      pkg/deb/bullseye/rules
  31. +0
    -82
      pkg/deb/bullseye/rules.modules
  32. +0
    -1
      pkg/deb/bullseye/source/format
  33. +0
    -1
      pkg/deb/bullseye/source/options
  34. +0
    -15
      pkg/deb/buster/.gitignore
  35. +0
    -2
      pkg/deb/buster/clean
  36. +0
    -146
      pkg/deb/buster/control
  37. +0
    -18
      pkg/deb/buster/control.modules.in
  38. +0
    -36
      pkg/deb/buster/copyright
  39. +0
    -7
      pkg/deb/buster/dkms.conf.in
  40. +0
    -6
      pkg/deb/buster/rtpengine-daemon.default
  41. +0
    -117
      pkg/deb/buster/rtpengine-daemon.init
  42. +0
    -3
      pkg/deb/buster/rtpengine-daemon.install
  43. +0
    -1
      pkg/deb/buster/rtpengine-daemon.links
  44. +0
    -1
      pkg/deb/buster/rtpengine-daemon.manpages
  45. +0
    -38
      pkg/deb/buster/rtpengine-daemon.postinst
  46. +0
    -16
      pkg/deb/buster/rtpengine-daemon.service
  47. +0
    -1
      pkg/deb/buster/rtpengine-dev.install
  48. +0
    -101
      pkg/deb/buster/rtpengine-iptables-setup
  49. +0
    -46
      pkg/deb/buster/rtpengine-kernel-dkms.postinst
  50. +0
    -32
      pkg/deb/buster/rtpengine-kernel-dkms.prerm
  51. +0
    -1
      pkg/deb/buster/rtpengine-kernel-source.links
  52. +0
    -11
      pkg/deb/buster/rtpengine-recording-daemon.default
  53. +0
    -2
      pkg/deb/buster/rtpengine-recording-daemon.dirs
  54. +0
    -112
      pkg/deb/buster/rtpengine-recording-daemon.init
  55. +0
    -3
      pkg/deb/buster/rtpengine-recording-daemon.install
  56. +0
    -1
      pkg/deb/buster/rtpengine-recording-daemon.links
  57. +0
    -1
      pkg/deb/buster/rtpengine-recording-daemon.manpages
  58. +0
    -20
      pkg/deb/buster/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service
  59. +0
    -16
      pkg/deb/buster/rtpengine-recording-daemon.service
  60. +0
    -42
      pkg/deb/buster/rtpengine-recording-nfs-setup
  61. +0
    -4
      pkg/deb/buster/rtpengine-utils.install
  62. +0
    -2
      pkg/deb/buster/rtpengine.docs
  63. +0
    -70
      pkg/deb/buster/rules
  64. +0
    -82
      pkg/deb/buster/rules.modules
  65. +0
    -1
      pkg/deb/buster/source/format
  66. +0
    -1
      pkg/deb/buster/source/options
  67. +0
    -0
      pkg/deb/debian/.gitignore
  68. +18
    -0
      pkg/deb/debian/backports/bookworm
  69. +18
    -0
      pkg/deb/debian/backports/bullseye
  70. +21
    -0
      pkg/deb/debian/backports/buster
  71. +18
    -0
      pkg/deb/debian/backports/sid
  72. +0
    -0
      pkg/deb/debian/clean
  73. +0
    -0
      pkg/deb/debian/control
  74. +0
    -0
      pkg/deb/debian/control.modules.in
  75. +0
    -0
      pkg/deb/debian/copyright
  76. +0
    -0
      pkg/deb/debian/dkms.conf.in
  77. +0
    -0
      pkg/deb/debian/rtpengine-daemon.default
  78. +0
    -0
      pkg/deb/debian/rtpengine-daemon.init
  79. +0
    -0
      pkg/deb/debian/rtpengine-daemon.install
  80. +0
    -0
      pkg/deb/debian/rtpengine-daemon.links
  81. +0
    -0
      pkg/deb/debian/rtpengine-daemon.manpages
  82. +0
    -0
      pkg/deb/debian/rtpengine-daemon.postinst
  83. +0
    -0
      pkg/deb/debian/rtpengine-daemon.service
  84. +0
    -0
      pkg/deb/debian/rtpengine-dev.install
  85. +0
    -0
      pkg/deb/debian/rtpengine-iptables-setup
  86. +0
    -0
      pkg/deb/debian/rtpengine-kernel-dkms.postinst
  87. +0
    -0
      pkg/deb/debian/rtpengine-kernel-dkms.prerm
  88. +0
    -0
      pkg/deb/debian/rtpengine-kernel-source.links
  89. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.default
  90. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.dirs
  91. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.init
  92. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.install
  93. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.links
  94. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.manpages
  95. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service
  96. +0
    -0
      pkg/deb/debian/rtpengine-recording-daemon.service
  97. +0
    -0
      pkg/deb/debian/rtpengine-recording-nfs-setup
  98. +0
    -0
      pkg/deb/debian/rtpengine-utils.install
  99. +0
    -0
      pkg/deb/debian/rtpengine.docs
  100. +0
    -0
      pkg/deb/debian/rules

+ 0
- 15
pkg/deb/bullseye/.gitignore View File

@ -1,15 +0,0 @@
*.debhelper
*.log
*.substvars
/.debhelper/
/debhelper-build-stamp
/files
/rtpengine-daemon/
/rtpengine-iptables/
/rtpengine-kernel-dkms/
/rtpengine-kernel-source/
/rtpengine-recording-daemon/
/rtpengine-utils/
/rtpengine/
README.html.gz
README.md.gz

+ 0
- 2
pkg/deb/bullseye/clean View File

@ -1,2 +0,0 @@
debian/README.html.gz
debian/README.md.gz

+ 0
- 147
pkg/deb/bullseye/control View File

@ -1,147 +0,0 @@
Source: rtpengine
Section: net
Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
Homepage: https://www.sipwise.com/
Standards-Version: 3.9.8
Build-Depends:
debhelper-compat (= 12),
default-libmysqlclient-dev,
gperf,
libavcodec-dev (>= 6:10),
libavfilter-dev (>= 6:10),
libavformat-dev (>= 6:10),
libavutil-dev (>= 6:10),
libbcg729-dev <!pkg.rtpengine.nobcg729>,
libbencode-perl,
libcrypt-openssl-rsa-perl,
libcrypt-rijndael-perl,
libcurl4-openssl-dev | libcurl4-gnutls-dev,
libdigest-crc-perl,
libdigest-hmac-perl,
libevent-dev (>= 2.0),
libglib2.0-dev (>= 2.30),
libhiredis-dev,
libio-multiplex-perl,
libio-socket-inet6-perl,
libio-socket-ip-perl,
libiptc-dev,
libjson-glib-dev,
libmosquitto-dev,
libnet-interface-perl,
libpcap0.8-dev,
libpcre3-dev,
libsocket6-perl,
libspandsp-dev,
libssl-dev (>= 1.0.1),
libswresample-dev (>= 6:10),
libsystemd-dev,
libwebsockets-dev,
libxmlrpc-core-c3-dev (>= 1.16.07),
libxtables-dev (>= 1.4) | iptables-dev (>= 1.4),
markdown,
python3,
python3-websockets,
zlib1g-dev,
Package: rtpengine-daemon
Architecture: any
Recommends:
rtpengine-recording-daemon,
rtpengine-utils,
Depends:
iptables,
lsb-base (>= 3.0-6),
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-daemon,
Description: proxy for RTP and media streams used in NGCP, userspace part
This daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
Package: rtpengine-recording-daemon
Architecture: any
Build-Profiles: <!pkg.rtpengine.no-transcoding>
Recommends:
rtpengine-utils,
Depends:
lsb-base (>= 3.0-6),
nfs-common,
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-recording-daemon,
Description: recording daemon for RTP and media streams
This daemon handles the call recording (media intercept) component of rtpengine.
Package: rtpengine-iptables
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-iptables,
Description: IPtables extension module for the kernel-space NGCP media proxy
Provides the IPtables extension needed to configure the mediaproxy rule.
Package: rtpengine
Architecture: all
Depends:
rtpengine-daemon (>= ${source:Version}),
rtpengine-iptables (>= ${source:Version}),
rtpengine-kernel-dkms (>= ${source:Version}),
rtpengine-recording-daemon (>= ${source:Version}),
rtpengine-utils (>= ${source:Version}),
${misc:Depends},
Description: NGCP RTP/media proxy - meta package
This is a meta package for easy installation of all four parts of the NGCP
media proxy. It will install the user-space daemon, the kernel-space IPtables
module, the IPtables extension module and utility scripts.
Package: rtpengine-kernel-source
Architecture: all
Section: kernel
Depends:
debhelper-compat (= 12),
module-assistant,
${misc:Depends},
Conflicts:
ngcp-rtpengine-kernel-source,
Description: IPtables kernel module for the NGCP media proxy - source
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with module-assistant or
kernel-package.
Package: rtpengine-kernel-dkms
Architecture: all
Section: kernel
Depends:
dkms (>= 1.95),
lsb-release,
${misc:Depends},
Conflicts:
ngcp-rtpengine-kernel-dkms,
Description: IPtables kernel module for the NGCP media proxy - DKMS
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with dkms.
Package: rtpengine-utils
Architecture: all
Depends:
libbencode-perl,
libconfig-tiny-perl,
libcrypt-rijndael-perl,
libdigest-hmac-perl,
libio-socket-inet6-perl,
libio-socket-ip-perl,
libsocket6-perl,
netcat-openbsd | netcat,
${misc:Depends},
${perl:Depends},
Conflicts:
ngcp-rtpengine-utils,
Description: scripts and Perl modules for NGCP rtpengine
This package contains scripts and Perl modules for NGCP rtpengine

+ 0
- 18
pkg/deb/bullseye/control.modules.in View File

@ -1,18 +0,0 @@
Source: rtpengine
Section: kernel
Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
Build-Depends:
debhelper-compat (= 12),
Standards-Version: 3.9.8
Homepage: https://www.sipwise.com/
Package: rtpengine-kernel-modules-_KVERS_
Architecture: any
Depends:
linux-modules-_KVERS_ | linux-image-_KVERS_,
Conflicts:
ngcp-rtpengine-kernel-modules-_KVERS_,
Description: IPtables kernel module for the NGCP media proxy
This package provides the rtpengine module for
the Linux kernel version _KVERS_.

+ 0
- 36
pkg/deb/bullseye/copyright View File

@ -1,36 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://www.sipwise.com/
Upstream-Contact: Sipwise Development Team <support@sipwise.com>
Files: *
Copyright:
Copyright © 2007-2019 Sipwise GmbH, Austria
License: GPL-3+ with OpenSSL exception
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.
.
In addition, as a special exception, the copyright holders give
permission to link the code of this release with the OpenSSL project's
"OpenSSL" library (or with modified versions of it that use the same
license as the "OpenSSL" library), and distribute the linked executables.
.
You must obey the GNU General Public License in all respects for all
of the code used other than "OpenSSL". If you modify file(s) with this
exception, you may extend this exception to your version of the file(s),
but you are not obligated to do so. If you do not wish to do so,
delete this exception statement from your version. If you delete
this exception statement from all source files in the program, then
also delete it here.
.
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 <https://www.gnu.org/licenses/>.
Comment:
On Debian systems, the full text of the GNU General Public License
version 3 can be found in the file '/usr/share/common-licenses/GPL-3'.

+ 0
- 7
pkg/deb/bullseye/dkms.conf.in View File

@ -1,7 +0,0 @@
PACKAGE_NAME="rtpengine"
PACKAGE_VERSION="__VERSION__"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build RTPENGINE_VERSION=\"__VERSION__\""
CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"
AUTOINSTALL=yes
BUILT_MODULE_NAME[0]="xt_RTPENGINE"
DEST_MODULE_LOCATION[0]=/extra

+ 0
- 6
pkg/deb/bullseye/rtpengine-daemon.default View File

@ -1,6 +0,0 @@
CONFIG_FILE=/etc/rtpengine/rtpengine.conf
# CONFIG_SECTION=rtpengine
PIDFILE=/run/rtpengine-daemon.pid
MANAGE_IPTABLES=yes
#SET_USER=root
#SET_GROUP=root # GROUP only needs to be set if USER is not set or if the user isn't in the group

+ 0
- 117
pkg/deb/bullseye/rtpengine-daemon.init View File

@ -1,117 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: rtpengine-daemon
# Required-Start: $network $local_fs $remote_fs $syslog
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ngcp Rtpengine
# Description: Proxy for RTP and other media streams
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpengine-daemon
DESC="RTP/media proxy"
DAEMON=$(which rtpengine)
DEFAULTS=/etc/default/${NAME}
test -f "$DAEMON" || exit 0
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$PIDFILE" ] && PIDFILE="/run/rtpengine.pid"
OPTIONS=""
START_OPTIONS=""
[ -z "$CONFIG_FILE" ] || OPTIONS="$OPTIONS --config-file=$CONFIG_FILE"
[ -z "$CONFIG_SECTION" ] || OPTIONS="$OPTIONS --config-section=$CONFIG_SECTION"
[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS --pidfile=$PIDFILE"
if test "$FORK" = "no" ; then
OPTIONS="$OPTIONS --foreground"
fi
# check if directory for pid file needs to be created
PIDDIR=$(dirname "$PIDFILE")
DO_DIR_CHOWN=0
if ! test -z "$PIDDIR" && ! test -d "$PIDDIR"; then
mkdir -p "$PIDDIR"
DO_DIR_CHOWN=1
fi
# handle requested setuid/setgid
if ! test -z "$SET_USER"; then
START_OPTIONS="$START_OPTIONS --chuid $SET_USER"
test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR"
fi
if ! test -z "$SET_GROUP"; then
START_OPTIONS="$START_OPTIONS --group $SET_GROUP"
test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR"
fi
###
case "$1" in
start)
if [ -x "$(which ngcp-check-active)" ]; then
case "$(ngcp-check-active -v)" in
active|transition)
log_action_msg "Active node or transition."
;;
*)
log_action_msg "Ignored start action in inactive node"
exit 0
;;
esac
fi
RC=0
rtpengine-iptables-setup start || RC=$?
if [ "$RC" -ne 0 ]; then
log_action_msg "Failed to start rtpengine-iptables-setup"
log_end_msg "$RC"
exit 1
fi
log_daemon_msg "Starting $DESC" "$NAME"
# shellcheck disable=SC2086
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "$DAEMON" $START_OPTIONS -- $OPTIONS || log_progress_msg " already running"
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
RC=0
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--retry 5 --exec "$DAEMON" || RC=$?
if [ "$RC" -eq 0 ]; then
rtpengine-iptables-setup stop || true
fi
rm -f "$PIDFILE"
log_end_msg "$RC"
exit "$RC"
;;
restart|force-reload)
$0 stop
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

+ 0
- 3
pkg/deb/bullseye/rtpengine-daemon.install View File

@ -1,3 +0,0 @@
daemon/rtpengine /usr/sbin/
debian/rtpengine-iptables-setup /usr/sbin
etc/rtpengine.sample.conf /etc/rtpengine/

+ 0
- 1
pkg/deb/bullseye/rtpengine-daemon.links View File

@ -1 +0,0 @@
/lib/systemd/system/rtpengine-daemon.service /lib/systemd/system/rtpengine.service

+ 0
- 1
pkg/deb/bullseye/rtpengine-daemon.manpages View File

@ -1 +0,0 @@
daemon/rtpengine.8

+ 0
- 38
pkg/deb/bullseye/rtpengine-daemon.postinst View File

@ -1,38 +0,0 @@
#!/bin/sh
set -e
default=/etc/default/rtpengine-daemon
modname=xt_RTPENGINE
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip kernel module check"
else
if [ -f $default ]; then
. $default || true
fi
if [ -n "$TABLE" ] && [ "$TABLE" -ge 0 ] && \
[ -n "$NO_FALLBACK" ] && \
{ [ "$NO_FALLBACK" = "1" ] || [ "$NO_FALLBACK" = "yes" ] ; }
then
if lsmod | grep -q $modname || modinfo $modname > /dev/null 2> /dev/null; then
true
else
echo "Kernel module $modname not found and NO_FALLBACK is set."
echo "Daemon restart not performed."
exit 0
fi
fi
fi
#DEBHELPER#
exit 0

+ 0
- 16
pkg/deb/bullseye/rtpengine-daemon.service View File

@ -1,16 +0,0 @@
[Unit]
Description=NGCP RTP/media Proxy Daemon
After=network-online.target
After=remote-fs.target
Requires=network-online.target
[Service]
Type=notify
EnvironmentFile=/etc/default/rtpengine-daemon
PIDFile=/run/rtpengine-daemon.pid
ExecStartPre=/usr/sbin/rtpengine-iptables-setup start
ExecStart=/usr/sbin/rtpengine -f -E --no-log-timestamps --pidfile /run/rtpengine-daemon.pid --config-file /etc/rtpengine/rtpengine.conf
ExecStopPost=/usr/sbin/rtpengine-iptables-setup stop
[Install]
WantedBy=multi-user.target

+ 0
- 1
pkg/deb/bullseye/rtpengine-dev.install View File

@ -1 +0,0 @@
daemon/*.h /usr/include/rtpengine/

+ 0
- 101
pkg/deb/bullseye/rtpengine-iptables-setup View File

@ -1,101 +0,0 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MODNAME=xt_RTPENGINE
MANAGE_IPTABLES=yes
DEFAULTS=/etc/default/rtpengine-daemon
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
MODPROBE_OPTIONS=""
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
# Handle requested setuid/setgid.
if ! test -z "$SET_USER"; then
PUID=$(id -u "$SET_USER" 2> /dev/null)
test -z "$PUID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$PUID"
if test -z "$SET_GROUP"; then
PGID=$(id -g "$SET_USER" 2> /dev/null)
test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID"
fi
fi
if ! test -z "$SET_GROUP"; then
PGID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null)
test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID"
fi
###
if [ -x "$(which ngcp-virt-identify 2>/dev/null)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
if [ "$MANAGE_IPTABLES" != "yes" ]; then
return
fi
# shellcheck disable=SC2086
modprobe $MODNAME $MODPROBE_OPTIONS
iptables -N rtpengine 2>/dev/null
iptables -D INPUT -j rtpengine 2>/dev/null
iptables -D INPUT -p udp -j rtpengine 2>/dev/null
iptables -I INPUT -p udp -j rtpengine
iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
iptables -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
ip6tables -N rtpengine 2>/dev/null
ip6tables -D INPUT -j rtpengine 2>/dev/null
ip6tables -D INPUT -p udp -j rtpengine 2>/dev/null
ip6tables -I INPUT -p udp -j rtpengine
ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
ip6tables -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
}
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
# XXX: Wait a bit to make sure the daemon has been stopped.
sleep 1
if [ -e /proc/rtpengine/control ]; then
echo "del $TABLE" >/proc/rtpengine/control 2>/dev/null
fi
if [ "$MANAGE_IPTABLES" != "yes" ]; then
return
fi
iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
}
case "$1" in
start)
firewall_setup
;;
stop)
firewall_teardown
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit 0

+ 0
- 46
pkg/deb/bullseye/rtpengine-kernel-dkms.postinst View File

@ -1,46 +0,0 @@
#!/bin/sh
set -e
package=rtpengine-kernel-dkms
name=rtpengine
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
isadded=$(dkms status -m "$name" -v "$version")
if [ -z "${isadded}" ] ; then
dkms add -m "$name" -v "$version"
fi
if [ "$1" = 'configure' ] ; then
KERNELS=$(ls /lib/modules/ 2>/dev/null || true)
for kernel in $KERNELS; do
if [ ! -r "/lib/modules/$kernel/build" ]; then
# cannot build modules for this kernel
continue
fi
( dkms build -m "$name" -v "$version" -k "$kernel" && dkms install -m "$name" -v "$version" -k "$kernel" ) || true
done
# try to start the daemon
if [ -x /etc/init.d/rtpengine-daemon ] ; then
invoke-rc.d rtpengine-daemon restart || true
fi
fi
fi
#DEBHELPER#
exit 0

+ 0
- 32
pkg/deb/bullseye/rtpengine-kernel-dkms.prerm View File

@ -1,32 +0,0 @@
#!/bin/sh
set -e
package=rtpengine-kernel-dkms
name=rtpengine
modname=xt_RTPENGINE
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
# make sure it's not running
if [ -x /etc/init.d/rtpengine-daemon ] ; then
invoke-rc.d rtpengine-daemon stop || true
rmmod "$modname" 2>/dev/null || true
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
dkms remove -m "$name" -v "$version" --all || true
fi
#DEBHELPER#
exit 0

+ 0
- 1
pkg/deb/bullseye/rtpengine-kernel-source.links View File

@ -1 +0,0 @@
/usr/share/modass/packages/default.sh /usr/share/modass/overrides/rtpengine-kernel-source

+ 0
- 11
pkg/deb/bullseye/rtpengine-recording-daemon.default View File

@ -1,11 +0,0 @@
CONFIG_FILE=/etc/rtpengine/rtpengine-recording.conf
# CONFIG_SECTION=rtpengine-recording
PIDFILE=/run/rtpengine-recording-daemon.pid
#SET_USER=root
#SET_GROUP=root # GROUP only needs to be set if USER is not set or if the user isn't in the group
#
MUST_NFS=no
NFS_HOST=192.168.1.1
NFS_REMOTE_PATH=/var/recordings
NFS_LOCAL_MOUNT=/var/lib/rtpengine-recording # must match output-dir if used
NFS_OPTIONS=hard,intr,tcp

+ 0
- 2
pkg/deb/bullseye/rtpengine-recording-daemon.dirs View File

@ -1,2 +0,0 @@
var/lib/rtpengine-recording
var/spool/rtpengine

+ 0
- 112
pkg/deb/bullseye/rtpengine-recording-daemon.init View File

@ -1,112 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: rtpengine-recording-daemon
# Required-Start: $network $local_fs $remote_fs $syslog
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ngcp Rtpengine Recording Daemon
# Description: Recording daemon for RTP and other media streams
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpengine-recording-daemon
DESC="RTP/media recording daemon"
DAEMON=$(which rtpengine-recording)
DEFAULTS=/etc/default/${NAME}
test -f "$DAEMON" || exit 0
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$PIDFILE" ] && PIDFILE="/run/rtpengine-recording.pid"
OPTIONS=""
START_OPTIONS=""
[ -z "$CONFIG_FILE" ] || OPTIONS="$OPTIONS --config-file=$CONFIG_FILE"
[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS --pidfile=$PIDFILE"
# check if directory for pid file needs to be created
PIDDIR=$(dirname "$PIDFILE")
DO_DIR_CHOWN=0
if ! test -z "$PIDDIR" && ! test -d "$PIDDIR"; then
mkdir -p "$PIDDIR"
DO_DIR_CHOWN=1
fi
# handle requested setuid/setgid
if ! test -z "$SET_USER"; then
START_OPTIONS="$START_OPTIONS --chuid $SET_USER"
test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR"
fi
if ! test -z "$SET_GROUP"; then
START_OPTIONS="$START_OPTIONS --group $SET_GROUP"
test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR"
fi
###
case "$1" in
start)
if [ -x "$(which ngcp-check-active)" ]; then
case "$(ngcp-check-active -v)" in
active|transition)
log_action_msg "Active node or transition."
;;
*)
log_action_msg "Ignored start action in inactive node"
exit 0
;;
esac
fi
RC=0
rtpengine-recording-nfs-setup start || RC=$?
if [ "$RC" -ne 0 ] ; then
log_action_msg "Failed to start rtpengine-recording-nfs-setup"
log_end_msg "$RC"
exit "$RC"
fi
log_daemon_msg "Starting $DESC" "$NAME"
# shellcheck disable=SC2086
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "$DAEMON" $START_OPTIONS -- $OPTIONS || log_progress_msg " already running"
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
RC=0
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--retry 5 --exec "$DAEMON" || RC=$?
rm -f "$PIDFILE"
log_end_msg "$RC"
exit "$RC"
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

+ 0
- 3
pkg/deb/bullseye/rtpengine-recording-daemon.install View File

@ -1,3 +0,0 @@
debian/rtpengine-recording-nfs-setup /usr/sbin/
etc/rtpengine-recording.sample.conf /etc/rtpengine/
recording-daemon/rtpengine-recording /usr/sbin/

+ 0
- 1
pkg/deb/bullseye/rtpengine-recording-daemon.links View File

@ -1 +0,0 @@
/lib/systemd/system/rtpengine-recording-daemon.service /lib/systemd/system/rtpengine-recording.service

+ 0
- 1
pkg/deb/bullseye/rtpengine-recording-daemon.manpages View File

@ -1 +0,0 @@
recording-daemon/rtpengine-recording.8

+ 0
- 20
pkg/deb/bullseye/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service View File

@ -1,20 +0,0 @@
[Unit]
Description=NGCP RTP/media Recording Daemon NFS mount point
After=network-online.target
After=remote-fs.target
After=rpcbind.socket
After=rpcbind.service
After=nfs-client.target
Requires=network-online.target
Requires=rpcbind.socket
Requires=rpcbind.service
Requires=nfs-client.target
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/sbin/rtpengine-recording-nfs-setup start
ExecStop=/usr/sbin/rtpengine-recording-nfs-setup stop
[Install]
WantedBy=multi-user.target

+ 0
- 16
pkg/deb/bullseye/rtpengine-recording-daemon.service View File

@ -1,16 +0,0 @@
[Unit]
Description=NGCP RTP/media Recording Daemon
After=network-online.target
After=remote-fs.target
After=rtpengine-recording-nfs-mount.service
Requires=network-online.target
Requires=rtpengine-recording-nfs-mount.service
[Service]
Type=notify
LimitNOFILE=100000
PIDFile=/run/rtpengine-recording-daemon.pid
ExecStart=/usr/sbin/rtpengine-recording -f -E --no-log-timestamps --pidfile /run/rtpengine-recording-daemon.pid --config-file /etc/rtpengine/rtpengine-recording.conf
[Install]
WantedBy=multi-user.target

+ 0
- 42
pkg/deb/bullseye/rtpengine-recording-nfs-setup View File

@ -1,42 +0,0 @@
#!/bin/sh
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DEFAULTS=/etc/default/rtpengine-recording-daemon
DESC="RTP engine recording NFS share"
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$NFS_OPTIONS" ] && NFS_OPTIONS="hard,tcp,intr"
###
case "$1" in
start)
if [ "$MUST_NFS" = yes ]; then
if ! grep -E -q "^[^ :]+:[^ :]+ $NFS_LOCAL_MOUNT nfs.? " /proc/mounts; then
log_action_msg "Mounting $DESC"
test -d "$NFS_LOCAL_MOUNT" || mkdir -p "$NFS_LOCAL_MOUNT"
mount -t nfs -o "$NFS_OPTIONS" "$NFS_HOST:$NFS_REMOTE_PATH" "$NFS_LOCAL_MOUNT"
fi
fi
;;
stop)
if grep -E -q "^[^ :]+:[^ :]+ $NFS_LOCAL_MOUNT nfs.? " /proc/mounts; then
log_action_msg "Unmounting $DESC"
umount "$NFS_LOCAL_MOUNT"
fi
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit 0

+ 0
- 4
pkg/deb/bullseye/rtpengine-utils.install View File

@ -1,4 +0,0 @@
perl/* /usr/share/perl5/
utils/rtpengine-ctl /usr/sbin/
utils/rtpengine-get-table /usr/libexec/rtpengine/
utils/rtpengine-ng-client /usr/sbin/

+ 0
- 2
pkg/deb/bullseye/rtpengine.docs View File

@ -1,2 +0,0 @@
debian/README.html.gz
debian/README.md.gz

+ 0
- 70
pkg/deb/bullseye/rules View File

@ -1,70 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
## kernel package specific stuff
# Name of the source package
psource:=rtpengine-kernel-source
# Name of the dkms package
pdkms:=rtpengine-kernel-dkms
# short upstream name, used for module source directory
sname:=rtpengine
# Source version
sversion:=$(DEB_VERSION_UPSTREAM)
## end of kernel package specific stuff
XTABLES_DIR:=$(shell pkg-config xtables --variable=xtlibdir || echo /lib/xtables)
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.rtpengine.no-transcoding))
export with_transcoding = no
endif
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.rtpengine.asan))
export DO_ASAN_FLAGS = 1
# this prevents dh from setting default (including -O2) which we don't want
export DEB_CFLAGS_MAINT_SET =
export DEB_LDFLAGS_MAINT_SET =
endif
%:
dh $@
override_dh_auto_install-indep:
# Create the directories to install the source into
dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian
dh_installdirs -p$(pdkms) usr/src/$(sname)-$(sversion)
# Copy only the driver source to the proper locations
cd kernel-module && cp Makefile *.c *.h ../debian/$(psource)/usr/src/modules/$(sname)
cd kernel-module && cp Makefile *.c *.h ../debian/$(pdkms)/usr/src/$(sname)-$(sversion)
# Copy the needed debian/ pieces to the proper location
cp debian/*.modules.in* debian/$(psource)/usr/src/modules/$(sname)/debian
cp debian/control debian/changelog debian/copyright \
debian/$(psource)/usr/src/modules/$(sname)/debian/
install -m 0755 debian/rules.modules debian/$(psource)/usr/src/modules/$(sname)/debian/rules
cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
# Prepare dkms.conf from the dkms.conf.in template
sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf
# markdown README
markdown README.md | gzip -9 > debian/README.html.gz
gzip -9 < README.md > debian/README.md.gz
dh_auto_install
override_dh_install:
dh_install
dh_installdirs -prtpengine-iptables $(XTABLES_DIR)
install -m 0644 iptables-extension/libxt_RTPENGINE.so debian/rtpengine-iptables/$(XTABLES_DIR)
override_dh_dwz:
# Disable, as dwz cannot cope with some of the plugins generated.
override_dh_installsystemd:
dh_installsystemd
dh_installsystemd -prtpengine-recording-daemon --name=rtpengine-recording-nfs-mount

+ 0
- 82
pkg/deb/bullseye/rules.modules View File

@ -1,82 +0,0 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS ?= -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# Name of the source package
psource:=rtpengine-kernel-source
# The short upstream name, used for the module source directory
sname:=rtpengine
### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules
# prefix of the target package name
PACKAGE=rtpengine-kernel-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make
# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)
# The kdist_configure target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the necessary debian/ files
kdist_configure: prep-deb-files
# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean: clean
$(MAKE) $(MFLAGS) -f debian/rules clean
#
### end KERNEL SETUP
# the binary-modules rule is invoked by module-assistant while processing the
# kdist* targets. It is called by module-assistant or make-kpkg and *not*
# during a normal build
binary-modules: prep-deb-files
dh_testroot
dh_prep
# Build the module
$(MAKE) modules KSRC=$(KSRC) KVER=$(KVERS)
# Install the module
install -D -m 0644 xt_RTPENGINE.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/extra/xt_RTPENGINE.ko
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installmodules
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
clean:
dh_testdir
$(MAKE) clean
dh_clean
.PHONY: clean binary-modules kdist kdist_configure kdist_image kdist_clean

+ 0
- 1
pkg/deb/bullseye/source/format View File

@ -1 +0,0 @@
3.0 (quilt)

+ 0
- 1
pkg/deb/bullseye/source/options View File

@ -1 +0,0 @@
extend-diff-ignore=.gitreview

+ 0
- 15
pkg/deb/buster/.gitignore View File

@ -1,15 +0,0 @@
*.debhelper
*.log
*.substvars
/.debhelper/
/debhelper-build-stamp
/files
/rtpengine-daemon/
/rtpengine-iptables/
/rtpengine-kernel-dkms/
/rtpengine-kernel-source/
/rtpengine-recording-daemon/
/rtpengine-utils/
/rtpengine/
README.html.gz
README.md.gz

+ 0
- 2
pkg/deb/buster/clean View File

@ -1,2 +0,0 @@
debian/README.html.gz
debian/README.md.gz

+ 0
- 146
pkg/deb/buster/control View File

@ -1,146 +0,0 @@
Source: rtpengine
Section: net
Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
Homepage: https://www.sipwise.com/
Standards-Version: 3.9.8
Build-Depends:
debhelper-compat (= 12),
default-libmysqlclient-dev,
gperf,
libavcodec-dev (>= 6:10),
libavfilter-dev (>= 6:10),
libavformat-dev (>= 6:10),
libavutil-dev (>= 6:10),
libbencode-perl,
libcrypt-openssl-rsa-perl,
libcrypt-rijndael-perl,
libcurl4-openssl-dev | libcurl4-gnutls-dev,
libdigest-crc-perl,
libdigest-hmac-perl,
libevent-dev (>= 2.0),
libglib2.0-dev (>= 2.30),
libhiredis-dev,
libio-multiplex-perl,
libio-socket-inet6-perl,
libio-socket-ip-perl,
libiptc-dev,
libjson-glib-dev,
libmosquitto-dev,
libnet-interface-perl,
libpcap0.8-dev,
libpcre3-dev,
libsocket6-perl,
libspandsp-dev,
libssl-dev (>= 1.0.1),
libswresample-dev (>= 6:10),
libsystemd-dev,
libwebsockets-dev,
libxmlrpc-core-c3-dev (>= 1.16.07),
libxtables-dev (>= 1.4) | iptables-dev (>= 1.4),
markdown,
python3,
python3-websockets,
zlib1g-dev,
Package: rtpengine-daemon
Architecture: any
Recommends:
rtpengine-recording-daemon,
rtpengine-utils,
Depends:
iptables,
lsb-base (>= 3.0-6),
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-daemon,
Description: proxy for RTP and media streams used in NGCP, userspace part
This daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
Package: rtpengine-recording-daemon
Architecture: any
Build-Profiles: <!pkg.rtpengine.no-transcoding>
Recommends:
rtpengine-utils,
Depends:
lsb-base (>= 3.0-6),
nfs-common,
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-recording-daemon,
Description: recording daemon for RTP and media streams
This daemon handles the call recording (media intercept) component of rtpengine.
Package: rtpengine-iptables
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
Conflicts:
ngcp-rtpengine-iptables,
Description: IPtables extension module for the kernel-space NGCP media proxy
Provides the IPtables extension needed to configure the mediaproxy rule.
Package: rtpengine
Architecture: all
Depends:
rtpengine-daemon (>= ${source:Version}),
rtpengine-iptables (>= ${source:Version}),
rtpengine-kernel-dkms (>= ${source:Version}),
rtpengine-recording-daemon (>= ${source:Version}),
rtpengine-utils (>= ${source:Version}),
${misc:Depends},
Description: NGCP RTP/media proxy - meta package
This is a meta package for easy installation of all four parts of the NGCP
media proxy. It will install the user-space daemon, the kernel-space IPtables
module, the IPtables extension module and utility scripts.
Package: rtpengine-kernel-source
Architecture: all
Section: kernel
Depends:
debhelper-compat (= 12),
module-assistant,
${misc:Depends},
Conflicts:
ngcp-rtpengine-kernel-source,
Description: IPtables kernel module for the NGCP media proxy - source
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with module-assistant or
kernel-package.
Package: rtpengine-kernel-dkms
Architecture: all
Section: kernel
Depends:
dkms (>= 1.95),
lsb-release,
${misc:Depends},
Conflicts:
ngcp-rtpengine-kernel-dkms,
Description: IPtables kernel module for the NGCP media proxy - DKMS
Provides the kernel-space part of the NGCP media proxy for high-
performance packet forwarding.
This package contains the source to be built with dkms.
Package: rtpengine-utils
Architecture: all
Depends:
libbencode-perl,
libconfig-tiny-perl,
libcrypt-rijndael-perl,
libdigest-hmac-perl,
libio-socket-inet6-perl,
libio-socket-ip-perl,
libsocket6-perl,
netcat-openbsd | netcat,
${misc:Depends},
${perl:Depends},
Conflicts:
ngcp-rtpengine-utils,
Description: scripts and Perl modules for NGCP rtpengine
This package contains scripts and Perl modules for NGCP rtpengine

+ 0
- 18
pkg/deb/buster/control.modules.in View File

@ -1,18 +0,0 @@
Source: rtpengine
Section: kernel
Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
Build-Depends:
debhelper-compat (= 12),
Standards-Version: 3.9.8
Homepage: https://www.sipwise.com/
Package: rtpengine-kernel-modules-_KVERS_
Architecture: any
Depends:
linux-modules-_KVERS_ | linux-image-_KVERS_,
Conflicts:
ngcp-rtpengine-kernel-modules-_KVERS_,
Description: IPtables kernel module for the NGCP media proxy
This package provides the rtpengine module for
the Linux kernel version _KVERS_.

+ 0
- 36
pkg/deb/buster/copyright View File

@ -1,36 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://www.sipwise.com/
Upstream-Contact: Sipwise Development Team <support@sipwise.com>
Files: *
Copyright:
Copyright © 2007-2019 Sipwise GmbH, Austria
License: GPL-3+ with OpenSSL exception
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.
.
In addition, as a special exception, the copyright holders give
permission to link the code of this release with the OpenSSL project's
"OpenSSL" library (or with modified versions of it that use the same
license as the "OpenSSL" library), and distribute the linked executables.
.
You must obey the GNU General Public License in all respects for all
of the code used other than "OpenSSL". If you modify file(s) with this
exception, you may extend this exception to your version of the file(s),
but you are not obligated to do so. If you do not wish to do so,
delete this exception statement from your version. If you delete
this exception statement from all source files in the program, then
also delete it here.
.
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 <https://www.gnu.org/licenses/>.
Comment:
On Debian systems, the full text of the GNU General Public License
version 3 can be found in the file '/usr/share/common-licenses/GPL-3'.

+ 0
- 7
pkg/deb/buster/dkms.conf.in View File

@ -1,7 +0,0 @@
PACKAGE_NAME="rtpengine"
PACKAGE_VERSION="__VERSION__"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build RTPENGINE_VERSION=\"__VERSION__\""
CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"
AUTOINSTALL=yes
BUILT_MODULE_NAME[0]="xt_RTPENGINE"
DEST_MODULE_LOCATION[0]=/extra

+ 0
- 6
pkg/deb/buster/rtpengine-daemon.default View File

@ -1,6 +0,0 @@
CONFIG_FILE=/etc/rtpengine/rtpengine.conf
# CONFIG_SECTION=rtpengine
PIDFILE=/run/rtpengine-daemon.pid
MANAGE_IPTABLES=yes
#SET_USER=root
#SET_GROUP=root # GROUP only needs to be set if USER is not set or if the user isn't in the group

+ 0
- 117
pkg/deb/buster/rtpengine-daemon.init View File

@ -1,117 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: rtpengine-daemon
# Required-Start: $network $local_fs $remote_fs $syslog
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ngcp Rtpengine
# Description: Proxy for RTP and other media streams
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpengine-daemon
DESC="RTP/media proxy"
DAEMON=$(which rtpengine)
DEFAULTS=/etc/default/${NAME}
test -f "$DAEMON" || exit 0
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$PIDFILE" ] && PIDFILE="/run/rtpengine.pid"
OPTIONS=""
START_OPTIONS=""
[ -z "$CONFIG_FILE" ] || OPTIONS="$OPTIONS --config-file=$CONFIG_FILE"
[ -z "$CONFIG_SECTION" ] || OPTIONS="$OPTIONS --config-section=$CONFIG_SECTION"
[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS --pidfile=$PIDFILE"
if test "$FORK" = "no" ; then
OPTIONS="$OPTIONS --foreground"
fi
# check if directory for pid file needs to be created
PIDDIR=$(dirname "$PIDFILE")
DO_DIR_CHOWN=0
if ! test -z "$PIDDIR" && ! test -d "$PIDDIR"; then
mkdir -p "$PIDDIR"
DO_DIR_CHOWN=1
fi
# handle requested setuid/setgid
if ! test -z "$SET_USER"; then
START_OPTIONS="$START_OPTIONS --chuid $SET_USER"
test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR"
fi
if ! test -z "$SET_GROUP"; then
START_OPTIONS="$START_OPTIONS --group $SET_GROUP"
test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR"
fi
###
case "$1" in
start)
if [ -x "$(which ngcp-check-active)" ]; then
case "$(ngcp-check-active -v)" in
active|transition)
log_action_msg "Active node or transition."
;;
*)
log_action_msg "Ignored start action in inactive node"
exit 0
;;
esac
fi
RC=0
rtpengine-iptables-setup start || RC=$?
if [ "$RC" -ne 0 ]; then
log_action_msg "Failed to start rtpengine-iptables-setup"
log_end_msg "$RC"
exit 1
fi
log_daemon_msg "Starting $DESC" "$NAME"
# shellcheck disable=SC2086
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "$DAEMON" $START_OPTIONS -- $OPTIONS || log_progress_msg " already running"
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
RC=0
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--retry 5 --exec "$DAEMON" || RC=$?
if [ "$RC" -eq 0 ]; then
rtpengine-iptables-setup stop || true
fi
rm -f "$PIDFILE"
log_end_msg "$RC"
exit "$RC"
;;
restart|force-reload)
$0 stop
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

+ 0
- 3
pkg/deb/buster/rtpengine-daemon.install View File

@ -1,3 +0,0 @@
daemon/rtpengine /usr/sbin/
debian/rtpengine-iptables-setup /usr/sbin
etc/rtpengine.sample.conf /etc/rtpengine/

+ 0
- 1
pkg/deb/buster/rtpengine-daemon.links View File

@ -1 +0,0 @@
/lib/systemd/system/rtpengine-daemon.service /lib/systemd/system/rtpengine.service

+ 0
- 1
pkg/deb/buster/rtpengine-daemon.manpages View File

@ -1 +0,0 @@
daemon/rtpengine.8

+ 0
- 38
pkg/deb/buster/rtpengine-daemon.postinst View File

@ -1,38 +0,0 @@
#!/bin/sh
set -e
default=/etc/default/rtpengine-daemon
modname=xt_RTPENGINE
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip kernel module check"
else
if [ -f $default ]; then
. $default || true
fi
if [ -n "$TABLE" ] && [ "$TABLE" -ge 0 ] && \
[ -n "$NO_FALLBACK" ] && \
{ [ "$NO_FALLBACK" = "1" ] || [ "$NO_FALLBACK" = "yes" ] ; }
then
if lsmod | grep -q $modname || modinfo $modname > /dev/null 2> /dev/null; then
true
else
echo "Kernel module $modname not found and NO_FALLBACK is set."
echo "Daemon restart not performed."
exit 0
fi
fi
fi
#DEBHELPER#
exit 0

+ 0
- 16
pkg/deb/buster/rtpengine-daemon.service View File

@ -1,16 +0,0 @@
[Unit]
Description=NGCP RTP/media Proxy Daemon
After=network-online.target
After=remote-fs.target
Requires=network-online.target
[Service]
Type=notify
EnvironmentFile=/etc/default/rtpengine-daemon
PIDFile=/run/rtpengine-daemon.pid
ExecStartPre=/usr/sbin/rtpengine-iptables-setup start
ExecStart=/usr/sbin/rtpengine -f -E --no-log-timestamps --pidfile /run/rtpengine-daemon.pid --config-file /etc/rtpengine/rtpengine.conf
ExecStopPost=/usr/sbin/rtpengine-iptables-setup stop
[Install]
WantedBy=multi-user.target

+ 0
- 1
pkg/deb/buster/rtpengine-dev.install View File

@ -1 +0,0 @@
daemon/*.h /usr/include/rtpengine/

+ 0
- 101
pkg/deb/buster/rtpengine-iptables-setup View File

@ -1,101 +0,0 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MODNAME=xt_RTPENGINE
MANAGE_IPTABLES=yes
DEFAULTS=/etc/default/rtpengine-daemon
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
MODPROBE_OPTIONS=""
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
# Handle requested setuid/setgid.
if ! test -z "$SET_USER"; then
PUID=$(id -u "$SET_USER" 2> /dev/null)
test -z "$PUID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$PUID"
if test -z "$SET_GROUP"; then
PGID=$(id -g "$SET_USER" 2> /dev/null)
test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID"
fi
fi
if ! test -z "$SET_GROUP"; then
PGID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null)
test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID"
fi
###
if [ -x "$(which ngcp-virt-identify 2>/dev/null)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
if [ "$MANAGE_IPTABLES" != "yes" ]; then
return
fi
# shellcheck disable=SC2086
modprobe $MODNAME $MODPROBE_OPTIONS
iptables -N rtpengine 2>/dev/null
iptables -D INPUT -j rtpengine 2>/dev/null
iptables -D INPUT -p udp -j rtpengine 2>/dev/null
iptables -I INPUT -p udp -j rtpengine
iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
iptables -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
ip6tables -N rtpengine 2>/dev/null
ip6tables -D INPUT -j rtpengine 2>/dev/null
ip6tables -D INPUT -p udp -j rtpengine 2>/dev/null
ip6tables -I INPUT -p udp -j rtpengine
ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
ip6tables -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
}
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
# XXX: Wait a bit to make sure the daemon has been stopped.
sleep 1
if [ -e /proc/rtpengine/control ]; then
echo "del $TABLE" >/proc/rtpengine/control 2>/dev/null
fi
if [ "$MANAGE_IPTABLES" != "yes" ]; then
return
fi
iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
}
case "$1" in
start)
firewall_setup
;;
stop)
firewall_teardown
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit 0

+ 0
- 46
pkg/deb/buster/rtpengine-kernel-dkms.postinst View File

@ -1,46 +0,0 @@
#!/bin/sh
set -e
package=rtpengine-kernel-dkms
name=rtpengine
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
isadded=$(dkms status -m "$name" -v "$version")
if [ -z "${isadded}" ] ; then
dkms add -m "$name" -v "$version"
fi
if [ "$1" = 'configure' ] ; then
KERNELS=$(ls /lib/modules/ 2>/dev/null || true)
for kernel in $KERNELS; do
if [ ! -r "/lib/modules/$kernel/build" ]; then
# cannot build modules for this kernel
continue
fi
( dkms build -m "$name" -v "$version" -k "$kernel" && dkms install -m "$name" -v "$version" -k "$kernel" ) || true
done
# try to start the daemon
if [ -x /etc/init.d/rtpengine-daemon ] ; then
invoke-rc.d rtpengine-daemon restart || true
fi
fi
fi
#DEBHELPER#
exit 0

+ 0
- 32
pkg/deb/buster/rtpengine-kernel-dkms.prerm View File

@ -1,32 +0,0 @@
#!/bin/sh
set -e
package=rtpengine-kernel-dkms
name=rtpengine
modname=xt_RTPENGINE
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
# make sure it's not running
if [ -x /etc/init.d/rtpengine-daemon ] ; then
invoke-rc.d rtpengine-daemon stop || true
rmmod "$modname" 2>/dev/null || true
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
dkms remove -m "$name" -v "$version" --all || true
fi
#DEBHELPER#
exit 0

+ 0
- 1
pkg/deb/buster/rtpengine-kernel-source.links View File

@ -1 +0,0 @@
/usr/share/modass/packages/default.sh /usr/share/modass/overrides/rtpengine-kernel-source

+ 0
- 11
pkg/deb/buster/rtpengine-recording-daemon.default View File

@ -1,11 +0,0 @@
CONFIG_FILE=/etc/rtpengine/rtpengine-recording.conf
# CONFIG_SECTION=rtpengine-recording
PIDFILE=/run/rtpengine-recording-daemon.pid
#SET_USER=root
#SET_GROUP=root # GROUP only needs to be set if USER is not set or if the user isn't in the group
#
MUST_NFS=no
NFS_HOST=192.168.1.1
NFS_REMOTE_PATH=/var/recordings
NFS_LOCAL_MOUNT=/var/lib/rtpengine-recording # must match output-dir if used
NFS_OPTIONS=hard,intr,tcp

+ 0
- 2
pkg/deb/buster/rtpengine-recording-daemon.dirs View File

@ -1,2 +0,0 @@
var/lib/rtpengine-recording
var/spool/rtpengine

+ 0
- 112
pkg/deb/buster/rtpengine-recording-daemon.init View File

@ -1,112 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: rtpengine-recording-daemon
# Required-Start: $network $local_fs $remote_fs $syslog
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ngcp Rtpengine Recording Daemon
# Description: Recording daemon for RTP and other media streams
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpengine-recording-daemon
DESC="RTP/media recording daemon"
DAEMON=$(which rtpengine-recording)
DEFAULTS=/etc/default/${NAME}
test -f "$DAEMON" || exit 0
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$PIDFILE" ] && PIDFILE="/run/rtpengine-recording.pid"
OPTIONS=""
START_OPTIONS=""
[ -z "$CONFIG_FILE" ] || OPTIONS="$OPTIONS --config-file=$CONFIG_FILE"
[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS --pidfile=$PIDFILE"
# check if directory for pid file needs to be created
PIDDIR=$(dirname "$PIDFILE")
DO_DIR_CHOWN=0
if ! test -z "$PIDDIR" && ! test -d "$PIDDIR"; then
mkdir -p "$PIDDIR"
DO_DIR_CHOWN=1
fi
# handle requested setuid/setgid
if ! test -z "$SET_USER"; then
START_OPTIONS="$START_OPTIONS --chuid $SET_USER"
test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR"
fi
if ! test -z "$SET_GROUP"; then
START_OPTIONS="$START_OPTIONS --group $SET_GROUP"
test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR"
fi
###
case "$1" in
start)
if [ -x "$(which ngcp-check-active)" ]; then
case "$(ngcp-check-active -v)" in
active|transition)
log_action_msg "Active node or transition."
;;
*)
log_action_msg "Ignored start action in inactive node"
exit 0
;;
esac
fi
RC=0
rtpengine-recording-nfs-setup start || RC=$?
if [ "$RC" -ne 0 ] ; then
log_action_msg "Failed to start rtpengine-recording-nfs-setup"
log_end_msg "$RC"
exit "$RC"
fi
log_daemon_msg "Starting $DESC" "$NAME"
# shellcheck disable=SC2086
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "$DAEMON" $START_OPTIONS -- $OPTIONS || log_progress_msg " already running"
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
RC=0
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--retry 5 --exec "$DAEMON" || RC=$?
rm -f "$PIDFILE"
log_end_msg "$RC"
exit "$RC"
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

+ 0
- 3
pkg/deb/buster/rtpengine-recording-daemon.install View File

@ -1,3 +0,0 @@
debian/rtpengine-recording-nfs-setup /usr/sbin/
etc/rtpengine-recording.sample.conf /etc/rtpengine/
recording-daemon/rtpengine-recording /usr/sbin/

+ 0
- 1
pkg/deb/buster/rtpengine-recording-daemon.links View File

@ -1 +0,0 @@
/lib/systemd/system/rtpengine-recording-daemon.service /lib/systemd/system/rtpengine-recording.service

+ 0
- 1
pkg/deb/buster/rtpengine-recording-daemon.manpages View File

@ -1 +0,0 @@
recording-daemon/rtpengine-recording.8

+ 0
- 20
pkg/deb/buster/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service View File

@ -1,20 +0,0 @@
[Unit]
Description=NGCP RTP/media Recording Daemon NFS mount point
After=network-online.target
After=remote-fs.target
After=rpcbind.socket
After=rpcbind.service
After=nfs-client.target
Requires=network-online.target
Requires=rpcbind.socket
Requires=rpcbind.service
Requires=nfs-client.target
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/sbin/rtpengine-recording-nfs-setup start
ExecStop=/usr/sbin/rtpengine-recording-nfs-setup stop
[Install]
WantedBy=multi-user.target

+ 0
- 16
pkg/deb/buster/rtpengine-recording-daemon.service View File

@ -1,16 +0,0 @@
[Unit]
Description=NGCP RTP/media Recording Daemon
After=network-online.target
After=remote-fs.target
After=rtpengine-recording-nfs-mount.service
Requires=network-online.target
Requires=rtpengine-recording-nfs-mount.service
[Service]
Type=notify
LimitNOFILE=100000
PIDFile=/run/rtpengine-recording-daemon.pid
ExecStart=/usr/sbin/rtpengine-recording -f -E --no-log-timestamps --pidfile /run/rtpengine-recording-daemon.pid --config-file /etc/rtpengine/rtpengine-recording.conf
[Install]
WantedBy=multi-user.target

+ 0
- 42
pkg/deb/buster/rtpengine-recording-nfs-setup View File

@ -1,42 +0,0 @@
#!/bin/sh
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DEFAULTS=/etc/default/rtpengine-recording-daemon
DESC="RTP engine recording NFS share"
. /lib/lsb/init-functions
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
[ -z "$NFS_OPTIONS" ] && NFS_OPTIONS="hard,tcp,intr"
###
case "$1" in
start)
if [ "$MUST_NFS" = yes ]; then
if ! grep -E -q "^[^ :]+:[^ :]+ $NFS_LOCAL_MOUNT nfs.? " /proc/mounts; then
log_action_msg "Mounting $DESC"
test -d "$NFS_LOCAL_MOUNT" || mkdir -p "$NFS_LOCAL_MOUNT"
mount -t nfs -o "$NFS_OPTIONS" "$NFS_HOST:$NFS_REMOTE_PATH" "$NFS_LOCAL_MOUNT"
fi
fi
;;
stop)
if grep -E -q "^[^ :]+:[^ :]+ $NFS_LOCAL_MOUNT nfs.? " /proc/mounts; then
log_action_msg "Unmounting $DESC"
umount "$NFS_LOCAL_MOUNT"
fi
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit 0

+ 0
- 4
pkg/deb/buster/rtpengine-utils.install View File

@ -1,4 +0,0 @@
perl/* /usr/share/perl5/
utils/rtpengine-ctl /usr/sbin/
utils/rtpengine-get-table /usr/libexec/rtpengine/
utils/rtpengine-ng-client /usr/sbin/

+ 0
- 2
pkg/deb/buster/rtpengine.docs View File

@ -1,2 +0,0 @@
debian/README.html.gz
debian/README.md.gz

+ 0
- 70
pkg/deb/buster/rules View File

@ -1,70 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
## kernel package specific stuff
# Name of the source package
psource:=rtpengine-kernel-source
# Name of the dkms package
pdkms:=rtpengine-kernel-dkms
# short upstream name, used for module source directory
sname:=rtpengine
# Source version
sversion:=$(DEB_VERSION_UPSTREAM)
## end of kernel package specific stuff
XTABLES_DIR:=$(shell pkg-config xtables --variable=xtlibdir || echo /lib/xtables)
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.rtpengine.no-transcoding))
export with_transcoding = no
endif
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.rtpengine.asan))
export DO_ASAN_FLAGS = 1
# this prevents dh from setting default (including -O2) which we don't want
export DEB_CFLAGS_MAINT_SET =
export DEB_LDFLAGS_MAINT_SET =
endif
%:
dh $@
override_dh_auto_install-indep:
# Create the directories to install the source into
dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian
dh_installdirs -p$(pdkms) usr/src/$(sname)-$(sversion)
# Copy only the driver source to the proper locations
cd kernel-module && cp Makefile *.c *.h ../debian/$(psource)/usr/src/modules/$(sname)
cd kernel-module && cp Makefile *.c *.h ../debian/$(pdkms)/usr/src/$(sname)-$(sversion)
# Copy the needed debian/ pieces to the proper location
cp debian/*.modules.in* debian/$(psource)/usr/src/modules/$(sname)/debian
cp debian/control debian/changelog debian/copyright \
debian/$(psource)/usr/src/modules/$(sname)/debian/
install -m 0755 debian/rules.modules debian/$(psource)/usr/src/modules/$(sname)/debian/rules
cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
# Prepare dkms.conf from the dkms.conf.in template
sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf
# markdown README
markdown README.md | gzip -9 > debian/README.html.gz
gzip -9 < README.md > debian/README.md.gz
dh_auto_install
override_dh_install:
dh_install
dh_installdirs -prtpengine-iptables $(XTABLES_DIR)
install -m 0644 iptables-extension/libxt_RTPENGINE.so debian/rtpengine-iptables/$(XTABLES_DIR)
override_dh_dwz:
# Disable, as dwz cannot cope with some of the plugins generated.
override_dh_installsystemd:
dh_installsystemd
dh_installsystemd -prtpengine-recording-daemon --name=rtpengine-recording-nfs-mount

+ 0
- 82
pkg/deb/buster/rules.modules View File

@ -1,82 +0,0 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS ?= -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# Name of the source package
psource:=rtpengine-kernel-source
# The short upstream name, used for the module source directory
sname:=rtpengine
### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules
# prefix of the target package name
PACKAGE=rtpengine-kernel-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make
# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)
# The kdist_configure target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the necessary debian/ files
kdist_configure: prep-deb-files
# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean: clean
$(MAKE) $(MFLAGS) -f debian/rules clean
#
### end KERNEL SETUP
# the binary-modules rule is invoked by module-assistant while processing the
# kdist* targets. It is called by module-assistant or make-kpkg and *not*
# during a normal build
binary-modules: prep-deb-files
dh_testroot
dh_prep
# Build the module
$(MAKE) modules KSRC=$(KSRC) KVER=$(KVERS)
# Install the module
install -D -m 0644 xt_RTPENGINE.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/extra/xt_RTPENGINE.ko
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installmodules
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
clean:
dh_testdir
$(MAKE) clean
dh_clean
.PHONY: clean binary-modules kdist kdist_configure kdist_image kdist_clean

+ 0
- 1
pkg/deb/buster/source/format View File

@ -1 +0,0 @@
3.0 (quilt)

+ 0
- 1
pkg/deb/buster/source/options View File

@ -1 +0,0 @@
extend-diff-ignore=.gitreview

pkg/deb/bookworm/.gitignore → pkg/deb/debian/.gitignore View File


+ 18
- 0
pkg/deb/debian/backports/bookworm View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# Target dist: Debian Bookworm
DIST=bookworm
if [ ! -d ../../pkg/deb ] ; then
echo "script needs to be executed at pkg/deb dir" >&2
exit 1
fi
rm -rf ${DIST}
cp -r debian ${DIST}
wrap-and-sort -sat -d ${DIST}
# clean backports scripts
rm -rf ${DIST}/backports
exit 0

+ 18
- 0
pkg/deb/debian/backports/bullseye View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# Target dist: Debian Bullseye
DIST=bullseye
if [ ! -d ../../pkg/deb ] ; then
echo "script needs to be executed at pkg/deb dir" >&2
exit 1
fi
rm -rf ${DIST}
cp -r debian ${DIST}
wrap-and-sort -sat -d ${DIST}
# clean backports scripts
rm -rf ${DIST}/backports
exit 0

+ 21
- 0
pkg/deb/debian/backports/buster View File

@ -0,0 +1,21 @@
#!/bin/bash
#
# Target dist: Debian Buster
DIST=buster
if [ ! -d ../../pkg/deb ] ; then
echo "script needs to be executed at pkg/deb dir" >&2
exit 1
fi
rm -rf ${DIST}
cp -r debian ${DIST}
# No libbcg729-dev package
sed -i -e '/libbcg729-dev/d' ${DIST}/control
wrap-and-sort -sat -d ${DIST}
# clean backports scripts
rm -rf ${DIST}/backports
exit 0

+ 18
- 0
pkg/deb/debian/backports/sid View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# Target dist: Debian Sid
DIST=sid
if [ ! -d ../../pkg/deb ] ; then
echo "script needs to be executed at pkg/deb dir" >&2
exit 1
fi
rm -rf ${DIST}
cp -r debian ${DIST}
wrap-and-sort -sat -d ${DIST}
# clean backports scripts
rm -rf ${DIST}/backports
exit 0

pkg/deb/bookworm/clean → pkg/deb/debian/clean View File


pkg/deb/bookworm/control → pkg/deb/debian/control View File


pkg/deb/bookworm/control.modules.in → pkg/deb/debian/control.modules.in View File


pkg/deb/bookworm/copyright → pkg/deb/debian/copyright View File


pkg/deb/bookworm/dkms.conf.in → pkg/deb/debian/dkms.conf.in View File


pkg/deb/bookworm/rtpengine-daemon.default → pkg/deb/debian/rtpengine-daemon.default View File


pkg/deb/bookworm/rtpengine-daemon.init → pkg/deb/debian/rtpengine-daemon.init View File


pkg/deb/bookworm/rtpengine-daemon.install → pkg/deb/debian/rtpengine-daemon.install View File


pkg/deb/bookworm/rtpengine-daemon.links → pkg/deb/debian/rtpengine-daemon.links View File


pkg/deb/bookworm/rtpengine-daemon.manpages → pkg/deb/debian/rtpengine-daemon.manpages View File


pkg/deb/bookworm/rtpengine-daemon.postinst → pkg/deb/debian/rtpengine-daemon.postinst View File


pkg/deb/bookworm/rtpengine-daemon.service → pkg/deb/debian/rtpengine-daemon.service View File


pkg/deb/bookworm/rtpengine-dev.install → pkg/deb/debian/rtpengine-dev.install View File


pkg/deb/bookworm/rtpengine-iptables-setup → pkg/deb/debian/rtpengine-iptables-setup View File


pkg/deb/bookworm/rtpengine-kernel-dkms.postinst → pkg/deb/debian/rtpengine-kernel-dkms.postinst View File


pkg/deb/bookworm/rtpengine-kernel-dkms.prerm → pkg/deb/debian/rtpengine-kernel-dkms.prerm View File


pkg/deb/bookworm/rtpengine-kernel-source.links → pkg/deb/debian/rtpengine-kernel-source.links View File


pkg/deb/bookworm/rtpengine-recording-daemon.default → pkg/deb/debian/rtpengine-recording-daemon.default View File


pkg/deb/bookworm/rtpengine-recording-daemon.dirs → pkg/deb/debian/rtpengine-recording-daemon.dirs View File


pkg/deb/bookworm/rtpengine-recording-daemon.init → pkg/deb/debian/rtpengine-recording-daemon.init View File


pkg/deb/bookworm/rtpengine-recording-daemon.install → pkg/deb/debian/rtpengine-recording-daemon.install View File


pkg/deb/bookworm/rtpengine-recording-daemon.links → pkg/deb/debian/rtpengine-recording-daemon.links View File


pkg/deb/bookworm/rtpengine-recording-daemon.manpages → pkg/deb/debian/rtpengine-recording-daemon.manpages View File


pkg/deb/bookworm/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service → pkg/deb/debian/rtpengine-recording-daemon.ngcp-rtpengine-recording-nfs-mount.service View File


pkg/deb/bookworm/rtpengine-recording-daemon.service → pkg/deb/debian/rtpengine-recording-daemon.service View File


pkg/deb/bookworm/rtpengine-recording-nfs-setup → pkg/deb/debian/rtpengine-recording-nfs-setup View File


pkg/deb/bookworm/rtpengine-utils.install → pkg/deb/debian/rtpengine-utils.install View File


pkg/deb/bookworm/rtpengine.docs → pkg/deb/debian/rtpengine.docs View File


pkg/deb/bookworm/rules → pkg/deb/debian/rules View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save