#1125389 reportbug: zbackup produces debug output / is not built as "Release"

Package:
zbackup
Source:
zbackup
Description:
Versatile deduplicating backup tool
Submitter:
Kristof Koehler
Date:
2026-01-13 10:33:03 UTC
Severity:
normal
Tags:
#1125389#5
Date:
2026-01-13 10:31:43 UTC
From:
To:
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.