Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kwayland for openSUSE:Factory 
checked in at 2022-12-12 17:38:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwayland (Old)
 and      /work/SRC/openSUSE:Factory/.kwayland.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kwayland"

Mon Dec 12 17:38:50 2022 rev:107 rq:1042156 version:5.101.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kwayland/kwayland.changes        2022-11-15 
13:20:06.196391217 +0100
+++ /work/SRC/openSUSE:Factory/.kwayland.new.1835/kwayland.changes      
2022-12-12 17:40:48.729516757 +0100
@@ -1,0 +2,11 @@
+Tue Dec  6 20:11:04 UTC 2022 - Christophe Marin <christo...@krop.fr>
+
+- Update to 5.101.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.101.0
+- Changes since 5.100.0:
+  * client: Add F_SEAL_SHRINK seal to shm pool backing file
+  * client: Expose concrete xdg-shell class implementations
+
+-------------------------------------------------------------------

Old:
----
  kwayland-5.100.0.tar.xz
  kwayland-5.100.0.tar.xz.sig

New:
----
  kwayland-5.101.0.tar.xz
  kwayland-5.101.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kwayland.spec ++++++
--- /var/tmp/diff_new_pack.oHruh9/_old  2022-12-12 17:40:49.225519259 +0100
+++ /var/tmp/diff_new_pack.oHruh9/_new  2022-12-12 17:40:49.229519279 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define _tar_path 5.100
+%define _tar_path 5.101
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -24,11 +24,10 @@
 # Only needed for the package signature condition
 %bcond_without released
 Name:           kwayland
-Version:        5.100.0
+Version:        5.101.0
 Release:        0
 Summary:        KDE Wayland library
 License:        LGPL-2.1-or-later
-Group:          Development/Libraries/KDE
 URL:            https://www.kde.org
 Source:         %{name}-%{version}.tar.xz
 %if %{with released}
@@ -61,7 +60,6 @@
 
 %package devel
 Summary:        KDE Wayland library: Build Environment
-Group:          Development/Libraries/KDE
 Requires:       %{name} = %{version}
 Requires:       extra-cmake-modules >= %{_kf5_bugfix_version}
 Requires:       cmake(Qt5Gui) >= 5.15.0


++++++ kwayland-5.100.0.tar.xz -> kwayland-5.101.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.100.0/CMakeLists.txt 
new/kwayland-5.101.0/CMakeLists.txt
--- old/kwayland-5.100.0/CMakeLists.txt 2022-11-05 13:32:26.000000000 +0100
+++ new/kwayland-5.101.0/CMakeLists.txt 2022-12-03 10:52:07.000000000 +0100
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "5.100.0") # handled by release scripts
+set(KF_VERSION "5.101.0") # handled by release scripts
 project(KWayland VERSION ${KF_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.100.0  NO_MODULE)
+find_package(ECM 5.101.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)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules)
@@ -75,6 +75,20 @@
     QT 5.15.2
 )
 
