.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
This commit is contained in:
Oliver Smith
2024-04-26 14:21:27 +02:00
parent a26abc6aa8
commit e391c4c58d
3 changed files with 25 additions and 32 deletions

2
debian/control vendored
View File

@@ -20,7 +20,7 @@ Homepage: https://projects.osmocom.org/projects/osmo-hlr
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.