Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kf6-kcrash for openSUSE:Factory checked in at 2024-09-15 12:33:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kf6-kcrash (Old) and /work/SRC/openSUSE:Factory/.kf6-kcrash.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-kcrash" Sun Sep 15 12:33:54 2024 rev:7 rq:1201006 version:6.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kf6-kcrash/kf6-kcrash.changes 2024-08-10 19:10:10.563701193 +0200 +++ /work/SRC/openSUSE:Factory/.kf6-kcrash.new.29891/kf6-kcrash.changes 2024-09-15 12:37:42.367786603 +0200 @@ -1,0 +2,12 @@ +Sat Sep 7 09:03:12 UTC 2024 - Christophe Marin <[email protected]> + +- Update to 6.6.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/6/6.6.0 +- Changes since 6.5.0: + * Update version to 6.6.0 + * Document that KCrash::initialize should be called after KAboutData + * drop ptrace forwarding code + +------------------------------------------------------------------- Old: ---- kcrash-6.5.0.tar.xz kcrash-6.5.0.tar.xz.sig New: ---- kcrash-6.6.0.tar.xz kcrash-6.6.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kf6-kcrash.spec ++++++ --- /var/tmp/diff_new_pack.z5FC8e/_old 2024-09-15 12:37:43.263824275 +0200 +++ /var/tmp/diff_new_pack.z5FC8e/_new 2024-09-15 12:37:43.267824444 +0200 @@ -19,13 +19,13 @@ %define qt6_version 6.6.0 %define rname kcrash -# Full KF6 version (e.g. 6.5.0) +# Full KF6 version (e.g. 6.6.0) %{!?_kf6_version: %global _kf6_version %{version}} # Last major and minor KF6 version (e.g. 6.0) %{!?_kf6_bugfix_version: %define _kf6_bugfix_version %(echo %{_kf6_version} | awk -F. '{print $1"."$2}')} %bcond_without released Name: kf6-kcrash -Version: 6.5.0 +Version: 6.6.0 Release: 0 Summary: An application crash handler License: LGPL-2.1-or-later ++++++ kcrash-6.5.0.tar.xz -> kcrash-6.6.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcrash-6.5.0/CMakeLists.txt new/kcrash-6.6.0/CMakeLists.txt --- old/kcrash-6.5.0/CMakeLists.txt 2024-08-02 13:12:45.000000000 +0200 +++ new/kcrash-6.6.0/CMakeLists.txt 2024-09-06 13:36:58.000000000 +0200 @@ -1,14 +1,14 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "6.5.0") # handled by release scripts -set(KF_DEP_VERSION "6.5.0") # handled by release scripts +set(KF_VERSION "6.6.0") # handled by release scripts +set(KF_DEP_VERSION "6.6.0") # handled by release scripts project(KCrash VERSION ${KF_VERSION}) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) include(FeatureSummary) -find_package(ECM 6.5.0 NO_MODULE) +find_package(ECM 6.6.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcrash-6.5.0/src/kcrash.cpp new/kcrash-6.6.0/src/kcrash.cpp --- old/kcrash-6.5.0/src/kcrash.cpp 2024-08-02 13:12:45.000000000 +0200 +++ new/kcrash-6.6.0/src/kcrash.cpp 2024-09-06 13:36:58.000000000 +0200 @@ -30,7 +30,6 @@ #include <qt_windows.h> #endif #ifdef Q_OS_LINUX -#include <sys/poll.h> #include <sys/prctl.h> #endif @@ -67,10 +66,6 @@ using namespace std::chrono_literals; -#ifdef Q_OS_LINUX -static QByteArray s_socketpath; -#endif - struct Args { Args() = default; ~Args() @@ -242,11 +237,6 @@ qWarning() << "This process needs a QCoreApplication instance in order to use KCrash"; } -#ifdef Q_OS_LINUX - // Create socket path to transfer ptrace scope and open connection - s_socketpath = QFile::encodeName(QStringLiteral("%1/kcrash_%2").arg(QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)).arg(getpid())); -#endif - if (shouldWriteMetadataToDisk()) { // We do not actively clean up metadata via KCrash but some other service. This potentially means we litter // a lot -> put the metadata in a subdir. @@ -707,14 +697,6 @@ static pid_t startDirectly(const char *argv[]); -#ifdef Q_OS_LINUX -static int write_socket(int sock, char *buffer, int len); -static int read_socket(int sock, char *buffer, int len); - -static int openDrKonqiSocket(const QByteArray &socketpath); -static int pollDrKonqiSocket(pid_t pid, int sockfd); -#endif - void KCrash::startProcess(int argc, const char *argv[], bool waitAndExit) { Q_UNUSED(argc); @@ -732,23 +714,10 @@ // and only send SIGCONT when it is about to attach a debugger. #ifdef Q_OS_LINUX // Declare the process that will be debugging the crashed KDE app (#245529). - // For now that will be DrKonqi, which may ask to transfer the ptrace scope to - // a debugger it is not an ancestor of (because it was started via kdeinit or - // KProcess::startDetached()) using a socket. #ifndef PR_SET_PTRACER #define PR_SET_PTRACER 0x59616d61 #endif prctl(PR_SET_PTRACER, pid, 0, 0, 0); - - int sockfd = openDrKonqiSocket(s_socketpath); - - if (sockfd >= 0) { - // Wait while DrKonqi is running and the socket connection exists - // If the process was started directly, use waitpid(), as it's a child... - while ((running = waitpid(pid, nullptr, WNOHANG) != pid) && pollDrKonqiSocket(pid, sockfd) >= 0) { } - close(sockfd); - unlink(s_socketpath.constData()); - } #endif if (running) { // If the process was started directly, use waitpid(), as it's a child... @@ -798,140 +767,6 @@ return pid; } } - -#ifdef Q_OS_LINUX - -/* - * Write 'len' bytes from 'buffer' into 'sock'. - * returns 0 on success, -1 on failure. - */ -static int write_socket(int sock, char *buffer, int len) -{ - ssize_t result; - int bytes_left = len; - while (bytes_left > 0) { - result = write(sock, buffer, bytes_left); - if (result > 0) { - buffer += result; - bytes_left -= result; - } else if (result == 0) { - return -1; - } else if ((result == -1) && (errno != EINTR) && (errno != EAGAIN)) { - return -1; - } - } - return 0; -} - -/* - * Read 'len' bytes from 'sock' into 'buffer'. - * returns 0 on success, -1 on failure. - */ -static int read_socket(int sock, char *buffer, int len) -{ - ssize_t result; - int bytes_left = len; - while (bytes_left > 0) { - result = read(sock, buffer, bytes_left); - if (result > 0) { - buffer += result; - bytes_left -= result; - } else if (result == 0) { - return -1; - } else if ((result == -1) && (errno != EINTR) && (errno != EAGAIN)) { - return -1; - } - } - return 0; -} - -static int openDrKonqiSocket(const QByteArray &socketpath) -{ - int sockfd = socket(PF_UNIX, SOCK_STREAM, 0); - if (sockfd < 0) { - perror("Warning: socket() for communication with DrKonqi failed"); - return -1; - } - - struct sockaddr_un drkonqi_server; - drkonqi_server.sun_family = AF_UNIX; - - if (socketpath.size() >= static_cast<int>(sizeof(drkonqi_server.sun_path))) { - fprintf(stderr, "Warning: socket path is too long\n"); - close(sockfd); - return -1; - } - strcpy(drkonqi_server.sun_path, socketpath.constData()); - - unlink(drkonqi_server.sun_path); // remove potential stale socket - if (bind(sockfd, (struct sockaddr *)&drkonqi_server, sizeof(drkonqi_server)) < 0) { - perror("Warning: bind() for communication with DrKonqi failed"); - close(sockfd); - unlink(drkonqi_server.sun_path); - return -1; - } - - listen(sockfd, 1); - - return sockfd; -} - -static int pollDrKonqiSocket(pid_t pid, int sockfd) -{ - struct pollfd fd; - fd.fd = sockfd; - fd.events = POLLIN; - int r; - do { - r = poll(&fd, 1, 1000); // wait for 1 second for a request by DrKonqi - } while (r == -1 && errno == EINTR); - // only continue if POLLIN event returned - if (r == 0) { // timeout - return 0; - } else if (r == -1 || !(fd.revents & POLLIN)) { // some error - return -1; - } - - static struct sockaddr_un drkonqi_client; - static socklen_t cllength = sizeof(drkonqi_client); - int clsockfd; - do { - clsockfd = accept(sockfd, (struct sockaddr *)&drkonqi_client, &cllength); - } while (clsockfd == -1 && errno == EINTR); - if (clsockfd < 0) { - return -1; - } - - // check whether the message is coming from DrKonqi - static struct ucred ucred; - static socklen_t credlen = sizeof(struct ucred); - if (getsockopt(clsockfd, SOL_SOCKET, SO_PEERCRED, &ucred, &credlen) < 0) { - return -1; - } - - if (ucred.pid != pid) { - fprintf(stderr, "Warning: peer pid does not match DrKonqi pid\n"); - return -1; - } - - // read PID to change ptrace scope - static const int msize = 21; // most digits in a 64bit int (+sign +'\0') - char msg[msize]; - if (read_socket(clsockfd, msg, msize) == 0) { - int dpid = atoi(msg); - prctl(PR_SET_PTRACER, dpid, 0, 0, 0); - // confirm change to DrKonqi - if (write_socket(clsockfd, msg, msize) == 0) { - fprintf(stderr, "KCrash: ptrace access transferred to %s\n", msg); - } - } - close(clsockfd); - - return 1; -} - -#endif - #endif // Q_OS_UNIX void KCrash::setErrorMessage(const QString &message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcrash-6.5.0/src/kcrash.h new/kcrash-6.6.0/src/kcrash.h --- old/kcrash-6.5.0/src/kcrash.h 2024-08-02 13:12:45.000000000 +0200 +++ new/kcrash-6.6.0/src/kcrash.h 2024-09-06 13:36:58.000000000 +0200 @@ -39,7 +39,7 @@ * * This does nothing if $KDE_DEBUG is set. * - * Call this in your main() to ensure that the crash handler is always launched. + * Call this in your main() after setting up KAboutData to ensure that the crash handler is launched. * @since 5.15 */ KCRASH_EXPORT void initialize();
