9 Commits

Author SHA1 Message Date
Oliver Smith
ccfd8e40ea Bump version: 0.2.4.7-ebf2 → 0.3.0
Change-Id: Ibdd991c03499926404b92bac9d76238aade4175c
2024-07-25 09:49:50 +02:00
Vadim Yanitskiy
ebf2429f39 README.md: cosmetic: fix a typo
Change-Id: I5cd00ad066223fa33cf76ff1c85fbd810f37062c
2024-06-05 18:34:07 +07:00
Oliver Smith
ddfea86880 debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.

Do not fail if the user deleted the config file.

Be verbose when changing permissions.

Related: OS#4107
Change-Id: I8994759df644d6edd8f937051b95690537b749be
2024-05-14 15:21:06 +02:00
Oliver Smith
b9e204f3bd contrib: remove rpm spec file
Related: https://osmocom.org/news/255
Related: OS#6446
Change-Id: I9e7a3beb861faab1b6852aa5b57847c590986976
2024-05-08 14:41:10 +02:00
Oliver Smith
7dbd34a37e .deb/.rpm: various fixes related to non-root
* Explicitly chown /var/lib/osmocom to osmocom:osmocom, instead of
  relying on systemd to do it when the service starts up. This does not
  work with the systemd versions in debian 10 and almalinux 8.
* deb: Use "useradd" instead of the interactive "adduser" perl script
  from Debian. This makes it consistent with how we do it in rpm, and
  avoids the dependency on "adduser".
* deb: Consistently use tabs through the file, instead of mixing tabs
  and spaces.
* deb: Remove support for the "dpkg-statoverride --list" logic. This
  seems to be a rather obscure feature to override permissions for
  certain files or directories, for which it does not seem to be a good
  idea to make the postinst script less maintainable. Something similar
  can be achieved by using your own Osmocom config file in a different
  path with different permissions.

Related: OS#4107
Change-Id: Ib129217f6aff713d1d0e7aa831b4b54823e9bade
2024-04-26 15:08:47 +02:00
Max
961e96bfd9 .deb/.rpm: add osmocom user during package install
Create osmocom user & group during package installation.
Fix the configuration dir/files permission to match.

Related: OS#4107
Tweaked-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: I459ac6b80526afa0f5d47a8b56f40d5f636dbe28
2024-04-24 16:16:33 +02:00
Vadim Yanitskiy
4b739ac260 build: include README.md into the release tarball
Change-Id: Icef2122de065683ee6a18f507c1834066c950349
2024-01-26 23:38:57 +07:00
Andreas Eversberg
f66763e891 Use uniform log format for default config files
Related: OS#6272
Change-Id: I24f454bd83f32504b9c135d1620b7d02167e8bc6
2023-12-01 12:53:08 +01:00
Pau Espin Pedrol
e7535a4a9b Bump version: 0.2.3.12-7385-dirty → 0.2.4
Change-Id: Ib73d7f15f55a52479a7728f86e96e93bba699ec5
2023-09-12 17:14:42 +02:00
9 changed files with 105 additions and 102 deletions

View File

@@ -19,7 +19,7 @@ SUBDIRS = \
BUILT_SOURCES = $(top_srcdir)/.version
EXTRA_DIST = \
.version \
contrib/osmo-smlc.spec.in \
README.md \
debian \
git-version-gen \
osmoappdesc.py \

View File

@@ -60,7 +60,7 @@ Contributing
Our coding standards are described at
<https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards>
We us a gerrit based patch submission/review process for managing
We use a Gerrit based patch submission/review process for managing
contributions. Please see
<https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for
more details

View File

@@ -36,12 +36,12 @@ if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
fi
PKG_PROG_PKG_CONFIG([0.20])
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 1.7.0)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.10.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.10.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.10.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.10.0)
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.9.0)
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 1.9.0)
dnl checks for header files
AC_HEADER_STDC
@@ -208,5 +208,4 @@ AC_OUTPUT(
doc/manuals/Makefile
contrib/Makefile
contrib/systemd/Makefile
contrib/osmo-smlc.spec
Makefile)

View File

