aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Santana <daniel@santana.tech>2021-02-18 18:18:21 -0300
committerLeo <thinkabit.ukim@gmail.com>2021-02-21 17:05:43 +0000
commitadd17bdb3ef03ac44c05b51fa0ed0b99b4c336a7 (patch)
tree636dfa57c0eeca3f47d8075d4292ce9e3cbab2cd
parent9093c0356bd9d7e20e01b56c566dc03683048a30 (diff)
downloadaports-add17bdb3ef03ac44c05b51fa0ed0b99b4c336a7.tar.gz
aports-add17bdb3ef03ac44c05b51fa0ed0b99b4c336a7.tar.bz2
aports-add17bdb3ef03ac44c05b51fa0ed0b99b4c336a7.tar.xz
community/xorg-server: allow rootless X server
This patch fixes the suid flag in /usr/libexec/Xorg.wrap (instead of /usr/libexec/Xorg) and installs the related wrapper script in /usr/bin/X, so rootless X server becomes possible without breaking systems that still needs root privileges to run X (e.g. GDM). This is the same approach used by Debian, Void Linux and many other distros.
-rw-r--r--community/xorg-server/APKBUILD8
-rw-r--r--community/xorg-server/meson-install-xorg-wrap-script.patch21
2 files changed, 26 insertions, 3 deletions
diff --git a/community/xorg-server/APKBUILD b/community/xorg-server/APKBUILD
index 37c3425acd..d5e499b93d 100644
--- a/community/xorg-server/APKBUILD
+++ b/community/xorg-server/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xorg-server
pkgver=1.20.10
-pkgrel=2
+pkgrel=3
pkgdesc="X.Org X servers"
url="https://www.x.org/wiki"
arch="all"
@@ -55,6 +55,7 @@ source="https://www.x.org/releases/individual/xserver/xorg-server-$pkgver.tar.bz
link-libshadow.patch
e50c85f4ebf559a3bac4817b41074c43d4691779.patch
0001-compiler.h-ensure-IOPortBase-is-declared-extern-on-m.patch
+ meson-install-xorg-wrap-script.patch
"
# secfixes:
@@ -142,7 +143,7 @@ check() {
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
- chmod u+s "$pkgdir"/usr/bin/Xorg
+ chmod u+s "$pkgdir"/usr/libexec/Xorg.wrap
ln -s /usr/bin/Xorg "$pkgdir"/usr/bin/X
# Don't conflict with xf86-input-evdev
@@ -178,4 +179,5 @@ sha512sums="a07bee380bb72f2117fe6f831a6e4aded19bea1f2b36e42a019a30348e98d6fe65c0
004c9a7d920af8825a311d32433bf64190d45583d57bb20b3c5ef39d8011ced7bf17b73296e56078ca791e6cd923594dacfe3fbf7af7c98934627e34559c85d8 xwayland-glx.patch
d0f723e6033a77faec118adc64e9d4749270724cbb2b86ca5ff796e1fbaef2d01ebcbb2904d48132b58f3ecf0781b2583744b671b17b7d51a1748f4b461932b0 link-libshadow.patch
e1a4c630e2bbf9ab47c81d48f2de98e302a0e3d5c2896d07804dc36eef1cd0a4e076bd2ed1be70c0d3b024501e5f540abf1b11548ede74c1af3c82183553a728 e50c85f4ebf559a3bac4817b41074c43d4691779.patch
-a91f861588233c363a7939194d1582114ea216117e5f046b971d6571cb79445ceaaf0a1c6f66781da5b139d9ab8bd260d5dc3ff8c3279410865807561bf4fcee 0001-compiler.h-ensure-IOPortBase-is-declared-extern-on-m.patch"
+a91f861588233c363a7939194d1582114ea216117e5f046b971d6571cb79445ceaaf0a1c6f66781da5b139d9ab8bd260d5dc3ff8c3279410865807561bf4fcee 0001-compiler.h-ensure-IOPortBase-is-declared-extern-on-m.patch
+748e02370ba38bfa02b5e3bc503ad46d6c1fe8c59c7c0288f860a960089d3a6367b57cfcb999b6b354a08bae537baab86f12aed8ecdc381427a8126c4dd3097b meson-install-xorg-wrap-script.patch"
diff --git a/community/xorg-server/meson-install-xorg-wrap-script.patch b/community/xorg-server/meson-install-xorg-wrap-script.patch
new file mode 100644
index 0000000000..d0367d9585
--- /dev/null
+++ b/community/xorg-server/meson-install-xorg-wrap-script.patch
@@ -0,0 +1,21 @@
+--- a/hw/xfree86/meson.build
++++ b/hw/xfree86/meson.build
+@@ -145,10 +145,14 @@
+ 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_data(
++ configure_file(
++ input: 'Xorg.sh.in',
++ output: 'Xorg.sh',
++ configuration: conf_data,
++ ),
++ rename: 'Xorg',
++ install_mode: 'rwxr-xr-x',
+ install_dir: join_paths(get_option('prefix'), get_option('bindir')),
+ )
+ endif