0001-v2-FS-58644.patch 1.63 KB
Newer Older
Eric Vidal's avatar
Eric Vidal committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 17584285d296acaa80f131ca0e8b75eff675962b Mon Sep 17 00:00:00 2001
From: fafryd <dz1125.bug.tracker@gmail.com>
Date: Sun, 20 May 2018 14:30:43 +0200
Subject: [PATCH] v2 FS#58644

---
 hw/xfree86/common/meson.build | 13 +++++++++++++
 hw/xfree86/meson.build        | 12 +++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build
index 514999ff6..0eff6e488 100644
--- a/hw/xfree86/common/meson.build
+++ b/hw/xfree86/common/meson.build
@@ -1,3 +1,16 @@
+if get_option('suid_wrapper')
+    x_sh = configure_file(
+        input: '../Xorg.sh.in',
+        output: 'Xorg',
+        configuration: conf_data,
+    )
+    install_data(
+       x_sh,
+       install_mode: 'rwxr-xr-x',
+       install_dir: join_paths(get_option('prefix'), get_option('bindir')),
+    )
+endif
+
 srcs_xorg_common = [
     'xf86fbBus.c',
     'xf86noBus.c',
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index cacf56d4c..d1295d404 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -145,11 +145,13 @@ if get_option('suid_wrapper')
         install_dir: get_option('libexecdir'),
         # install_mode: ['r-sr-xr-x', 0, 0],
     )
-    configure_file(
-        input: 'Xorg.sh.in',
-        output: 'Xorg',
-        configuration: conf_data,
-        install_dir: join_paths(get_option('prefix'), get_option('bindir')),
+     meson.add_install_script(
+        'sh', '-c',
+        'chmod u+s @0@@1@/@2@'.format(
+            '${DESTDIR}',
+            join_paths(get_option('prefix'), get_option('libexecdir')),
+            'Xorg.wrap'
+        )
     )
 endif
 
-- 
2.17.0