forked from acouzens/open5gs
update debian rule for override_dh_auto_test
VM(like OBS) may not support SCTP At this point, I disabled SCTP-needed test code.
This commit is contained in:
parent
4e33365bf4
commit
c8ec3702d0
|
@ -14,6 +14,7 @@ lib/freeDiameter-*/include/freeDiameter/version.h
|
||||||
lib/freeDiameter-*/include/freeDiameter/config.h.in
|
lib/freeDiameter-*/include/freeDiameter/config.h.in
|
||||||
lib/freeDiameter-*/include/freeDiameter/freeDiameter-host.h
|
lib/freeDiameter-*/include/freeDiameter/freeDiameter-host.h
|
||||||
lib/core/include/core.h
|
lib/core/include/core.h
|
||||||
|
support/systemd/nextepc-*.service
|
||||||
support/logrotate/nextepc
|
support/logrotate/nextepc
|
||||||
|
|
||||||
# autotools
|
# autotools
|
||||||
|
|
|
@ -11,11 +11,12 @@ Build-Depends: debhelper (>= 9),
|
||||||
flex,
|
flex,
|
||||||
bison,
|
bison,
|
||||||
libsctp-dev,
|
libsctp-dev,
|
||||||
libssl-dev,
|
|
||||||
libgnutls28-dev,
|
libgnutls28-dev,
|
||||||
libgcrypt-dev,
|
libgcrypt-dev,
|
||||||
|
libssl-dev,
|
||||||
libmongoc-dev,
|
libmongoc-dev,
|
||||||
libbson-dev
|
libbson-dev,
|
||||||
|
mongodb
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Vcs-Browser: https://github.com/acetcom/nextepc
|
Vcs-Browser: https://github.com/acetcom/nextepc
|
||||||
Vcs-Git: git://github.com/acetcom/nextepc
|
Vcs-Git: git://github.com/acetcom/nextepc
|
||||||
|
@ -67,7 +68,8 @@ Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
Depends: ${shlibs:Depends},
|
Depends: ${shlibs:Depends},
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
nextepc-core (= ${binary:Version})
|
nextepc-core (= ${binary:Version}),
|
||||||
|
iproute2
|
||||||
Description: Open Source based 3GPP EPC PGW (Packet Data Network Gateway)
|
Description: Open Source based 3GPP EPC PGW (Packet Data Network Gateway)
|
||||||
NextEPC is a C-language Open Source implementation of the 3GPP Evolved
|
NextEPC is a C-language Open Source implementation of the 3GPP Evolved
|
||||||
Packet Core, i.e. the core network of an LTE network.
|
Packet Core, i.e. the core network of an LTE network.
|
||||||
|
@ -83,8 +85,9 @@ Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
Depends: ${shlibs:Depends},
|
Depends: ${shlibs:Depends},
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
nextepc-core (= ${binary:Version})
|
nextepc-core (= ${binary:Version}),
|
||||||
Description: Open Source based 3GPP EPC PGW (Policy and Charging Rules Function)
|
mongodb
|
||||||
|
Description: Open Source based 3GPP EPC PCRF (Policy and Charging Rules Function)
|
||||||
NextEPC is a C-language Open Source implementation of the 3GPP Evolved
|
NextEPC is a C-language Open Source implementation of the 3GPP Evolved
|
||||||
Packet Core, i.e. the core network of an LTE network.
|
Packet Core, i.e. the core network of an LTE network.
|
||||||
.
|
.
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# postinst script for nextepc
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <postinst> `abort-remove'
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
|
||||||
|
ip tuntap add name pgwtun mode tun
|
||||||
|
ip addr add 45.45.0.1/16 dev pgwtun
|
||||||
|
ip link set pgwtun up
|
||||||
|
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
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# postinst script for nextepc
|
|
||||||
#
|
|
||||||
# see: dh_installdeb(1)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
|
|
||||||
ip tuntap add name pgwtun mode tun
|
|
||||||
ip addr add 45.45.0.1/16 dev pgwtun
|
|
||||||
ip link set pgwtun up
|
|
||||||
fi
|
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,27 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
dh $@ --with autoreconf --with systemd
|
dh $@ --with autoreconf --with systemd
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
mkdir -p debian/test/etc/nextepc/freeDiameter debian/test/var/log/nextepc
|
mkdir -p debian/test/db debian/test/etc/nextepc/freeDiameter debian/test/var/log/nextepc; \
|
||||||
sed 's?@SYSCONF_DIR@?'`pwd`'/debian/test/etc?g;s?@LOCALSTATE_DIR@?'`pwd`'/debian/test/var?g' support/config/nextepc.conf.in > debian/test/etc/nextepc/nextepc.conf
|
sed 's?@SYSCONF_DIR@?'`pwd`'/debian/test/etc?g;s?@LOCALSTATE_DIR@?'`pwd`'/debian/test/var?g' support/config/nextepc.conf.in > debian/test/etc/nextepc/nextepc.conf; \
|
||||||
for i in `find support/freeDiameter -name '*.conf.in' -printf "%f\n" | sed 's/.in$$//g'`; do \
|
for i in `find support/freeDiameter -name '*.conf.in' -printf "%f\n" | sed 's/.in$$//g'`; do \
|
||||||
sed 's?@SYSCONF_DIR@/nextepc?'`pwd`'/support?g;s?@LIB_DIR@/nextepc/\([_a-z0-9]*\)\.so?'`pwd`'/lib/fd/extensions/\1/.libs/\1.so?g' support/freeDiameter/$$i.in > debian/test/etc/nextepc/freeDiameter/$$i; \
|
sed 's?@SYSCONF_DIR@/nextepc?'`pwd`'/support?g;s?@LIB_DIR@/nextepc/\([_a-z0-9]*\)\.so?'`pwd`'/lib/fd/extensions/\1/.libs/\1.so?g' support/freeDiameter/$$i.in > debian/test/etc/nextepc/freeDiameter/$$i; \
|
||||||
done;
|
done; \
|
||||||
test/testepc -f debian/test/etc/nextepc/nextepc.conf -c
|
testcore_excluded_list=; \
|
||||||
rm -rf debian/test
|
testepc_excluded_list=; \
|
||||||
|
if ! cat /proc/net/protocols | grep SCTP > /dev/null; then \
|
||||||
|
testcore_excluded_list="-x testnetlib"; \
|
||||||
|
testepc_excluded_list="-x s1setup_test attach_test volte_test handover_test"; \
|
||||||
|
fi; \
|
||||||
|
mongodb_required=yes; \
|
||||||
|
if ps -ef | grep mongod | grep -v grep > /dev/null; then \
|
||||||
|
mongodb_required=no; \
|
||||||
|
fi; \
|
||||||
|
if test "x$$mongodb_required" = xyes; then \
|
||||||
|
mongod --fork --logpath debian/test/var/log/mongodb.log --dbpath debian/test/db; \
|
||||||
|
fi; \
|
||||||
|
lib/core/test/testcore $$testcore_excluded_list || exit; \
|
||||||
|
test/testepc -f debian/test/etc/nextepc/nextepc.conf -c $$testepc_excluded_list || exit; \
|
||||||
|
if test "x$$mongodb_required" = xyes; then \
|
||||||
|
pkill mongod; \
|
||||||
|
fi; \
|
||||||
|
rm -rf debian/test;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
|
||||||
#include "mme_fd_path.h"
|
#include "mme_fd_path.h"
|
||||||
#include "mme_gtp_path.h"
|
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
||||||
static thread_id sm_thread;
|
static thread_id sm_thread;
|
||||||
|
@ -39,11 +38,6 @@ status_t mme_initialize()
|
||||||
rv = thread_create(&net_thread, NULL, net_main, NULL);
|
rv = thread_create(&net_thread, NULL, net_main, NULL);
|
||||||
if (rv != CORE_OK) return rv;
|
if (rv != CORE_OK) return rv;
|
||||||
|
|
||||||
rv = mme_gtp_open();
|
|
||||||
if (rv != CORE_OK) return rv;
|
|
||||||
rv = s1ap_open();
|
|
||||||
if (rv != CORE_OK) return rv;
|
|
||||||
|
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
|
|
||||||
return CORE_OK;
|
return CORE_OK;
|
||||||
|
@ -53,10 +47,6 @@ void mme_terminate(void)
|
||||||
{
|
{
|
||||||
if (!initialized) return;
|
if (!initialized) return;
|
||||||
|
|
||||||
mme_gtp_close();
|
|
||||||
s1ap_close(mme_self()->s1ap_sock);
|
|
||||||
mme_self()->s1ap_sock = NULL;
|
|
||||||
|
|
||||||
thread_delete(net_thread);
|
thread_delete(net_thread);
|
||||||
thread_delete(sm_thread);
|
thread_delete(sm_thread);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "nas_path.h"
|
#include "nas_path.h"
|
||||||
#include "emm_handler.h"
|
#include "emm_handler.h"
|
||||||
#include "esm_handler.h"
|
#include "esm_handler.h"
|
||||||
|
#include "mme_gtp_path.h"
|
||||||
#include "mme_s11_handler.h"
|
#include "mme_s11_handler.h"
|
||||||
#include "fd_lib.h"
|
#include "fd_lib.h"
|
||||||
#include "mme_fd_path.h"
|
#include "mme_fd_path.h"
|
||||||
|
@ -46,10 +47,35 @@ void mme_state_operational(fsm_t *s, event_t *e)
|
||||||
{
|
{
|
||||||
case FSM_ENTRY_SIG:
|
case FSM_ENTRY_SIG:
|
||||||
{
|
{
|
||||||
|
rv = mme_gtp_open();
|
||||||
|
if (rv != CORE_OK)
|
||||||
|
{
|
||||||
|
d_error("Can't establish S11-GTP path");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
rv = s1ap_open();
|
||||||
|
if (rv != CORE_OK)
|
||||||
|
{
|
||||||
|
d_error("Can't establish S1AP path");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FSM_EXIT_SIG:
|
case FSM_EXIT_SIG:
|
||||||
{
|
{
|
||||||
|
rv = mme_gtp_close();
|
||||||
|
if (rv != CORE_OK)
|
||||||
|
{
|
||||||
|
d_error("Can't close S11-GTP path");
|
||||||
|
}
|
||||||
|
rv = s1ap_close(mme_self()->s1ap_sock);
|
||||||
|
if (rv != CORE_OK)
|
||||||
|
{
|
||||||
|
d_error("Can't close S1AP path");
|
||||||
|
}
|
||||||
|
mme_self()->s1ap_sock = NULL;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MME_EVT_S1AP_LO_ACCEPT:
|
case MME_EVT_S1AP_LO_ACCEPT:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
DB_URI : "mongodb://localhost/nextepc",
|
DB_URI : "mongodb://localhost/nextepc",
|
||||||
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/nextepc.log",
|
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/hss.log",
|
||||||
TRACE:
|
TRACE:
|
||||||
{
|
{
|
||||||
FD: 1,
|
FD: 1,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
DB_URI : "mongodb://localhost/nextepc",
|
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/mme.log",
|
||||||
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/nextepc.log",
|
|
||||||
TRACE:
|
TRACE:
|
||||||
{
|
{
|
||||||
S1AP: 1,
|
S1AP: 1,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
DB_URI : "mongodb://localhost/nextepc",
|
DB_URI : "mongodb://localhost/nextepc",
|
||||||
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/nextepc.log",
|
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/pcrf.log",
|
||||||
TRACE:
|
TRACE:
|
||||||
{
|
{
|
||||||
FD: 1,
|
FD: 1,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
DB_URI : "mongodb://localhost/nextepc",
|
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/pgw.log",
|
||||||
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/nextepc.log",
|
|
||||||
TRACE:
|
TRACE:
|
||||||
{
|
{
|
||||||
FD: 1,
|
FD: 1,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
DB_URI : "mongodb://localhost/nextepc",
|
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/sgw.log",
|
||||||
LOG_PATH : "@LOCALSTATE_DIR@/log/nextepc/nextepc.log",
|
|
||||||
TRACE:
|
TRACE:
|
||||||
{
|
{
|
||||||
GTP: 1,
|
GTP: 1,
|
||||||
|
|
Loading…
Reference in New Issue