+check_cxx_source_compiles("
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+int main() {
+    const int size = 10;
+    int fd = memfd_create(\"test\", MFD_CLOEXEC | MFD_ALLOW_SEALING);
+    ftruncate(fd, size);
+    fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
+    mmap(nullptr, size, PROT_WRITE, MAP_SHARED, fd, 0);
+    return 0;
+}" HAVE_MEMFD)
+
 # Subdirectories
 ecm_install_po_files_as_qm(po)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.100.0/src/client/CMakeLists.txt 
new/kwayland-5.101.0/src/client/CMakeLists.txt
--- old/kwayland-5.100.0/src/client/CMakeLists.txt      2022-11-05 
13:32:26.000000000 +0100
+++ new/kwayland-5.101.0/src/client/CMakeLists.txt      2022-12-03 
10:52:07.000000000 +0100
@@ -256,6 +256,10 @@
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
 )
 
+target_compile_definitions(KF5WaylandClient PRIVATE
+    -DHAVE_MEMFD=${HAVE_MEMFD}
+)
+
 target_include_directories(KF5WaylandClient
     INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KWayland>"
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.100.0/src/client/shm_pool.cpp 
new/kwayland-5.101.0/src/client/shm_pool.cpp
--- old/kwayland-5.100.0/src/client/shm_pool.cpp        2022-11-05 
13:32:26.000000000 +0100
+++ new/kwayland-5.101.0/src/client/shm_pool.cpp        2022-12-03 
10:52:07.000000000 +0100
@@ -11,8 +11,8 @@
 // Qt
 #include <QDebug>
 #include <QImage>
-#include <QTemporaryFile>
 // system
+#include <fcntl.h>
 #include <sys/mman.h>
 #include <unistd.h>
 // wayland
@@ -32,8 +32,8 @@
     WaylandPointer<wl_shm, wl_shm_destroy> shm;
     WaylandPointer<wl_shm_pool, wl_shm_pool_destroy> pool;
     void *poolData = nullptr;
+    int fd = -1;
     int32_t size = 1024;
-    QScopedPointer<QTemporaryFile> tmpFile;
     bool valid = false;
     int offset = 0;
     QList<QSharedPointer<Buffer>> buffers;
@@ -44,8 +44,7 @@
 };
 
 ShmPool::Private::Private(ShmPool *q)
-    : tmpFile(new QTemporaryFile())
-    , q(q)
+    : q(q)
 {
 }
 
@@ -67,9 +66,12 @@
         munmap(d->poolData, d->size);
         d->poolData = nullptr;
     }
+    if (d->fd != -1) {
+        close(d->fd);
+        d->fd = -1;
+    }
     d->pool.release();
     d->shm.release();
-    d->tmpFile->close();
     d->valid = false;
     d->offset = 0;
 }
@@ -84,9 +86,12 @@
         munmap(d->poolData, d->size);
         d->poolData = nullptr;
     }
+    if (d->fd != -1) {
+        close(d->fd);
+        d->fd = -1;
+    }
     d->pool.destroy();
     d->shm.destroy();
-    d->tmpFile->close();
     d->valid = false;
     d->offset = 0;
 }
