summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-03-06 14:46:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-06 22:36:35 +0000
commit8f19fb08b66cd75616345e96fa5718048daae7fe (patch)
treef3f03c90fc3283b9aba43d20b1a9b9b965d02937 /meta
parentaefcc7a7dd012530ed846292caaed70d20589a3a (diff)
downloadopenembedded-core-contrib-8f19fb08b66cd75616345e96fa5718048daae7fe.tar.gz
meson: Correctly set uid/gid of installed files
In 0.57.0, the uid and gid arguments passed to os.chown() when using install_mode were accidentally swapped, causing files to end up with incorrect owner/group if the owner and group are not the same. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/meson/meson.inc1
-rw-r--r--meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index 622c22affd..8454d18c28 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -14,6 +14,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://disable-rpath-handling.patch \
file://cross-prop-default.patch \
file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
+ file://0001-minstall-Correctly-set-uid-gid-of-installed-files.patch \
"
SRC_URI[sha256sum] = "72e1c782ba9bda204f4a1ed57f98d027d7b6eb9414c723eebbd6ec7f1955c8a6"
diff --git a/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch b/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch
new file mode 100644
index 0000000000..d55b7cc7c7
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch
@@ -0,0 +1,28 @@
+From 3f6f4964dc79ae986f44afe1687922381f237edd Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Wed, 3 Mar 2021 12:47:28 +0100
+Subject: [PATCH] minstall: Correctly set uid/gid of installed files
+
+In commit caab4d3d, the uid and gid arguments passed to os.chown() by
+set_chown() were accidentally swapped, causing files to end up with
+incorrect owner/group if the owner and group are not the same.
+
+Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6226ac26ef63335bfb817db02b3f295c78214a82]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ mesonbuild/minstall.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
+index 785ff5869..07da408aa 100644
+--- a/mesonbuild/minstall.py
++++ b/mesonbuild/minstall.py
+@@ -148,7 +148,7 @@ def set_chown(path: str, user: T.Optional[str] = None, group: T.Optional[str] =
+ Use a real function rather than a lambda to help mypy out. Also real
+ functions are faster.
+ """
+- real_os_chown(path, gid, uid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
++ real_os_chown(path, uid, gid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
+
+ try:
+ os.chown = chown