lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
April 2024
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
1128 discussions
Start a n
N
ew thread
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Use Titan TEXT encoder to implement AMI record enc/dec
by osmith
Attention is currently required from: laforge, pespin. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36610?usp=email
) Change subject: asterisk: Use Titan TEXT encoder to implement AMI record enc/dec ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36610?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If179e45307a7e42b81b28db6ee4b7bf5eeb8b5f1 Gerrit-Change-Number: 36610 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 08:44:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year, 2 months
1
0
0
0
[S] Change in docker-playground[master]: ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg
by fixeria
fixeria has submitted this change. (
https://gerrit.osmocom.org/c/docker-playground/+/36635?usp=email
) Change subject: ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg ...................................................................... ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg This commit fixes the following error: cp osmo-stp.cfg /home/osmocom-build/jenkins/workspace/ttcn3-sgsn-test-sns/logs/stp/ cp: cannot stat 'osmo-stp.cfg': No such file or directory Change-Id: Ie0f887dc68e89d2fa1f9a2ee8dfd7f8ce71fc329 Fixes: e4fdd72 "ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg" --- A ttcn3-sgsn-test-sns/osmo-stp.cfg 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/ttcn3-sgsn-test-sns/osmo-stp.cfg b/ttcn3-sgsn-test-sns/osmo-stp.cfg new file mode 120000 index 0000000..6760339 --- /dev/null +++ b/ttcn3-sgsn-test-sns/osmo-stp.cfg @@ -0,0 +1 @@ +../ttcn3-sgsn-test/osmo-stp.cfg \ No newline at end of file -- To view, visit
https://gerrit.osmocom.org/c/docker-playground/+/36635?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie0f887dc68e89d2fa1f9a2ee8dfd7f8ce71fc329 Gerrit-Change-Number: 36635 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 year, 2 months
1
0
0
0
[M] Change in libosmo-sccp[master]: .deb/.rpm: add osmocom user during package install
by osmith
osmith has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... .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(a)sysmocom.de> Change-Id: I63e147961f93d62904ae64f5f3794839d047e4a6 --- M contrib/libosmo-sccp.spec.in M contrib/systemd/osmo-stp.service M debian/control A debian/osmo-stp.postinst 4 files changed, 74 insertions(+), 3 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/libosmo-sccp.spec.in b/contrib/libosmo-sccp.spec.in index 5a33a67..7e74e18 100644 --- a/contrib/libosmo-sccp.spec.in +++ b/contrib/libosmo-sccp.spec.in @@ -141,9 +141,24 @@ %if 0%{?suse_version} %preun -n osmo-stp %service_del_preun osmo-stp.service %postun -n osmo-stp %service_del_postun osmo-stp.service -%pre -n osmo-stp %service_add_pre osmo-stp.service -%post -n osmo-stp %service_add_post osmo-stp.service %endif +%pre -n osmo-stp +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 +%if 0%{?suse_version} +%service_add_pre osmo-stp.service +%endif + +%post -n osmo-stp +%if 0%{?suse_version} +%service_add_post osmo-stp.service +%endif +chown osmocom:osmocom /etc/osmocom/osmo-stp.cfg +chmod 0660 /etc/osmocom/osmo-stp.cfg +chown root:osmocom /etc/osmocom +chmod 2775 /etc/osmocom + %files -n libosmo-mtp-devel %dir %{_includedir}/%{name} diff --git a/contrib/systemd/osmo-stp.service b/contrib/systemd/osmo-stp.service index 027ea91..decc3cb 100644 --- a/contrib/systemd/osmo-stp.service +++ b/contrib/systemd/osmo-stp.service @@ -9,6 +9,8 @@ Restart=always StateDirectory=osmocom WorkingDirectory=%S/osmocom +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-stp -c /etc/osmocom/osmo-stp.cfg RestartSec=2 diff --git a/debian/control b/debian/control index 444604c..712774c 100644 --- a/debian/control +++ b/debian/control @@ -100,7 +100,8 @@ Section: net Depends: libosmo-sigtran9, ${shlibs:Depends}, - ${misc:Depends} + ${misc:Depends}, + adduser Description: Osmocom SIGTRAN STP (Signaling Transfer Point) This is the Osmocom (Open Source Mobile Communications) implementation of a Signaling Transfer Point (STP) for SS7/SIGTRAN telecommunication diff --git a/debian/osmo-stp.postinst b/debian/osmo-stp.postinst new file mode 100755 index 0000000..94fb408 --- /dev/null +++ b/debian/osmo-stp.postinst @@ -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-stp.cfg + chperms root osmocom 2775 /etc/osmocom + + ;; +esac + +# dh_installdeb(1) will replace this with shell code automatically +# generated by other debhelper scripts. +#DEBHELPER# -- To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I63e147961f93d62904ae64f5f3794839d047e4a6 Gerrit-Change-Number: 29722 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 year, 2 months
1
0
0
0
[M] Change in libosmo-sccp[master]: .deb/.rpm: add osmocom user during package install
by osmith
Attention is currently required from: msuraev. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I63e147961f93d62904ae64f5f3794839d047e4a6 Gerrit-Change-Number: 29722 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 08:36:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year, 2 months
1
0
0
0
[M] Change in osmo-bsc[master]: .deb/.rpm: add osmocom user during package install
by osmith
osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/29710?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... .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(a)sysmocom.de> Change-Id: Ic64bcd8a8124fcc8c6d7ffe31d32f51b288afdcb --- M contrib/osmo-bsc.spec.in M contrib/systemd/osmo-bsc.service M debian/control A debian/postinst 4 files changed, 71 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/contrib/osmo-bsc.spec.in b/contrib/osmo-bsc.spec.in index 0a9c9f3..7b7777d 100644 --- a/contrib/osmo-bsc.spec.in +++ b/contrib/osmo-bsc.spec.in @@ -97,19 +97,33 @@ %install %make_install -%if 0%{?suse_version} %preun +%if 0%{?suse_version} %service_del_preun %{name}.service +%endif %postun +%if 0%{?suse_version} %service_del_postun %{name}.service +%endif %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 +%if 0%{?suse_version} %service_add_pre %{name}.service +%endif %post +%if 0%{?suse_version} %service_add_post %{name}.service %endif +chown osmocom:osmocom /etc/osmocom/osmo-bsc.cfg +chmod 0660 /etc/osmocom/osmo-bsc.cfg +chown root:osmocom /etc/osmocom +chmod 2775 /etc/osmocom + %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) diff --git a/contrib/systemd/osmo-bsc.service b/contrib/systemd/osmo-bsc.service index c8dc877..85de544 100644 --- a/contrib/systemd/osmo-bsc.service +++ b/contrib/systemd/osmo-bsc.service @@ -10,6 +10,8 @@ LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-bsc -c /etc/osmocom/osmo-bsc.cfg -s RestartSec=2 diff --git a/debian/control b/debian/control index d2abb43..5f1016c 100644 --- a/debian/control +++ b/debian/control @@ -26,7 +26,7 @@ Package: osmo-bsc Architecture: any Multi-Arch: foreign -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, adduser Recommends: osmo-mgw Description: OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..43d0f5e --- /dev/null +++ b/debian/postinst @@ -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-bsc.cfg + chperms root osmocom 2775 /etc/osmocom + + ;; +esac + +# dh_installdeb(1) will replace this with shell code automatically +# generated by other debhelper scripts. +#DEBHELPER# -- To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/29710?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic64bcd8a8124fcc8c6d7ffe31d32f51b288afdcb Gerrit-Change-Number: 29710 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 year, 2 months
1
0
0
0
[M] Change in osmo-bsc[master]: .deb/.rpm: add osmocom user during package install
by osmith
Attention is currently required from: msuraev. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/29710?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/29710?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic64bcd8a8124fcc8c6d7ffe31d32f51b288afdcb Gerrit-Change-Number: 29710 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 08:36:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year, 2 months
1
0
0
0
[M] Change in osmo-hnbgw[master]: .deb/.rpm: add osmocom user during package install
by osmith
osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29712?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... .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(a)sysmocom.de> Change-Id: Ife9433291ae03392ae114ebda418bce8cc93fe3b --- M contrib/osmo-hnbgw.spec.in M contrib/systemd/osmo-hnbgw.service M debian/control A debian/postinst 4 files changed, 70 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/contrib/osmo-hnbgw.spec.in b/contrib/osmo-hnbgw.spec.in index 02247a3..2b98da2 100644 --- a/contrib/osmo-hnbgw.spec.in +++ b/contrib/osmo-hnbgw.spec.in @@ -68,19 +68,32 @@ %install %make_install -%if 0%{?suse_version} %preun +%if 0%{?suse_version} %service_del_preun %{name}.service +%endif %postun +%if 0%{?suse_version} %service_del_postun %{name}.service +%endif %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 +%if 0%{?suse_version} %service_add_pre %{name}.service +%endif %post +%if 0%{?suse_version} %service_add_post %{name}.service %endif +chown osmocom:osmocom /etc/osmocom/osmo-hnbgw.cfg +chmod 0660 /etc/osmocom/osmo-hnbgw.cfg +chown root:osmocom /etc/osmocom +chmod 2775 /etc/osmocom %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) diff --git a/contrib/systemd/osmo-hnbgw.service b/contrib/systemd/osmo-hnbgw.service index 2307bcc..f54cc78 100644 --- a/contrib/systemd/osmo-hnbgw.service +++ b/contrib/systemd/osmo-hnbgw.service @@ -9,6 +9,8 @@ LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-hnbgw -c /etc/osmocom/osmo-hnbgw.cfg RestartSec=2 diff --git a/debian/control b/debian/control index 77737b5..48d95cf 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Package: osmo-hnbgw Architecture: any Multi-Arch: foreign -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, adduser Recommends: osmo-mgw Description: OsmoHNBGW: Osmocom Home Node B Gateway diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..bdec955 --- /dev/null +++ b/debian/postinst @@ -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-hnbgw.cfg + chperms root osmocom 2775 /etc/osmocom + + ;; +esac + +# dh_installdeb(1) will replace this with shell code automatically +# generated by other debhelper scripts. +#DEBHELPER# -- To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29712?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Ife9433291ae03392ae114ebda418bce8cc93fe3b Gerrit-Change-Number: 29712 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 year, 2 months
1
0
0
0
[M] Change in osmo-hnbgw[master]: .deb/.rpm: add osmocom user during package install
by osmith
Attention is currently required from: msuraev. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29712?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29712?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Ife9433291ae03392ae114ebda418bce8cc93fe3b Gerrit-Change-Number: 29712 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 08:36:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year, 2 months
1
0
0
0
[M] Change in osmo-hnodeb[master]: .deb/.rpm: add osmocom user during package install
by osmith
osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnodeb/+/29713?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... .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(a)sysmocom.de> Change-Id: Ic24b43bde8d4af0641365f276106eb3cd016be2c --- M contrib/osmo-hnodeb.spec.in M contrib/systemd/osmo-hnodeb.service M debian/control A debian/postinst 4 files changed, 70 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/contrib/osmo-hnodeb.spec.in b/contrib/osmo-hnodeb.spec.in index 1efc36b..0f9795b 100644 --- a/contrib/osmo-hnodeb.spec.in +++ b/contrib/osmo-hnodeb.spec.in @@ -66,19 +66,32 @@ %install %make_install -%if 0%{?suse_version} %preun +%if 0%{?suse_version} %service_del_preun %{name}.service +%endif %postun +%if 0%{?suse_version} %service_del_postun %{name}.service +%endif %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 +%if 0%{?suse_version} %service_add_pre %{name}.service +%endif %post +%if 0%{?suse_version} %service_add_post %{name}.service %endif +chown osmocom:osmocom /etc/osmocom/osmo-hnodeb.cfg +chmod 0660 /etc/osmocom/osmo-hnodeb.cfg +chown root:osmocom /etc/osmocom +chmod 2775 /etc/osmocom %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) diff --git a/contrib/systemd/osmo-hnodeb.service b/contrib/systemd/osmo-hnodeb.service index 12181a2..9a63451 100644 --- a/contrib/systemd/osmo-hnodeb.service +++ b/contrib/systemd/osmo-hnodeb.service @@ -8,6 +8,8 @@ StateDirectory=osmocom WorkingDirectory=%S/osmocom Restart=always +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-hnodeb -c /etc/osmocom/osmo-hnodeb.cfg RestartSec=2 diff --git a/debian/control b/debian/control index 86ddb27..365e07e 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,7 @@ Package: osmo-hnodeb Architecture: any Multi-Arch: foreign -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, adduser Recommends: osmo-mgw Description: OsmoHNodeB: Osmocom's Home NodeB for 3G mobile networks diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..bdf0e8b --- /dev/null +++ b/debian/postinst @@ -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-hnodeb.cfg + chperms root osmocom 2775 /etc/osmocom + + ;; +esac + +# dh_installdeb(1) will replace this with shell code automatically +# generated by other debhelper scripts. +#DEBHELPER# -- To view, visit
https://gerrit.osmocom.org/c/osmo-hnodeb/+/29713?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnodeb Gerrit-Branch: master Gerrit-Change-Id: Ic24b43bde8d4af0641365f276106eb3cd016be2c Gerrit-Change-Number: 29713 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 year, 2 months
1
0
0
0
[M] Change in osmo-hnodeb[master]: .deb/.rpm: add osmocom user during package install
by osmith
Attention is currently required from: msuraev. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnodeb/+/29713?usp=email
) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmo-hnodeb/+/29713?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnodeb Gerrit-Branch: master Gerrit-Change-Id: Ic24b43bde8d4af0641365f276106eb3cd016be2c Gerrit-Change-Number: 29713 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 08:36:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year, 2 months
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
113
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Results per page:
10
25
50
100
200