Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email )
Change subject: jobs: gerrit: build osmo-pcap + dep for centos7
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ci/+/36718/comment/876e8c71_5f6718d0
PS1, Line 9: We are about to remove the rpm spec files for almost all Osmocom git
> AH I read the ML now, so indeed we are dropping all the . […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4d4a67c053ed29811c504158d1ef49430880ad4f
Gerrit-Change-Number: 36718
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 08 May 2024 11:49:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/36664?usp=email )
Change subject: .deb/.rpm: various fixes related to non-root
......................................................................
.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
---
M contrib/osmo-sip-connector.spec.in
M debian/control
M debian/postinst
3 files changed, 50 insertions(+), 32 deletions(-)
Approvals:
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/contrib/osmo-sip-connector.spec.in b/contrib/osmo-sip-connector.spec.in
index 6b65800..35f977a 100644
--- a/contrib/osmo-sip-connector.spec.in
+++ b/contrib/osmo-sip-connector.spec.in
@@ -76,6 +76,8 @@
chmod 0660 /etc/osmocom/osmo-sip-connector.cfg
chown root:osmocom /etc/osmocom
chmod 2775 /etc/osmocom
+mkdir -p /var/lib/osmocom
+chown -R osmocom:osmocom /var/lib/osmocom
%check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
diff --git a/debian/control b/debian/control
index b1a7580..4c7e4b0 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@
Package: osmo-sip-connector
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: MNCC to SIP bridge for osmo-nitb
Use the osmo-nitb MNCC interface and bridge it to SIP.
diff --git a/debian/postinst b/debian/postinst
index 83be547..d96fa8c 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,37 +1,28 @@
#!/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-sip-connector.cfg
- chperms root osmocom 2775 /etc/osmocom
+ 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)
+ chown osmocom:osmocom /etc/osmocom/osmo-sip-connector.cfg
+ chmod 0660 /etc/osmocom/osmo-sip-connector.cfg
+ chown root:osmocom /etc/osmocom
+ chmod 2775 /etc/osmocom
+ mkdir -p /var/lib/osmocom
+ chown -R osmocom:osmocom /var/lib/osmocom
+ ;;
esac
# dh_installdeb(1) will replace this with shell code automatically
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/36664?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ib129217f6aff713d1d0e7aa831b4b54823e9bade
Gerrit-Change-Number: 36664
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(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
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email )
Change subject: jobs: gerrit: build osmo-pcap + dep for centos7
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ci/+/36718/comment/80e20023_b56f7186
PS1, Line 9: We are about to remove the rpm spec files for almost all Osmocom git
> This is a bit confusing, since afaiu only remove the Centos7 related bits, not the possibility to bu […]
AH I read the ML now, so indeed we are dropping all the .spec files from repos at some point, except for osmo-pcap and libosmocore.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4d4a67c053ed29811c504158d1ef49430880ad4f
Gerrit-Change-Number: 36718
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 08 May 2024 11:12:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email )
Change subject: jobs: gerrit: build osmo-pcap + dep for centos7
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ci/+/36718/comment/df58eb59_21280639
PS1, Line 9: We are about to remove the rpm spec files for almost all Osmocom git
This is a bit confusing, since afaiu only remove the Centos7 related bits, not the possibility to build rpms from all distros, correct?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36718?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4d4a67c053ed29811c504158d1ef49430880ad4f
Gerrit-Change-Number: 36718
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 08 May 2024 11:09:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment