Package: debianutils
Version: 5.7-0.5~deb12u1
Severity: normal
File: /usr/bin/savelog

Dear Maintainer,


$ touch bar
$ savelog -C -d bar
gzip: 
.//bar.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]: 
No such file or directory
Rotated `bar' at Wed Apr 30 16:22:11 MDT 2025.

This looks similar to bug #653940, but on closer inspection actually comes
from a different spot.

Here is a patch that addresses this issue.

Thanks for maintaining debianutils!

George

--- /usr/bin/savelog    2023-07-28 17:46:35.000000000 -0600
+++ /tmp/savelog        2025-04-30 16:11:20.425388982 -0600
@@ -292,7 +292,11 @@
 
        # compress the old uncompressed log if needed
        if test -n "$datum" && test -n "$COMPRESS"; then
-               $COMPRESS $COMPRESS_OPTS -- 
"$newname".[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
+               for f in 
"$newname".[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9];
 do
+                       if [ -f "$f" ]; then
+                           $COMPRESS $COMPRESS_OPTS -- "$f"
+                       fi
+               done
        fi
 
        # remove old files if so desired



-- System Information:
Debian Release: 12.9
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-34-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to C), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages debianutils depends on:
ii  libc6  2.36-9+deb12u10

debianutils recommends no packages.

debianutils suggests no packages.

-- no debconf information
--- /usr/bin/savelog    2023-07-28 17:46:35.000000000 -0600
+++ /tmp/savelog        2025-04-30 16:11:20.425388982 -0600
@@ -292,7 +292,11 @@
 
        # compress the old uncompressed log if needed
        if test -n "$datum" && test -n "$COMPRESS"; then
-               $COMPRESS $COMPRESS_OPTS -- 
"$newname".[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
+               for f in 
"$newname".[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9];
 do
+                       if [ -f "$f" ]; then
+                           $COMPRESS $COMPRESS_OPTS -- "$f"
+                       fi
+               done
        fi
 
        # remove old files if so desired

Reply via email to