Bug#1030249: unexpected "prefclean output on ..." emails since bookworm upgrade

2023-02-05 Thread Francesco Poli
On Thu, 02 Feb 2023 20:57:16 -0500 Antoine Beaupré wrote:

> On 2023-02-01 23:35:09, Francesco Poli wrote:
> > On Wed, 01 Feb 2023 10:25:21 -0500 Antoine Beaupre wrote:
> 
> [...]
> 
> > I must admit that I am somewhat surprised that you see all these mail
> > notifications about fixed packages as something new.
> > apt-listbugs has notified root by (local) mail about fixed packages for
> > ages. Through the cron job mechanism and, starting from 2019, through
> > the manually-implemented mailing in the systemd timer.
> >
> > So, I wonder what has changed in your box, when you began to see these
> > mail notifications...
> 
> I am not sure. I recently deployed unattended-upgrades on all my
> machines, and recently upgraded them to bookworm, which might have
> triggered more of those warnings. 2019 is not that long ago though, was
> this part of bullseye?

Yes, the mail notifications have been present for ages.
Before 2019, just because cron/anacron sends the output by (local) mail
by default. Starting from 2019, also because they are manually
implemented in the systemd timer (for systemd-running boxes).
This implementation was done in 2019 and was part of bullseye (which
was released in 2021).

However, what you say made me think about a couple of things.
Under unattended-upgrades, apt-listbugs automatically pins all buggy
packages, see the corresponding [FAQ]
in /usr/share/doc/apt-listbugs/FAQ.md.gz .

[FAQ]: 


