From f10e6ac5e8ef7bf6bba3fb81599e8ed714f35a93 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 9 Mar 2026 07:31:01 +0000 Subject: [PATCH] sys-apps/file: Sync with Gentoo It's from Gentoo commit 82fd76b51c99206b6478bb302bc01f588d061ea3. Signed-off-by: Flatcar Buildbot --- .../{file-5.47.ebuild => file-5.47-r1.ebuild} | 1 + .../file/files/file-5.47-magic.py.patch | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+) rename sdk_container/src/third_party/portage-stable/sys-apps/file/{file-5.47.ebuild => file-5.47-r1.ebuild} (99%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/file/files/file-5.47-magic.py.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47-r1.ebuild similarity index 99% rename from sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47-r1.ebuild index 95e3022d87..9b1335a913 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.47-r1.ebuild @@ -60,6 +60,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( makedev ) PATCHES=( "${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet "${FILESDIR}/file-5.45-seccomp-sandbox.patch" + "${FILESDIR}/file-5.47-magic.py.patch" ) src_prepare() { diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/file/files/file-5.47-magic.py.patch b/sdk_container/src/third_party/portage-stable/sys-apps/file/files/file-5.47-magic.py.patch new file mode 100644 index 0000000000..1583873e39 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/file/files/file-5.47-magic.py.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/970842 + +From f70443485d6754b8e4ecb82dae1ec58102ab9dd5 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Tue, 3 Mar 2026 14:55:15 +0000 +Subject: [PATCH] Use self._close Vincent Mihalkovic + +--- + python/magic.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/python/magic.py b/python/magic.py +index 14938281c6..24c32d2ddf 100644 +--- a/python/magic.py ++++ b/python/magic.py +@@ -133,8 +133,8 @@ def close(self): + """ + Closes the magic database and deallocates any resources used. + """ +- if _close: +- _close(self._magic_t) ++ if self._close: ++ self._close(self._magic_t) + + @staticmethod + def __tostr(s): +From f8f8745ccc0fac38561ba7a168c7b5638135bcec Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Wed, 4 Mar 2026 10:26:12 +0000 +Subject: [PATCH] convert tab to spaces + +--- + python/magic.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/magic.py b/python/magic.py +index 24c32d2dd..1db4a5d01 100644 +--- a/python/magic.py ++++ b/python/magic.py +@@ -127,7 +127,7 @@ class magic_set(Structure): + class Magic(object): + def __init__(self, ms): + self._magic_t = ms +- self._close = _close ++ self._close = _close + + def close(self): + """