@@ -1,89 +0,0 @@
#
# spec file for package osmo-smlc
#
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
## Disable LTO for now since it breaks compilation of the tests
## https://osmocom.org/issues/4113
%define _lto_cflags %{nil}
Name: osmo-smlc
Version: @VERSION@
Release: 0
Summary: OsmoSMLC: Osmocom's Location Service Center
License: AGPL-3.0-or-later
Group: Hardware/Mobile
URL: https://osmocom.org/projects/osmo-smlc
Source: %{name}-%{version}.tar.xz
BuildRequires: autoconf
BuildRequires: automake >= 1.9
BuildRequires: libtool >= 2
BuildRequires: pkgconfig >= 0.20
%if 0%{?suse_version}
BuildRequires: systemd-rpm-macros
%endif
BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0
BuildRequires: pkgconfig(libosmo-sccp) >= 1.7.0
BuildRequires: pkgconfig(libosmo-sigtran) >= 1.7.0
BuildRequires: pkgconfig(libosmocore) >= 1.8.0
BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0
BuildRequires: pkgconfig(libosmogsm) >= 1.8.0
BuildRequires: pkgconfig(libosmovty) >= 1.8.0
BuildRequires: pkgconfig(talloc)
%{?systemd_requires}
%description
OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks.
%prep
%setup -q
%build
echo "%{version}" >.tarball-version
autoreconf -fi
%configure \
--docdir=%{_docdir}/%{name} \
--with-systemdsystemunitdir=%{_unitdir}
make %{?_smp_mflags}
%install
%make_install
%if 0%{?suse_version}
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%endif
%check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
%files
%license COPYING
%doc AUTHORS README.md
%{_bindir}/osmo-smlc
%dir %{_docdir}/%{name}/examples
%dir %{_docdir}/%{name}/examples/osmo-smlc
%{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg
%dir %{_sysconfdir}/osmocom
%config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg
%{_unitdir}/%{name}.service
%changelog

View File

@@ -8,6 +8,8 @@ Type=simple
Restart=always
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
User=osmocom
Group=osmocom
ExecStart=/usr/bin/osmo-smlc -c /etc/osmocom/osmo-smlc.cfg
RestartSec=2

45
debian/changelog vendored
View File

@@ -1,3 +1,48 @@
osmo-smlc (0.3.0) unstable; urgency=medium
[ Andreas Eversberg ]
* Use uniform log format for default config files
[ Vadim Yanitskiy ]
* build: include README.md into the release tarball
* README.md: cosmetic: fix a typo
[ Max ]
* .deb/.rpm: add osmocom user during package install
[ Oliver Smith ]
* .deb/.rpm: various fixes related to non-root
* contrib: remove rpm spec file
* debian/postinst: add checks, be verbose
-- Oliver Smith <osmith@sysmocom.de> Thu, 25 Jul 2024 09:49:50 +0200
osmo-smlc (0.2.4) unstable; urgency=medium
[ arehbein ]
* Transition to use of 'telnet_init_default'
[ Vadim Yanitskiy ]
* configure.ac: set -std=gnu11
* Makefile.am: remove $(COVERAGE_LDFLAGS) from osmo_smlc_LDADD
* Makefile.am: remove unneeded AM_LDFLAGS with LIBS
* tests: $(BUILT_SOURCES) is not defined, depend on osmo-smlc
* tests: execute osmotest{vty,config}.py against osmo-smlc
* copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
* configure.ac: migrate from python2 to python3
[ Oliver Smith ]
* debian: set compat level to 10
* systemd: depend on networking-online.target
[ Neels Janosch Hofmeyr ]
* ctrl-test: drop bogus 'rm -f $(CTRL_TEST_DB)'
[ Pau Espin Pedrol ]
* Write explicit role & sctp-role fields in ASP configurations
-- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 12 Sep 2023 17:14:41 +0200
osmo-smlc (0.2.3) unstable; urgency=medium
[ Vadim Yanitskiy ]

8
debian/control vendored
View File

@@ -11,10 +11,10 @@ Build-Depends: debhelper (>= 10),
pkg-config,
libsctp-dev,
libtalloc-dev,
libosmocore-dev (>= 1.8.0),
libosmo-sccp-dev (>= 1.7.0),
libosmo-sigtran-dev (>= 1.7.0),
osmo-gsm-manuals-dev (>= 1.4.0)
libosmocore-dev (>= 1.10.0),
libosmo-sccp-dev (>= 1.9.0),
libosmo-sigtran-dev (>= 1.9.0),
osmo-gsm-manuals-dev (>= 1.6.0)
Standards-Version: 3.9.8
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc

38
debian/postinst vendored Executable file
View File

@@ -0,0 +1,38 @@
#!/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
# Fix permissions of previous (root-owned) install (OS#4107)
if dpkg --compare-versions "$2" le "0.3.0"; then
if [ -e /etc/osmocom/osmo-smlc.cfg ]; then
chown -v osmocom:osmocom /etc/osmocom/osmo-smlc.cfg
chmod -v 0660 /etc/osmocom/osmo-smlc.cfg
fi
if [ -d /etc/osmocom ]; then
chown -v root:osmocom /etc/osmocom
chmod -v 2775 /etc/osmocom
fi
mkdir -p /var/lib/osmocom
chown -R -v osmocom:osmocom /var/lib/osmocom
fi
;;
esac
# dh_installdeb(1) will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#

View File

@@ -1,3 +1,11 @@
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
cells
lac-ci 23 42 lat 12.34567 lon 34.56789
cgi 262 42 17 5 lat 12.34765 lon 34.56987