From fd18ddd0d1d2e9f63108ef58b2854b355b8d221e Mon Sep 17 00:00:00 2001 From: Brandon Lee Date: Wed, 9 Aug 2023 15:27:48 -0600 Subject: [PATCH] debian package --- debian_nextepc/changelog | 5 + debian_nextepc/compat | 1 + debian_nextepc/control | 235 +++++++++++++++++++++++++ debian_nextepc/copyright | 59 +++++++ debian_nextepc/nextepc-amf.install | 5 + debian_nextepc/nextepc-ausf.install | 5 + debian_nextepc/nextepc-bsf.install | 5 + debian_nextepc/nextepc-common.dirs | 1 + debian_nextepc/nextepc-common.install | 6 + debian_nextepc/nextepc-common.postinst | 52 ++++++ debian_nextepc/nextepc-common.postrm | 44 +++++ debian_nextepc/nextepc-hss.install | 6 + debian_nextepc/nextepc-mme.install | 6 + debian_nextepc/nextepc-nrf.install | 5 + debian_nextepc/nextepc-nssf.install | 5 + debian_nextepc/nextepc-pcf.install | 5 + debian_nextepc/nextepc-pcrf.install | 6 + debian_nextepc/nextepc-scp.install | 5 + debian_nextepc/nextepc-sgwc.install | 3 + debian_nextepc/nextepc-sgwu.install | 3 + debian_nextepc/nextepc-smf.install | 6 + debian_nextepc/nextepc-udm.install | 7 + debian_nextepc/nextepc-udr.install | 5 + debian_nextepc/nextepc-upf.install | 4 + debian_nextepc/nextepc-upf.postinst | 55 ++++++ debian_nextepc/nextepc-upf.postrm | 46 +++++ debian_nextepc/rules | 17 ++ debian_nextepc/source/format | 1 + 28 files changed, 603 insertions(+) create mode 100644 debian_nextepc/changelog create mode 100644 debian_nextepc/compat create mode 100644 debian_nextepc/control create mode 100644 debian_nextepc/copyright create mode 100644 debian_nextepc/nextepc-amf.install create mode 100644 debian_nextepc/nextepc-ausf.install create mode 100644 debian_nextepc/nextepc-bsf.install create mode 100644 debian_nextepc/nextepc-common.dirs create mode 100644 debian_nextepc/nextepc-common.install create mode 100644 debian_nextepc/nextepc-common.postinst create mode 100644 debian_nextepc/nextepc-common.postrm create mode 100644 debian_nextepc/nextepc-hss.install create mode 100644 debian_nextepc/nextepc-mme.install create mode 100644 debian_nextepc/nextepc-nrf.install create mode 100644 debian_nextepc/nextepc-nssf.install create mode 100644 debian_nextepc/nextepc-pcf.install create mode 100644 debian_nextepc/nextepc-pcrf.install create mode 100644 debian_nextepc/nextepc-scp.install create mode 100644 debian_nextepc/nextepc-sgwc.install create mode 100644 debian_nextepc/nextepc-sgwu.install create mode 100644 debian_nextepc/nextepc-smf.install create mode 100644 debian_nextepc/nextepc-udm.install create mode 100644 debian_nextepc/nextepc-udr.install create mode 100644 debian_nextepc/nextepc-upf.install create mode 100644 debian_nextepc/nextepc-upf.postinst create mode 100644 debian_nextepc/nextepc-upf.postrm create mode 100755 debian_nextepc/rules create mode 100644 debian_nextepc/source/format diff --git a/debian_nextepc/changelog b/debian_nextepc/changelog new file mode 100644 index 000000000..9ea410333 --- /dev/null +++ b/debian_nextepc/changelog @@ -0,0 +1,5 @@ +nextepc (2.6.4) unstable; urgency=medium + + * Initial release. + + -- NextEPC Inc. Wed, 09 Aug 2023 21:00:00 +0000 diff --git a/debian_nextepc/compat b/debian_nextepc/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/debian_nextepc/compat @@ -0,0 +1 @@ +11 diff --git a/debian_nextepc/control b/debian_nextepc/control new file mode 100644 index 000000000..e76925236 --- /dev/null +++ b/debian_nextepc/control @@ -0,0 +1,235 @@ +Source: nextepc +Section: net +Priority: optional +Maintainer: Harald Welte +Build-Depends: debhelper (>= 11), + git, + pkg-config, + meson (>= 0.43.0), + cmake, + flex, + bison, + libgnutls28-dev, + libgcrypt-dev, + libssl-dev, + libidn11-dev, + libmongoc-dev, + libbson-dev, + libsctp-dev, + libyaml-dev, + libmicrohttpd-dev, + libcurl4-gnutls-dev, + libnghttp2-dev, + libtins-dev, + libtalloc-dev, +Standards-Version: 4.3.0 +Rules-Requires-Root: no +Vcs-Browser: https://github.com/nextepc/nextepc-oss +Vcs-Git: git://github.com/nextepc/nextepc-oss + +Package: nextepc-common +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: 5G Core and EPC (Shared Files) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-mme +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: MME (Mobility Management Entity) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-sgwc +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: SGW-C (Serving Gateway - Control Plane) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-smf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: SMF (Session Management Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-amf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: AMF (Access and Mobility Management Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-sgwu +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: SGW-U (Serving Gateway - User Plane) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-upf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + udev, + nextepc-common (= ${binary:Version}) +Description: UPF (User Plane Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-hss +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + mongodb-org | mongodb, + nextepc-common (= ${binary:Version}) +Description: HSS (Home Subscriber Server) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-pcrf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + mongodb-org | mongodb, + nextepc-common (= ${binary:Version}) +Description: PCRF (Policy and Charging Rules Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-nrf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: NRF (Network Repository Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-scp +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: SCP (Network Repository Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-ausf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: AUSF (Authentication Server Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-udm +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: UDM (Unified Data Management) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-pcf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: PCF (Policy Control Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-nssf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: NSSF (Network Slice Selection Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-bsf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: BSF (Binding Support Function) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-udr +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nextepc-common (= ${binary:Version}) +Description: UDR (Unified Data Repository) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, + nextepc-common (= ${binary:Version}), + nextepc-mme (= ${binary:Version}), + nextepc-sgwc (= ${binary:Version}), + nextepc-smf (= ${binary:Version}), + nextepc-amf (= ${binary:Version}), + nextepc-sgwu (= ${binary:Version}), + nextepc-upf (= ${binary:Version}), + nextepc-hss (= ${binary:Version}), + nextepc-pcrf (= ${binary:Version}), + nextepc-nrf (= ${binary:Version}), + nextepc-scp (= ${binary:Version}), + nextepc-ausf (= ${binary:Version}), + nextepc-udm (= ${binary:Version}), + nextepc-pcf (= ${binary:Version}), + nextepc-nssf (= ${binary:Version}), + nextepc-bsf (= ${binary:Version}), + nextepc-udr (= ${binary:Version}) +Description: 5GC and EPC (metapackage) + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + +Package: nextepc-dbg +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, + nextepc (= ${binary:Version}) +Description: Debug symbols for NextEPC + NextEPC OSS is an open source implementation of 5G Core and LTE EPC. + + diff --git a/debian_nextepc/copyright b/debian_nextepc/copyright new file mode 100644 index 000000000..845661549 --- /dev/null +++ b/debian_nextepc/copyright @@ -0,0 +1,59 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: nextepc +Source: https://github.com/nextepc/nextepc-oss + +Files: * +Copyright: 2019 NextEPC Inc. +License: AGPL-3 + +Files: * +Copyright: 2017 Open5GS Group +License: AGPL-3 + +Files: lib/freeDiameter-1.2.1/* +Copyright: 2008-2011, WIDE Project and NICT +License: BSD-3-clause + +Files: debian/* +Copyright: 2017 Harald Welte +License: GPL-3 + +License: GPL-3 + This package 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; version 3 of the License + . + 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 . + . + On Debian systems, the complete text of the GNU General Public + License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +License: BSD-3-clause + Software License Agreement (BSD License) + . + Copyright (c) 2008-2011, WIDE Project and NICT + All rights reserved. + . + Redistribution and use of this software in source and binary forms, with or without modification, are· + permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above· + copyright notice, this list of conditions and the· + following disclaimer. + ··· + * Redistributions in binary form must reproduce the above· + copyright notice, this list of conditions and the· + following disclaimer in the documentation and/or other + materials provided with the distribution. + . + * Neither the name of the WIDE Project or NICT nor the· + names of its contributors may be used to endorse or· + promote products derived from this software without· + specific prior written permission of WIDE Project and· + NICT. diff --git a/debian_nextepc/nextepc-amf.install b/debian_nextepc/nextepc-amf.install new file mode 100644 index 000000000..ca7931548 --- /dev/null +++ b/debian_nextepc/nextepc-amf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-amfd +configs/nextepc/amf.yaml etc/nextepc +configs/nextepc/tls/amf.key etc/nextepc/tls +configs/nextepc/tls/amf.crt etc/nextepc/tls +configs/systemd/nextepc-amfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-ausf.install b/debian_nextepc/nextepc-ausf.install new file mode 100644 index 000000000..67e371de4 --- /dev/null +++ b/debian_nextepc/nextepc-ausf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-ausfd +configs/nextepc/ausf.yaml etc/nextepc +configs/nextepc/tls/ausf.key etc/nextepc/tls +configs/nextepc/tls/ausf.crt etc/nextepc/tls +configs/systemd/nextepc-ausfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-bsf.install b/debian_nextepc/nextepc-bsf.install new file mode 100644 index 000000000..52d1682f7 --- /dev/null +++ b/debian_nextepc/nextepc-bsf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-bsfd +configs/nextepc/bsf.yaml etc/nextepc +configs/nextepc/tls/bsf.key etc/nextepc/tls +configs/nextepc/tls/bsf.crt etc/nextepc/tls +configs/systemd/nextepc-bsfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-common.dirs b/debian_nextepc/nextepc-common.dirs new file mode 100644 index 000000000..20bc978cf --- /dev/null +++ b/debian_nextepc/nextepc-common.dirs @@ -0,0 +1 @@ +var/log/nextepc diff --git a/debian_nextepc/nextepc-common.install b/debian_nextepc/nextepc-common.install new file mode 100644 index 000000000..3b4751eae --- /dev/null +++ b/debian_nextepc/nextepc-common.install @@ -0,0 +1,6 @@ +usr/lib/*/libogs*.so* +usr/lib/*/libfd*.so* +usr/lib/*/freeDiameter/*.fdx +usr/lib/*/lib*prom*.so* +configs/nextepc/tls/ca.crt /etc/nextepc/tls +configs/logrotate/nextepc /etc/logrotate.d diff --git a/debian_nextepc/nextepc-common.postinst b/debian_nextepc/nextepc-common.postinst new file mode 100644 index 000000000..ba4d68b8a --- /dev/null +++ b/debian_nextepc/nextepc-common.postinst @@ -0,0 +1,52 @@ +#!/bin/sh +# postinst script for nextepc-common +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + # create a nextepc group and user + if ! getent passwd nextepc >/dev/null; then + adduser --system --disabled-password --disabled-login \ + --home /var/run/nextepc --no-create-home \ + --quiet --group nextepc + fi + for dir in /var/log/nextepc; do + if ! dpkg-statoverride --list "$dir" >/dev/null 2>&1; then + dpkg-statoverride --update --add nextepc nextepc 0755 "$dir" + fi + done + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian_nextepc/nextepc-common.postrm b/debian_nextepc/nextepc-common.postrm new file mode 100644 index 000000000..7b32a5dca --- /dev/null +++ b/debian_nextepc/nextepc-common.postrm @@ -0,0 +1,44 @@ +#!/bin/sh +# postrm script for nextepc-common +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -f /var/log/nextepc/*.log || true + rmdir /var/log/nextepc || true + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian_nextepc/nextepc-hss.install b/debian_nextepc/nextepc-hss.install new file mode 100644 index 000000000..dcddbd0b1 --- /dev/null +++ b/debian_nextepc/nextepc-hss.install @@ -0,0 +1,6 @@ +usr/bin/nextepc-hssd +configs/freeDiameter/hss.* etc/freeDiameter +configs/nextepc/hss.yaml etc/nextepc +configs/nextepc/tls/hss.key etc/nextepc/tls +configs/nextepc/tls/hss.crt etc/nextepc/tls +configs/systemd/nextepc-hssd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-mme.install b/debian_nextepc/nextepc-mme.install new file mode 100644 index 000000000..6c5077f9d --- /dev/null +++ b/debian_nextepc/nextepc-mme.install @@ -0,0 +1,6 @@ +usr/bin/nextepc-mmed +configs/freeDiameter/mme.* etc/freeDiameter +configs/nextepc/mme.yaml etc/nextepc +configs/nextepc/tls/mme.key etc/nextepc/tls +configs/nextepc/tls/mme.crt etc/nextepc/tls +configs/systemd/nextepc-mmed.service lib/systemd/system diff --git a/debian_nextepc/nextepc-nrf.install b/debian_nextepc/nextepc-nrf.install new file mode 100644 index 000000000..1ea741088 --- /dev/null +++ b/debian_nextepc/nextepc-nrf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-nrfd +configs/nextepc/nrf.yaml etc/nextepc +configs/nextepc/tls/nrf.key etc/nextepc/tls +configs/nextepc/tls/nrf.crt etc/nextepc/tls +configs/systemd/nextepc-nrfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-nssf.install b/debian_nextepc/nextepc-nssf.install new file mode 100644 index 000000000..b698d5fa8 --- /dev/null +++ b/debian_nextepc/nextepc-nssf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-nssfd +configs/nextepc/nssf.yaml etc/nextepc +configs/nextepc/tls/nssf.key etc/nextepc/tls +configs/nextepc/tls/nssf.crt etc/nextepc/tls +configs/systemd/nextepc-nssfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-pcf.install b/debian_nextepc/nextepc-pcf.install new file mode 100644 index 000000000..de056860c --- /dev/null +++ b/debian_nextepc/nextepc-pcf.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-pcfd +configs/nextepc/pcf.yaml etc/nextepc +configs/nextepc/tls/pcf.key etc/nextepc/tls +configs/nextepc/tls/pcf.crt etc/nextepc/tls +configs/systemd/nextepc-pcfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-pcrf.install b/debian_nextepc/nextepc-pcrf.install new file mode 100644 index 000000000..c24a20a7e --- /dev/null +++ b/debian_nextepc/nextepc-pcrf.install @@ -0,0 +1,6 @@ +usr/bin/nextepc-pcrfd +configs/freeDiameter/pcrf.* etc/freeDiameter +configs/nextepc/pcrf.yaml etc/nextepc +configs/nextepc/tls/pcrf.key etc/nextepc/tls +configs/nextepc/tls/pcrf.crt etc/nextepc/tls +configs/systemd/nextepc-pcrfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-scp.install b/debian_nextepc/nextepc-scp.install new file mode 100644 index 000000000..8460e60ad --- /dev/null +++ b/debian_nextepc/nextepc-scp.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-scpd +configs/nextepc/scp.yaml etc/nextepc +configs/nextepc/tls/scp.key etc/nextepc/tls +configs/nextepc/tls/scp.crt etc/nextepc/tls +configs/systemd/nextepc-scpd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-sgwc.install b/debian_nextepc/nextepc-sgwc.install new file mode 100644 index 000000000..e9850cea1 --- /dev/null +++ b/debian_nextepc/nextepc-sgwc.install @@ -0,0 +1,3 @@ +usr/bin/nextepc-sgwcd +configs/nextepc/sgwc.yaml etc/nextepc +configs/systemd/nextepc-sgwcd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-sgwu.install b/debian_nextepc/nextepc-sgwu.install new file mode 100644 index 000000000..7f37716d7 --- /dev/null +++ b/debian_nextepc/nextepc-sgwu.install @@ -0,0 +1,3 @@ +usr/bin/nextepc-sgwud +configs/nextepc/sgwu.yaml etc/nextepc +configs/systemd/nextepc-sgwud.service lib/systemd/system diff --git a/debian_nextepc/nextepc-smf.install b/debian_nextepc/nextepc-smf.install new file mode 100644 index 000000000..83f6dd704 --- /dev/null +++ b/debian_nextepc/nextepc-smf.install @@ -0,0 +1,6 @@ +usr/bin/nextepc-smfd +configs/freeDiameter/smf.* etc/freeDiameter +configs/nextepc/smf.yaml etc/nextepc +configs/nextepc/tls/smf.key etc/nextepc/tls +configs/nextepc/tls/smf.crt etc/nextepc/tls +configs/systemd/nextepc-smfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-udm.install b/debian_nextepc/nextepc-udm.install new file mode 100644 index 000000000..b2dc72a62 --- /dev/null +++ b/debian_nextepc/nextepc-udm.install @@ -0,0 +1,7 @@ +usr/bin/nextepc-udmd +configs/nextepc/udm.yaml etc/nextepc +configs/nextepc/tls/udm.key etc/nextepc/tls +configs/nextepc/tls/udm.crt etc/nextepc/tls +configs/nextepc/hnet/curve25519-*.key /etc/nextepc/hnet +configs/nextepc/hnet/secp256r1-*.key /etc/nextepc/hnet +configs/systemd/nextepc-udmd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-udr.install b/debian_nextepc/nextepc-udr.install new file mode 100644 index 000000000..897c09727 --- /dev/null +++ b/debian_nextepc/nextepc-udr.install @@ -0,0 +1,5 @@ +usr/bin/nextepc-udrd +configs/nextepc/udr.yaml etc/nextepc +configs/nextepc/tls/udr.key etc/nextepc/tls +configs/nextepc/tls/udr.crt etc/nextepc/tls +configs/systemd/nextepc-udrd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-upf.install b/debian_nextepc/nextepc-upf.install new file mode 100644 index 000000000..5e459fdb7 --- /dev/null +++ b/debian_nextepc/nextepc-upf.install @@ -0,0 +1,4 @@ +usr/bin/nextepc-upfd +configs/nextepc/upf.yaml etc/nextepc +configs/systemd/99-nextepc.net* etc/systemd/network +configs/systemd/nextepc-upfd.service lib/systemd/system diff --git a/debian_nextepc/nextepc-upf.postinst b/debian_nextepc/nextepc-upf.postinst new file mode 100644 index 000000000..1c5ff605a --- /dev/null +++ b/debian_nextepc/nextepc-upf.postinst @@ -0,0 +1,55 @@ +#!/bin/sh +# postinst script for nextepc-upf +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + if test "x`sysctl -n net.ipv6.conf.all.disable_ipv6`" = x1; then + echo "net.ipv6.conf.all.disable_ipv6=0" > /etc/sysctl.d/20-nextepc.conf + sysctl -p /etc/sysctl.d/20-nextepc.conf + fi + if test "x`systemctl is-enabled systemd-networkd`" = xdisabled; then + systemctl enable systemd-networkd + fi + if test -d "/run/systemd"; then + deb-systemd-invoke restart systemd-networkd + fi + if test -f /etc/sysctl.d/20-nextepc.conf && grep "ogstun" /proc/net/dev > /dev/null; then + echo "net.ipv6.conf.upftun0.disable_ipv6=0" > /etc/sysctl.d/20-nextepc.conf + sysctl -p /etc/sysctl.d/20-nextepc.conf + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian_nextepc/nextepc-upf.postrm b/debian_nextepc/nextepc-upf.postrm new file mode 100644 index 000000000..48a4f15bd --- /dev/null +++ b/debian_nextepc/nextepc-upf.postrm @@ -0,0 +1,46 @@ +#!/bin/sh +# postrm script for nextepc-upf +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + if grep "ogstun" /proc/net/dev > /dev/null; then + ip tuntap del name upftun0 mode tun + fi + rm -f /etc/sysctl.d/20-nextepc.conf + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian_nextepc/rules b/debian_nextepc/rules new file mode 100755 index 000000000..bbfaa0423 --- /dev/null +++ b/debian_nextepc/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +export LC_ALL = C.UTF-8 + +include /usr/share/dpkg/default.mk + +%: + dh $@ --buildsystem=meson + +override_dh_install: + dh_install --sourcedir=obj-$(DEB_HOST_GNU_TYPE) + +override_dh_auto_test: + cd obj-$(DEB_HOST_GNU_TYPE) && meson test -v --suite unit diff --git a/debian_nextepc/source/format b/debian_nextepc/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/debian_nextepc/source/format @@ -0,0 +1 @@ +3.0 (native)