Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/file: bump to version 5.48
@ 2026-11-03  6:40 Yegor Yefremov via buildroot
  2026-11-04 21:24 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-11-03  6:40 UTC (permalink / raw)
  To: buildroot

https://github.com/file/file/blob/FILE5_48/ChangeLog

5.48 adds Landlock sandboxing, which is enabled when the toolchain
provides linux/landlock.h and skipped at runtime on kernels without
Landlock support.

Add two patches fixing the seccomp build, broken by the new syscall
rules in 5.48:

- with musl, where pread64 is a macro once seccomp.c includes
  <unistd.h>;
- with kernel headers older than 5.9, which lack openat2, faccessat2
  or close_range.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 ...f-pread64-to-fix-the-build-with-musl.patch | 40 +++++++++++++++++
 ...build-with-kernel-headers-older-than.patch | 44 +++++++++++++++++++
 package/file/file.hash                        |  4 +-
 package/file/file.mk                          |  2 +-
 4 files changed, 87 insertions(+), 3 deletions(-)
 create mode 100644 package/file/0002-seccomp-undef-pread64-to-fix-the-build-with-musl.patch
 create mode 100644 package/file/0003-seccomp-fix-the-build-with-kernel-headers-older-than.patch

diff --git a/package/file/0002-seccomp-undef-pread64-to-fix-the-build-with-musl.patch b/package/file/0002-seccomp-undef-pread64-to-fix-the-build-with-musl.patch
new file mode 100644
index 0000000000..ebb4637c54
--- /dev/null
+++ b/package/file/0002-seccomp-undef-pread64-to-fix-the-build-with-musl.patch
@@ -0,0 +1,40 @@
+From dd8fc9dd375d7db78d09ea8b669e576eb617d472 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <yegorslists@googlemail.com>
+Date: Mon, 2 Nov 2026 22:42:54 +0100
+Subject: [PATCH] seccomp: undef pread64 to fix the build with musl
+
+Since 5.48, seccomp.c includes <unistd.h>. With _LARGEFILE64_SOURCE,
+musl's unistd.h does
+
+  #define pread64 pread
+
+which turns ALLOW_RULE(pread64) into SCMP_SYS(pread), which does not
+exist:
+
+  seccomp.c:53:52: error: '__SNR_pread' undeclared (first use in this function)
+
+Undefine the macro before using it. The same musl issue affects
+fstatat64 (bug 473).
+
+Assisted-by: Claude:claude-opus-5-5
+Upstream: sent to file@astron.com on 2026-11-03, Message-Id <20261103050039.3844049-1-yegorslists@googlemail.com>
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ src/seccomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index f867abcf..ea27a3a8 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -178,6 +178,7 @@ enable_sandbox(int flags, int action)
+ 		    SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_RDWR, O_RDWR)) == -1)
+ 			goto out;
+ 	}
++#undef pread64
+ 	ALLOW_RULE(pread64);
+ 	ALLOW_RULE(read);
+ 	ALLOW_RULE(readlink);
+-- 
+2.34.1
+
diff --git a/package/file/0003-seccomp-fix-the-build-with-kernel-headers-older-than.patch b/package/file/0003-seccomp-fix-the-build-with-kernel-headers-older-than.patch
new file mode 100644
index 0000000000..e302c8d844
--- /dev/null
+++ b/package/file/0003-seccomp-fix-the-build-with-kernel-headers-older-than.patch
@@ -0,0 +1,44 @@
+From 5962ca083112c45eb3d903a21fc9fcf2e42fead4 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <yegorslists@googlemail.com>
+Date: Mon, 2 Nov 2026 22:42:54 +0100
+Subject: [PATCH] seccomp: fix the build with kernel headers older than 5.9
+
+openat2, faccessat2 and close_range were added in Linux 5.6, 5.8 and
+5.9. With older kernel headers, libseccomp maps them to undefined
+__NR_* macros:
+
+  seccomp.c:59:52: error: '__NR_openat2' undeclared (first use in this function)
+
+Only add the ENOSYS rules when the syscall numbers are defined, like
+it is already done for other syscalls.
+
+Assisted-by: Claude:claude-opus-5-5
+Upstream: sent to file@astron.com on 2026-11-03, Message-Id <20261103050039.3844049-2-yegorslists@googlemail.com>
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ src/seccomp.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index ea27a3a8..376e09b0 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -214,9 +214,15 @@ enable_sandbox(int flags, int action)
+ 	ALLOW_RULE(writev);
+ 
+ 	/* Newer variants we don't use. ENOSYS lets glibc fall back. */
++#ifdef __NR_openat2
+ 	ERRNO_RULE(openat2);
++#endif
++#ifdef __NR_faccessat2
+ 	ERRNO_RULE(faccessat2);
++#endif
++#ifdef __NR_close_range
+ 	ERRNO_RULE(close_range);
++#endif
+ 
+ 
+ #if 0
+-- 
+2.34.1
+
diff --git a/package/file/file.hash b/package/file/file.hash
index bb367893a9..a58684f6ad 100644
--- a/package/file/file.hash
+++ b/package/file/file.hash
@@ -1,6 +1,6 @@
 # Locally calculated after verifying signature
