#1057302 schroot: Generates weird messages in /var/log/syslog

Package:
schroot
Source:
schroot
Description:
Execute commands in a chroot environment
Submitter:
Hilmar Preusse
Date:
2024-12-01 14:09:01 UTC
Severity:
normal
#1057302#5
Date:
2023-12-01 22:10:36 UTC
From:
To:
I run sbuild as following:

sbuild --no-run-lintian --arch-all --dist=sid *.dsc -d unstable-amd64-sbuild

, where unstable-amd64-sbuild references a chroot. Updating the chroot is done:

sudo sbuild-update -udcar unstable-amd64-sbuild

Both commands generate weird messages in /var/log/syslog like this:

2023-12-01T09:36:52.230653+01:00 haka2 schroot[3182]: [unstable-
amd64-sbuild-327cf8c2-30d1-4469-aa7b-9bc3653dbc45 chroot] (root->root) Running
command: "perl -e #012    use strict;#012
   use warnings;#012    use POSIX;#012    <snip>

Sample file is attached. These #012 are page feed chars IIRC. Unfortunately
logcheck is not able to handle the situation and generates E-Mails, which
report the full command line by line. There is definitely a white list rule for
schroot in /etc/logcheck/ignore.d.server/schroot, but it is not able to handle
the lot of special characters. Consider to not print the full perl script into
the log file (if possible).

It may be an issue in logcheck, but rather prefer to avoid message instead of
trying to white list afterwards.

Hilmar

#1057302#8
Date:
2023-12-02 07:30:33 UTC
From:
To:
Hi,

Quoting Hilmar Preusse (2023-12-01 23:10:36)

it may also be an issue with schroot, no? I do not think sbuild at any point
tells schroot to write anything to syslog.

What should sbuild do to fix this?

Thanks!

cheers, josch

#1057302#13
Date:
2023-12-02 23:06:23 UTC
From:
To:
Control: clone 1057234 -1
Control: reassign -1 schroot
Control: retitle -1 schroot: Generates weird messages in /var/log/syslog

Hi,

I wasn't sure b/c I use mostly sbuild. Cloning to schroot.

H.

#1057302#26
Date:
2023-12-27 21:42:46 UTC
From:
To:
On Sun, 3 Dec 2023 00:06:23 +0100 =?UTF-8?B?UHJldcOfZSwgSGlsbWFy?= <hille42@web.de> wrote:

I think this is done by the calls to debug, eg here:

https://salsa.debian.org/debian/sbuild/-/blob/main/lib/Sbuild/Chroot.pm?ref_type=heads#L811
debug("Running command: ", join(" ", @$command), "\n");

debug() is defined at
https://salsa.debian.org/debian/sbuild/-/blob/main/lib/Sbuild.pm?ref_type=heads#L336

to print to STDERR, which systemd will then connect to the journal (i
don't know how this last bit works, i think
it happens from schroot  - but the lines to write are generated by sbuild)