mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
sway: update to 1.8
Co-authored-by: SupervisedThinking <supervisedthinking@gmail.com>
This commit is contained in:
parent
0c22fe734d
commit
f3bd0106ab
@ -2,8 +2,8 @@
|
|||||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
PKG_NAME="sway"
|
PKG_NAME="sway"
|
||||||
PKG_VERSION="1.7"
|
PKG_VERSION="1.8"
|
||||||
PKG_SHA256="0c64536fb2883ec518e75cfb119f9300115fb49b084e3fde62b794fe2c6c8d84"
|
PKG_SHA256="fae0422bca8f528027f77e3a7bbea2be0498bba2ad3f0d22554ff8827e37f04e"
|
||||||
PKG_LICENSE="MIT"
|
PKG_LICENSE="MIT"
|
||||||
PKG_SITE="https://swaywm.org/"
|
PKG_SITE="https://swaywm.org/"
|
||||||
PKG_URL="https://github.com/swaywm/sway/archive/${PKG_VERSION}.tar.gz"
|
PKG_URL="https://github.com/swaywm/sway/archive/${PKG_VERSION}.tar.gz"
|
||||||
@ -24,7 +24,7 @@ PKG_MESON_OPTS_TARGET="-Ddefault-wallpaper=false \
|
|||||||
|
|
||||||
pre_configure_target() {
|
pre_configure_target() {
|
||||||
# sway does not build without -Wno flags as all warnings being treated as errors
|
# sway does not build without -Wno flags as all warnings being treated as errors
|
||||||
export TARGET_CFLAGS=$(echo "${TARGET_CFLAGS} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -Wno-maybe-uninitialized -Wno-stringop-truncation -Wno-address")
|
export TARGET_CFLAGS=$(echo "${TARGET_CFLAGS} -Wno-unused-variable")
|
||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
|
@ -1,13 +1,37 @@
|
|||||||
--- a/sway/main.c
|
--- a/sway/main.c
|
||||||
+++ b/sway/main.c
|
+++ b/sway/main.c
|
||||||
@@ -152,6 +152,10 @@ static void log_kernel(void) {
|
@@ -151,7 +151,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool detect_suid(void) {
|
||||||
static bool drop_permissions(void) {
|
- if (geteuid() != 0 && getegid() != 0) {
|
||||||
+ if (getuid() == 0 || getgid() == 0) {
|
+ if (geteuid() == 0 && getegid() == 0) {
|
||||||
+ sway_log(SWAY_INFO, "Running sway as root user");
|
+ sway_log(SWAY_INFO, "Running sway as root user");
|
||||||
+ return true;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -309,11 +310,6 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- // SUID operation is deprecated, so block it for now.
|
||||||
|
- if (detect_suid()) {
|
||||||
|
- exit(EXIT_FAILURE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// Since wayland requires XDG_RUNTIME_DIR to be set, abort with just the
|
||||||
|
// clear error message (when not running as an IPC client).
|
||||||
|
if (!getenv("XDG_RUNTIME_DIR") && optind == argc) {
|
||||||
|
@@ -363,6 +359,11 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // SUID operation is deprecated, so block it for now.
|
||||||
|
+ if (detect_suid()) {
|
||||||
|
+ exit(EXIT_FAILURE);
|
||||||
+ }
|
+ }
|
||||||
if (getuid() != geteuid() || getgid() != getegid()) {
|
+
|
||||||
sway_log(SWAY_ERROR, "!!! DEPRECATION WARNING: "
|
detect_proprietary(allow_unsupported_gpu);
|
||||||
"SUID privilege drop will be removed in a future release, please migrate to seatd-launch");
|
increase_nofile_limit();
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -158,18 +158,6 @@
|
||||||
|
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
|
||||||
|
|
||||||
|
version = '"@0@"'.format(meson.project_version())
|
||||||
|
-git = find_program('git', native: true, required: false)
|
||||||
|
-if git.found()
|
||||||
|
- git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false)
|
||||||
|
- git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
|
||||||
|
- if git_commit.returncode() == 0 and git_branch.returncode() == 0
|
||||||
|
- version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format(
|
||||||
|
- meson.project_version(),
|
||||||
|
- git_commit.stdout().strip(),
|
||||||
|
- git_branch.stdout().strip(),
|
||||||
|
- )
|
||||||
|
- endif
|
||||||
|
-endif
|
||||||
|
add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')
|
||||||
|
|
||||||
|
# Compute the relative path used by compiler invocations.
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user