Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame^] | 1 | From 3f6f4964dc79ae986f44afe1687922381f237edd Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Kjellerstedt <pkj@axis.com> |
| 3 | Date: Wed, 3 Mar 2021 12:47:28 +0100 |
| 4 | Subject: [PATCH] minstall: Correctly set uid/gid of installed files |
| 5 | |
| 6 | In commit caab4d3d, the uid and gid arguments passed to os.chown() by |
| 7 | set_chown() were accidentally swapped, causing files to end up with |
| 8 | incorrect owner/group if the owner and group are not the same. |
| 9 | |
| 10 | Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6226ac26ef63335bfb817db02b3f295c78214a82] |
| 11 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
| 12 | --- |
| 13 | mesonbuild/minstall.py | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py |
| 17 | index 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 |