Re: [kde-freebsd] ports/135860: [PATCH] x11/kdebase3: Unbreak on -CURRENT

2009-06-20 Thread edwin
Synopsis: [PATCH] x11/kdebase3: Unbreak on -CURRENT

Responsible-Changed-From-To: freebsd-ports-bugs-kde
Responsible-Changed-By: edwin
Responsible-Changed-When: Sat Jun 20 12:00:28 UTC 2009
Responsible-Changed-Why: 
Over to maintainer (via the GNATS Auto Assign Tool)

http://www.freebsd.org/cgi/query-pr.cgi?pr=135860
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information


[kde-freebsd] [PATCH] x11/kdebase3: Unbreak on -CURRENT

2009-06-20 Thread Ulrich Spoerlein

Submitter-Id:  current-users
Originator:Ulrich Spoerlein
Organization:  
Confidential:  no 
Synopsis:  [PATCH] x11/kdebase3: Unbreak on -CURRENT
Severity:  non-critical
Priority:  low
Category:  ports 
Class: change-request
Release:   FreeBSD 7.2-STABLE i386
Environment:
Description:
- Port over libusb20 changes from kdebase4 to kdebase3 to make it compile on 
CURRENT

Added file(s):
- files/extrapatch-libusb20

Removed file(s):
- files/patch-kcontrol-usbview-usbdevices.h

Generated with FreeBSD Port Tools 0.77
How-To-Repeat:
Fix:

--- .patch begins here ---
Index: Makefile
===
RCS file: /tank/ncvs/ports/x11/kdebase3/Makefile,v
retrieving revision 1.213
diff -u -p -u -r1.213 Makefile
--- Makefile9 Mar 2009 17:15:42 -   1.213
+++ Makefile20 Jun 2009 11:51:40 -
@@ -60,6 +60,8 @@ OPTIONS=  ARTSWRAPPER Suid wrapper for a
 
 .if ${OSVERSION}  800069
 LIB_DEPENDS+=  usb-0.1:${PORTSDIR}/devel/libusb
+.else
+EXTRA_PATCHES+=${FILESDIR}/extrapatch-libusb20
 .endif
 
 .if !defined(WITHOUT_ARTSWRAPPER)
@@ -71,7 +73,7 @@ RUN_DEPENDS+= htdig:${PORTSDIR}/textproc
 .endif
 
 .if !defined(WITHOUT_HAL)