-# https://astron.com/pub/file/file-5.47.tar.gz.asc
+# https://astron.com/pub/file/file-5.48.tar.gz.asc
 # using key BE04995BA8F90ED0C0C176C471112AB16CB33B3A
-sha256  45672fec165cb4cc1358a2d76b5d57d22876dcb97ab169427ac385cbe1d5597a  file-5.47.tar.gz
+sha256  ed14656883b23a364b4057c05595d93252da9bc473d30106519519d0da141283  file-5.48.tar.gz
 sha256  0bfa856a9930bddadbef95d1be1cf4e163c0be618e76ea3275caaf255283e274  COPYING
 sha256  2e14b6fa9a74f952ebfde3c96527158df281c953cfaf35609eb854d4da30131c  src/vasprintf.c
diff --git a/package/file/file.mk b/package/file/file.mk
index b70b3c521c..ceebbe3fde 100644
--- a/package/file/file.mk
+++ b/package/file/file.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FILE_VERSION = 5.47
+FILE_VERSION = 5.48
 FILE_SITE = https://astron.com/pub/file
 FILE_LICENSE = BSD-2-Clause, BSD-3-Clause (vasprintf.c)
 FILE_LICENSE_FILES = COPYING src/vasprintf.c
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/file: bump to version 5.48
  2026-11-03  6:40 [Buildroot] [PATCH] package/file: bump to version 5.48 Yegor Yefremov via buildroot
@ 2026-11-04 21:24 ` Thomas Petazzoni via buildroot
  2026-11-04 22:19   ` Yegor Yefremov via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-04 21:24 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: buildroot

On Tue, Nov 03, 2026 at 07:40:34AM +0100, Yegor Yefremov via buildroot wrote:
> https://github.com/file/file/blob/FILE5_48/ChangeLog
> 
> 5.48 adds Landlock sandboxing, which is enabled when the toolchain
> provides linux/landlock.h and skipped at runtime on kernels without
> Landlock support.
> 
> Add two patches fixing the seccomp build, broken by the new syscall
> rules in 5.48:
> 
> - with musl, where pread64 is a macro once seccomp.c includes
>   <unistd.h>;
> - with kernel headers older than 5.9, which lack openat2, faccessat2
>   or close_range.
> 
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to master, thanks!

I continue to be amazed that key open-software like file has a website
like this: https://astron.com/, no Git repository, no mailing list, no
nothing...

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/file: bump to version 5.48
  2026-11-04 21:24 ` Thomas Petazzoni via buildroot
@ 2026-11-04 22:19   ` Yegor Yefremov via buildroot
  2026-11-04 22:44     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-11-04 22:19 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,

