#1148276 anacron: restore udev trigger on AC connect, with a device match that avoids #914795

Package:
anacron
Source:
anacron
Description:
cron-like program that doesn't go by time
Submitter:
Sam Bull
Date:
2026-11-07 16:51:03 UTC
Severity:
normal
Tags:
#1148276#5
Date:
2026-09-18 15:51:34 UTC
From:
To:
Hi,

It appears that #914795 was resolved by removing the udev rule introduced to fix a
previous issue (with anacron not running reliably). It appears both can be fixed by simply
adding a filter to the udev rule so it only checks mains power, instead of being triggered
by device power. (Note that README.debian still claims the udev rule is in use)

I can see on my machine, I have Type=Mains/Scope= and for a connected mouse, I have
Type=Battery/Scope=Device. So, adding a Type==Mains and/or a Scope!=Device should make the
udev rule work as initially intended.

So, I think the updated udev rule that can be re-added to make anacron reliable again
could look like:

   SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="anacron.service"

Thanks,
Sam

#1148276#10
Date:
2026-11-07 16:50:03 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
anacron, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1148276@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lance Lin <lq27267@gmail.com> (supplier of updated anacron package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 07 Nov 2026 22:50:18 +0700
Source: anacron
Architecture: source
Version: 2.3-51
Distribution: experimental
Urgency: medium
Maintainer: Lance Lin <lq27267@gmail.com>
Changed-By: Lance Lin <lq27267@gmail.com>
Closes: 1134934 1148276
Changes:
 anacron (2.3-51) experimental; urgency=medium
 .
   * anacron.8, anacrontab.5: Issues in man pages (Closes: #1134934)
   * d/control: Update debhelper compat version to 14
   * d/anacron.udev: Add udev rules for the main power supply triggering
     anacron on and off (Closes: #1148276)
   * anacron.8, anacrontab.5: Update date for last update
Checksums-Sha1:
 d0bfb157f5b165640faad033977bb010cb72513c 1826 anacron_2.3-51.dsc
 587e2cdb4e13bdc614e328d773068a7e6273b308 40560 anacron_2.3-51.debian.tar.xz
 ab42e42137e356400a0c43a3f42f2183f0768005 6003 anacron_2.3-51_amd64.buildinfo
Checksums-Sha256:
 3fb9e22dca70280526627efd025bfeff994414d40024810b2226ce65b7d4a476 1826 anacron_2.3-51.dsc
 d20db39e4aba6c2c7d6a1431f4a88806d5cdec02e20c0f9cb1178731818c4a7b 40560 anacron_2.3-51.debian.tar.xz
 cabef2a2237455fa5778185e3a40dee70cf4afd7683c4e6fc20ae0bd93b97ed5 6003 anacron_2.3-51_amd64.buildinfo
Files:
 31af2876463c74dd86ee0798f953da11 1826 admin optional anacron_2.3-51.dsc
 eebea8f4a660242e6b6ded2c14196737 40560 admin optional anacron_2.3-51.debian.tar.xz
 9d5d43968f67e91e15405737a208d459 6003 admin optional anacron_2.3-51_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEESjHbWh7kCWyHOZiAkDZJKUwz+bcFAmrvSZEACgkQkDZJKUwz
+bfEMg//bEIMigU8eMYLn9KmqjWa4TqnYpowrrrs9P1WSgYx5oh/3OJc56/iXGqs
IMg/HnTW293NDGHJB9bFld9h3u3k0PBBYfUzaFFXKCVFZrix68Wqdbz+zjS4P0yr
/VkBfrMT82c36roLSBc/X4K1w9ayZ8no1MZsW1sVPsXPlr5APO3u/02HrSxFbSqB
aRVSjHVjBiLqLDnw9L0U5+sTZn4qt2MUc3P870dqQoqMY7USN2XK3S8nLl4lzn7Q
AmlT2WlSiJoruh6qd8GAsFKE3evTBtFBCtGw4r+Nf6ORFM/xfAi7B8aU4uibSEh0
NS6MQ7KZojYLXA3uSKVqS7VZB/Gk8KqfOxSG1v9iZlkvUV6zIMpm+7puNHJat2OB
0VYP+fEiSPDSFlEW2V3NAVBBXPju/OkgRcEY9NwnPnU8gq0wtRBKkkgQmonxIwvJ
BS8lr0EANzgvIpbtC1UOSzu0Ilk3ARrN4j07ZLJQp26ac9oAxI5S1sLVBHW8SaOK
F5GTQcgZrpsBGXqmXej+QiiGAbSSVIWm3UoaTj0VPYMxOIgf5XmI/oQdCmmbrxaL
87ACqIuDBimSkjEaWVtLIw4rd5d09Fr6uoziDE3KBfUpmeFag9ffWkf/cg60oMhQ
lRkQb6GySBbJArkc8TyQSWnJod6kj5W80ctakvjd5hVtUYBLbx0=
=eUzG
-----END PGP SIGNATURE-----