diff mbox series

[025/114] kbd: upgrade 2.8.0 -> 2.9.0

Message ID 20251222200739.2278706-25-alex.kanavin@gmail.com
State New
Headers show
Series [001/114] build-appliance-image: do not inherit setuptools | expand

Commit Message

Alexander Kanavin Dec. 22, 2025, 8:06 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

Backport a patch to address installation ownership issues under
pseudo.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...ly-necessary-metadata-during-install.patch | 54 +++++++++++++++++++
 .../kbd/{kbd_2.8.0.bb => kbd_2.9.0.bb}        |  3 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/kbd/kbd/0001-Preserve-only-necessary-metadata-during-install.patch
 rename meta/recipes-core/kbd/{kbd_2.8.0.bb => kbd_2.9.0.bb} (93%)
diff mbox series

Patch

diff --git a/meta/recipes-core/kbd/kbd/0001-Preserve-only-necessary-metadata-during-install.patch b/meta/recipes-core/kbd/kbd/0001-Preserve-only-necessary-metadata-during-install.patch
new file mode 100644
index 0000000000..87275040c1
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/0001-Preserve-only-necessary-metadata-during-install.patch
@@ -0,0 +1,54 @@ 
+From d9d1c22592b6ce21bf455a22bca9000bf9b3fe61 Mon Sep 17 00:00:00 2001
+From: Alexey Gladkov <legion@kernel.org>
+Date: Wed, 10 Sep 2025 10:45:25 +0200
+Subject: [PATCH] Preserve only necessary metadata during install
+
+"cp -a" tries to preserve all attributes if possible. This implies
+preserving mode, any ACL, xattr permissions, and security context.
+
+In some cases (such as fakeroot), it is not possible to preserve that
+all attributes are preserved.
+
+  cp: failed to preserve ownership for /tmp/.pkgmk/pkg/usr/share/kbd/keymaps/i386/qwertz/sr-latin.map.gz: Operation not supported
+
+To avoid this, we will require that only the necessary attributes be
+preserved. It is important for us to preserve the simlinks.
+
+Signed-off-by: Alexey Gladkov <legion@kernel.org>
+Upstream-Status: Backport [https://github.com/legionus/kbd/commit/db82eb6f86e6c0b8ac4260e88b88d66e1cd7c077]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ data/Makefile.am | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/data/Makefile.am b/data/Makefile.am
+index a730062..4d2ae3d 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -44,21 +44,21 @@ endif
+ 
+ install-consolefonts: $(SRC_FONTDIR) $(SRC_PARTIALDIR)
+ 	mkdir -p -m 755 -- $(DESTDIR)$(datadir)/$(FONTDIR)
+-	cp -a -- $(SRC_FONTDIR)/* $(DESTDIR)$(datadir)/$(FONTDIR)/
++	cp -dPR -- $(SRC_FONTDIR)/* $(DESTDIR)$(datadir)/$(FONTDIR)/
+ 	mkdir -p -m 755 -- $(DESTDIR)$(datadir)/$(FONTDIR)/$(PARTIALDIR)
+-	cp -a -- $(SRC_PARTIALDIR)/* $(DESTDIR)$(datadir)/$(FONTDIR)/$(PARTIALDIR)/
++	cp -dPR -- $(SRC_PARTIALDIR)/* $(DESTDIR)$(datadir)/$(FONTDIR)/$(PARTIALDIR)/
+ 
+ install-consoletrans:
+ 	mkdir -p -m 755 -- $(DESTDIR)$(datadir)/$(TRANSDIR)
+-	cp -a -- $(srcdir)/$(TRANSDIR)/* $(DESTDIR)$(datadir)/$(TRANSDIR)/
++	cp -dPR -- $(srcdir)/$(TRANSDIR)/* $(DESTDIR)$(datadir)/$(TRANSDIR)/
+ 
+ install-unimaps:
+ 	mkdir -p -m 755 -- $(DESTDIR)$(datadir)/$(UNIMAPDIR)
+-	cp -a -- $(srcdir)/$(UNIMAPDIR)/* $(DESTDIR)$(datadir)/$(UNIMAPDIR)/
++	cp -dPR -- $(srcdir)/$(UNIMAPDIR)/* $(DESTDIR)$(datadir)/$(UNIMAPDIR)/
+ 
+ install-keymaps: $(SRC_KEYMAPDIR)
+ 	mkdir -p -m 755 -- $(DESTDIR)$(datadir)/$(KEYMAPDIR)
+-	cp -ar -- $(SRC_KEYMAPDIR)/* $(DESTDIR)$(datadir)/$(KEYMAPDIR)/
++	cp -dPR -- $(SRC_KEYMAPDIR)/* $(DESTDIR)$(datadir)/$(KEYMAPDIR)/
+ 	cd "$(DESTDIR)$(datadir)/$(KEYMAPDIR)"; \
+ 	  for f in $(IGNORE_KEYMAPS); do ! test -e "$$f" || rm -f -- "$$f"; done
+ 	rm -f $(DESTDIR)$(datadir)/$(KEYMAPDIR)/ppc
diff --git a/meta/recipes-core/kbd/kbd_2.8.0.bb b/meta/recipes-core/kbd/kbd_2.9.0.bb
similarity index 93%
rename from meta/recipes-core/kbd/kbd_2.8.0.bb
rename to meta/recipes-core/kbd/kbd_2.9.0.bb
index ababa09918..ae07979733 100644
--- a/meta/recipes-core/kbd/kbd_2.8.0.bb
+++ b/meta/recipes-core/kbd/kbd_2.9.0.bb
@@ -24,9 +24,10 @@  RPROVIDES:${PN} = "console-tools"
 RCONFLICTS:${PN} = "console-tools"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+           file://0001-Preserve-only-necessary-metadata-during-install.patch \
            "
 
-SRC_URI[sha256sum] = "01f5806da7d1d34f594b7b2a6ae1ab23215344cf1064e8edcd3a90fef9776a11"
+SRC_URI[sha256sum] = "fb3197f17a99eb44d22a3a1a71f755f9622dd963e66acfdea1a45120951b02ed"
 
 # 'gzip -n' is set due to https://github.com/legionus/kbd/issues/124
 EXTRA_OECONF = "--disable-tests --enable-compress='gzip -n'"