laforge has submitted this change. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37730?usp=email )
Change subject: add debian package files
......................................................................
add debian package files
Related: SYS#7040
Change-Id: I5446c70c1c1f232a2a45de60be7068cfd683a99c
---
A contrib/generate_build_dep.sh
A debian/changelog
A debian/compat
A debian/control
A debian/postinst
A debian/rules
A debian/source/format
7 files changed, 78 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/contrib/generate_build_dep.sh b/contrib/generate_build_dep.sh
new file mode 100755
index 0000000..3237ae3
--- /dev/null
+++ b/contrib/generate_build_dep.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+# execute the script from the top dir of this repository to generate
+# a build_dep.tar.gz for building with debian/OBS
+
+if [ ! -e rebar.config ] ; then
+ echo "Please execute $0 from the top directory"
+ exit 1
+fi
+
+set -x
+rm -rf _checkouts _build
+rebar3 get-deps
+mkdir _checkouts
+mv ./_build/default/lib/* _checkouts/
+mv ./_build/default/plugins/* _checkouts/
+# delete erlang bytecode
+find _checkouts/ -iname '*beam' -delete
+tar czf build_dep.tar.gz ./_checkouts
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..dd7edc9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+osmo-s1gw (0.1.0) unstable; urgency=medium
+
+ * Initial debian packaging
+
+ -- Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> Mon, 05 Aug 2024 20:42:11 +0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4062ee8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,18 @@
+Source: osmo-s1gw
+Maintainer: Osmocom team <openbsc(a)lists.osmocom.org>
+Section: net
+Priority: optional
+Build-Depends: erlang-nox,
+ libpcap-dev,
+ rebar3,
+ debhelper (>= 10)
+Standards-Version: 4.5.0
+
+Package: osmo-s1gw
+Architecture: any
+Depends: erlang-nox
+Multi-Arch: allowed
+Description: Osmocom S1 gateway
+ This can be used on the S1 interface between eNB and MME/CN, and
+ acts as separation between the eNB-facing IP network and the
+ CN-facing IP network, which may be separate without routing in between.
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..d4857a2
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+case "$1" in
+ configure)
+ # Create the osmocom group and user (if it doesn't exist yet)
+ if ! getent group osmocom >/dev/null; then
+ groupadd --system osmocom
+ fi
+ if ! getent passwd osmocom >/dev/null; then
+ useradd \
+ --system \
+ --gid osmocom \
+ --home-dir /var/lib/osmocom \
+ --shell /sbin/nologin \
+ --comment "Open Source Mobile Communications" \
+ osmocom
+ fi
+ ;;
+esac
+
+# dh_installdeb(1) will replace this with shell code automatically
+# generated by other debhelper scripts.
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ffd896c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+include /usr/share/dpkg/default.mk
+export ERL_COMPILER_OPTIONS=deterministic
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ if [ -e build_dep.tar.gz ] ; then tar xzf ./build_dep.tar.gz ; fi
+ dh_auto_build
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
--
To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37730?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I5446c70c1c1f232a2a45de60be7068cfd683a99c
Gerrit-Change-Number: 37730
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>