But, unfortunately, this automatic pinning was broken in bullseye, due
to a bug introduced by me in 2020 and then fixed in 2022 (see bug
[#1021289]).

[#1021289]: 

In bookworm, this bug is fixed and the automatic pinning should work
correctly.

This should explain why you suddenly began to see the notifications
under unattended-upgrades, after migrating to bookworm.

[...]
> > In the meanwhile, you could try the attached patch as temporary
> > workaround for your specific case (the "I do not want any mail
> > notifications" case).
> > Please let me know whether it works as intended.
> 
> Ah well, I thought I could write something like this on my own of
> course, but I didn't want to diverge from upstream and forget I had that
> patch lying around. I suspect it might just work, indeed, as the caller
> checks to see if there's any output beforing firing off that email...
> 
> Thanks for the patch!

You are welcome.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


pgpPgIPYGCRiD.pgp
Description: PGP signature


Bug#1030249: unexpected "prefclean output on ..." emails since bookworm upgrade

2023-02-02 Thread Antoine Beaupré
On 2023-02-01 23:35:09, Francesco Poli wrote:
> On Wed, 01 Feb 2023 10:25:21 -0500 Antoine Beaupre wrote:

[...]

> I must admit that I am somewhat surprised that you see all these mail
> notifications about fixed packages as something new.
> apt-listbugs has notified root by (local) mail about fixed packages for
> ages. Through the cron job mechanism and, starting from 2019, through
> the manually-implemented mailing in the systemd timer.
>
> So, I wonder what has changed in your box, when you began to see these
> mail notifications...

I am not sure. I recently deployed unattended-upgrades on all my
machines, and recently upgraded them to bookworm, which might have
triggered more of those warnings. 2019 is not that long ago though, was
this part of bullseye?

[...]

> Well, it's the first time that someone complains about these mail
> notifications.

Hi! :)

> Personally, I like to be informed, when a bug that I feared has been
> fixed, and the fixed package can finally be upgraded on my box.
>
> Anyway, that's a matter of preference, I must admit.
> Hence, it may make sense to implement an option to silence those
> notifications...

Glad you are open to the suggestion, thanks!

[...]

> I think that the best place where I can implement the option is
> probably an APT preference to be read (via 'apt-config') by aptcleanup,
> which would suppress its " Fixed packages:" output.

Yeah, that's what I had in mind too...

> But I am afraid that this is not the right time to implement that for
> bookworm.
> I won't introduce such a change during the freeze.
> I will probably do so for trixie, after bookworm is released.

Oh, okay. I'm happy to test a patch that would implement this, for what
that's worth though...

> In the meanwhile, you could try the attached patch as temporary
> workaround for your specific case (the "I do not want any mail
> notifications" case).
> Please let me know whether it works as intended.

Ah well, I thought I could write something like this on my own of
course, but I didn't want to diverge from upstream and forget I had that
patch lying around. I suspect it might just work, indeed, as the caller
checks to see if there's any output beforing firing off that email...

Thanks for the patch!
-- 
People in glass houses shouldn't throw stones.
People in glass cities shouldn't fire missiles.
- Banksy



Bug#1030249: unexpected "prefclean output on ..." emails since bookworm upgrade

2023-02-01 Thread Francesco Poli
Control: severity -1 wishlist


On Wed, 01 Feb 2023 10:25:21 -0500 Antoine Beaupre wrote:

> Package: apt-listbugs
> Version: 0.1.40
> Severity: minor

Hello Antoine!
Thanks for your bug report.   :-)

> 
> Since I'm running bookworm, apt-listbugs started pestering me with
> emails that look like this:
> 
> Date: Wed, 01 Feb 2023 07:25:20 -0500
> From: apt-listbugs timer 
> To: r...@anarc.at
> Subject: prefclean output on curie
> 
> /usr/libexec/apt-listbugs/prefclean:
>  Paquets corrigés : breeze kactivitymanagerd ksshaskpass kwayland-integration 
> polkit-kde-agent-1
> 
> That "Paquets corrigés" string there means "Fixed packages" in
> english.

Yes, it's in the French translation catalog of messages.

> I've traced it down to /usr/libexec/apt-listbugs/aptcleanup,
> itself called from /usr/libexec/apt-listbugs/prefclean which
> specifically makes a point of explicitely writing an email if you're
> running under systemd.

It does so, in order to provide an equivalent functionality with
respect to the cron.daily job, which runs if you are _not_ running
under systemd.
By default, cron jobs have their output sent by (local) mail, if any
output is produced.
When I implemented the equivalent systemd timer, I had to manually
implement the output-mailing feature...

I must admit that I am somewhat surprised that you see all these mail
notifications about fixed packages as something new.
apt-listbugs has notified root by (local) mail about fixed packages for
ages. Through the cron job mechanism and, starting from 2019, through
the manually-implemented mailing in the systemd timer.

So, I wonder what has changed in your box, when you began to see these
mail notifications...

> 
> I'd love a way to turn that stuff off or, preferably, have it logged
> normally in syslog/journald. I don't need to be told when those things
> are fixed: I'm assuming apt-listbugs will do its job correctly unless
> otherwise noted. In other words, this is not a failure condition, it's
> actually a *success* condition, and I don't really need to be told
> about those.

Well, it's the first time that someone complains about these mail
notifications.

Personally, I like to be informed, when a bug that I feared has been
fixed, and the fixed package can finally be upgraded on my box.

Anyway, that's a matter of preference, I must admit.
Hence, it may make sense to implement an option to silence those
notifications...

> 
> Could we make this a knob at least? It looks like aptcleanup looks at
> the apt preferences to that might be a good place, but prefclean is
> where the decision is actually mean on how to treat the aptclean
> output, so I'm not sure how best this could be done...

I think that the best place where I can implement the option is
probably an APT preference to be read (via 'apt-config') by aptcleanup,
which would suppress its " Fixed packages:" output.

But I am afraid that this is not the right time to implement that for
bookworm.
I won't introduce such a change during the freeze.
I will probably do so for trixie, after bookworm is released.

In the meanwhile, you could try the attached patch as temporary
workaround for your specific case (the "I do not want any mail
notifications" case).
Please let me know whether it works as intended.

Bye.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


bug1030249_tempworkaround.diff.xz
Description: application/xz


pgpcMgs0FKmxm.pgp
Description: PGP signature


Bug#1030249: unexpected "prefclean output on ..." emails since bookworm upgrade

2023-02-01 Thread Antoine Beaupre
Package: apt-listbugs
Version: 0.1.40
Severity: minor

Since I'm running bookworm, apt-listbugs started pestering me with
emails that look like this:

Date: Wed, 01 Feb 2023 07:25:20 -0500
From: apt-listbugs timer 
To: r...@anarc.at
Subject: prefclean output on curie

/usr/libexec/apt-listbugs/prefclean:
 Paquets corrigés : breeze kactivitymanagerd ksshaskpass kwayland-integration 
polkit-kde-agent-1

That "Paquets corrigés" string there means "Fixed packages" in
english. I've traced it down to /usr/libexec/apt-listbugs/aptcleanup,
itself called from /usr/libexec/apt-listbugs/prefclean which
specifically makes a point of explicitely writing an email if you're
running under systemd.

I'd love a way to turn that stuff off or, preferably, have it logged
normally in syslog/journald. I don't need to be told when those things
are fixed: I'm assuming apt-listbugs will do its job correctly unless
otherwise noted. In other words, this is not a failure condition, it's
actually a *success* condition, and I don't really need to be told
about those.

Could we make this a knob at least? It looks like aptcleanup looks at
the apt preferences to that might be a good place, but prefclean is
where the decision is actually mean on how to treat the aptclean
output, so I'm not sure how best this could be done...

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (1, 
'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.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 apt-listbugs depends on:
ii  apt 2.5.5
ii  ruby1:3.1
ii  ruby-debian 0.3.10+b8
ii  ruby-gettext3.3.3-2
ii  ruby-soap4r 2.0.5-5
ii  ruby-unicode0.4.4.4-1+b5
ii  ruby-xmlparser  0.7.3-4+b4

Versions of packages apt-listbugs recommends:
ii  ruby-httpclient  2.8.3+git20211122.4658227-1

Versions of packages apt-listbugs suggests:
ii  chromium [www-browser]  109.0.5414.119-1
ii  firefox [www-browser]   109.0-1
ii  lynx [www-browser]  2.9.0dev.12-1
ii  reportbug   11.6.0
ii  sensible-utils  0.0.17+nmu1
ii  w3m [www-browser]   0.5.3+git20230121-1
ii  xdg-utils   1.1.3-4.1

-- debconf-show failed