Bug#1051471: btrfsd: cron job for calling btrfsd

2023-09-10 Thread Matthew Vernon

Hi,

Just a note on the libsystemd dependency.

On 10/09/2023 10:21, Martin Steigerwald wrote:


Sure, that should actually be extremely low-maintenance, there isn't
any hard dependency the daemon has on systemd - with one exception: It
uses libsystemd to write to the journal if that's available, and I
would like to keep that feature. It will however already fall back to
syslog in case sd-journal isn't available, and libsystemd is inert on
systems without systemd.


On Debian systems, libelogind0 Provides: libsystemd0, so a libsystemd0 
dependency (which, as you say, util-linux has) isn't a problem.


Regards,

Matthew



Bug#1051471: btrfsd: cron job for calling btrfsd

2023-09-10 Thread Martin Steigerwald
Hi Matthias.

Thanks for your kind and detailed feedback. As next releases are quite a 
bit away, there is no need to rush anything here. CC'ing the Debian init 
diversity mailing list as to gather additional feedback on whether my 
ideas about how to proceed make sense:

Matthias Klumpp - 10.09.23, 00:15:07 CEST:
> Am Fr., 8. Sept. 2023 um 15:24 Uhr schrieb Martin :
> > [...]
> > would you consider to include a cron job into the package in order to
> > make btrfsd installable on systems without Systemd? Of course a change
> > regarding package dedepencies would also be required.
> 
> Sure, that should actually be extremely low-maintenance, there isn't
> any hard dependency the daemon has on systemd - with one exception: It
> uses libsystemd to write to the journal if that's available, and I
> would like to keep that feature. It will however already fall back to
> syslog in case sd-journal isn't available, and libsystemd is inert on
> systems without systemd.

As far as I see on my Devuan system there is libelogin-compat which 
replaces and provides libsystemd0. So I think a dependency on libsystemd0 
would be resolved by having libelogin-compat installed.

However this one is not available on Debian. But while here on Devuan 
installing libsystemd0 directly would remove most of my Plasma desktop, I 
bet on Debian libsystemd0 can be installed without systemd package being 
installed as well. AFAIK util-linux on Debian depends on libsystemd0 for 
example while on Devuan it does not. Any feedback from people using other 
than Systemd init on Debian? Do you have libsystemd0 installed?

I am willing to test whether a btrfsd package with cron job and Systemd 
timer would be installable on Devuan, Debian with Systemd and Debian 
without Systemd. I can do so with my laptop and two VMs.

However for systems without Systemd I bet the hard dependency on "systemd" 
package itself would have to be replaced by something else. I wonder: Is a 
hard dependency on "systemd" package required in case the package also 
provides a cron job in addition to the Systemd timer?

> > I have seen btrfsd in mailing list "debian-devel-changes" but could
> > not find it on my Devuan system.
> > 
> > If yes, I would aim to provide a merge request.
> 
> This could go upstream, I think.
> I do not know if there is a no-overhead way to ship both the cron job
> and systemd timer in the same package with recompilation. But if
> that's not possible, I think at the very least we could provide a
> configuration option upstream to select one or the other, so
> derivatives that don't use systemd could switch to the cron version by
> simply recompiling the package (by checking dpkg vendor strings).

If for example depending on libsystemd0 would be a problem in Devuan it 
would still be preferable to have as much as possible in upstream package, 
so that the diff to be applied to make btrfsd package work on Devuan is as 
small as possible. Of course I'd aim to make btrfsd package usable on 
Debian without Systemd as well, so that there is a benefit for Debian users 
as well.

> What do you think? Unfortunately I know little how to make both
> systems interoperate and avoid having the timer and cron job calling
> the service, so patches would be very welcome.

I'd aim at providing a merge request proposal after gathering enough 
feedback on how to do it properly. I have seen cron jobs checking for 
presence of Systemd and only running in case Systemd is not installed, 
cause otherwise the Systemd timer would do the job. I don't know in which 
package, but I am confident I can find it again. AFAIR the check was pretty 
straight forward.

To people from debian-init-diversity mailing list: Do you have any 
examples of this working? If so, please kindly advice on where to find 
those. Would be nice to be able to at least partly copy an approach that 
has proven itself to work okay.

Best,
-- 
Martin



Bug#1051471: btrfsd: cron job for calling btrfsd

2023-09-09 Thread Matthias Klumpp
Hi Martin!

Am Fr., 8. Sept. 2023 um 15:24 Uhr schrieb Martin :
> [...]
> would you consider to include a cron job into the package in order to
> make btrfsd installable on systems without Systemd? Of course a change
> regarding package dedepencies would also be required.

Sure, that should actually be extremely low-maintenance, there isn't
any hard dependency the daemon has on systemd - with one exception: It
uses libsystemd to write to the journal if that's available, and I
would like to keep that feature. It will however already fall back to
syslog in case sd-journal isn't available, and libsystemd is inert on
systems without systemd.

> I have seen btrfsd in mailing list "debian-devel-changes" but could not
> find it on my Devuan system.
>
> If yes, I would aim to provide a merge request.

This could go upstream, I think.
I do not know if there is a no-overhead way to ship both the cron job
and systemd timer in the same package with recompilation. But if
that's not possible, I think at the very least we could provide a
configuration option upstream to select one or the other, so
derivatives that don't use systemd could switch to the cron version by
simply recompiling the package (by checking dpkg vendor strings).

What do you think? Unfortunately I know little how to make both
systems interoperate and avoid having the timer and cron job calling
the service, so patches would be very welcome.

Cheers,
Matthias

-- 
I welcome VSRE emails. See http://vsre.info/



Bug#1051471: btrfsd: cron job for calling btrfsd

2023-09-08 Thread Martin
Package: btrfsd
Version: 0.2.0-1
Severity: wishlist
X-Debbugs-Cc: mar...@lichtvoll.de

Dear Matthias,

would you consider to include a cron job into the package in order to
make btrfsd installable on systems without Systemd? Of course a change
regarding package dedepencies would also be required.

I have seen btrfsd in mailing list "debian-devel-changes" but could not
find it on my Devuan system.

If yes, I would aim to provide a merge request.

If not, I would aim to work with Devuan project to create a forked version
of the package. Feel free to close the wish list report in that case.

I ask here, cause I do not like to invest time providing a merge request
on Salsa in case you are not interested to carry a cron job within the
Debian package.

Best,
Martin

-- System Information:
Devuan Release: daedalus/ceres
Debian Release: trixie/sid
  APT prefers experimental
  APT policy: (200, 'experimental')

No, apt does certainly not prefer Debian experimental here. I would
certainly have noticed it in case it did so.

merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.2-t14 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled