[Buildroot] [PATCH 1/1] package/nfs-utils: Backport yet another printf fix

Petr Vorel petr.vorel at gmail.com
Tue Aug 3 17:17:28 UTC 2021


Hi Thomas,

> On Tue, 3 Aug 2021 00:06:46 +0200
> Petr Vorel <petr.vorel at gmail.com> wrote:

> > I believe all 3 patches (2 already merged + this one) should fix the problem.
> > But I was not able to verify it, because ./utils/test-pkg didn't catch even
> > this error (I tested all available toolchains), IMHO -Werror=format=2 and other
> > -Werror are probably only on http://autobuild.buildroot.net/ (not in Buildroot
> > config for users). It'd be great if ./utils/test-pkg had the same CFLAGS.
> > Or have I (again) overlooked something?

> No, the autobuilders don't do anything specific with -Werror CFLAGS.
> The configurations tested by the autobuilders are generated by
> utils/genrandconfig in the Buildroot tree. Besides the obvious package
> randomization, there is some randomization of "global" options:

>     # Per-package folder
>     if randint(0, 15) == 0:
>         configlines.append("BR2_PER_PACKAGE_DIRECTORIES=y\n")

>     # Amend the configuration with a few things.
>     if randint(0, 20) == 0:
>         configlines.append("BR2_ENABLE_DEBUG=y\n")
>     if randint(0, 20) == 0:
>         configlines.append("BR2_ENABLE_RUNTIME_DEBUG=y\n")
>     if randint(0, 1) == 0:
>         configlines.append("BR2_INIT_BUSYBOX=y\n")
>     elif randint(0, 15) == 0:
>         configlines.append("BR2_INIT_SYSTEMD=y\n")
>     elif randint(0, 10) == 0:
>         configlines.append("BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y\n")
>     if randint(0, 20) == 0:
>         configlines.append("BR2_STATIC_LIBS=y\n")
>     if randint(0, 20) == 0:
>         configlines.append("BR2_PACKAGE_PYTHON_PY_ONLY=y\n")
>     if randint(0, 5) == 0:
>         configlines.append("BR2_OPTIMIZE_2=y\n")
>     if randint(0, 4) == 0:
>         configlines.append("BR2_SYSTEM_ENABLE_NLS=y\n")
>     if randint(0, 4) == 0:
>         configlines.append("BR2_FORTIFY_SOURCE_2=y\n")
Thanks for valuable info!
I need to have look into https://git.busybox.net/buildroot-test/.

> For example, did you test with BR2_FORTIFY_SOURCE_2=y ?

> Could you point me to the autobuilder failure that you had, but was not
> able to reproduce with test-pkg ? We should be able to point out the
> difference.
Actually, I thought I submitted 0ce30de72f ("package/nfs-utils: bump to version
2.5.4"), but I didn't thus I did not run the verifies.

I now tested b2857786f1 ("package/nfs-utils: needs uuid") (which I also didn't
submit thus didn't tested and all verifiers are OK. I believe that was the first
build which failed due warning on printf format. And now:

grep ^BR2_FORTIFY_SOURCE_2 ~/br-test-pkg/*/.config
# nothing

I'll try to test next time with snippet with BR2_FORTIFY_SOURCE_2=y.
Anything else it's worth of enabling? E.g. BR2_STATIC_LIBS have at least some of
them, also BR2_FORTIFY_SOURCE_1 (but that's not enough)

> The thing is that test-pkg cannot test all possibilities, it would take
> way too much time.
Understand. I just didn't know about the randomizer on autobuilders. I did
noticed that sometimes error was reported even I was not able to spot it during
test-pkg testing :).

Kind regards,
Petr

> Thomas


More information about the buildroot mailing list