Re: zramen-dinit flaw (possible also zramen-s6, not sure)
Reply #10 –
I initially wanted to ignore this since zramen is not an Arch package (and I didn't add it initially), however since the alternative is systemd-zram-generator, I took a second look at this and rewritten the dinit service itself (I don't know why a script file is needed when we can invoke the binary script itself).
type = scripted
command = /usr/bin/zramen make
stop-command = /usr/bin/zramen toss
env-file = /etc/dinit.d/config/zramen.conf
logfile = /var/log/dinit/zramen.log
depends-on = early-devices.target
after = early-fs-local.target # can be removed if logfile is removed/log-type is buffer
ZRAM_COMP_ALGORITHM=zstd # for testing purposes
#ZRAM_PRIORITY=32767
#ZRAM_SIZE=25
#ZRAM_MAX_SIZE=4096
#ZRAM_STREAMS=1
It works for me.
Though from this PR I found the zramen author's response odd. Why doesn't zramen just read the config file directly from the bash script (just put it in /etc and name it /etc/zramen.conf)? Why isn’t it (I quote) "designed to be sourced outside of a runit service context"?
Also, zramen can be a POSIX sh script instead of bash script, but that's outside this topic and can be discussed another day.
As for packaging, I'll need to contact whoever last packaged zramen (and its scripts).