diff options
Diffstat (limited to 'source')
7 files changed, 406 insertions, 27 deletions
diff --git a/source/kde/kde/build/plasma-workspace b/source/kde/kde/build/plasma-workspace index d00491fd7..0cfbf0888 100644 --- a/source/kde/kde/build/plasma-workspace +++ b/source/kde/kde/build/plasma-workspace @@ -1 +1 @@ -1 +2 diff --git a/source/kde/kde/patch/plasma-workspace.patch b/source/kde/kde/patch/plasma-workspace.patch index 975f72785..4a298cf17 100644 --- a/source/kde/kde/patch/plasma-workspace.patch +++ b/source/kde/kde/patch/plasma-workspace.patch @@ -1,3 +1,5 @@ # Set GTK_BACKEND=x11 in a wayland session # Works around missing window decorations and broken config file reading cat $CWD/patch/plasma-workspace/0001-Set-GTK_BACKEND-x11-in-a-wayland-session.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } +# Fix issue where USB storage devices are only detected once per session: +cat $CWD/patch/plasma-workspace/update-qml-files.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } diff --git a/source/kde/kde/patch/plasma-workspace/update-qml-files.patch b/source/kde/kde/patch/plasma-workspace/update-qml-files.patch new file mode 100644 index 000000000..54aad06cc --- /dev/null +++ b/source/kde/kde/patch/plasma-workspace/update-qml-files.patch @@ -0,0 +1,278 @@ +diff -u -r plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/DeviceItem.qml plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/DeviceItem.qml +--- plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/DeviceItem.qml 2021-08-31 06:52:18.000000000 -0500 ++++ plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/DeviceItem.qml 2021-09-17 01:37:28.000000000 -0500 +@@ -1,24 +1,11 @@ + /* +- * Copyright 2011 Viranch Mehta <viranch.mehta@gmail.com> +- * Copyright 2012 Jacopo De Simoi <wilderkde@gmail.com> +- * Copyright 2016 Kai Uwe Broulik <kde@privat.broulik.de> +- * Copyright 2020 Nate Graham <nate@kde.org> +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Library General Public License as +- * published by the Free Software Foundation; either version 2 or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this program; if not, write to the +- * Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- */ ++ SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com> ++ SPDX-FileCopyrightText: 2012 Jacopo De Simoi <wilderkde@gmail.com> ++ SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de> ++ SPDX-FileCopyrightText: 2020 Nate Graham <nate@kde.org> ++ ++ SPDX-License-Identifier: LGPL-2.0-or-later ++*/ + + import QtQuick 2.0 + import QtQuick.Controls 2.12 as QQC2 +@@ -44,7 +31,8 @@ + readonly property double totalSpace: sdSource.data[udi] && sdSource.data[udi]["Size"] ? sdSource.data[udi]["Size"] : -1.0 + property bool freeSpaceKnown: freeSpace > 0 && totalSpace > 0 + +- readonly property bool isRootVolume: sdSource.data[udi]["File Path"] ? sdSource.data[udi]["File Path"] == "/" : false ++ readonly property bool isRootVolume: sdSource.data[udi] && sdSource.data[udi]["File Path"] ? sdSource.data[udi]["File Path"] == "/" : false ++ readonly property bool isRemovable: sdSource.data[udi] && sdSource.data[udi]["Removable"] ? sdSource.data[udi]["Removable"] : false + + onOperationResultChanged: { + if (!popupIconTimer.running) { +@@ -73,6 +61,15 @@ + } + } + ++ Connections { ++ target: plasmoid.action("unmountAllDevices") ++ function onTriggered() { ++ if (model["Removable"] && isMounted) { ++ actionTriggered(); ++ } ++ } ++ } ++ + // this keeps the delegate around for 5 seconds after the device has been + // removed in case there was a message, such as "you can now safely remove this" + ListView.onRemove: { +@@ -123,7 +120,7 @@ + var operationName + var operation + var wasMounted = isMounted; +- if (!sdSource.data[udi].Removable || !isMounted) { ++ if (!isRemovable || !isMounted) { + service = hpSource.serviceForSource(udi); + operation = service.operationDescription('invokeAction'); + operation.predicate = "test-predicate-openinwindow.desktop"; +@@ -140,26 +137,23 @@ + + // When there's no better icon available, show a placeholder icon instead + // of nothing +- icon: sdSource.data[udi] == undefined ? "device-notifier" : sdSource.data[udi].Icon ++ icon: sdSource.data[udi] ? sdSource.data[udi].Icon : "device-notifier" + + iconEmblem: { +- if (sdSource.data[udi] != undefined) { +- if (deviceItem.hasMessage) { +- if (deviceItem.message.solidError === 0) { +- return "emblem-information" +- } else { +- return "emblem-error" +- } +- } else if (deviceItem.state == 0 && Emblems && Emblems[0]) { +- return Emblems[0] ++ if (deviceItem.hasMessage) { ++ if (deviceItem.message.solidError === 0) { ++ return "emblem-information" + } else { +- return "" ++ return "emblem-error" + } ++ } else if (deviceItem.state == 0 && Emblems && Emblems[0]) { ++ return Emblems[0] ++ } else { ++ return "" + } +- return "" + } + +- title: sdSource.data[udi] == undefined ? "" : sdSource.data[udi].Description ++ title: sdSource.data[udi] ? sdSource.data[udi].Description : "" + + subtitle: { + if (deviceItem.hasMessage) { +@@ -176,9 +170,9 @@ + } + return "" + } else if (deviceItem.state == 1) { +- return i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Accessing...") ++ return i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Accessing…") + } else { +- return i18nc("Removing is a less technical word for Unmounting; translation should be short and mean \'Currently unmounting this device\'", "Removing...") ++ return i18nc("Removing is a less technical word for Unmounting; translation should be short and mean \'Currently unmounting this device\'", "Removing…") + } + } + +@@ -196,15 +190,15 @@ + + defaultActionButtonAction: QQC2.Action { + icon.name: { +- if (!sdSource.data[udi].Removable) { +- return "document-open-folder" +- } else { ++ if (isRemovable) { + return isMounted ? "media-eject" : "document-open-folder" ++ } else { ++ return "document-open-folder" + } + } + text: { + // It's possible for the root volume to be on a removable disk +- if (!sdSource.data[udi].Removable || deviceItem.isRootVolume) { ++ if (!isRemovable || isRootVolume) { + return i18n("Open in File Manager") + } else { + var types = model["Device Types"]; +@@ -236,7 +230,7 @@ + if (modelData.predicate != "test-predicate-openinwindow.desktop") { + return true; + } +- return sdSource.data[udi].Removable && deviceItem.isMounted; ++ return deviceItem.isRemovable && deviceItem.isMounted; + } + onTriggered: { + var service = hpSource.serviceForSource(udi); +@@ -257,7 +251,7 @@ + icon.name: "media-mount" + + // Only show for unmounted removable devices +- enabled: sdSource.data[udi].Removable && !deviceItem.isMounted ++ enabled: deviceItem.isRemovable && !deviceItem.isMounted + + onTriggered: { + var service = sdSource.serviceForSource(udi); +diff -u -r plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/FullRepresentation.qml plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/FullRepresentation.qml +--- plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/FullRepresentation.qml 2021-08-31 06:52:18.000000000 -0500 ++++ plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/FullRepresentation.qml 2021-09-17 01:37:39.000000000 -0500 +@@ -1,26 +1,12 @@ + /* +- * Copyright 2011 Viranch Mehta <viranch.mehta@gmail.com> +- * Copyright 2012 Jacopo De Simoi <wilderkde@gmail.com> +- * Copyright 2014 David Edmundson <davidedmundson@kde.org> +- * Copyright 2014 Marco Martin <mart@kde.org> +- * Copyright 2020 Nate Graham <nate@kde.org> +- * +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Library General Public License as +- * published by the Free Software Foundation; either version 2 or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this program; if not, write to the +- * Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- */ ++ SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com> ++ SPDX-FileCopyrightText: 2012 Jacopo De Simoi <wilderkde@gmail.com> ++ SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org> ++ SPDX-FileCopyrightText: 2014 Marco Martin <mart@kde.org> ++ SPDX-FileCopyrightText: 2020 Nate Graham <nate@kde.org> ++ ++ SPDX-License-Identifier: LGPL-2.0-or-later ++*/ + + import QtQuick 2.2 + import QtQuick.Window 2.2 +@@ -149,7 +135,7 @@ + section { + property: "Type Description" + delegate: Item { +- height: childrenRect.height ++ height: Math.floor(childrenRect.height) + width: notifierDialog.width + PlasmaExtras.Heading { + level: 3 +diff -u -r plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/devicenotifier.qml plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/devicenotifier.qml +--- plasma-workspace-5.22.5.orig/applets/devicenotifier/package/contents/ui/devicenotifier.qml 2021-08-31 06:52:18.000000000 -0500 ++++ plasma-workspace-5.22.5/applets/devicenotifier/package/contents/ui/devicenotifier.qml 2021-09-17 01:37:49.000000000 -0500 +@@ -1,24 +1,11 @@ + /* +- * Copyright 2011 Viranch Mehta <viranch.mehta@gmail.com> +- * Copyright 2012 Jacopo De Simoi <wilderkde@gmail.com> +- * Copyright 2014 David Edmundson <davidedmundson@kde.org> +- * Copyright 2016 Kai Uwe Broulik <kde@privat.broulik.de> +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Library General Public License as +- * published by the Free Software Foundation; either version 2 or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this program; if not, write to the +- * Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- */ ++ SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com> ++ SPDX-FileCopyrightText: 2012 Jacopo De Simoi <wilderkde@gmail.com> ++ SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org> ++ SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de> ++ ++ SPDX-License-Identifier: LGPL-2.0-or-later ++*/ + + import QtQuick 2.0 + import QtQuick.Layouts 1.1 +@@ -88,6 +75,7 @@ + onSourceAdded: { + disconnectSource(source); + connectSource(source); ++ sdSource.connectedSources = sources + } + onSourceRemoved: { + disconnectSource(source); +@@ -111,7 +99,6 @@ + PlasmaCore.DataSource { + id: sdSource + engine: "soliddevice" +- connectedSources: hpSource.sources + interval: 0 + property string last + onSourceAdded: { +@@ -235,6 +222,13 @@ + Plasmoid.status = PlasmaCore.Types.PassiveStatus; + } + ++ plasmoid.setAction("unmountAllDevices", i18n("Remove All"), "media-eject"); ++ plasmoid.action("unmountAllDevices").visible = Qt.binding(() => { ++ return devicenotifier.mountedRemovables > 1; ++ }); ++ ++ plasmoid.setActionSeparator("sep0"); ++ + plasmoid.setAction("showRemovableDevices", i18n("Removable Devices"), "drive-removable-media"); + devicenotifier.showRemovableDevicesAction = plasmoid.action("showRemovableDevices"); + devicenotifier.showRemovableDevicesAction.checkable = true; +@@ -264,7 +258,7 @@ + + if (devicenotifier.openAutomounterKcmAuthorized) { + plasmoid.removeAction("configure"); +- plasmoid.setAction("configure", i18nc("Open auto mounter kcm", "Configure Removable Devices..."), "configure") ++ plasmoid.setAction("configure", i18nc("Open auto mounter kcm", "Configure Removable Devices…"), "configure") + } + } + diff --git a/source/n/NetworkManager/NetworkManager.SlackBuild b/source/n/NetworkManager/NetworkManager.SlackBuild index 3cfd061d4..c2fb7ed04 100755 --- a/source/n/NetworkManager/NetworkManager.SlackBuild +++ b/source/n/NetworkManager/NetworkManager.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=NetworkManager VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} # Automatically determine the architecture we're building on: MARCH=$( uname -m ) diff --git a/source/n/NetworkManager/conf.d/00-dhcp-client.conf b/source/n/NetworkManager/conf.d/00-dhcp-client.conf index 53e30c85d..78518ac56 100644 --- a/source/n/NetworkManager/conf.d/00-dhcp-client.conf +++ b/source/n/NetworkManager/conf.d/00-dhcp-client.conf @@ -1,22 +1,11 @@ [main] # Choose a DHCP client below. Upstream recommends internal, but results may vary. # -# This is a simple DHCP client that is built into NetworkManager: -dhcp=internal +# dhcpcd is the DHCP client usually used by Slackware: +dhcp=dhcpcd # # dhclient is the ISC reference DHCP client, part of the dhcp package: #dhcp=dhclient # -# dhcpcd is the DHCP client usually used by Slackware. However, it is built -# with --enable-privsep, and a side-effect of this when used with -# NetworkManager is that the network will not return properly after a -# suspend/resume cycle. If you don't require this functionality, dhcpcd will -# work fine otherwise. If you do require it and don't want to use one of the -# other two options here, there are some workarounds. -# You may force NetworkManager to reload the network by killing dhcpcd: -# killall -9 dhcpcd -# Otherwise, you may rebuild the dhcpcd package without privilege separation -# using the following command in the dhcpcd source directory: -# PRIVSEP=no ./dhcpcd.SlackBuild -# The resulting dhcpcd package will work fine with NetworkManager. -#dhcp=dhcpcd +# This is a simple DHCP client that is built into NetworkManager: +#dhcp=internal diff --git a/source/n/NetworkManager/patches/9cc2591fe871b29ce9a743dfb2cd189cb1580bde.dhcpcd.graceful.exit.patch b/source/n/NetworkManager/patches/9cc2591fe871b29ce9a743dfb2cd189cb1580bde.dhcpcd.graceful.exit.patch new file mode 100644 index 000000000..72e33b75e --- /dev/null +++ b/source/n/NetworkManager/patches/9cc2591fe871b29ce9a743dfb2cd189cb1580bde.dhcpcd.graceful.exit.patch @@ -0,0 +1,119 @@ +From 9cc2591fe871b29ce9a743dfb2cd189cb1580bde Mon Sep 17 00:00:00 2001 +From: Roy Marples <roy@marples.name> +Date: Thu, 16 Sep 2021 20:36:49 +0100 +Subject: [PATCH] dhcpcd: stop dhcpcd using nm_dhcp_client_stop_pid rather than + killing + +NetworkManager can stop/start a DHCP client faster than dhcpcd can +gracefully exit. + +As such, refactor nm_dhcp_client_stop_pid so that a specific signal +can be sent which allows dhcpcd to gracefully stop on SIGTERM and +release on SIGALRM. +--- + src/core/dhcp/nm-dhcp-client.c | 6 +++--- + src/core/dhcp/nm-dhcp-client.h | 2 +- + src/core/dhcp/nm-dhcp-dhclient.c | 2 +- + src/core/dhcp/nm-dhcp-dhcpcd.c | 22 ++++------------------ + 4 files changed, 9 insertions(+), 23 deletions(-) + +diff --git a/src/core/dhcp/nm-dhcp-client.c b/src/core/dhcp/nm-dhcp-client.c +index f88c79c0be..727296d158 100644 +--- a/src/core/dhcp/nm-dhcp-client.c ++++ b/src/core/dhcp/nm-dhcp-client.c +@@ -429,14 +429,14 @@ watch_cleanup(NMDhcpClient *self) + } + + void +-nm_dhcp_client_stop_pid(pid_t pid, const char *iface) ++nm_dhcp_client_stop_pid(pid_t pid, const char *iface, int sig) + { + char *name = iface ? g_strdup_printf("dhcp-client-%s", iface) : NULL; + + g_return_if_fail(pid > 1); + + nm_utils_kill_child_sync(pid, +- SIGTERM, ++ sig, + LOGD_DHCP, + name ?: "dhcp-client", + NULL, +@@ -457,7 +457,7 @@ stop(NMDhcpClient *self, gboolean release) + if (priv->pid > 0) { + /* Clean up the watch handler since we're explicitly killing the daemon */ + watch_cleanup(self); +- nm_dhcp_client_stop_pid(priv->pid, priv->iface); ++ nm_dhcp_client_stop_pid(priv->pid, priv->iface, SIGTERM); + } + priv->pid = -1; + } +diff --git a/src/core/dhcp/nm-dhcp-client.h b/src/core/dhcp/nm-dhcp-client.h +index 2e7e021650..439b873dec 100644 +--- a/src/core/dhcp/nm-dhcp-client.h ++++ b/src/core/dhcp/nm-dhcp-client.h +@@ -197,7 +197,7 @@ void nm_dhcp_client_stop(NMDhcpClient *self, gboolean release); + /* Backend helpers for subclasses */ + void nm_dhcp_client_stop_existing(const char *pid_file, const char *binary_name); + +-void nm_dhcp_client_stop_pid(pid_t pid, const char *iface); ++void nm_dhcp_client_stop_pid(pid_t pid, const char *iface, int sig); + + void nm_dhcp_client_start_timeout(NMDhcpClient *self); + +diff --git a/src/core/dhcp/nm-dhcp-dhclient.c b/src/core/dhcp/nm-dhcp-dhclient.c +index 970a51f5dd..21fc857d26 100644 +--- a/src/core/dhcp/nm-dhcp-dhclient.c ++++ b/src/core/dhcp/nm-dhcp-dhclient.c +@@ -627,7 +627,7 @@ stop(NMDhcpClient *client, gboolean release) + + if (dhclient_start(client, NULL, TRUE, &rpid, 0, NULL)) { + /* Wait a few seconds for the release to happen */ +- nm_dhcp_client_stop_pid(rpid, nm_dhcp_client_get_iface(client)); ++ nm_dhcp_client_stop_pid(rpid, nm_dhcp_client_get_iface(client), SIGTERM); + } + } + } +diff --git a/src/core/dhcp/nm-dhcp-dhcpcd.c b/src/core/dhcp/nm-dhcp-dhcpcd.c +index 7522156bef..db694a2c11 100644 +--- a/src/core/dhcp/nm-dhcp-dhcpcd.c ++++ b/src/core/dhcp/nm-dhcp-dhcpcd.c +@@ -162,31 +162,17 @@ stop(NMDhcpClient *client, gboolean release) + { + NMDhcpDhcpcd *self = NM_DHCP_DHCPCD(client); + pid_t pid; +- int sig, errsv; ++ int sig; + + pid = nm_dhcp_client_get_pid(client); + if (pid > 1) { + sig = release ? SIGALRM : SIGTERM; + _LOGD("sending %s to dhcpcd pid %d", sig == SIGALRM ? "SIGALRM" : "SIGTERM", pid); + +- /* dhcpcd-9.x features privilege separation. +- * It's not our job to track all these processes so we rely on dhcpcd +- * to always cleanup after itself. +- * Because it also re-parents itself to PID 1, the process cannot be +- * reaped or waited for. +- * As such, just send the correct signal. +- */ +- if (kill(pid, sig) == -1) { +- errsv = errno; +- _LOGE("failed to kill dhcpcd %d:%s", errsv, strerror(errsv)); +- } +- +- /* When this function exits NM expects the PID to be -1. +- * This means we also need to stop watching the pid. +- * If we need to know the exit status then we need to refactor NM +- * to allow a non -1 to mean we're waiting to exit still. +- */ ++ /* We need to remove the watch before stopping the process */ + nm_dhcp_client_stop_watch_child(client, pid); ++ ++ nm_dhcp_client_stop_pid(pid, nm_dhcp_client_get_iface(client), sig); + } + } + +-- +GitLab + + diff --git a/source/n/dhcpcd/dhcpcd.SlackBuild b/source/n/dhcpcd/dhcpcd.SlackBuild index c4efe43d9..5bab0cb38 100755 --- a/source/n/dhcpcd/dhcpcd.SlackBuild +++ b/source/n/dhcpcd/dhcpcd.SlackBuild @@ -29,16 +29,7 @@ BUILD=${BUILD:-2} # By default, Slackware builds dhcpcd with privilege separation, which improves # security by ensuring that any security vulnerabilies such as buffer overflows # or shell metacharacter insertion would gain access to an unprivileged user -# (the dhcpcd user) rather than the root user. However, this creates issues -# when using dhcpcd with NetworkManager. With privilege separation enabled, -# the network won't return properly after suspend/resume. -# -# If you use dhcpcd with NetworkManager and this functionality is important to -# you, rebuild dhcpcd with this command: -# -# PRIVSEP=no ./dhcpcd.SlackBuild -# -# Then upgrade to the generated package. +# (the dhcpcd user) rather than the root user. PRIVSEP=${PRIVSEP:-yes} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} |