Bug#1086879: bookworm-pu: package prometheus-node-exporter-collectors/0.0~git20230203.6f710f8-1+deb12u3

2024-11-16 Thread Jonathan Wiltshire
Control: tag -1 = bookworm confirmed

On Fri, Nov 15, 2024 at 07:07:07PM -0500, Reinhard Tartler wrote:
> On 2024-11-15 11:10, Jonathan Wiltshire wrote:
> > Control: tag -1 moreinfo
> > 
> > Hi,
> > 
> > I'm fine with these changes, but what you've uploaded doesn't match the
> > proposal because
> > 0.0~git20230203.6f710f8-1+deb12u2 has never
> > been in the
> > archive. Do you want to upload it as well
> > and I'll take both, or shall I
> > reject +deb12u3 so you can squash them down?
> 
> Please reject. I'll reupload as +deb12u2.
> 
> I've also identified another missing improvement
> at 
> https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/commit/ab04a51e1a11696da7604be314696ffd87eda80d
> that I'd like to backport, if that's okay with
> you

Yes please.

Thanks,

-- 
Jonathan Wiltshire  j...@debian.org
Debian Developer http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51
ed25519/0x196418AAEB74C8A1: CA619D65A72A7BADFC96D280196418AAEB74C8A1



Bug#1086879: bookworm-pu: package prometheus-node-exporter-collectors/0.0~git20230203.6f710f8-1+deb12u3

2024-11-15 Thread Reinhard Tartler

On 2024-11-15 11:10, Jonathan Wiltshire wrote:

Control: tag -1 moreinfo

Hi,

I'm fine with these changes, but what you've uploaded doesn't match the
proposal because 0.0~git20230203.6f710f8-1+deb12u2 has never been in 
the
archive. Do you want to upload it as well and I'll take both, or shall 
I

reject +deb12u3 so you can squash them down?


Please reject. I'll reupload as +deb12u2.

I've also identified another missing improvement at 
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/commit/ab04a51e1a11696da7604be314696ffd87eda80d 
that I'd like to backport, if that's okay with you


best,
-rt



Bug#1086879: bookworm-pu: package prometheus-node-exporter-collectors/0.0~git20230203.6f710f8-1+deb12u3

2024-11-15 Thread Jonathan Wiltshire
Control: tag -1 moreinfo

Hi,

I'm fine with these changes, but what you've uploaded doesn't match the
proposal because 0.0~git20230203.6f710f8-1+deb12u2 has never been in the
archive. Do you want to upload it as well and I'll take both, or shall I
reject +deb12u3 so you can squash them down?

Thanks,

-- 
Jonathan Wiltshire  j...@debian.org
Debian Developer http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51
ed25519/0x196418AAEB74C8A1: CA619D65A72A7BADFC96D280196418AAEB74C8A1



Bug#1086879: bookworm-pu: package prometheus-node-exporter-collectors/0.0~git20230203.6f710f8-1+deb12u3

2024-11-06 Thread Reinhard Tartler
Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: prometheus-node-exporter-collect...@packages.debian.org, Debian 
Go Packaging Team , Daniel Swarbrick 
, Martina Ferrari 
Control: affects -1 + src:prometheus-node-exporter-collectors
User: release.debian@packages.debian.org
Usertags: pu

[ Reason ]
The version in Debian stable suffers from:
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/issues/193
which causes upgrades no to appear in apt_upgrades_pending but only in
apt_upgrades_held. This is tracked in debian as #1077694

This was fixed with upstream PR:
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/207

[ Impact ]
This bug leads to the collector not reporting on pending package upgrades and
can lead to system administrators miss to install critical software updates

[ Tests ]
This change was installed on my (siretart's) homelab cluster and confirmed to 
work there.

[ Risks ]
low. The code change is easy to review and understand.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

diff --git a/debian/changelog b/debian/changelog
index 3233700..b514460 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+prometheus-node-exporter-collectors (0.0~git20230203.6f710f8-1+deb12u3) 
bookworm; urgency=medium
+
+  * Team upload
+  * apt_info.py: fix apt_upgrades_pending and apt_upgrades_held, Closes: 
#1077694
+
+ -- Reinhard Tartler   Wed, 06 Nov 2024 20:15:44 -0500
+
 prometheus-node-exporter-collectors (0.0~git20230203.6f710f8-1+deb12u2) 
bookworm; urgency=medium
 
   * Team upload
diff --git 
a/debian/patches/0001-apt_info.py-fix-apt_upgrades_pending-and-apt_upgrade.patch
 
b/debian/patches/0001-apt_info.py-fix-apt_upgrades_pending-and-apt_upgrade.patch
new file mode 100644
index 000..6af357f
--- /dev/null
+++ 
b/debian/patches/0001-apt_info.py-fix-apt_upgrades_pending-and-apt_upgrade.patch
@@ -0,0 +1,35 @@
+From: Reinhard Tartler 
+Date: Sat, 2 Nov 2024 08:20:41 -0400
+Subject: apt_info.py: fix apt_upgrades_pending and apt_upgrades_held
+
+Backported from
+https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/207
+---
+ apt_info.py | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/apt_info.py b/apt_info.py
+index 82ea4e5..804f89c 100755
+--- a/apt_info.py
 b/apt_info.py
+@@ -57,7 +57,7 @@ def _write_pending_upgrades(cache):
+ # only one upgrade, not two). See the following issue for more details:
+ # 
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/issues/85
+ candidates = {
+-p.candidate for p in cache.get_changes() if p.is_installed and 
p.marked_upgrade
++p.candidate for p in cache if p.is_upgradable
+ }
+ _write_upgrade_info("apt_upgrades_pending", candidates)
+ 
+@@ -66,7 +66,10 @@ def _write_held_upgrades(cache):
+ print("# HELP apt_upgrades_held Apt packages pending updates but held 
back.")
+ print("# TYPE apt_upgrades_held gauge")
+ 
+-held_candidates = {p.candidate for p in cache if p.is_upgradable and 
p.marked_keep}
++held_candidates = {
++p.candidate for p in cache
++if p.is_upgradable and p._pkg.selected_state == apt_pkg.SELSTATE_HOLD
++}
+ _write_upgrade_info("apt_upgrades_held", held_candidates)
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index f5329fc..8ee1d54 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-do-not-run-apt-update-or-simulate-apt-dist-upgrade.patch
 0001-report-the-apt-cache-timestamp.patch
 0001-use-a-better-heuristic-for-the-apt-update-last-run-t.patch
+0001-apt_info.py-fix-apt_upgrades_pending-and-apt_upgrade.patch