@@ -111,19 +116,37 @@
 
 bool ShmPool::Private::createPool()
 {
-    if (!tmpFile->open()) {
+#if HAVE_MEMFD
+    fd = memfd_create("kwayland-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
+    if (fd >= 0) {
+        fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
+    } else
+#endif
+    {
+        char templateName[] = "/tmp/kwayland-shared-XXXXXX";
+        fd = mkstemp(templateName);
+        if (fd >= 0) {
+            unlink(templateName);
+
+            int flags = fcntl(fd, F_GETFD);
+            if (flags == -1 || fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) {
+                close(fd);
+                fd = -1;
+            }
+        }
+    }
+
+    if (fd == -1) {
         qCDebug(KWAYLAND_CLIENT) << "Could not open temporary file for Shm 
pool";
         return false;
     }
-    if (unlink(tmpFile->fileName().toUtf8().constData()) != 0) {
-        qCDebug(KWAYLAND_CLIENT) << "Unlinking temporary file for Shm pool 
from file system failed";
-    }
-    if (ftruncate(tmpFile->handle(), size) < 0) {
+
+    if (ftruncate(fd, size) < 0) {
         qCDebug(KWAYLAND_CLIENT) << "Could not set size for Shm pool file";
         return false;
     }
-    poolData = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, 
tmpFile->handle(), 0);
-    pool.setup(wl_shm_create_pool(shm, tmpFile->handle(), size));
+    poolData = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+    pool.setup(wl_shm_create_pool(shm, fd, size));
 
     if (poolData == MAP_FAILED || !pool) {
         qCDebug(KWAYLAND_CLIENT) << "Creating Shm pool failed";
@@ -134,13 +157,13 @@
 
 bool ShmPool::Private::resizePool(int32_t newSize)
 {
-    if (ftruncate(tmpFile->handle(), newSize) < 0) {
+    if (ftruncate(fd, newSize) < 0) {
         qCDebug(KWAYLAND_CLIENT) << "Could not set new size for Shm pool file";
         return false;
     }
     wl_shm_pool_resize(pool, newSize);
     munmap(poolData, size);
-    poolData = mmap(nullptr, newSize, PROT_READ | PROT_WRITE, MAP_SHARED, 
tmpFile->handle(), 0);
+    poolData = mmap(nullptr, newSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 
0);
     size = newSize;
     if (poolData == MAP_FAILED) {
         qCDebug(KWAYLAND_CLIENT) << "Resizing Shm pool failed";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.100.0/src/client/xdgshell.h 
new/kwayland-5.101.0/src/client/xdgshell.h
--- old/kwayland-5.100.0/src/client/xdgshell.h  2022-11-05 13:32:26.000000000 
+0100
+++ new/kwayland-5.101.0/src/client/xdgshell.h  2022-12-03 10:52:07.000000000 
+0100
@@ -629,6 +629,55 @@
     QScopedPointer<Private> d;
 };
 
+/**
+ * Wrapper class for xdg_wm_base interface.
+ *
+ * @since 5.101
+ */
+class KWAYLANDCLIENT_EXPORT XdgShellStable : public XdgShell
+{
+    Q_OBJECT
+public:
+    explicit XdgShellStable(QObject *parent = nullptr);
+    ~XdgShellStable() override;
+
+private:
+    class Private;
+};
+
+/**
+ * Wrapper class for xdg_toplevel interface.
+ *
+ * @since 5.101
+ */
+class KWAYLANDCLIENT_EXPORT XdgTopLevelStable : public XdgShellSurface
+{
+    Q_OBJECT
+public:
+    explicit XdgTopLevelStable(QObject *parent = nullptr);
+    ~XdgTopLevelStable() override;
+
+private:
+    friend class XdgShellStable;
+    class Private;
+};
+
+/**
+ * Wrapper class for xdg_popup interface.
+ *
+ * @since 5.101
+ */
+class KWAYLANDCLIENT_EXPORT XdgShellPopupStable : public XdgShellPopup
+{
+public:
+    explicit XdgShellPopupStable(QObject *parent = nullptr);
+    ~XdgShellPopupStable() override;
+
+private:
+    friend class XdgShellStable;
+    class Private;
+};
+
 }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.100.0/src/client/xdgshell_p.h 
new/kwayland-5.101.0/src/client/xdgshell_p.h
--- old/kwayland-5.100.0/src/client/xdgshell_p.h        2022-11-05 
13:32:26.000000000 +0100
+++ new/kwayland-5.101.0/src/client/xdgshell_p.h        2022-12-03 
10:52:07.000000000 +0100
@@ -121,17 +121,6 @@
     class Private;
 };
 
-class XdgShellStable : public XdgShell
-{
-    Q_OBJECT
-public:
-    explicit XdgShellStable(QObject *parent = nullptr);
-    ~XdgShellStable() override;
-
-private:
-    class Private;
-};
-
 class XdgShellSurfaceUnstableV5 : public XdgShellSurface
 {
     Q_OBJECT
@@ -156,18 +145,6 @@
     class Private;
 };
 
-class XdgTopLevelStable : public XdgShellSurface
-{
-    Q_OBJECT
-public:
-    ~XdgTopLevelStable() override;
-
-private:
-    explicit XdgTopLevelStable(QObject *parent = nullptr);
-    friend class XdgShellStable;
-    class Private;
-};
-
 class Q_DECL_HIDDEN XdgShellSurface::Private
 {
 public:
@@ -362,17 +339,6 @@
     class Private;
 };
 
-class XdgShellPopupStable : public XdgShellPopup
-{
-public:
-    ~XdgShellPopupStable() override;
-
-private:
-    explicit XdgShellPopupStable(QObject *parent = nullptr);
-    friend class XdgShellStable;
-    class Private;
-};
-
 }
 }
 

Reply via email to