On Wed, Nov 4, 2026 at 10:24 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Tue, Nov 03, 2026 at 07:40:34AM +0100, Yegor Yefremov via buildroot wrote:
> > https://github.com/file/file/blob/FILE5_48/ChangeLog
> >
> > 5.48 adds Landlock sandboxing, which is enabled when the toolchain
> > provides linux/landlock.h and skipped at runtime on kernels without
> > Landlock support.
> >
> > Add two patches fixing the seccomp build, broken by the new syscall
> > rules in 5.48:
> >
> > - with musl, where pread64 is a macro once seccomp.c includes
> >   <unistd.h>;
> > - with kernel headers older than 5.9, which lack openat2, faccessat2
> >   or close_range.
> >
> > Assisted-by: Claude:claude-opus-5-5
> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> Applied to master, thanks!
>
> I continue to be amazed that key open-software like file has a website
> like this: https://astron.com/, no Git repository, no mailing list, no
> nothing...

You're right. That's very odd. They seem to use CVS:
https://github.com/file/file

Yegor
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/file: bump to version 5.48
  2026-11-04 22:19   ` Yegor Yefremov via buildroot
@ 2026-11-04 22:44     ` Thomas Petazzoni via buildroot
  2026-11-04 23:08       ` Yegor Yefremov via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-04 22:44 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: buildroot

On Wed, Nov 04, 2026 at 11:19:49PM +0100, Yegor Yefremov wrote:

> > I continue to be amazed that key open-software like file has a website
> > like this: https://astron.com/, no Git repository, no mailing list, no
> > nothing...
> 
> You're right. That's very odd. They seem to use CVS:
> https://github.com/file/file

CVS, interesting :-)

Note that https://github.com/file/file says "NOTE: do not make pull
requests here, nor comment any commits, submit them usual way to bug
tracker or to the mailing list.". So is there a mailing list
somewhere?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/file: bump to version 5.48
  2026-11-04 22:44     ` Thomas Petazzoni via buildroot
@ 2026-11-04 23:08       ` Yegor Yefremov via buildroot
  2026-11-05  7:39         ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-11-04 23:08 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

On Wed, Nov 4, 2026 at 11:44 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Wed, Nov 04, 2026 at 11:19:49PM +0100, Yegor Yefremov wrote:
>
> > > I continue to be amazed that key open-software like file has a website
> > > like this: https://astron.com/, no Git repository, no mailing list, no
> > > nothing...
> >
> > You're right. That's very odd. They seem to use CVS:
> > https://github.com/file/file
>
> CVS, interesting :-)
>
> Note that https://github.com/file/file says "NOTE: do not make pull
> requests here, nor comment any commits, submit them usual way to bug
> tracker or to the mailing list.". So is there a mailing list
> somewhere?

https://mailman.astron.com/pipermail/file/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/file: bump to version 5.48
  2026-11-04 23:08       ` Yegor Yefremov via buildroot
@ 2026-11-05  7:39         ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-05  7:39 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: buildroot

On Thu, Nov 05, 2026 at 12:08:44AM +0100, Yegor Yefremov wrote:

> > Note that https://github.com/file/file says "NOTE: do not make pull
> > requests here, nor comment any commits, submit them usual way to bug
> > tracker or to the mailing list.". So is there a mailing list
> > somewhere?
> 
> https://mailman.astron.com/pipermail/file/

Nice, I see your patches there. Then perhaps we can update the
Upstream: tags in your patches to point to these archives?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-05  7:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03  6:40 [Buildroot] [PATCH] package/file: bump to version 5.48 Yegor Yefremov via buildroot
2026-11-04 21:24 ` Thomas Petazzoni via buildroot
2026-11-04 22:19   ` Yegor Yefremov via buildroot
2026-11-04 22:44     ` Thomas Petazzoni via buildroot
2026-11-04 23:08       ` Yegor Yefremov via buildroot
2026-11-05  7:39         ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox