Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#985948: libubootenv-tool: Debug lines from fw_printenv break RAUC

32 views
Skip to first unread message

Paul Jena

unread,
Mar 26, 2021, 12:00:04 PM3/26/21
to
Package: libubootenv-tool
Version: 0.3-1
Severity: grave

Hello,

there are compatibility problems with RAUC and the libubootenv-tool package.

RAUC requires the fw_setenv and fw_printenv utilites to interact with the
u-boot-environment. After Installing the libubootenv-tool package to get fw_printenv
and fw_setenv, RAUC didnt work properly. i.e.:

$ rauc status
...
=== Bootloader ===
Activated: (null) ((null)) <-- should look like "Activated: rootfs.0 (A)
...

The reason for this is that RAUC is not able to parse the output of
fw_printenv with the added debug message "Environment OK, copy 0":

$ fw_printenv BOOT_ORDER
Environment OK, copy 0
BOOT_ORDER=B A

After building a fw_printenv that doesnt print the Debug Mesaage the Rauc worked properly again.
(I looked into the source code of libubootenv and saw that passing the NDEBUG compiler flag
supresses the Debugging Messages:
https://salsa.debian.org/debian/libubootenv/-/blob/master/src/uboot_env.c#L946)
i.e:

$ fw_printenv BOOT_ORDER
BOOT_ORDER=B A

$ rauc status
...
=== Bootloader ===
Activated: rootfs.1 (B)
...

Perhaps it is desirable that libubootenv-tool provides output similiar to the native
u-boot envtools to support compability, by building it in downstream with the NDEBUG
compiler flag.

Paul Jena

-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: armhf (armv7l)

Kernel: Linux 4.14.184-rt84-stable-16216-gdf370847d809 (SMP w/4 CPU threads; PR>
Locale: LANG=C.UTF-8, LC_CTYPE=C.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 libubootenv-tool depends on:
ii libc6 2.31-9
ii libubootenv0.1 0.3-1
ii zlib1g 1:1.2.11.dfsg-2

libubootenv-tool recommends no packages.

libubootenv-tool suggests no packages.

-- no debconf information

Andreas Henriksson

unread,
Apr 7, 2021, 5:40:03 AM4/7/21
to
Control: severity -1 grave

On Wed, Apr 07, 2021 at 11:20:18AM +0200, Bastian Germann wrote:
> Control: severity -1 important
>
> Am 07.04.21 um 11:10 schrieb Andreas Henriksson:
> > Could we please just add a patch that either just rips out the NDEBUG
> > lines (or inverts the login to #ifdef DEBUG ) ?! Such a patch could/should
> > be forwarded upstream as well.... A library should not print to stdout
> > like this!
> I am not the maintainer.

I agree that the maintainer should have done a better job at reviewing
rather than blindly applying your patch and also verifying that the new
version actually fixes the bugs that is claimed to be closed in the
changelog.

People must have been sleeping while writing this debian/rules
file. Most content is entirely unused because cmake build type
is *not* release!

> You can hand in such a patch to speed up that process.

I've submitted a merge-request that fixes the imminent problems for
review at:
https://salsa.debian.org/debian/libubootenv/-/merge_requests/3

Please not that I'm nowhere near a cmake expert. I've only fixed
the imminent bug and some glaring problems in debian/rules.
I've left comments in commit messages about further improvements,
but there are likely entirely different and better ways of
doing things.

> I am reducing the severity as pointed out before.

And I'm raising it back up again, because this is definitely an RC bug.
Breaking the output of fw_printenv breaks multiple programs (including
but not limited to mender-client) which parses that output.

Regards,
Andreas Henriksson

Nobuhiro Iwamatsu

unread,
Apr 7, 2021, 8:40:03 PM4/7/21
to
Hi all,

2021年4月7日(水) 18:39 Andreas Henriksson <and...@fatal.se>:
Thank you for the patch. I will review this carefully.

>
> > I am reducing the severity as pointed out before.
>
> And I'm raising it back up again, because this is definitely an RC bug.
> Breaking the output of fw_printenv breaks multiple programs (including
> but not limited to mender-client) which parses that output.
>

I agree about this.

Best regards,
Nobuhiro


--
Nobuhiro Iwamatsu
0 new messages