#887461 btrfsmaintenance: Make configuration easier for non-systemd users

#887461#5
Date:
2018-01-16 20:25:19 UTC
From:
To:
Package: btrfsmaintenance
Version: 0.3.1-17-gf7d61e3-1~exp1
Severity: important

Hi!
The package, as currently provided, is non-functional without manual actions
on non-systemd systems.

During installation, there's an error:
/usr/bin/deb-systemd-helper: error: unable to read btrfsmaintenance-refresh.path

then the cron jobs are not installed by default.  According to README.Debian:

# # or run the script directly
# /usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh
#
# Running the refresh-cron script is required on Debian or Debian-like
# systems that do not use systemd.

so fixing this should be a matter of just running this in appropriate places
(such as postinst; or, to be safe, during boot as well).

(I haven't actually tested the scripts yet -- having manually written ones
everywhere.)


Also, I don't see what's the point in using .service/.timer at all, as they
use no systemd-specific features, so this complicates maintenance for no gain.


Meow!

#887461#10
Date:
2018-01-21 21:32:04 UTC
From:
To:
Hi Adam,

This is intended, and the packaging on the master branch of the Debian
package also requires manual activation for systemd systems.

Oh my, that was sloppy work on my part.  Thank you for keeping me
accountable!  I'll fix this for the next upload.

I agree that it should be run during boot (once manually enabled),
because this is what the upstream timer that calls
btrfsmaintenance-refresh-cron.sh does.  At some point it might be cool
to non-default priority dpkg-configure knob to make this easier to enable.

Do you have anything that would improve upstream btrfsmaintenance?  I
believe now might be a good time to contribute, because a lot of work
is being done in preparation for the next release.

Honestly I'm neutral on the sysvinit vs systemd vs alternatives
debate, and yes I'm also uncomfortable with some of systemd's
"replacements" for existing functionality; however, I think this is a
gain: https://github.com/kdave/btrfsmaintenance/issues/42 (power-state
aware init of jobs that work in a cross-distribution way, plus
hopefully support for deferred scheduling).

Of course, this is also possible with anacron, a power-state check in
the scripts, plus something in /var to note the last time maintenance
was done. ;-)

Cheers,
Nicholas

#887461#15
Date:
2018-01-21 21:32:04 UTC
From:
To:
Hi Adam,

This is intended, and the packaging on the master branch of the Debian
package also requires manual activation for systemd systems.

Oh my, that was sloppy work on my part.  Thank you for keeping me
accountable!  I'll fix this for the next upload.

I agree that it should be run during boot (once manually enabled),
because this is what the upstream timer that calls
btrfsmaintenance-refresh-cron.sh does.  At some point it might be cool
to non-default priority dpkg-configure knob to make this easier to enable.

Do you have anything that would improve upstream btrfsmaintenance?  I
believe now might be a good time to contribute, because a lot of work
is being done in preparation for the next release.

Honestly I'm neutral on the sysvinit vs systemd vs alternatives
debate, and yes I'm also uncomfortable with some of systemd's
"replacements" for existing functionality; however, I think this is a
gain: https://github.com/kdave/btrfsmaintenance/issues/42 (power-state
aware init of jobs that work in a cross-distribution way, plus
hopefully support for deferred scheduling).

Of course, this is also possible with anacron, a power-state check in
the scripts, plus something in /var to note the last time maintenance
was done. ;-)

Cheers,
Nicholas

#887461#20
Date:
2018-02-04 22:11:37 UTC
From:
To:
Hi Adam,

I've uploaded a new upstream release of btrfsmaintenance with many
changes.  Please close this bug if it addresses the issues raised in
this bug report, or alternatively retitle this bug to something
concrete and true ;-)

tldl; "Depends: systemd | cron", and upstream maintains that
btrfsmaintenance must not use both at the same time.

Because Debian defaults to systemd, I believe that is a reasonable
default.  Also, if btrfsmaintenance ever requires patching to function
without systemd I will search for someone to maintain a
btrfsmaintenance-nosystemd variant...and of course, you'll be the
first person I'll ask!

Kind regards,
Nicholas

#887461#25
Date:
2018-02-04 22:11:37 UTC
From:
To:
Hi Adam,

I've uploaded a new upstream release of btrfsmaintenance with many
changes.  Please close this bug if it addresses the issues raised in
this bug report, or alternatively retitle this bug to something
concrete and true ;-)

tldl; "Depends: systemd | cron", and upstream maintains that
btrfsmaintenance must not use both at the same time.

Because Debian defaults to systemd, I believe that is a reasonable
default.  Also, if btrfsmaintenance ever requires patching to function
without systemd I will search for someone to maintain a
btrfsmaintenance-nosystemd variant...and of course, you'll be the
first person I'll ask!

Kind regards,
Nicholas

#887461#30
Date:
2018-02-07 23:54:48 UTC
From:
To:
P.S.  I'm considering learning about debconf to make
disabled|systemd|cron a low or medium level configuration
option...mostly it's a "project to learn about and practise using
debconf in a package" but retitling this bug to something to the
effect of "Implement debconf option for easier configuration" might be
nice :-)

#887461#35
Date:
2018-02-07 23:54:48 UTC
From:
To:
P.S.  I'm considering learning about debconf to make
disabled|systemd|cron a low or medium level configuration
option...mostly it's a "project to learn about and practise using
debconf in a package" but retitling this bug to something to the
effect of "Implement debconf option for easier configuration" might be
nice :-)