openbsc: Drop packages present in other recipes after split
The osmo-bsc one is renamed to osmo-bsc-sccplite and kept because the
code in the new osmo-bsc repository still doesn't support SCCPLite, this
this one can still be used by installing the osmo-bsc-sccplite package.
Change-Id: Ifd029cbd36417ee980bff51b4112705be16175d3
diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc
index 164b492..e04911d 100644
--- a/recipes-osmocom/openbsc/openbsc.inc
+++ b/recipes-osmocom/openbsc/openbsc.inc
@@ -7,14 +7,14 @@
RDEPENDS_osmo-nitb = "libdbd-sqlite3"
SRC_URI = "file://osmo-nitb.init \
- file://osmo-bsc_mgcp.init \
- file://osmo-bsc.init \
- file://osmo-sgsn.init"
+ file://osmo-bsc-sccplite.init \
+ file://osmo-bsc-sccplite.service \
+ "
-INC_PR = "r22.${META_TELEPHONY_OSMO_INC}"
+INC_PR = "r23.${META_TELEPHONY_OSMO_INC}"
-EXTRA_OECONF += " --enable-nat --enable-osmo-bsc --enable-smpp --enable-mgcp-transcoding --with-g729"
+EXTRA_OECONF += "--enable-osmo-bsc --enable-mgcp-transcoding --with-g729"
inherit autotools update-rc.d pkgconfig
@@ -26,50 +26,38 @@
do_install_append() {
install -d ${D}${sysconfdir}/osmocom
install -m 0660 ${S}/doc/examples/osmo-nitb/nanobts/openbsc.cfg ${D}${sysconfdir}/osmocom/osmo-nitb.cfg
- install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc.cfg
- install -m 0660 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg
- install -m 0660 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/osmo-sgsn.cfg
+ install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg
# Install sysv-init files
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rc5.d
install -m 0775 ${WORKDIR}/osmo-nitb.init ${D}${sysconfdir}/init.d/osmo-nitb
- install -m 0775 ${WORKDIR}/osmo-bsc_mgcp.init ${D}${sysconfdir}/init.d/osmo-bsc-mgcp
- install -m 0775 ${WORKDIR}/osmo-bsc.init ${D}${sysconfdir}/init.d/osmo-bsc
- install -m 0775 ${WORKDIR}/osmo-sgsn.init ${D}${sysconfdir}/init.d/osmo-sgsn
+ install -m 0775 ${WORKDIR}/osmo-bsc-sccplite.init ${D}${sysconfdir}/init.d/osmo-bsc-sccplite
# Install systemd files and enable on sysinit
- install -d ${D}${systemd_unitdir}/system
- for i in `ls ${S}/contrib/systemd`; do
- install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/
- done
+ install -d ${D}${systemd_system_unitdir}/
+ install -m 0644 ${S}/contrib/systemd/osmo-nitb.service ${D}${systemd_system_unitdir}/
+ install -m 0644 ${WORKDIR}/osmo-bsc-sccplite.service ${D}${systemd_system_unitdir}/
install -d ${D}/var/lib/osmocom
+
+ mv ${D}${bindir}/osmo-bsc ${D}${bindir}/osmo-bsc-sccplite
}
-PACKAGES =+ "osmo-bsc osmo-nitb osmo-gbproxy osmo-gbproxy-dbg osmo-sgsn ipaccess-utils osmo-bsc-mgcp osmo-bsc-nat"
+PACKAGES =+ "osmo-bsc-sccplite osmo-nitb"
-INITSCRIPT_PACKAGES = "osmo-bsc osmo-bsc-mgcp osmo-nitb osmo-sgsn"
+INITSCRIPT_PACKAGES = "osmo-bsc-sccplite osmo-nitb"
# Do not start any of the services by default
SYSTEMD_AUTO_ENABLE = "disable"
-CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg"
-INITSCRIPT_NAME_osmo-bsc = "osmo-bsc"
-INITSCRIPT_PARAMS_osmo-bsc = "defaults 30 30"
-FILES_osmo-bsc = " ${bindir}/osmo-bsc \
- ${sysconfdir}/osmocom/osmo-bsc.cfg \
- ${sysconfdir}/init.d/osmo-bsc \
- ${systemd_unitdir}/system/osmo-bsc.service \
- "
-
-CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
-INITSCRIPT_NAME_osmo-bsc-mgcp = "osmo-bsc-mgcp"
-INITSCRIPT_PARAMS_osmo-bsc-mgcp = "defaults 30 30"
-FILES_osmo-bsc-mgcp = " ${bindir}/osmo-bsc_mgcp \
- ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
- ${sysconfdir}/init.d/osmo-bsc-mgcp \
- ${systemd_unitdir}/system/osmo-bsc-mgcp.service \
+CONFFILES_osmo-bsc-sccplite = "${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg"
+INITSCRIPT_NAME_osmo-bsc-sccplite = "osmo-bsc-sccplite"
+INITSCRIPT_PARAMS_osmo-bsc-sccplite = "defaults 30 30"
+FILES_osmo-bsc-sccplite = " ${bindir}/osmo-bsc-sccplite \
+ ${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg \
+ ${sysconfdir}/init.d/osmo-bsc-sccplite \
+ ${systemd_system_unitdir}/osmo-bsc-sccplite.service \
"
CONFFILES_osmo-nitb = "${sysconfdir}/osmocom/osmo-nitb.cfg"
@@ -81,19 +69,3 @@
${sysconfdir}/osmocom/osmo-nitb.cfg \
${systemd_unitdir}/system/osmo-nitb.service \
"
-
-CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg"
-INITSCRIPT_NAME_osmo-sgsn = "osmo-sgsn"
-INITSCRIPT_PARAMS_osmo-sgsn = "defaults 30 30"
-FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \
- ${sysconfdir}/init.d/osmo-sgsn \
- ${sysconfdir}/osmocom/osmo-sgsn.cfg \
- ${systemd_unitdir}/system/osmo-sgsn.service \
- "
-
-FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy "
-FILES_osmo-bsc-nat = " ${bindir}/osmo-bsc_nat "
-FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy \
- ${systemd_unitdir}/system/osmo-gbproxy.service \
- "
-FILES_osmo-gbproxy-dbg = " ${bindir}/.debug/osmo-gbproxy "
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.init
similarity index 66%
rename from recipes-osmocom/openbsc/openbsc/osmo-bsc.init
rename to recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.init
index c793a0b..3186f6d 100755
--- a/recipes-osmocom/openbsc/openbsc/osmo-bsc.init
+++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.init
@@ -1,24 +1,24 @@
#!/bin/sh
### BEGIN INIT INFO
-# Provides: osmo-bsc
+# Provides: osmo-bsc-sccplite
# Required-Start: $syslog $networking
# Required-Stop: $syslog
# Default-Start: 5
# Default-Stop: 1
-# Short-Description: Osmocom GSM Base Station Controller
+# Short-Description: Osmocom GSM Base Station Controller (legacy, with SCCPLite)
### END INIT INFO
-DAEMON=/usr/bin/osmo-bsc
-NAME=osmo-bsc
+DAEMON=/usr/bin/osmo-bsc-sccplite
+NAME=osmo-bsc-sccplite
DESC="Osmocom GSM Base Station Controller"
-NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc.cfg -r /var/run/openbsc.ctl"
+NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc-sccplite.cfg -r /var/run/openbsc.ctl"
OSMOBTS_EXTRA_ARGS=""
NO_START=1
set -e
-test ! -r /etc/default/osmo-bsc || . /etc/default/osmo-bsc
+test ! -r /etc/default/osmo-bsc-sccplite || . /etc/default/osmo-bsc-sccplite
test "$NO_START" = "0" || exit 0
test -x "$DAEMON" || exit 0
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.service b/recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.service
new file mode 100644
index 0000000..3edd35c
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc-sccplite.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenBSC BSC (legacy, with SCCPLite)
+Wants=osmo-bsc-mgcp.service
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=/usr/bin/osmo-bsc-sccplite -c /etc/osmocom/osmo-bsc-sccplite.cfg -s
+RestartSec=2
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init
deleted file mode 100755
index f417588..0000000
--- a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: osmo-bsc_mgcp
-# Required-Start: $syslog $networking
-# Required-Stop: $syslog
-# Default-Start: 5
-# Default-Stop: 1
-# Short-Description: Osmocom GSM BSC MGCP proxy
-### END INIT INFO
-
-DAEMON=/usr/bin/osmo-bsc_mgcp
-NAME=osmo-bsc_mgcp
-DESC="Osmocom GSM BSC MGCP proxy"
-NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc-mgcp.cfg"
-
-OSMOBTS_EXTRA_ARGS=""
-NO_START=1
-
-set -e
-
-test ! -r /etc/default/osmo-bsc_mgcp || . /etc/default/osmo-bsc_mgcp
-test "$NO_START" = "0" || exit 0
-test -x "$DAEMON" || exit 0
-
-case "$1" in
- start)
- echo -n "Starting $DESC: "
- start-stop-daemon -S \
- -x "$DAEMON" -- $NORMAL_ARGS $OSMOBTS_EXTRA_ARGS
- echo "$NAME."
- ;;
- stop)
- echo -n "Stopping $DESC: "
- start-stop-daemon -K -x "$DAEMON"
- echo "$NAME."
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart}" >&2
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-sgsn.init b/recipes-osmocom/openbsc/openbsc/osmo-sgsn.init
deleted file mode 100755
index 4481135..0000000
--- a/recipes-osmocom/openbsc/openbsc/osmo-sgsn.init
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: osmo-sgsn
-# Required-Start: $syslog $networking
-# Required-Stop: $syslog
-# Default-Start: 5
-# Default-Stop: 1
-# Short-Description: Osmocom Serving GPRS Support Node
-### END INIT INFO
-
-DAEMON=/usr/bin/osmo-sgsn
-NAME=osmo-sgsn
-DESC="Osmocom Serving GPRS Support Node"
-NORMAL_ARGS="-D -c /etc/osmocom/osmo-sgsn.cfg"
-
-OSMOSGSN_EXTRA_ARGS=""
-NO_START=0
-
-set -e
-
-test ! -r /etc/default/osmo-sgsn || . /etc/default/osmo-sgsn
-test "$NO_START" = "0" || exit 0
-test -x "$DAEMON" || exit 0
-
-case "$1" in
- start)
- echo -n "Starting $DESC: "
- start-stop-daemon -S \
- -x "$DAEMON" -- $NORMAL_ARGS $OSMOSGSN_EXTRA_ARGS
- echo "$NAME."
- ;;
- stop)
- echo -n "Stopping $DESC: "
- start-stop-daemon -K -x "$DAEMON"
- echo "$NAME."
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart}" >&2
- exit 1
- ;;
-esac
-
-exit 0