Control: tags -1 + patch fixed-upstream On Mon, Jan 27, 2025 at 11:19:53PM +0000, Andrew Bower wrote: > Control: forwarded -1 https://github.com/thkukuk/wtmpdb/pull/21 > > On Sun, Jan 26, 2025 at 06:49:38PM +0000, Andrew Bower wrote: > > I'm tempted to propose a patch for continuity for users upgrading to > > trixie. > > I have proposed a patch upstream (so far) at > <https://github.com/thkukuk/wtmpdb/pull/21>. I'm very grateful to the upstream maintainer for accepting this patch. I suspect, however, that we might be wise to stick with the current upstream in Debian and focus on a smooth experience for stable upgrades for now.
From cf7b1178fba10d0c9f96601e918e9889940e175c Mon Sep 17 00:00:00 2001
From: Andrew Bower <andrew@bower.uk>
Date: Wed, 29 Jan 2025 23:48:54 +0000
Subject: [PATCH] Accept classic 'last -<number>' style of invocation
Closes: #1094286
---
...-classic-last-N-form-for-max-entries.patch | 65 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 66 insertions(+)
create mode 100644 debian/patches/Accept-classic-last-N-form-for-max-entries.patch
diff --git a/debian/patches/Accept-classic-last-N-form-for-max-entries.patch b/debian/patches/Accept-classic-last-N-form-for-max-entries.patch
new file mode 100644
index 0000000..67e4539
--- /dev/null
+++ b/debian/patches/Accept-classic-last-N-form-for-max-entries.patch
@@ -0,0 +1,65 @@
+From: Andrew Bower <andrew@bower.uk>
+Date: Mon, 27 Jan 2025 23:01:17 +0000
+Bug-Debian: https://bugs.debian.org/1094286
+Forwarded: https://github.com/thkukuk/wtmpdb/pull/21
+Reviewed-By: Thorsten Kukuk <kukuk@suse.com>
+Applied-Upstream: commit:72a2861c813f74db3cf4c2b770afb0025c251f35
+Subject: Accept classic 'last -N' form for max entries
+
+---
+ man/wtmpdb.8.xml | 3 +++
+ src/wtmpdb.c | 17 +++++++++++++++--
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/man/wtmpdb.8.xml b/man/wtmpdb.8.xml
+index 014d05f..bdd8627 100644
+--- a/man/wtmpdb.8.xml
++++ b/man/wtmpdb.8.xml
+@@ -115,6 +115,9 @@
+ <term>
+ <option>-n, --limit</option> <replaceable>N</replaceable>
+ </term>
++ <term>
++ <option>-</option><replaceable>N</replaceable>
++ </term>
+ <listitem>
+ <para>
+ Display only the first <replaceable>N</replaceable> entries.
+diff --git a/src/wtmpdb.c b/src/wtmpdb.c
+index fb5d585..bcefd39 100644
+--- a/src/wtmpdb.c
++++ b/src/wtmpdb.c
+@@ -555,7 +555,7 @@ usage (int retval)
+ fputs (" -f, --file FILE Use FILE as wtmpdb database\n", output);
+ fputs (" -F, --fulltimes Display full times and dates\n", output);
+ fputs (" -i, --ip Translate hostnames to IP addresses\n", output);
+- fputs (" -n, --limit N Display only first N entries\n", output);
++ fputs (" -n, --limit N, -N Display only first N entries\n", output);
+ fputs (" -p, --present TIME Display who was present at TIME\n", output);
+ fputs (" -R, --nohostname Don't display hostname\n", output);
+ fputs (" -S, --service Display PAM service used to login\n", output);
+@@ -681,10 +681,23 @@ main_last (int argc, char **argv)
+ char *error = NULL;
+ int c;
+
+- while ((c = getopt_long (argc, argv, "adf:Fin:p:RSs:t:wx", longopts, NULL)) != -1)
++ while ((c = getopt_long (argc, argv, "0123456789adf:Fin:p:RSs:t:wx",
++ longopts, NULL)) != -1)
+ {
+ switch (c)
+ {
++ case '0':
++ case '1':
++ case '2':
++ case '3':
++ case '4':
++ case '5':
++ case '6':
++ case '7':
++ case '8':
++ case '9':
++ maxentries = maxentries * 10 + c - '0';
++ break;
+ case 'a':
+ hostlast = 1;
+ break;
diff --git a/debian/patches/series b/debian/patches/series
index 7243c53..df6fb77 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
wtmpdb-update-boot-service-requires-dbus.patch
+Accept-classic-last-N-form-for-max-entries.patch
--
2.47.2
Attachment:
signature.asc
Description: PGP signature