-EXTRA_PATCHES= 
${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.cpp \
+EXTRA_PATCHES+=
${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.cpp \
${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.h
 LIB_DEPENDS+=  dbus-qt-1.1:${PORTSDIR}/devel/dbus-qt3 \
hal.1:${PORTSDIR}/sysutils/hal
Index: files/extrapatch-libusb20
===
RCS file: files/extrapatch-libusb20
diff -N files/extrapatch-libusb20
--- /dev/null   1 Jan 1970 00:00:00 -
+++ files/extrapatch-libusb20   20 Jun 2009 11:51:40 -
@@ -0,0 +1,166 @@
+--- usbdevices.h.orig  2006-07-22 10:15:22.0 +0200
 usbdevices.h   2009-06-20 13:19:42.0 +0200
+@@ -17,7 +17,9 @@
+ #include qptrlist.h
+ 
+ #ifdef Q_OS_FREEBSD
+-#include dev/usb/usb.h
++#include libusb20.h
++#include dev/usb/usb_ioctl.h
++#include dev/usb/usb_revision.h
+ #endif
+ 
+ class USBDB;
+@@ -66,7 +68,7 @@
+   unsigned int _vendorID, _prodID, _revMajor, _revMinor;
+ 
+ #ifdef Q_OS_FREEBSD
+-  void collectData( int fd, int level, usb_device_info di, int parent );
++  void collectData(struct libusb20_backend *, struct libusb20_device *);
+   QStringList _devnodes;
+ #endif
+ };
+--- usbdevices.cpp.orig2009-06-20 13:19:47.0 +0200
 usbdevices.cpp 2009-06-20 13:38:34.0 +0200
+@@ -318,17 +318,25 @@
+ 
+ /*
+  * FreeBSD support by Markus Brueffer mar...@brueffer.de
++ * libusb20 support by Hans Petter Selasky hsela...@freebsd.org
+  *
+  * Basic idea and some code fragments were taken from FreeBSD's usbdevs(8), 
+  * originally developed for NetBSD, so this code should work with no or 
+  * only little modification on NetBSD.
+  */
+ 
+-void USBDevice::collectData( int fd, int level, usb_device_info di, int 
parent)
++void USBDevice::collectData(struct libusb20_backend *pbe,
++struct libusb20_device *pdev)
+ {
++  char tempbuf[32];
++  struct usb_device_info di;
++
++  if (libusb20_dev_get_info(pdev, di))
++  memset(di, 0, sizeof(di));
++
+   // determine data for this device
+-  _level= level;
+-  _parent   = parent;
++  _level= 0;
++  _parent   = 0;
+   
+   _bus  = di.udi_bus;
+   _device   = di.udi_addr;
+@@ -345,87 +353,49 @@
+   _channels = di.udi_nports;
+   
+   // determine the speed
+-#if __FreeBSD_version  490102
+   switch (di.udi_speed) {
+   case USB_SPEED_LOW:  _speed = 1.5;   break;
+   case USB_SPEED_FULL: _speed = 12.0;  break;
+   case USB_SPEED_HIGH: _speed = 480.0; break;
++  case USB_SPEED_VARIABLE: _speed = 480.0; break;
++  case USB_SPEED_SUPER: _speed = 4800.0; break;
++  default: _speed = 480.0; break;
+   }
+-#else
+-  _speed = di.udi_lowspeed ? 1.5 : 12.0;
+-#endif
+ 
+   // Get all attached devicenodes
+-  for ( int i = 0; i  USB_MAX_DEVNAMES; ++i )
+-  if ( di.udi_devnames[i][0] )
+-  _devnodes  di.udi_devnames[i];
++  for (int i = 0; i  32; ++i) {
++  if (libusb20_dev_get_iface_desc(pdev, i, tempbuf, sizeof(tempbuf)) 
== 0) {
++  _devnodes  tempbuf;
++  } else {
++  break;
++  }
++  }
+ 
+   // For compatibility, split the revision number
+   sscanf( di.udi_release, %x.%x, _revMajor, _revMinor );
+ 
+-  // Cycle through the attached devices if there are any
+-  for ( int p = 0; p  di.udi_nports; ++p ) {
+-  // Get data for device
+-  struct usb_device_info di2;
+-
+-  di2.udi_addr = di.udi_ports[p];
+-  
+-  

[kde-freebsd] Nepomukservicestub and redland soprano backend

2009-06-20 Thread Mel Flynn
hi,

while debugging/fixing the nepomukservicestub crash that like always happens, 
I found it's main cause is badly chosen defaults by the port system for 
soprano.

Basically, we provide the user with a not working strigi service, as per 
nepomuk/services/strigi/strigiservice.cpp:
52  // Using Strigi with the redland backend is torture.
   
53  // Thus we simply fail initialization if it is used 
   
54  // ==   
   
55  if ( org::kde::nepomuk::Storage( org.kde.NepomukStorage,  
   
56   /nepomukstorage,
57   QDBusConnection::sessionBus() )
58   .usedSopranoBackend().value() != QString::fromLatin1( 
redland ) ) {

This is also the cause of the following crash:
(gdb) bt
#0  0x281467a6 in QThread::d_func (this=0xa5a5a5a5) at qthread.h:125
#1  0x281457ae in QThread::isRunning (this=0xa5a5a5a5) at 
thread/qthread.cpp:403
#2  0x2b475175 in Nepomuk::IndexScheduler::stop (this=0xa5a5a5a5)
at /stable/usr/obj/usr/ports/x11/kdebase4-runtime/work/kdebase-
runtime-4.2.4/nepomuk/services/strigi/indexscheduler.cpp:150
#3  0x2b470937 in ~StrigiService (this=0x2b52f2c0)
at /stable/usr/obj/usr/ports/x11/kdebase4-runtime/work/kdebase-
runtime-4.2.4/nepomuk/services/strigi/strigiservice.cpp:90
#4  0x28253414 in QObjectPrivate::deleteChildren (this=0x2ada5dd0)
at kernel/qobject.cpp:1875
#5  0x2825a387 in ~QObject (this=0x2ada2f40) at kernel/qobject.cpp:884
#6  0x0804c58c in ~ServiceControl (this=0x2ada2f40)
at /stable/usr/obj/usr/ports/x11/kdebase4-runtime/work/kdebase-
runtime-4.2.4/nepomuk/servicestub/servicecontrol.cpp:39
#7  0x28253414 in QObjectPrivate::deleteChildren (this=0x2ad57180)
at kernel/qobject.cpp:1875
#8  0x2825a387 in ~QObject (this=0xbfbfe78c) at kernel/qobject.cpp:884
#9  0x2824594c in ~QCoreApplication (this=0xbfbfe78c) at 
kernel/qcoreapplication.cpp:516
#10 0x285c8816 in ~QApplication (this=0xbfbfe78c) at 
kernel/qapplication.cpp:1044
#11 0x0804b3ac in main (argc=Cannot access memory at address 0xa5a5a5a5
)
at /stable/usr/obj/usr/ports/x11/kdebase4-runtime/work/kdebase-
runtime-4.2.4/nepomuk/servicestub/main.cpp:149
(gdb) frame 3
#3  0x2b470937 in ~StrigiService (this=0x2b52f2c0)
at /stable/usr/obj/usr/ports/x11/kdebase4-runtime/work/kdebase-
runtime-4.2.4/nepomuk/services/strigi/strigiservice.cpp:90
90  m_indexScheduler-stop();
(gdb) print *this
$9 = {Nepomuk::Service = {QObject = {_vptr$QObject = 0x2b4877e8,
  static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x282dbdc0 
QObject,
  data = 0x282dbe40, extradata = 0x0}}, d_ptr = 0x2b530150,
  static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 
0x282e5260 Qt,
  data = 0x282e6f00, extradata = 0x0}}}, static staticMetaObject = {d 
= {
superdata = 0x804ee18, stringdata = 0x2948a9c0 Nepomuk::Service,
data = 0x2948a9e0, extradata = 0x0}}, d = 0x2ad072b0}, static 
staticMetaObject = {
d = {superdata = 0x804ed98, stringdata = 0x2b483fe0 
Nepomuk::StrigiService,
  data = 0x2b4840c0, extradata = 0x0}}, m_indexManager = 0xa5a5a5a5,
  m_indexScheduler = 0xa5a5a5a5}
(gdb) print *this-m_indexManager
Cannot access memory at address 0xa5a5a5a5

I don't know what other storage backends beside redland and the java one are 
available for soprano, but I think we should not make redland the default.

I'm currently rebuilding kdebase4-runtime with the attached patch applied, and 
am fairly confident it will fix the crash. I chose not to call isInitialized() 
in the destructor as there may be other cases where m_indexManager is checked 
rather then checking for successful initialization, plus it seemed cleaner to 
me to call setServiceInitialized at the end of the constructor so that any 
logic above it can fail at will.
-- 
Mel


--- nepomuk/services/strigi/strigiservice.cpp.orig	2008-11-28 06:33:44.0 -0900
+++ nepomuk/services/strigi/strigiservice.cpp	2009-06-20 09:03:10.0 -0800
@@ -71,16 +71,14 @@
 else {
 kDebug()  Failed to load sopranobackend Strigi index manager.;
 }
-
-
-// service initialization done if creating a strigi index manager was successful
-// ==
-setServiceInitialized( m_indexManager != 0 );
 }
 else {
 kDebug()  Will not start when using redland Soprano backend due to horrible performance.;
-setServiceInitialized( false );
+	m_indexManager = 0;
 }
+// service initialization done if creating a strigi index manager was successful
+// ==
+setServiceInitialized( m_indexManager != 0 );
 }
 
 
___
kde-freebsd mailing list

Re: [kde-freebsd] PowerDevil (and ConsoleKit)

2009-06-20 Thread Mel Flynn
On Thursday 18 June 2009 10:07:11 David Naylor wrote:
 Hi,

 I'm unable to get powerdevil to work.  The symptoms:
 1) Complains that I've selected profile  (that does not exist)
 2) Will not change to any profile that I choose
 3) Profiles do not take affect (i.e. ac-battery)
 4) Doesn't have any default profiles (had to copy the default profiles by
 hand)

Adding a me2.

 The Battery plasmoid works fine (shows battery status, changes when going
 from ac-battery and back).

 I suspect this is related to ConsoleKit.  A `ck-list-sessions' shows one
 session that is inactive (it should be active).

Maybe related?
dbus-daemon: Would reject message, 1 matched rules; type=method_call, 
sender=:1.6 (uid=1003 pid=1637 comm=kded4 ) 
interface=org.freedesktop.DBus.Introspectable member=Introspect error 
name=(unset) requested_reply=0 destination=org.freedesktop.ConsoleKit 
(uid=0 pid=1517 comm=/usr/local/sbin/console-kit-daemon ))

-- 
Mel
___
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information