[SCM] qbs packaging branch, master, updated. debian/1.4.1+dfsg-5-5-geb64ba9

Dmitry Shachnev mitya57 at moszumanska.debian.org
Sat Jul 18 16:19:20 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qbs.git;a=commitdiff;h=eb64ba9

The following commit has been merged in the master branch:
commit eb64ba92d3fac806b690c316b2693b88b98e60d9
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Sat Jul 18 19:18:45 2015 +0300

    Talk to FreeBSD kernel manually instead of using kinfo_getproc.
    
    kinfo_getproc is only available on true FreeBSD, not on GNU/kFreeBSD.
---
 debian/changelog                 |  2 ++
 debian/control                   |  1 -
 debian/patches/bsd_includes.diff | 15 --------------
 debian/patches/kfreebsd.diff     | 43 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  2 +-
 5 files changed, 46 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 75e381c..ddea7cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ qbs (1.4.1+dfsg-6) UNRELEASED; urgency=medium
   * Define qbs_enable_unit_tests to enable some additional tests.
   * Move tests whitelist logic to auto.pro, so that non-API tests are
     still run on non-whitelisted architectures.
+  * Talk to FreeBSD kernel manually instead of using kinfo_getproc,
+    which is not available on GNU/kFreeBSD.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sat, 18 Jul 2015 18:00:48 +0300
 
diff --git a/debian/control b/debian/control
index 1030400..2847f61 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,6 @@ Uploaders: Dmitry Shachnev <mitya57 at debian.org>,
            Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>,
            Adam Majer <adamm at zombino.com>
 Build-Depends: debhelper (>= 9),
-               libutil-freebsd-dev [kfreebsd-any],
                pkg-kde-tools,
                qtbase5-dev,
                qtdeclarative5-dev,
diff --git a/debian/patches/bsd_includes.diff b/debian/patches/bsd_includes.diff
deleted file mode 100644
index 2a72dca..0000000
--- a/debian/patches/bsd_includes.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: add missing include for kinfo_getproc(3) on kFreeBSD
-Author: Dmitry Shachnev <mitya57 at debian.org>
-Forwarded: no
-Last-Update: 2015-07-13
-
---- a/src/lib/corelib/tools/processutils.cpp
-+++ b/src/lib/corelib/tools/processutils.cpp
-@@ -41,6 +41,7 @@
- #   include <unistd.h>
- #   include <cstdio>
- #elif defined(Q_OS_BSD4)
-+#   include <libutil.h>
- #   include <sys/user.h>
- #else
- #   error Missing implementation of processNameByPid for this platform.
diff --git a/debian/patches/kfreebsd.diff b/debian/patches/kfreebsd.diff
new file mode 100644
index 0000000..5fbf011
--- /dev/null
+++ b/debian/patches/kfreebsd.diff
@@ -0,0 +1,43 @@
+Description: add implementation of processNameByPid for GNU/kFreeBSD
+Author: Dmitry Shachnev <mitya57 at debian.org>
+Forwarded: no
+Last-Update: 2015-07-18
+
+--- a/src/lib/corelib/tools/processutils.cpp
++++ b/src/lib/corelib/tools/processutils.cpp
+@@ -41,7 +41,12 @@
+ #   include <unistd.h>
+ #   include <cstdio>
+ #elif defined(Q_OS_BSD4)
++#   include <sys/cdefs.h>
++#   include <sys/param.h>
++#   include <sys/sysctl.h>
+ #   include <sys/user.h>
++#   include <cstdlib>
++#   include <cstring>
+ #else
+ #   error Missing implementation of processNameByPid for this platform.
+ #endif
+@@ -80,9 +85,21 @@
+     readlink(exePath, buf, sizeof(buf));
+     return FileInfo::fileName(QString::fromUtf8(buf));
+ #elif defined(Q_OS_BSD4)
+-    kinfo_proc *proc = kinfo_getproc(pid);
++    int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
++    size_t len = 0;
++    if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0)
++        return QString();
++    kinfo_proc *proc = static_cast<kinfo_proc *>(malloc(len));
+     if (!proc)
+         return QString();
++    if (sysctl(mib, 4, proc, &len, NULL, 0) < 0) {
++        free(proc);
++        return QString();
++    }
++    if (proc->ki_pid != pid) {
++        free(proc);
++        return QString();
++    }
+     QString name = QString::fromUtf8(proc->ki_comm);
+     free(proc);
+     return name;
diff --git a/debian/patches/series b/debian/patches/series
index c216b68..ad3f971 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@ remove_rpaths.diff
 revert_tests_speedup.diff
 fix_assembly_test.diff
 disable_tests_qtscript.diff
-bsd_includes.diff
+kfreebsd.diff

-- 
qbs packaging



More information about the pkg-kde-commits mailing list