KDE frameworks, bump to 6.25.0 part6 (#13944)

This commit is contained in:
Schrijvers Luc
2026-04-14 14:13:54 +02:00
committed by GitHub
parent 1d44c30317
commit 21406f03a5
13 changed files with 222 additions and 26 deletions

View File

@@ -0,0 +1,89 @@
SUMMARY="User interface for running shell commands with root privileges"
DESCRIPTION="KDESU provides functionality for building GUI front ends for (password asking) \
console mode programs. For example, kdesu and kdessh use it to interface with su and ssh \
respectively."
HOMEPAGE="https://invent.kde.org/frameworks/kdesu"
COPYRIGHT="2010-2024 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/-/archive/v$portVersion/kdesu-v$portVersion.tar.bz2"
CHECKSUM_SHA256="5e163e989e0d13851f059ce9315475df6bb83b4b1b887038867d121af1fc637f"
SOURCE_DIR="kdesu-v$portVersion"
PATCHES="kdesu-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
kdesu$secondaryArchSuffix = $portVersion
lib:libKF5Su$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libKF5ConfigCore$secondaryArchSuffix
lib:libKF5CoreAddons$secondaryArchSuffix
lib:libKF5I18n$secondaryArchSuffix
lib:libKF5Pty$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
"
PROVIDES_devel="
kdesu${secondaryArchSuffix}_devel = $portVersion
devel:libKF5Su$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
kdesu$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= $portVersion
devel:libKF5ConfigCore$secondaryArchSuffix == $portVersion
devel:libKF5CoreAddons$secondaryArchSuffix == $portVersion
devel:libKF5I18n$secondaryArchSuffix == $portVersion
devel:libKF5Pty$secondaryArchSuffix == $portVersion
devel:libQt5Core$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:msgfmt
cmd:msgmerge
cmd:pkg_config$secondaryArchSuffix
cmd:qdbuscpp2xml$secondaryArchSuffix >= 5
"
BUILD()
{
cmake -Bbuild -S. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
-DBUILD_TESTING=OFF \
-DKDESU_USE_SUDO_DEFAULT=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libKF5Su
packageEntries devel \
$developDir \
$dataDir/Qt5/mkspecs \
$libDir/cmake
}
TEST()
{
# 50% tests passed, 1 tests failed out of 2
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
make -C build test
}

View File

@@ -3,13 +3,13 @@ DESCRIPTION="KDESU provides functionality for building GUI front ends for (passw
console mode programs. For example, kdesu and kdessh use it to interface with su and \
ssh respectively."
HOMEPAGE="https://invent.kde.org/frameworks/kdesu"
COPYRIGHT="2010-2025 KDE Organisation"
COPYRIGHT="2010-2026 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kdesu-$portVersion.tar.xz"
CHECKSUM_SHA256="02f92edf906a397b05554ff4bd671cd7f5ac6c2cef56732541a2c27cc03d209f"
CHECKSUM_SHA256="09ad4bf5fe7abae40884f8b645b22948cd00f418c7d643a0b5d505a02ef6f634"
SOURCE_DIR="kdesu-$portVersion"
PATCHES="kdesu-$portVersion.patchset"
PATCHES="kdesu6-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

View File

@@ -0,0 +1,105 @@
From 1b0ffaca707005b8ef321bb9d9ec31212be49fe3 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Thu, 11 Jan 2024 12:36:21 +0100
Subject: build fixes
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e166889..93d4c57 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -69,6 +69,7 @@ target_link_libraries(KF5Su
PRIVATE
KF5::CoreAddons # KUser::loginName
KF5::ConfigCore # KConfigGroup
+ network
)
diff --git a/src/client.cpp b/src/client.cpp
index 2bc2d09..7105f7d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -38,7 +38,7 @@ public:
QByteArray sock;
};
-#ifndef SUN_LEN
+#if !defined(SUN_LEN) && !defined(Q_OS_HAIKU)
#define SUN_LEN(ptr) ((QT_SOCKLEN_T)(((struct sockaddr_un *)0)->sun_path) + strlen((ptr)->sun_path))
#endif
@@ -94,7 +94,7 @@ int KDEsuClient::connect()
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, d->sock.constData());
- if (QT_SOCKET_CONNECT(d->sockfd, (struct sockaddr *)&addr, SUN_LEN(&addr)) < 0) {
+ if (QT_SOCKET_CONNECT(d->sockfd, (struct sockaddr *)&addr, sizeof(&addr)) < 0) {
qCWarning(KSU_LOG) << "[" << __FILE__ << ":" << __LINE__ << "] "
<< "connect():" << strerror(errno);
close(d->sockfd);
diff --git a/src/kdesud/CMakeLists.txt b/src/kdesud/CMakeLists.txt
index a545e59..437d4ad 100644
--- a/src/kdesud/CMakeLists.txt
+++ b/src/kdesud/CMakeLists.txt
@@ -25,7 +25,7 @@ ecm_qt_declare_logging_category(kdesud
EXPORT KSU
)
-target_link_libraries(kdesud KF5::Su KF5::I18n ${X11_LIBRARIES})
+target_link_libraries(kdesud KF5::Su KF5::I18n ${X11_LIBRARIES} network)
if(HAVE_X11)
target_include_directories(kdesud PRIVATE ${X11_X11_INCLUDE_PATH})
endif()
diff --git a/src/kdesud/kdesud.cpp b/src/kdesud/kdesud.cpp
index 0d16772..53c1b13 100644
--- a/src/kdesud/kdesud.cpp
+++ b/src/kdesud/kdesud.cpp
@@ -60,7 +60,7 @@
#include <dirent.h>
-#if !HAVE_CLOSE_RANGE
+#if !HAVE_CLOSE_RANGE && !defined(Q_OS_HAIKU)
#include <sys/syscall.h> // close_range syscall
#endif
@@ -258,11 +258,13 @@ int create_socket()
}
}
+#ifndef Q_OS_HAIKU
sockfd = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (sockfd < 0) {
qCCritical(KSUD_LOG) << "socket(): " << ERR << "\n";
return -1;
}
+#endif
// Ensure socket closed on error
struct fd_ScopeGuard {
@@ -378,9 +380,11 @@ int main(int argc, char *argv[])
exit(1);
}
+#ifndef Q_OS_HAIKU
if (sockfd != 3) {
sockfd = dup3(sockfd, 3, O_CLOEXEC);
}
+#endif
if (sockfd < 0) {
qCCritical(KSUD_LOG) << "Failed to set sockfd to fd 3" << ERR << "\n";
kdesud_cleanup();
@@ -415,7 +419,9 @@ int main(int argc, char *argv[])
repo = new Repository;
QVector<ConnectionHandler *> handler;
+#ifndef Q_OS_HAIKU
pipe2(pipeOfDeath, O_CLOEXEC);
+#endif
maxfd = qMax(maxfd, pipeOfDeath[0]);
// Signal handlers
--
2.42.1

View File

@@ -1,4 +1,4 @@
From 1865e943a5341bc4bec856073fc2f18c7e096ecf Mon Sep 17 00:00:00 2001
From 3396df64dbaf0632fcb50d2f4988220d7ca5e3da Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Thu, 7 Mar 2024 17:55:01 +0100
Subject: Build fixes
@@ -76,10 +76,10 @@ index d8cedf2..6a1c00e 100644
// Signal handlers
--
2.48.1
2.52.0
From dd6ead32da8443f809adb6ea13a0c43e0153af55 Mon Sep 17 00:00:00 2001
From b15c97cce234d924eb90983564740d820aac975d Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Tue, 12 Nov 2024 10:07:00 +0100
Subject: Link with libnetwork
@@ -118,5 +118,5 @@ index e80a772..395b0c3 100644
target_include_directories(kdesud PRIVATE ${X11_X11_INCLUDE_PATH})
endif()
--
2.48.1
2.52.0