osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/36668?usp=email )
Change subject: ttcn3-bsc-test-io_uring: limit jenkins nodes again
......................................................................
ttcn3-bsc-test-io_uring: limit jenkins nodes again
Run this job only on jenkins nodes with a linux kernel of 6.1.x or
higher. The io_uring implementation consumes a lot more memory on e.g.
the 5.10.x kernel of host2, which causes osmo-bsc to run out of memory
in other places:
<0002> system_information.c:1641 bts 0: Error while generating SI4: Cannot allocate memory (-12)
<0002> bts_trx.c:505 Cannot generate SI4 for BTS 0: error <Cannot allocate memory>, most likely a problem with neighbor cell list generation
Related: OS#6405
Change-Id: Iddf2d47a641998860fd1ef615de976104667c5ab
---
M jobs/ttcn3-testsuites.yml
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/36668/1
diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index 8a1f767..ac79f4d 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -223,6 +223,7 @@
# With LIBOSMO_IO_BACKEND=IO_URING (OS#6357)
- ttcn3-bsc-test-io_uring:
timer: H 11 * * *
+ node: ttcn3_with_linux_6.1_or_higher # Runs out of memory on others (OS#6405)
- ttcn3-msc-test-io_uring:
timer: H 11 * * *
- ttcn3-hnbgw-test-io_uring:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36668?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: Iddf2d47a641998860fd1ef615de976104667c5ab
Gerrit-Change-Number: 36668
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/36667?usp=email )
Change subject: ansible/setup-jenkins: install rsync
......................................................................
ansible/setup-jenkins: install rsync
After recent refactoring of the gerrit-binpkgs job, rsync is now
requried on the jenkins nodes. It was installed on the ones where I
tested, but not on all of them.
Fixes: b2e12851 ("OBS: move gerrit-binpkgs logic to separate script")
Change-Id: Ic8ffd61fc2c89574085e9c3abbceb554f3c5da6a
---
M ansible/setup-jenkins-slave.yml
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/67/36667/1
diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml
index 5813b40..03afe65 100644
--- a/ansible/setup-jenkins-slave.yml
+++ b/ansible/setup-jenkins-slave.yml
@@ -12,6 +12,7 @@
- tmux
- screen
- ca-certificates
+ - rsync
cache_valid_time: 3600
update_cache: yes
roles:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36667?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: Ic8ffd61fc2c89574085e9c3abbceb554f3c5da6a
Gerrit-Change-Number: 36667
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/36666?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-upf.spec.in
M debian/control
M debian/postinst
3 files changed, 50 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/66/36666/1
diff --git a/contrib/osmo-upf.spec.in b/contrib/osmo-upf.spec.in
index fb8438c..bc6c5ed 100644
--- a/contrib/osmo-upf.spec.in
+++ b/contrib/osmo-upf.spec.in
@@ -84,6 +84,8 @@
chmod 0660 /etc/osmocom/osmo-upf.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 7681c46..5c26faf 100644
--- a/debian/control
+++ b/debian/control
@@ -25,7 +25,7 @@
Package: osmo-upf
Architecture: any
Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends}, adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}
Description: OsmoUPF: Osmocom User Plane Function
Package: osmo-upf-dbg
diff --git a/debian/postinst b/debian/postinst
index a84d9b2..4310e7e 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-upf.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-upf.cfg
+ chmod 0660 /etc/osmocom/osmo-upf.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-upf/+/36666?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ib129217f6aff713d1d0e7aa831b4b54823e9bade
Gerrit-Change-Number: 36666
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/36663?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: I406ff0d625b02991d580c8382aa4be04dba45a00
---
M contrib/osmo-sgsn.spec.in
M debian/control
M debian/postinst
3 files changed, 51 insertions(+), 33 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/63/36663/1
diff --git a/contrib/osmo-sgsn.spec.in b/contrib/osmo-sgsn.spec.in
index 031cd14..b0fae9e 100644
--- a/contrib/osmo-sgsn.spec.in
+++ b/contrib/osmo-sgsn.spec.in
@@ -99,6 +99,8 @@
chmod 0660 /etc/osmocom/osmo-sgsn.cfg
chown root:osmocom /etc/osmocom
chmod 2775 /etc/osmocom
+mkdir -p /var/lib/osmocom
+chown -R osmocom:osmocom /var/lib/osmocom
%if 0%{?suse_version}
%preun -n osmo-gtphub %service_del_preun osmo-gtphub.service
diff --git a/debian/control b/debian/control
index b28db1f..aa59455 100644
--- a/debian/control
+++ b/debian/control
@@ -30,7 +30,7 @@
Package: osmo-sgsn
Architecture: any
Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends}, adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}
Description: OsmoSGSN: Osmocom's Serving GPRS Support Node for 2G and 3G packet-switched mobile networks
Package: osmo-sgsn-dbg
@@ -42,7 +42,7 @@
Package: osmo-gtphub
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs
Package: osmo-gtphub-dbg
diff --git a/debian/postinst b/debian/postinst
index 84d7e5f..4ac99e4 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-sgsn.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-sgsn.cfg
+ chmod 0660 /etc/osmocom/osmo-sgsn.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-sgsn/+/36663?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I406ff0d625b02991d580c8382aa4be04dba45a00
Gerrit-Change-Number: 36663
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/64/36664/1
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-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-smlc/+/36665?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-smlc.spec.in
M debian/control
M debian/postinst
3 files changed, 50 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-smlc refs/changes/65/36665/1
diff --git a/contrib/osmo-smlc.spec.in b/contrib/osmo-smlc.spec.in
index 6a6dc4b..6b19a17 100644
--- a/contrib/osmo-smlc.spec.in
+++ b/contrib/osmo-smlc.spec.in
@@ -84,6 +84,8 @@
chmod 0660 /etc/osmocom/osmo-smlc.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 bdfe6e9..242a797 100644
--- a/debian/control
+++ b/debian/control
@@ -23,7 +23,7 @@
Package: osmo-smlc
Architecture: any
Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends}, libdbd-sqlite3, adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}, libdbd-sqlite3
Description: OsmoSMLC: Osmocom's Location Services Center
FIXME
.
diff --git a/debian/postinst b/debian/postinst
index ae5fcb4..faecd26 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-smlc.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-smlc.cfg
+ chmod 0660 /etc/osmocom/osmo-smlc.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-smlc/+/36665?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: Ib129217f6aff713d1d0e7aa831b4b54823e9bade
Gerrit-Change-Number: 36665
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/36659?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: Remove support for the "dpkg-statoverride --list" logic. This
seems to be a rather obscure feature to override permissions for
certain files or directories. Let's rather remove this complexity to
make the postinst script more maintainable and more similar to the
rpm spec file. If users need this, they can achieve something similar
by using their own Osmocom config file in a different path with
different permissions.
* deb: Consistently use tabs throughout postinst, instead of mixing
tabs and spaces.
Related: OS#4107
Change-Id: Ib20406dd253f5e8720552e92e9002e45591218fa
---
M contrib/osmo-hlr.spec.in
M debian/control
M debian/postinst
3 files changed, 51 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/59/36659/1
diff --git a/contrib/osmo-hlr.spec.in b/contrib/osmo-hlr.spec.in
index a1f92ef..ebf6ee6 100644
--- a/contrib/osmo-hlr.spec.in
+++ b/contrib/osmo-hlr.spec.in
@@ -155,6 +155,8 @@
chmod 0660 /etc/osmocom/osmo-hlr.cfg
chown root:osmocom /etc/osmocom
chmod 2775 /etc/osmocom
+mkdir -p /var/lib/osmocom
+chown -R osmocom:osmocom /var/lib/osmocom
%post -n libosmo-gsup-client0 -p /sbin/ldconfig
%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
diff --git a/debian/control b/debian/control
index 56457c9..ec234a3 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@
Package: osmo-hlr
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Osmocom Home Location Register
OsmoHLR is a Osmocom implementation of HLR (Home Location Registrar) which
works over GSUP protocol. The subscribers are store in sqlite DB.
diff --git a/debian/postinst b/debian/postinst
index 96734df..5dedec4 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -4,39 +4,30 @@
# to do.
/usr/share/osmocom/osmo-hlr-post-upgrade.sh
-# 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-hlr.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-hlr.cfg
+ chmod 0660 /etc/osmocom/osmo-hlr.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-hlr/+/36659?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib20406dd253f5e8720552e92e9002e45591218fa
Gerrit-Change-Number: 36659
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36660?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: I6dd0205fb65d4ad5a79821c111865e67fb293a73
---
M contrib/osmo-hnbgw.spec.in
M debian/control
M debian/postinst
3 files changed, 50 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/60/36660/1
diff --git a/contrib/osmo-hnbgw.spec.in b/contrib/osmo-hnbgw.spec.in
index 2b98da2..414a4d5 100644
--- a/contrib/osmo-hnbgw.spec.in
+++ b/contrib/osmo-hnbgw.spec.in
@@ -94,6 +94,8 @@
chmod 0660 /etc/osmocom/osmo-hnbgw.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 48d95cf..77737b5 100644
--- a/debian/control
+++ b/debian/control
@@ -31,7 +31,7 @@
Package: osmo-hnbgw
Architecture: any
Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends}, adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: osmo-mgw
Description: OsmoHNBGW: Osmocom Home Node B Gateway
diff --git a/debian/postinst b/debian/postinst
index bdec955..d5bf871 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-hnbgw.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-hnbgw.cfg
+ chmod 0660 /etc/osmocom/osmo-hnbgw.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-hnbgw/+/36660?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: I6dd0205fb65d4ad5a79821c111865e67fb293a73
Gerrit-Change-Number: 36660
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnodeb/+/36661?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: I6dd0205fb65d4ad5a79821c111865e67fb293a73
---
M contrib/osmo-hnodeb.spec.in
M debian/control
M debian/postinst
3 files changed, 50 insertions(+), 32 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnodeb refs/changes/61/36661/1
diff --git a/contrib/osmo-hnodeb.spec.in b/contrib/osmo-hnodeb.spec.in
index 0f9795b..e28340e 100644
--- a/contrib/osmo-hnodeb.spec.in
+++ b/contrib/osmo-hnodeb.spec.in
@@ -92,6 +92,8 @@
chmod 0660 /etc/osmocom/osmo-hnodeb.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 365e07e..86ddb27 100644
--- a/debian/control
+++ b/debian/control
@@ -30,7 +30,7 @@
Package: osmo-hnodeb
Architecture: any
Multi-Arch: foreign
-Depends: ${misc:Depends}, ${shlibs:Depends}, adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: osmo-mgw
Description: OsmoHNodeB: Osmocom's Home NodeB for 3G mobile networks
diff --git a/debian/postinst b/debian/postinst
index bdf0e8b..c65375e 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-hnodeb.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-hnodeb.cfg
+ chmod 0660 /etc/osmocom/osmo-hnodeb.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-hnodeb/+/36661?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: I6dd0205fb65d4ad5a79821c111865e67fb293a73
Gerrit-Change-Number: 36661
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange