blob: d55b7cc7c7d85b41d8d9d10ca68692063ab527ad [file] [log] [blame]
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001From 3f6f4964dc79ae986f44afe1687922381f237edd Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <pkj@axis.com>
3Date: Wed, 3 Mar 2021 12:47:28 +0100
4Subject: [PATCH] minstall: Correctly set uid/gid of installed files
5
6In commit caab4d3d, the uid and gid arguments passed to os.chown() by
7set_chown() were accidentally swapped, causing files to end up with
8incorrect owner/group if the owner and group are not the same.
9
10Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6226ac26ef63335bfb817db02b3f295c78214a82]
11Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
12---
13 mesonbuild/minstall.py | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
17index 785ff5869..07da408aa 100644
18--- a/mesonbuild/minstall.py
19+++ b/mesonbuild/minstall.py
20@@ -148,7 +148,7 @@ def set_chown(path: str, user: T.Optional[str] = None, group: T.Optional[str] =
21 Use a real function rather than a lambda to help mypy out. Also real
22 functions are faster.
23 """
24- real_os_chown(path, gid, uid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
25+ real_os_chown(path, uid, gid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
26
27 try:
28 os.chown = chown