Package: systemd-zram-generator
Version: 1.1.2-2+b2
Severity: normal
Tags: patch

Dear Maintainer,

Can you please explain why you are placing the configuration file into 
/etc/systemd/zram-generator.conf?

`man zram-generator.conf` says in the section "CONFIGURATION DIRECTORIES AND 
PRECEDENCE" that:

"Files in /etc/ are reserved for the local administrator, who may use this 
logic to override the configuration files installed by vendor packages"

The behavior described in the manpage is typical for systemd packages. The rest 
of that manpage section provides further information.

Currently the systemd-zram-generator package places the vendor configuration 
file (vendor means debian in this case) into /etc/systemd/zram-generator.conf 
instead of placing it in /usr/lib/systemd/zram-generator.conf where other 
vendor configuration files go.

The correct way this should work is that the system administrator (me) creates 
/etc/systemd/zram-generator.conf to override the behavior defined in the vendor 
configuration file /usr/lib/systemd/zram-generator.conf.

This also means that `debsums --changed --config` will no longer complain about 
/etc/systemd/zram-generator.conf being modified when the system administrator 
has to change that file.

Just in case, I attach a patch to place the file in the expected location 
described by the manpage and other systemd documentation.







-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd-zram-generator depends on:
ii  libc6      2.36-9+deb12u1
ii  libgcc-s1  12.2.0-14
ii  systemd    252.12-1~deb12u1

systemd-zram-generator recommends no packages.

systemd-zram-generator suggests no packages.

-- Configuration Files:
/etc/systemd/zram-generator.conf changed:
[zram0]
compression-algorithm = zstd


-- no debconf information
---
 src/zram-generator/debian/systemd-zram-generator.install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/zram-generator/debian/systemd-zram-generator.install 
b/src/zram-generator/debian/systemd-zram-generator.install
index 10e26f7..ec61199 100644
--- a/src/zram-generator/debian/systemd-zram-generator.install
+++ b/src/zram-generator/debian/systemd-zram-generator.install
@@ -1,4 +1,4 @@
 debian/20-zram-generator.conf /etc/modules-load.d
-debian/zram-generator.conf /etc/systemd
+debian/zram-generator.conf /usr/lib/systemd
 units/systemd-zram-setup@.service /lib/systemd/system
 zram-generator.conf.example /usr/share/doc/systemd-zram-generator
-- 
2.39.2

Reply via email to