Package: zbackup
Version: 1.5-4
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]

Dear Maintainer,

I noticed that zbackup emits lots of debug output.


Example command sequence:

$ zbackup --silent --non-encrypted init /tmp/testrepo

$ echo "OK" | zbackup --silent --non-encrypted backup /tmp/testrepo/backups/test

$ zbackup --silent --non-encrypted restore /tmp/testrepo/backups/test | cat

Expected output:
OK

Actual output:
[DEBUG] at main( zbackup.cc:19 ): ZBackup version 1.4
[DEBUG] at Config( config.cc:182 ): 6Config is instantiated and initialized 
with default values
[DEBUG] at Config( config.cc:198 ): 6Config is instantiated and initialized 
with supplied ConfigInfo
[DEBUG] at Config( config.cc:182 ): 6Config is instantiated and initialized 
with default values
[DEBUG] at Config( config.cc:182 ): 6Config is instantiated and initialized 
with default values
[DEBUG] at save( storage_info_file.cc:20 ): Saving storage info...
[DEBUG] at OutputStream( encrypted_file.cc:244 ): Saving /tmp/testrepo/info, 
hasKey: false
[DEBUG] at save( storage_info_file.cc:57 ): Saving extended storage info, 
hasKey: false
[DEBUG] at OutputStream( encrypted_file.cc:244 ): Saving 
/tmp/testrepo/info_extended, hasKey: false
[DEBUG] at main( zbackup.cc:19 ): ZBackup version 1.4
[DEBUG] at Config( config.cc:182 ): 6Config is instantiated and initialized 
with default values
[DEBUG] at load( storage_info_file.cc:33 ): Loading storage info...
[DEBUG] at InputStream( encrypted_file.cc:26 ): Loading /tmp/testrepo/info, 
hasKey: false
[DEBUG] at load( storage_info_file.cc:74 ): Loading extended storage info, 
hasKey: false
[DEBUG] at InputStream( encrypted_file.cc:26 ): Loading 
/tmp/testrepo/info_extended, hasKey: false
[DEBUG] at ChunkIndex( chunk_index.cc:115 ): 10ChunkIndex for 
/tmp/testrepo/index is instantiated and initialized, hasKey: false
[DEBUG] at Config( config.cc:209 ): 6Config is instantiated and initialized 
with supplied values
[DEBUG] at ZBackupBase( zbackup_base.cc:98 ): 11ZBackupBase for /tmp/testrepo 
is instantiated and initialized
[DEBUG] at backupFromFileHandle( zutils.cc:112 ): No more input from stdin
[DEBUG] at finish( backup_creator.cc:149 ): At finish: 0, 3
[DEBUG] at finish( backup_creator.cc:149 ): At finish: 0, 6
[DEBUG] at backupFromFileHandle( zutils.cc:168 ): Iterations: 0
[DEBUG] at OutputStream( encrypted_file.cc:244 ): Saving 
/tmp/testrepo/tmp/gqigpe, hasKey: false
[DEBUG] at main( zbackup.cc:19 ): ZBackup version 1.4
[DEBUG] at Config( config.cc:182 ): 6Config is instantiated and initialized 
with default values
[DEBUG] at load( storage_info_file.cc:33 ): Loading storage info...
[DEBUG] at InputStream( encrypted_file.cc:26 ): Loading /tmp/testrepo/info, 
hasKey: false
[DEBUG] at load( storage_info_file.cc:74 ): Loading extended storage info, 
hasKey: false
[DEBUG] at InputStream( encrypted_file.cc:26 ): Loading 
/tmp/testrepo/info_extended, hasKey: false
[DEBUG] at ChunkIndex( chunk_index.cc:115 ): 10ChunkIndex for 
/tmp/testrepo/index is instantiated and initialized, hasKey: false
[DEBUG] at Config( config.cc:209 ): 6Config is instantiated and initialized 
with supplied values
[DEBUG] at ZBackupBase( zbackup_base.cc:98 ): 11ZBackupBase for /tmp/testrepo 
is instantiated and initialized
[DEBUG] at InputStream( encrypted_file.cc:26 ): Loading 
/tmp/testrepo/backups/test, hasKey: false
OK


Looking into the source, the debug output happens in debug.hh, line 18 - unless 
NDEBUG is defined.
This is not the case when building with the default configuration options.

The most straightforward-looking fix: Explicitly select the build type as 
"Release".
This will set the compiler flags -O3 and -NDEBUG.
I am attaching a patch for debian/rules to do that.

When building with the patch, zbackup no longer emits debug output.

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.13+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages zbackup depends on:
ii  libc6             2.42-7
ii  libgcc-s1         15.2.0-12
ii  liblzma5          5.8.2-1
ii  liblzo2-2         2.10-3+b1
ii  libprotobuf32t64  3.21.12-14+b1
ii  libssl3t64        3.5.4-1
ii  libstdc++6        15.2.0-12
ii  zlib1g            1:1.3.dfsg+really1.3.1-1+b2

zbackup recommends no packages.

zbackup suggests no packages.

-- no debconf information
--- ../zbackup-1.5.orig/debian/rules    2021-11-07 10:58:21.000000000 +0000
+++ debian/rules        2026-01-13 07:55:19.563230557 +0000
@@ -7,6 +7,7 @@
 
 override_dh_auto_configure:
        dh_auto_configure -O--buildsystem=cmake -- \
+               -DCMAKE_BUILD_TYPE='Release' \
                -DCMAKE_CXX_STANDARD='11'
 
 override_dh_auto_build:

Reply via email to