package/file: fix musl compile issue
PATCH 1/1 package/file: fix musl compile issue
Since the update of musl to 1.2.5 in commit f7f03445cf320adbbc41270a806b38c911d3454a find no longer compiles.
Add a patch from Gentoo people, also reported Upstream to fix the issue.
Fixes:
http://autobuild.buildroot.org/results/abf/abfe66cec3680d396c5774ba492f34599e513edc/
--- .../0001-file-seccomp-fstatat64-musl.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/file/0001-file-seccomp-fstatat64-musl.patch
package/file/0001-file-seccomp-fstatat64-musl.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 8c13923a8e17a02be0989649b2edc20124816729 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <[email protected]> +Date: Tue, 15 Jun 2021 16:08:22 -0400 +Subject: [PATCH] seccomp: undef fstatat64 to avoid build failure on musl + +sys/stat.h in musl does this: + + #define fstatat64 fstatat + +Counteract this with an #undef. + +Bug: https://bugs.gentoo.org/789336 +Bug: https://bugs.astron.com/view.php?id=473 +Signed-off-by: Mike Gilbert <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +Upstream: N/A under discussion +--- + src/seccomp.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/seccomp.c b/src/seccomp.c +index 5a39ee45..d2a1139a 100644 +--- a/src/seccomp.c ++++ b/src/seccomp.c +@@ -205,6 +205,7 @@ enable_sandbox_full(void) + #endif + ALLOW_RULE(fstat64); + #ifdef __NR_fstatat64 ++#undef fstatat64 + ALLOW_RULE(fstatat64); + #endif + ALLOW_RULE(futex);
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 2 lines · On Tue, 27 Aug 2024 06:35:14 +0200 Waldemar Brodkorb <[email protected]> wrote:
Since the update of musl to 1.2.5 in commit
f7f03445cf320adbbc41270a806b38c911d3454afind no longer compiles.
Thanks a lot, but that explanation cannot be correct. The Gentoo issue at https://bugs.gentoo.org/789336 is discussed since 2021, and the bug report at https://bugs.astron.com/view.php?id=473 is from 2023... but musl 1.2.5 was only tagged in February 2024.
In addition, if you look at:
http://autobuild.buildroot.net/?reason=file%&libc=musl
(and click on "Next" to see the next results), you can see that the issue has been occurring since 2022-01-25, with the first failure being:
http://autobuild.buildroot.net/results/0ef/0ef268f01541c3ef40d5570a443fec9dbd61c62f/build-end.log
Is it the bump of file to version 5.41 in commit d38b72bcd75392a88b5100839ac410859d0a6a79 that triggered the issue? This change was committed on Jan 1, 2022, but the issue first occurred on Jan 25, 2022. It feels a bit strange that it took 25 days for the issue to show up in the autobuilders, with such a simple package with no dependencies.
I also see no musl version bump around that time.
Conclusion: I don't know what started the breakage, but it's not the bump to musl 1.2.5. In this kind of cases, I think it's fine to state that the breakage has been occurring for as long as Jan 2022, which provides enough information to allow us to know that the fix should be backported to 2024.02.x.
Indeed, with your justification, we would have *NOT* backported the fix to 2024.02.x, because 2024.02.x uses musl 1.2.4. Hopefully this illustrates why the investigation of the root cause is an important matter :-)
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 38 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Hello,
Quoted 2 lines · On Tue, 27 Aug 2024 06:35:14 +0200 Waldemar Brodkorb <[email protected]> wrote:
Since the update of musl to 1.2.5 in commit
f7f03445cf320adbbc41270a806b38c911d3454afind no longer compiles.Thanks a lot, but that explanation cannot be correct. The Gentoo issue at https://bugs.gentoo.org/789336 is discussed since 2021, and the bug report at https://bugs.astron.com/view.php?id=473 is from 2023... but musl 1.2.5 was only tagged in February 2024.
In addition, if you look at:
http://autobuild.buildroot.net/?reason=file%&libc=musl
(and click on "Next" to see the next results), you can see that the issue has been occurring since 2022-01-25, with the first failure being:
http://autobuild.buildroot.net/results/0ef/0ef268f01541c3ef40d5570a443fec9dbd61c62f/build-end.log
Is it the bump of file to version 5.41 in commit
d38b72bcd75392a88b5100839ac410859d0a6a79that triggered the issue? This change was committed on Jan 1, 2022, but the issue first occurred on Jan 25, 2022. It feels a bit strange that it took 25 days for the issue to show up in the autobuilders, with such a simple package with no dependencies.I also see no musl version bump around that time.
Conclusion: I don't know what started the breakage, but it's not the bump to musl 1.2.5. In this kind of cases, I think it's fine to state that the breakage has been occurring for as long as Jan 2022, which provides enough information to allow us to know that the fix should be backported to 2024.02.x.
Quoted 6 lines
Indeed, with your justification, we would have *NOT* backported the fix to 2024.02.x, because 2024.02.x uses musl 1.2.4. Hopefully this illustrates why the investigation of the root cause is an important matter :-)
Thanks a lot!
Committed to 2024.02.x and 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot