mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 21:13:44 +00:00
Compare commits
2 Commits
1.13.0
...
review/msu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e14ee36650 | ||
|
|
cd35f724f0 |
@@ -37,6 +37,7 @@ BuildRequires: pkgconfig(libosmovty) >= 1.7.0
|
|||||||
BuildRequires: pkgconfig(libosmocoding) >= 1.7.0
|
BuildRequires: pkgconfig(libosmocoding) >= 1.7.0
|
||||||
BuildRequires: pkgconfig(libosmoabis) >= 1.3.0
|
BuildRequires: pkgconfig(libosmoabis) >= 1.3.0
|
||||||
BuildRequires: pkgconfig(libosmotrau) >= 1.3.0
|
BuildRequires: pkgconfig(libosmotrau) >= 1.3.0
|
||||||
|
Requires(pre): shadow
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -101,10 +102,17 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
|||||||
%service_del_postun osmo-mgw.service
|
%service_del_postun osmo-mgw.service
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
getent group osmocom >/dev/null || groupadd --system osmocom
|
||||||
|
getent passwd osmocom >/dev/null || useradd --system --gid osmocom --home-dir /var/lib/osmocom \
|
||||||
|
--shell /sbin/nologin --comment "Open Source Mobile Communications" osmocom
|
||||||
%service_add_pre osmo-mgw.service
|
%service_add_pre osmo-mgw.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%service_add_post osmo-mgw.service
|
%service_add_post osmo-mgw.service
|
||||||
|
chown osmocom:osmocom /etc/osmocom/osmo-mgw.cfg
|
||||||
|
chmod 0660 /etc/osmocom/osmo-mgw.cfg
|
||||||
|
chown root:osmocom /etc/osmocom
|
||||||
|
chmod 2775 /etc/osmocom
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
|||||||
@@ -5,9 +5,16 @@ Description=Osmocom Media Gateway (MGW)
|
|||||||
Type=simple
|
Type=simple
|
||||||
StateDirectory=osmocom
|
StateDirectory=osmocom
|
||||||
WorkingDirectory=%S/osmocom
|
WorkingDirectory=%S/osmocom
|
||||||
|
User=osmocom
|
||||||
|
Group=osmocom
|
||||||
Restart=always
|
Restart=always
|
||||||
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
# CPU scheduling policy:
|
||||||
|
CPUSchedulingPolicy=rr
|
||||||
|
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
||||||
|
CPUSchedulingPriority=1
|
||||||
|
# See sched(7) for further details on real-time policies and priorities
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -18,7 +18,7 @@ Homepage: https://osmocom.org/projects/osmo-mgw
|
|||||||
Package: osmo-mgw
|
Package: osmo-mgw
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}, adduser
|
||||||
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
|
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
|
||||||
|
|
||||||
Package: libosmo-mgcp-client9
|
Package: libosmo-mgcp-client9
|
||||||
|
|||||||
39
debian/postinst
vendored
Executable file
39
debian/postinst
vendored
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# Create 'osmocom' user and group (if it doesn't exist yet) and adjust permissions
|
||||||
|
# of directories which are not automatically adjusted by systemd from previous (root-owned)
|
||||||
|
# install.
|
||||||
|
|
||||||
|
# N. B: the user is intentionally NOT removed during package uninstall:
|
||||||
|
# see https://wiki.debian.org/AccountHandlingInMaintainerScripts for reasoning.
|
||||||
|
chperms() {
|
||||||
|
# chperms <user> <group> <perms> <file>
|
||||||
|
if ! OVERRIDE=`dpkg-statoverride --list $4 2>&1`; then
|
||||||
|
if [ -e $4 ]; then
|
||||||
|
chown $1:$2 $4
|
||||||
|
chmod $3 $4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
if ! getent passwd osmocom > /dev/null; then
|
||||||
|
adduser --quiet \
|
||||||
|
--system \
|
||||||
|
--group \
|
||||||
|
--no-create-home \
|
||||||
|
--disabled-password \
|
||||||
|
--home /var/lib/osmocom \
|
||||||
|
--gecos "Open Source Mobile Communications" \
|
||||||
|
osmocom
|
||||||
|
fi
|
||||||
|
# Set permissions according to https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
|
||||||
|
chperms osmocom osmocom 0660 /etc/osmocom/osmo-mgw.cfg
|
||||||
|
chperms root osmocom 2775 /etc/osmocom
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb(1) will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
#DEBHELPER#
|
||||||
Reference in New Issue
Block a user