summaryrefslogtreecommitdiffstats
path: root/source/a
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2024-04-30 18:54:11 +0000
committer Eric Hameleers <alien@slackware.com>2024-04-30 21:28:42 +0200
commit6d8e74c7fbe520ddc41f48de0243359e5c731717 (patch)
treee751736889502eb106f26c77cb518fc80e3c70d5 /source/a
parent93207ebf6e7becbc07e4c32c55793a8acdbce2be (diff)
downloadcurrent-6d8e74c7fbe520ddc41f48de0243359e5c731717.tar.gz
current-6d8e74c7fbe520ddc41f48de0243359e5c731717.tar.xz
Tue Apr 30 18:54:11 UTC 202420240430185411
a/elogind-255.5-x86_64-1.txz: Upgraded. d/git-2.45.0-x86_64-1.txz: Upgraded. l/gst-plugins-bad-free-1.24.3-x86_64-1.txz: Upgraded. l/gst-plugins-base-1.24.3-x86_64-1.txz: Upgraded. l/gst-plugins-good-1.24.3-x86_64-1.txz: Upgraded. l/gst-plugins-libav-1.24.3-x86_64-1.txz: Upgraded. l/gstreamer-1.24.3-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a')
-rw-r--r--source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch39
-rw-r--r--source/a/elogind/ce3616c8864e56bf7efb233242f20197108a9dba.patch132
-rwxr-xr-xsource/a/elogind/elogind.SlackBuild8
3 files changed, 2 insertions, 177 deletions
diff --git a/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch b/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch
deleted file mode 100644
index fe7940fff..000000000
--- a/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 5d16d94aa9a5e3afe5b51f591497149630763b24 Mon Sep 17 00:00:00 2001
-From: Sven Eden <sven@eden-worx.com>
-Date: Mon, 22 Apr 2024 08:31:30 +0200
-Subject: [PATCH] SIGCHLD handler: Check sleep_fork_action against NULL
-
-Signed-off-by: Sven Eden <sven@eden-worx.com>
----
- src/login/elogind.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/login/elogind.c b/src/login/elogind.c
-index e616b8088e..b47540352f 100644
---- a/src/login/elogind.c
-+++ b/src/login/elogind.c
-@@ -81,6 +81,7 @@ static int elogind_sigchld_handler(
- sd_event_source* s,
- const struct signalfd_siginfo* si,
- void* userdata ) {
-+ const HandleActionData* a;
- Manager* m = userdata;
- int r, status;
-
-@@ -97,13 +98,14 @@ static int elogind_sigchld_handler(
-
- /* The sleep forker PID is always "the outer one", so wait for it second. */
- if ( m->sleep_fork_pid > 0 ) {
-+ a = m->sleep_fork_action;
- waitpid(m->sleep_fork_pid, &status, WNOHANG | WUNTRACED);
- log_debug_elogind( "sleep_fork PID %d waitpid() set status %d", m->sleep_fork_pid, status );
- if ( WIFEXITED(status) || WIFSIGNALED(status) )
- m->sleep_fork_pid = 0;
- /* Tell people that they now may take a lock again */
-- if ( m->sleep_fork_action->sleep_operation != _SLEEP_OPERATION_INVALID ) {
-- (void) send_prepare_for( m, m->sleep_fork_action, false );
-+ if ( a && a->sleep_operation != _SLEEP_OPERATION_INVALID ) {
-+ (void) send_prepare_for( m, a, false );
- m->sleep_fork_action = NULL; /* All done */
- }
- }
diff --git a/source/a/elogind/ce3616c8864e56bf7efb233242f20197108a9dba.patch b/source/a/elogind/ce3616c8864e56bf7efb233242f20197108a9dba.patch
deleted file mode 100644
index 3fcc03794..000000000
--- a/source/a/elogind/ce3616c8864e56bf7efb233242f20197108a9dba.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From ce3616c8864e56bf7efb233242f20197108a9dba Mon Sep 17 00:00:00 2001
-From: Sven Eden <sven@eden-worx.com>
-Date: Sun, 21 Apr 2024 17:07:25 +0200
-Subject: [PATCH] Send wakeup signal in SIGCHLD handler (#280)
-
-The forked out sleeper process fails to send the wakeup signal, as it
-does not share the dbus connection with elogind.
-
-Therefore elogind sends the signal itself once the sleeper has
-messaged elogind that it is done via the SIGCHLD signal.
-
-Bug: #280
-Signed-off-by: Sven Eden <sven@eden-worx.com>
----
- src/login/elogind.c | 19 +++++++++++++------
- src/login/logind-dbus.c | 13 +++++--------
- src/login/logind-dbus.h | 4 ++++
- src/login/logind.h | 3 +++
- 4 files changed, 25 insertions(+), 14 deletions(-)
-
-diff --git a/src/login/elogind.c b/src/login/elogind.c
-index 11000170a6..e616b8088e 100644
---- a/src/login/elogind.c
-+++ b/src/login/elogind.c
-@@ -25,6 +25,7 @@
- #include "fd-util.h"
- #include "fileio.h"
- #include "fs-util.h"
-+#include "logind-dbus.h"
- #include "mount-setup.h"
- #include "musl_missing.h"
- #include "parse-util.h"
-@@ -100,6 +101,11 @@ static int elogind_sigchld_handler(
- log_debug_elogind( "sleep_fork PID %d waitpid() set status %d", m->sleep_fork_pid, status );
- if ( WIFEXITED(status) || WIFSIGNALED(status) )
- m->sleep_fork_pid = 0;
-+ /* Tell people that they now may take a lock again */
-+ if ( m->sleep_fork_action->sleep_operation != _SLEEP_OPERATION_INVALID ) {
-+ (void) send_prepare_for( m, m->sleep_fork_action, false );
-+ m->sleep_fork_action = NULL; /* All done */
-+ }
- }
- }
-
-@@ -416,12 +422,13 @@ void elogind_manager_free( Manager* m ) {
- int elogind_manager_new( Manager* m ) {
- int r = 0;
-
-- m->cgroups_agent_fd = -1;
-- m->pin_cgroupfs_fd = -1;
-- m->test_run_flags = 0;
-- m->do_interrupt = false;
-- m->sleep_fork_pid = 0;
-- m->tool_fork_pid = 0;
-+ m->cgroups_agent_fd = -1;
-+ m->pin_cgroupfs_fd = -1;
-+ m->test_run_flags = 0;
-+ m->do_interrupt = false;
-+ m->sleep_fork_pid = 0;
-+ m->tool_fork_pid = 0;
-+ m->sleep_fork_action = NULL;
-
- /* Init poweroff/suspend interruption */
- m->allow_poweroff_interrupts = false;
-diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
-index 25df8d2cb9..b83dceae9b 100644
---- a/src/login/logind-dbus.c
-+++ b/src/login/logind-dbus.c
-@@ -1730,7 +1730,11 @@ int manager_set_lid_switch_ignore(Manager *m, usec_t until) {
- return r;
- }
-
-+#if 0 /// elogind needs to call this from elogind.c
- static int send_prepare_for(Manager *m, const HandleActionData *a, bool _active) {
-+#else
-+int send_prepare_for(Manager *m, const HandleActionData *a, bool _active) {
-+#endif // 0
- int k = 0, r, active = _active;
-
- assert(m);
-@@ -1902,6 +1906,7 @@ static int elogind_execute_shutdown_or_sleep(
- * from the shutdown/sleep routines. Doing this in the main thread would
- * make it impossible to talk to ourselves.
- */
-+ m->sleep_fork_action = a; /* Remember this for the SIGCHLD handler */
- forker = strjoina( "e-", handle_action_to_string( a->handle ) );
- t = safe_fork( forker,
- FORK_LOG|FORK_REOPEN_LOG|FORK_DEATHSIG_SIGTERM|FORK_CLOSE_ALL_FDS|FORK_REARRANGE_STDIO,
-@@ -1926,14 +1931,6 @@ static int elogind_execute_shutdown_or_sleep(
- log_error_errno( r, "%s: shutdown_or_sleep failed: %m", program_invocation_short_name );
- }
-
-- /* As elogind cannot rely on a systemd manager to call all
-- * sleeping processes to wake up, we have to tell them all
-- * by ourselves.
-- * Note: execute_shutdown_or_sleep() does not send the
-- * signal unless an error occurred. */
-- if ( a->sleep_operation != _SLEEP_OPERATION_INVALID )
-- (void) send_prepare_for( m, a, false );
--
- log_debug_elogind("Exiting from %s", program_invocation_short_name);
-
- _exit( EXIT_SUCCESS );
-diff --git a/src/login/logind-dbus.h b/src/login/logind-dbus.h
-index c9d59231d4..aa8bdfeb23 100644
---- a/src/login/logind-dbus.h
-+++ b/src/login/logind-dbus.h
-@@ -9,6 +9,10 @@
- #include "logind-user.h"
- #include "logind.h"
-
-+#if 1 /// elogind needs to call this from elogind.c
-+int send_prepare_for(Manager *m, const HandleActionData *a, bool _active);
-+#endif // 1
-+
- int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret);
- int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret);
- int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Seat **ret);
-diff --git a/src/login/logind.h b/src/login/logind.h
-index 20c73444ed..6eb40ddb6f 100644
---- a/src/login/logind.h
-+++ b/src/login/logind.h
-@@ -84,6 +84,9 @@ struct Manager {
- /* elogind might spawn processes to suspend/hibernate, so we need their PIDs to end them properly */
- pid_t sleep_fork_pid; /* for suspend/hibernate fork */
- pid_t tool_fork_pid; /* for external tool fork */
-+
-+ /* To wake up sleeping consumers using the right operation, the manager must know what is going on. */
-+ const HandleActionData *sleep_fork_action;
- #endif // 0
-
- Seat *seat0;
diff --git a/source/a/elogind/elogind.SlackBuild b/source/a/elogind/elogind.SlackBuild
index 2f365484d..74d26ab85 100755
--- a/source/a/elogind/elogind.SlackBuild
+++ b/source/a/elogind/elogind.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=elogind
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -119,10 +119,6 @@ cat $CWD/elogind.nobody.nogroup.99.99.diff | patch -p1 --verbose || exit 1
cat $CWD/11-prefer-deep-suspend.patch | patch -p1 --verbose || exit 1
cat $CWD/12-default-deep-suspend.patch | patch -p1 --verbose || exit 1
-# Upstream sleep fixes:
-cat $CWD/ce3616c8864e56bf7efb233242f20197108a9dba.patch | patch -p1 --verbose || exit 1
-cat $CWD/5d16d94aa9a5e3afe5b51f591497149630763b24.patch | patch -p1 --verbose || exit 1
-
# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
@@ -195,7 +191,7 @@ mkdir -p $PKG/etc/elogind/logind.conf.d/ $PKG/etc/elogind/sleep.conf.d/
# Add login1 policy file that allows users in the 'power' group
# to shutdown/reboot the computer:
mkdir -p $PKG/usr/share/polkit-1/rules.d
-zcat $CWD/10-enable-elogind-power.rules.gz > $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules
+cat $CWD/10-enable-elogind-power.rules > $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules
# We don't need the hidden files to make inferior package managers keep dirs:
find $PKG -type f -name ".keep_dir" -exec rm -f {} \;