Hello community,
here is the log from the commit of package soprano for openSUSE:12.1 checked in at 2011-10-27 12:13:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1/soprano (Old)
and /work/SRC/openSUSE:12.1/.soprano.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "soprano", Maintainer is "kde-maintainers@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:12.1/soprano/soprano-backend-sesame.changes 2011-10-24 13:26:36.000000000 +0200
+++ /work/SRC/openSUSE:12.1/.soprano.new/soprano-backend-sesame.changes 2011-10-28 19:09:17.000000000 +0200
@@ -1,0 +2,28 @@
+Wed Oct 26 19:36:58 UTC 2011 - asterios.dramis@gmail.com
+
+- Fix package licenses (bnc#726055).
+
+-------------------------------------------------------------------
+Tue Oct 25 20:17:24 UTC 2011 - wstephenson@suse.com
+
+- Add patch from 2.7 branch to allow clients to react in case of
+ an unexpected Virtuoso server termination
+
+-------------------------------------------------------------------
+Sat Oct 22 19:05:28 UTC 2011 - asterios.dramis@gmail.com
+
+- Update to 2.7.2:
+ * Reverted a change which was introduced in 2.7.1 to use a separate
+ QDBusConnection for the DBusExportModel. It made things worse.
+ * Fixed a crash in NRLModel caused by a non-mutex-protected hash.
+ * Fixed the Virtuoso backend's option "forcedstart". Now the backend waits
+ for the running instance to be shut down before trying to start a new one.
+ From 2.7.1:
+ * Lowered the min Raptor version to 2.0.0 since it was only a runtime
+ dependancy for KDE.
+- Spec file updates:
+ * Changes based on spec-cleaner run.
+ * Changed License: to LGPL-2.0+.
+ * Removed boost-devel and raptor from BuildRequires: (not needed).
+
+-------------------------------------------------------------------
soprano-backend-virtuoso.changes: same change
soprano.changes: same change
Old:
----
soprano-2.7.0.tar.bz2
New:
----
2_7_BRANCH.diff
soprano-2.7.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ soprano-backend-sesame.spec ++++++
--- /var/tmp/diff_new_pack.j82198/_old 2011-10-28 19:09:17.000000000 +0200
+++ /var/tmp/diff_new_pack.j82198/_new 2011-10-28 19:09:17.000000000 +0200
@@ -18,18 +18,17 @@
Name: soprano-backend-sesame
-Url: http://soprano.sourceforge.net/
-License: LGPLv2+
-Group: System/Libraries
Summary: Sesame backend for Soprano
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+License: LGPL-2.1+
# COMMON1-BEGIN
# COMMON1-BEGIN
-Version: 2.7.0
+Version: 2.7.2
Release: 1
-Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2
+Url: http://soprano.sourceforge.net/
+Group: System/Libraries
+Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
Source100: baselibs.conf
-BuildRequires: boost-devel
+Patch0: 2_7_BRANCH.diff
BuildRequires: clucene-core-devel
BuildRequires: cmake
BuildRequires: doxygen
@@ -38,7 +37,6 @@
BuildRequires: libraptor-devel
BuildRequires: librasqal-devel
BuildRequires: libredland-devel
-BuildRequires: raptor
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
@@ -46,10 +44,11 @@
# COMMON1-END
BuildRequires: java-devel
BuildRequires: libsoprano-devel
-Requires: libsoprano4 = %{version}
Requires: java
+Requires: libsoprano4 = %{version}
Provides: soprano_backend = %{version}
Provides: backend-sesame2 = %{version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a Sesame based backend for Soprano.
@@ -58,12 +57,13 @@
# COMMON2-BEGIN
# COMMON2-BEGIN
%setup -q -n soprano-%{version}
+%patch0 -p1
# COMMON2-END
# COMMON2-END
%build
export JAVA_HOME=%{_jvmdir}/java
-%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON
+%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME2_BACKEND=ON
%make_jobs
%install
@@ -83,7 +83,7 @@
%files
%defattr(-,root,root,-)
-%{_datadir}/soprano/sesame2
+%{_datadir}/soprano/sesame2/
%{_libdir}/soprano/libsoprano_sesame2backend.so
%{_datadir}/soprano/plugins/sesame2backend.desktop
++++++ soprano-backend-virtuoso.spec ++++++
--- /var/tmp/diff_new_pack.j82198/_old 2011-10-28 19:09:17.000000000 +0200
+++ /var/tmp/diff_new_pack.j82198/_new 2011-10-28 19:09:17.000000000 +0200
@@ -18,18 +18,17 @@
Name: soprano-backend-virtuoso
-Url: http://soprano.sourceforge.net/
-License: LGPLv2+
-Group: System/Libraries
Summary: Virtuoso backend for Soprano
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+License: GPL-2.0+
# COMMON1-BEGIN
# COMMON1-BEGIN
-Version: 2.7.0
+Version: 2.7.2
Release: 1
-Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2
+Url: http://soprano.sourceforge.net/
+Group: System/Libraries
+Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
Source100: baselibs.conf
-BuildRequires: boost-devel
+Patch0: 2_7_BRANCH.diff
BuildRequires: clucene-core-devel
BuildRequires: cmake
BuildRequires: doxygen
@@ -38,7 +37,6 @@
BuildRequires: libraptor-devel
BuildRequires: librasqal-devel
BuildRequires: libredland-devel
-BuildRequires: raptor
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
@@ -50,6 +48,7 @@
Requires: virtuoso-server
Provides: soprano_backend = %{version}
Provides: backend-virtuso = %{version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a Virtuoso based backend for Soprano.
@@ -58,6 +57,7 @@
# COMMON2-BEGIN
# COMMON2-BEGIN
%setup -q -n soprano-%{version}
+%patch0 -p1
# COMMON2-END
# COMMON2-END
++++++ soprano.spec ++++++
--- /var/tmp/diff_new_pack.j82198/_old 2011-10-28 19:09:17.000000000 +0200
+++ /var/tmp/diff_new_pack.j82198/_new 2011-10-28 19:09:17.000000000 +0200
@@ -18,17 +18,16 @@
Name: soprano
-Url: http://soprano.sourceforge.net/
-License: LGPLv2+
-Group: System/Libraries
Summary: C++/Qt based interface library for RDF
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+License: LGPL-2.1+ and GPL-2.0+
# COMMON1-BEGIN
-Version: 2.7.0
+Version: 2.7.2
Release: 1
-Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2
+Url: http://soprano.sourceforge.net/
+Group: System/Libraries
+Source0: http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
Source100: baselibs.conf
-BuildRequires: boost-devel
+Patch0: 2_7_BRANCH.diff
BuildRequires: clucene-core-devel
BuildRequires: cmake
BuildRequires: doxygen
@@ -37,15 +36,15 @@
BuildRequires: libraptor-devel
BuildRequires: librasqal-devel
BuildRequires: libredland-devel
-BuildRequires: raptor
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
# COMMON1-END
BuildRequires: fdupes
Requires: libsoprano4 = %{version}
-Recommends: soprano_backend = %{version}
Recommends: soprano-backend-virtuoso
+Recommends: soprano_backend = %{version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Soprano is an open and pluggable RDF resource framework which is build
@@ -57,25 +56,21 @@
%prep
# COMMON2-BEGIN
%setup -q -n soprano-%{version}
+%patch0 -p1
# COMMON2-END
-%package -n libsoprano-devel
-License: LGPLv2+
-Summary: Developer files for Soprano
-Group: Development/Libraries/C and C++
-Requires: %{name} = %{version}
-%requires_ge clucene-core-devel
-%requires_ge libqt4-devel
-Requires: libraptor-devel
-Requires: libredland-devel
+%package backend-redland
+License: LGPL-2.1+
+Summary: Redland backend for Soprano
+Group: System/Libraries
Requires: libsoprano4 = %{version}
-Requires: soprano-backend-redland
+Provides: soprano_backend = %{version}
-%description -n libsoprano-devel
-This package contains developer files for Soprano.
+%description backend-redland
+This package provides a Redland based backend for Soprano.
%package -n libsoprano4
-License: LGPLv2+
+License: LGPL-2.1+
Summary: C++/Qt based interface library for RDF
Group: System/Libraries
%requires_ge libqt4
@@ -87,15 +82,20 @@
Soprano are desktop applications as it is being developed as a
subroject of Nepomuk, the semantic desktop initiative.
-%package backend-redland
-License: LGPLv2+
-Summary: Redland backend for Soprano
-Group: System/Libraries
+%package -n libsoprano-devel
+License: LGPL-2.1+
+Summary: Developer files for Soprano
+Group: Development/Libraries/C and C++
+Requires: %{name} = %{version}
+Requires: libraptor-devel
+Requires: libredland-devel
Requires: libsoprano4 = %{version}
-Provides: soprano_backend = %{version}
+Requires: soprano-backend-redland
+%requires_ge clucene-core-devel
+%requires_ge libqt4-devel
-%description backend-redland
-This package provides a Redland based backend for Soprano.
+%description -n libsoprano-devel
+This package contains developer files for Soprano.
%build
%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF
@@ -129,11 +129,7 @@
%{_bindir}/onto2vocabularyclass
%{_bindir}/sopranocmd
%{_bindir}/sopranod
-%{_datadir}/dbus-1/interfaces/org.soprano.Model.xml
-%{_datadir}/dbus-1/interfaces/org.soprano.NodeIterator.xml
-%{_datadir}/dbus-1/interfaces/org.soprano.QueryResultIterator.xml
-%{_datadir}/dbus-1/interfaces/org.soprano.Server.xml
-%{_datadir}/dbus-1/interfaces/org.soprano.StatementIterator.xml
+%{_datadir}/dbus-1/interfaces/org.soprano.*.xml
%dir %{_datadir}/soprano
%dir %{_datadir}/soprano/rules
%dir %{_datadir}/soprano/plugins
@@ -148,21 +144,22 @@
%{_libdir}/soprano/libsoprano_raptorparser.so
%{_libdir}/soprano/libsoprano_raptorserializer.so
+%files backend-redland
+%defattr(-,root,root,-)
+%{_libdir}/soprano/libsoprano_redlandbackend.so
+%{_datadir}/soprano/plugins/redlandbackend.desktop
+
%files -n libsoprano4
%defattr(-,root,root,-)
-%{_libdir}/libsopranoclient.so.1
-%{_libdir}/libsopranoclient.so.1.2.0
-%{_libdir}/libsopranoserver.so.1
-%{_libdir}/libsopranoserver.so.1.2.0
-%{_libdir}/libsoprano.so.4
-%{_libdir}/libsoprano.so.4.3.0
-%{_libdir}/libsopranoindex.so.1
-%{_libdir}/libsopranoindex.so.1.1.0
+%{_libdir}/libsopranoclient.so.1*
+%{_libdir}/libsopranoserver.so.1*
+%{_libdir}/libsoprano.so.4*
+%{_libdir}/libsopranoindex.so.1*
%files -n libsoprano-devel
%defattr(-,root,root,-)
-%{_includedir}/soprano
-%{_includedir}/Soprano
+%{_includedir}/soprano/
+%{_includedir}/Soprano/
%{_libdir}/libsoprano.so
%{_libdir}/libsopranoindex.so
%{_libdir}/libsopranoclient.so
@@ -171,12 +168,6 @@
%{_libdir}/pkgconfig/sopranoclient.pc
%{_libdir}/pkgconfig/sopranoindex.pc
%{_libdir}/pkgconfig/sopranoserver.pc
-%dir %{_datadir}/soprano/cmake
-%{_datadir}/soprano/cmake/SopranoAddOntology.cmake
-
-%files backend-redland
-%defattr(-,root,root,-)
-%{_libdir}/soprano/libsoprano_redlandbackend.so
-%{_datadir}/soprano/plugins/redlandbackend.desktop
+%{_datadir}/soprano/cmake/
%changelog
++++++ 2_7_BRANCH.diff ++++++
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3c440f..eb80bba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod
################## Soprano version ################################
set(CMAKE_SOPRANO_VERSION_MAJOR 2)
set(CMAKE_SOPRANO_VERSION_MINOR 7)
-set(CMAKE_SOPRANO_VERSION_RELEASE 1)
+set(CMAKE_SOPRANO_VERSION_RELEASE 3)
set(CMAKE_SOPRANO_VERSION_STRING "${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}")
diff --git a/ChangeLog b/ChangeLog
index 383fbea..00eec79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2.7.3
+ * Added new signal in the Virtuoso backend which signals when the server goes down.
+
2.7.2
* Reverted a change which was introduced in 2.7.1 to use a separate QDBusConnection for the
DBusExportModel. It made things worse.
diff --git a/backends/virtuoso/Virtuoso.dox b/backends/virtuoso/Virtuoso.dox
index c62d6f9..7bd0e73 100644
--- a/backends/virtuoso/Virtuoso.dox
+++ b/backends/virtuoso/Virtuoso.dox
@@ -60,6 +60,19 @@
* \li Soprano::BackendOptionPassword - Set the password to connect to the Virtuoso server.
*
*
+ * \section soprano_backend_vituoso_additions Additional Features
+ *
+ * Models created by the Virtuoso backend emit a non-standard signal which informs the client that the Virtuoso server went down.
+ * This signal is only emitted for Virtuoso instances that were started by the backend and has the following signature:
+ *
+ * \code
+ * void virtuosoStopped(bool normalExit);
+ * \endcode
+ *
+ * The parameter \p normalExit is \p true if the instance went down as scheduled (deletion of the model) and \p false if the
+ * Virtuoso instance crashed or was killed by a third party. Typically a client would connect to the signal to properly re-create the model.
+ *
+ *
* \section soprano_backend_vituoso_specialities Virtuoso Specialities
*
* Since Virtuoso is an SQL server and, thus, does store all RDF data in SQL tables it
diff --git a/backends/virtuoso/virtuosobackend.cpp b/backends/virtuoso/virtuosobackend.cpp
index c83605d..aab1881 100644
--- a/backends/virtuoso/virtuosobackend.cpp
+++ b/backends/virtuoso/virtuosobackend.cpp
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2008-2010 Sebastian Trueg
+ * Copyright (C) 2008-2011 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -115,8 +115,10 @@ Soprano::StorageModel* Soprano::Virtuoso::BackendPlugin::createModel( const Back
VirtuosoModel* model = new VirtuosoModel( connectionPool, this );
// mem mangement the ugly way
// FIXME: improve
- if ( controller )
+ if ( controller ) {
controller->setParent( model );
+ connect(controller, SIGNAL(stopped(Soprano::VirtuosoController::ExitStatus)), model, SLOT(slotVirtuosoStopped(Soprano::VirtuosoController::ExitStatus)));
+ }
return model;
}
diff --git a/backends/virtuoso/virtuosocontroller.h b/backends/virtuoso/virtuosocontroller.h
index 713d5cc..0f772d4 100644
--- a/backends/virtuoso/virtuosocontroller.h
+++ b/backends/virtuoso/virtuosocontroller.h
@@ -74,7 +74,7 @@ namespace Soprano {
Q_SIGNALS:
void started();
- void stopped( ExitStatus status );
+ void stopped( Soprano::VirtuosoController::ExitStatus status );
private Q_SLOTS:
void slotProcessFinished( int exitCode, QProcess::ExitStatus exitStatus );
diff --git a/backends/virtuoso/virtuosomodel.cpp b/backends/virtuoso/virtuosomodel.cpp
index 9b9aa5d..5b04c4e 100644
--- a/backends/virtuoso/virtuosomodel.cpp
+++ b/backends/virtuoso/virtuosomodel.cpp
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2008-2010 Sebastian Trueg
+ * Copyright (C) 2008-2011 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -449,4 +449,17 @@ Soprano::QueryResultIterator Soprano::VirtuosoModel::executeQuery( const QString
return d->sparqlQuery( d->replaceFakeTypesInQuery( query ) );
}
+
+void Soprano::VirtuosoModel::slotVirtuosoStopped(VirtuosoController::ExitStatus status)
+{
+ // inform clients about a non-scheduled exit of the server so they can act accordingly
+ // typically this would mean to re-create the model from the backend
+ // We do this async in case clients react by directly deleting us
+ QMetaObject::invokeMethod(this,
+ "virtuosoStopped",
+ Qt::QueuedConnection,
+ Q_ARG(bool, (!(status == VirtuosoController::CrashExit ||
+ status == VirtuosoController::ThirdPartyExit))));
+}
+
#include "virtuosomodel.moc"
diff --git a/backends/virtuoso/virtuosomodel.h b/backends/virtuoso/virtuosomodel.h
index ba1a344..7ad70a3 100644
--- a/backends/virtuoso/virtuosomodel.h
+++ b/backends/virtuoso/virtuosomodel.h
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project
*
- * Copyright (C) 2008-2010 Sebastian Trueg
+ * Copyright (C) 2008-2011 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,10 +19,11 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SOPRANO_IODBC_MODEL_H_
-#define _SOPRANO_IODBC_MODEL_H_
+#ifndef _SOPRANO_VIRTUOSO_MODEL_H_
+#define _SOPRANO_VIRTUOSO_MODEL_H_
#include "storagemodel.h"
+#include "virtuosocontroller.h"
namespace Soprano {
namespace ODBC {
@@ -55,6 +56,14 @@ namespace Soprano {
Query::QueryLanguage language = Query::QueryLanguageSparql,
const QString& userQueryLanguage = QString() ) const;
+ public Q_SLOTS:
+ /// a public slot since it is connected from the backend on creation time
+ void slotVirtuosoStopped(Soprano::VirtuosoController::ExitStatus status);
+
+ Q_SIGNALS:
+ /// \param normalExit \p true if the shutdown of Virtuoso was initialized by deleting the model
+ void virtuosoStopped(bool normalExit);
+
private:
VirtuosoModelPrivate* const d;
++++++ soprano-2.7.0.tar.bz2 -> soprano-2.7.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/CMakeLists.txt new/soprano-2.7.2/CMakeLists.txt
--- old/soprano-2.7.0/CMakeLists.txt 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/CMakeLists.txt 2011-10-21 10:22:44.000000000 +0200
@@ -7,7 +7,7 @@
################## Soprano version ################################
set(CMAKE_SOPRANO_VERSION_MAJOR 2)
set(CMAKE_SOPRANO_VERSION_MINOR 7)
-set(CMAKE_SOPRANO_VERSION_RELEASE 0)
+set(CMAKE_SOPRANO_VERSION_RELEASE 1)
set(CMAKE_SOPRANO_VERSION_STRING "${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}")
@@ -42,10 +42,7 @@
if(NOT SOPRANO_DISABLE_RAPTOR_PARSER OR NOT SOPRANO_DISABLE_RAPTOR_SERIALIZER OR NOT SOPRANO_DISABLE_REDLAND_BACKEND)
find_package(Rasqal)
- ## Dear packagers! There were serious bug that was fixed in 2.0.4. comparing to 2.0.3
- ## But, if for some reasons you can' ship 2.0.4, there is|are backport(s) of this fix to 2.0.3
- ## One of such backports was created by ArchLinux team. You may wish to contact them for it.
- find_package(Raptor 2.0.4)
+ find_package(Raptor 2.0.0)
find_package(Redland)
if(WIN32)
@@ -198,15 +195,19 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/soprano.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/soprano.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sopranoclient.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/sopranoclient.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sopranoserver.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/sopranoserver.pc @ONLY)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sopranoindex.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/sopranoindex.pc @ONLY)
+
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/soprano.pc
${CMAKE_CURRENT_BINARY_DIR}/sopranoclient.pc
${CMAKE_CURRENT_BINARY_DIR}/sopranoserver.pc
- ${CMAKE_CURRENT_BINARY_DIR}/sopranoindex.pc
DESTINATION
${PKGCONFIG_INSTALL_PREFIX})
+
+ if(BUILD_CLUCENE_INDEX)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sopranoindex.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/sopranoindex.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sopranoindex.pc DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
+ endif(BUILD_CLUCENE_INDEX)
endif(NOT WIN32)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/ChangeLog new/soprano-2.7.2/ChangeLog
--- old/soprano-2.7.0/ChangeLog 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/ChangeLog 2011-10-21 10:22:44.000000000 +0200
@@ -1,3 +1,13 @@
+2.7.2
+ * Reverted a change which was introduced in 2.7.1 to use a separate QDBusConnection for the
+ DBusExportModel. It made things worse.
+ * Fixed a crash in NRLModel caused by a non-mutex-protected hash.
+ * Fixed the Virtuoso backend's option "forcedstart". Now the backend waits for the running instance
+ to be shut down before trying to start a new one.
+
+2.7.1
+ * Lowered the min Raptor version to 2.0.0 since it was only a runtime dependancy for KDE.
+
2.7.0
* Use the new Virtuoso parameter XAnyNormalization to use normalized accents for full-text searching by default.
* Updated NAO Vocabulary namespace to include changes from SDO 0.7.
@@ -9,6 +19,7 @@
* Let onto2vocabularyclass convert dots in entity names to underscores to create valid C++ names.
* Register DBus types in Client::DBusModel to make sure it can be used without Client::DBusClient.
* Fixed error propagation in Utils::AsyncQuery.
+ * Use a separate QDBusConnection for the DBusExportModel to avoid crashes.
2.6.0
* Fixed handling of xsd:boolean in SPARQL queries in the Virtuoso backend
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/backends/virtuoso/virtuosocontroller.cpp new/soprano-2.7.2/backends/virtuoso/virtuosocontroller.cpp
--- old/soprano-2.7.0/backends/virtuoso/virtuosocontroller.cpp 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/backends/virtuoso/virtuosocontroller.cpp 2011-10-21 10:22:44.000000000 +0200
@@ -87,86 +87,101 @@
Soprano::VirtuosoController::~VirtuosoController()
{
- if ( isRunning() )
+ if ( m_virtuosoProcess.state() == QProcess::Running )
shutdown();
}
bool Soprano::VirtuosoController::start( const BackendSettings& settings, RunFlags flags )
{
- if ( !isRunning() ) {
- QTemporaryFile tmpFile( QDir::tempPath() + "/virtuoso_XXXXXX.ini" );
- tmpFile.setAutoRemove( false );
- tmpFile.open();
- m_configFilePath = tmpFile.fileName();
- tmpFile.close();
- writeConfigFile( m_configFilePath, settings );
- m_runFlags = flags;
-
- m_status = StartingUp;
-
- QString virtuosoExe = locateVirtuosoBinary();
- if ( virtuosoExe.isEmpty() ) {
- setError( "Unable to find the Virtuoso binary." );
+ switch( m_status ) {
+ case NotRunning:
+ break; // Try to start server
+ case StartingUp:
+ setError( "Virtuoso is already starting up.");
return false;
- }
+ case Running:
+ setError( "Virtuoso is already running." );
+ return false;
+ case ShuttingDown:
+ case Killing:
+ setError( "Virtuoso is not stopped yet." );
+ return false;
+ }
- const QString storageDir = valueInSettings( settings, BackendOptionStorageDir ).toString();
+ QTemporaryFile tmpFile( QDir::tempPath() + "/virtuoso_XXXXXX.ini" );
+ tmpFile.setAutoRemove( false );
+ tmpFile.open();
+ m_configFilePath = tmpFile.fileName();
+ tmpFile.close();
+ writeConfigFile( m_configFilePath, settings );
+ m_runFlags = flags;
+
+ m_status = StartingUp;
+
+ QString virtuosoExe = locateVirtuosoBinary();
+ if ( virtuosoExe.isEmpty() ) {
+ setError( "Unable to find the Virtuoso binary." );
+ return false;
+ }
- // aquire a lock for ourselves
- m_virtuosoLock.setFileName( storageDir + QLatin1String("/soprano-virtuoso.lock") );
- int pid = 0;
- if( !m_virtuosoLock.aquireLock( &pid ) ) {
- setError( QString::fromLatin1("Another instance of Soprano (%1) is already running on the data in '%2'.")
- .arg(pid).arg(storageDir));
- return false;
- }
+ const QString storageDir = valueInSettings( settings, BackendOptionStorageDir ).toString();
- // check if another instance of Virtuoso is running
- pid = pidOfRunningVirtuosoInstance( storageDir );
- if ( pid > 0 && valueInSettings( settings, "forcedstart", false ).toBool() ) {
+ // aquire a lock for ourselves
+ m_virtuosoLock.setFileName( storageDir + QLatin1String("/soprano-virtuoso.lock") );
+ int pid = 0;
+ if( !m_virtuosoLock.aquireLock( &pid ) ) {
+ setError( QString::fromLatin1("Another instance of Soprano (%1) is already running on the data in '%2'.")
+ .arg(pid).arg(storageDir));
+ return false;
+ }
+
+ // check if another instance of Virtuoso is running
+ pid = pidOfRunningVirtuosoInstance( storageDir );
+ if ( pid > 0 && valueInSettings( settings, "forcedstart", false ).toBool() ) {
#ifndef Q_OS_WIN
- qDebug( "Shutting down Virtuoso instance (%d) which is in our way.", pid );
- ::kill( pid_t( pid ), SIGINT );
- ::waitpid( pid_t( pid ), 0, 0 );
-#endif
- pid = 0;
- }
+ qDebug( "Shutting down Virtuoso instance (%d) which is in our way.", pid );
+ ::kill( pid_t( pid ), SIGINT );
- // remove old lock files in case Virtuoso crashed
- if ( !pid ) {
- QString lockFilePath = storageDir + QLatin1String( "/soprano-virtuoso.lck" );
- if ( QFile::exists( lockFilePath ) )
- QFile::remove( lockFilePath );
+ // wait for at max 30 seconds for the old instance to go down
+ int maxWaitSecs = 30;
+ while(pidOfRunningVirtuosoInstance( storageDir ) > 0 &&
+ --maxWaitSecs > 0) {
+ ::sleep(1);
}
+#endif
+ pid = 0;
+ }
- QStringList args;
- args << "+foreground"
- << "+configfile" << QDir::toNativeSeparators(m_configFilePath);
+ // remove old lock files in case Virtuoso crashed
+ if ( !pid ) {
+ QString lockFilePath = storageDir + QLatin1String( "/soprano-virtuoso.lck" );
+ if ( QFile::exists( lockFilePath ) )
+ QFile::remove( lockFilePath );
+ }
+
+ QStringList args;
+ args << "+foreground"
+ << "+configfile" << QDir::toNativeSeparators(m_configFilePath);
#ifndef Q_OS_WIN
- args << "+wait";
+ args << "+wait";
#endif
- qDebug() << "Starting Virtuoso server:" << virtuosoExe << args;
+ qDebug() << "Starting Virtuoso server:" << virtuosoExe << args;
- // We need to set the working directory cause virtuoso creates a temp checkpoint_in_progress file
- // in the directory it was started.
- m_virtuosoProcess.setWorkingDirectory( storageDir );
- m_virtuosoProcess.start( virtuosoExe, args, QIODevice::ReadOnly );
- m_virtuosoProcess.setReadChannel( QProcess::StandardError );
- m_virtuosoProcess.closeReadChannel( QProcess::StandardOutput );
- if ( waitForVirtuosoToInitialize() ) {
- clearError();
- m_status = Running;
- qDebug() << "Virtuoso started:" << m_virtuosoProcess.pid();
- return true;
- }
- else {
- setError( "Failed to start Virtuoso" );
- return false;
- }
+ // We need to set the working directory cause virtuoso creates a temp checkpoint_in_progress file
+ // in the directory it was started.
+ m_virtuosoProcess.setWorkingDirectory( storageDir );
+ m_virtuosoProcess.start( virtuosoExe, args, QIODevice::ReadOnly );
+ m_virtuosoProcess.setReadChannel( QProcess::StandardError );
+ m_virtuosoProcess.closeReadChannel( QProcess::StandardOutput );
+ if ( waitForVirtuosoToInitialize() ) {
+ clearError();
+ m_status = Running;
+ qDebug() << "Virtuoso started:" << m_virtuosoProcess.pid();
+ return true;
}
else {
- setError( "Virtuoso is already running." );
+ setError( "Failed to start Virtuoso" );
return false;
}
}
@@ -248,12 +263,6 @@
}
-bool Soprano::VirtuosoController::isRunning() const
-{
- return m_status == Running;
-}
-
-
void Soprano::VirtuosoController::slotProcessFinished( int, QProcess::ExitStatus exitStatus )
{
// clean up config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/backends/virtuoso/virtuosocontroller.h new/soprano-2.7.2/backends/virtuoso/virtuosocontroller.h
--- old/soprano-2.7.0/backends/virtuoso/virtuosocontroller.h 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/backends/virtuoso/virtuosocontroller.h 2011-10-21 10:22:44.000000000 +0200
@@ -66,7 +66,6 @@
int usedPort() const;
- bool isRunning() const;
Status status() const { return m_status; }
ExitStatus lastExitStatus() const { return m_lastExitStatus; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/soprano/inference/inferenceruleset.cpp new/soprano-2.7.2/soprano/inference/inferenceruleset.cpp
--- old/soprano-2.7.0/soprano/inference/inferenceruleset.cpp 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/soprano/inference/inferenceruleset.cpp 2011-10-21 10:22:44.000000000 +0200
@@ -21,16 +21,14 @@
#include "soprano-config.h"
+#include "sopranodirs.h"
#include "inferenceruleset.h"
#include "inferencerule.h"
#include "inferenceruleparser.h"
#include
#include
-#ifdef Q_OS_WIN
-#include
-#include
-#endif
+#include
class Soprano::Inference::RuleSet::Private : public QSharedData
{
@@ -127,36 +125,23 @@
Soprano::Inference::RuleSet Soprano::Inference::RuleSet::standardRuleSet( StandardRuleSet set )
{
- QString path( SOPRANO_PREFIX );
- path += "/share/soprano/rules/";
-
- switch( set ) {
- case RDFS:
- path += "rdfs.rules";
- break;
- case NRL:
- path += "nrl.rules";
- break;
- }
-
- RuleParser parser;
- parser.parseFile( path );
-#ifdef Q_OS_WIN
- // Additionally try to look up the rules based on the runtime Path if
- // they can not be found at the install prefix
- if (!parser.rules().count()) {
- path = QDir( QCoreApplication::applicationDirPath() ).absoluteFilePath( ".." );
- path += "/share/soprano/rules/";
+ QString path;
+ foreach( const QString &p, Soprano::dataDirs() ) {
switch( set ) {
case RDFS:
- path += "rdfs.rules";
+ path = p + QLatin1String( "/soprano/rules/rdfs.rules" );
break;
case NRL:
- path += "nrl.rules";
+ path = p + QLatin1String( "/soprano/rules/nrl.rules" );
break;
}
+ if (QFile::exists(path)) {
+ RuleParser parser;
+ if( parser.parseFile( path ) )
+ return parser.rules();
+ }
}
-#endif
- return parser.rules();
+
+ return Soprano::Inference::RuleSet();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/soprano/nrlmodel.cpp new/soprano-2.7.2/soprano/nrlmodel.cpp
--- old/soprano-2.7.0/soprano/nrlmodel.cpp 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/soprano/nrlmodel.cpp 2011-10-21 10:22:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project.
*
- * Copyright (C) 2007-2009 Sebastian Trueg
+ * Copyright (C) 2007-2011 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -54,7 +54,8 @@
public:
Private()
: ignoreContext( true ),
- m_expandQueryPrefixes( false ) {
+ m_expandQueryPrefixes( false ),
+ m_prefixMapMutex( QMutex::Recursive ) {
}
/**
@@ -62,7 +63,7 @@
*/
void buildPrefixMap()
{
- QMutexLocker lock( &m_mutex );
+ QMutexLocker lock( &m_prefixMapMutex );
m_prefixes.clear();
@@ -98,8 +99,7 @@
NRLModel* q;
-private:
- QMutex m_mutex;
+ QMutex m_prefixMapMutex;
};
Soprano::NRLModel::NRLModel()
@@ -299,8 +299,11 @@
if ( language == Query::QueryLanguageSparql &&
d->m_expandQueryPrefixes ) {
- for ( QHash::const_iterator it = d->m_prefixes.constBegin();
- it != d->m_prefixes.constEnd(); ++it ) {
+ d->m_prefixMapMutex.lock();
+ QHash prefixes = d->m_prefixes;
+ d->m_prefixMapMutex.unlock();
+ for ( QHash::const_iterator it = prefixes.constBegin();
+ it != prefixes.constEnd(); ++it ) {
QString prefix = it.key();
QUrl ns = it.value();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.7.0/soprano/nrlmodel.h new/soprano-2.7.2/soprano/nrlmodel.h
--- old/soprano-2.7.0/soprano/nrlmodel.h 2011-08-04 14:16:26.000000000 +0200
+++ new/soprano-2.7.2/soprano/nrlmodel.h 2011-10-21 10:22:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
* This file is part of Soprano Project.
*
- * Copyright (C) 2007-2009 Sebastian Trueg
+ * Copyright (C) 2007-2011 Sebastian Trueg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
++++++ soprano-backend-sesame.spec.in ++++++
--- /var/tmp/diff_new_pack.j82198/_old 2011-10-28 19:09:18.000000000 +0200
+++ /var/tmp/diff_new_pack.j82198/_new 2011-10-28 19:09:18.000000000 +0200
@@ -18,19 +18,17 @@
Name: soprano-backend-sesame
-Url: http://soprano.sourceforge.net/
-License: LGPLv2+
-Group: System/Libraries
Summary: Sesame backend for Soprano
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+License: LGPL-2.1+
# COMMON1-BEGIN
# COMMON1-END
BuildRequires: java-devel
BuildRequires: libsoprano-devel
-Requires: libsoprano4 = %{version}
Requires: java
+Requires: libsoprano4 = %{version}
Provides: soprano_backend = %{version}
Provides: backend-sesame2 = %{version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a Sesame based backend for Soprano.
@@ -41,7 +39,7 @@
%build
export JAVA_HOME=%{_jvmdir}/java
-%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON
+%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME2_BACKEND=ON
%make_jobs
%install
@@ -61,7 +59,7 @@
%files
%defattr(-,root,root,-)
-%{_datadir}/soprano/sesame2
+%{_datadir}/soprano/sesame2/
%{_libdir}/soprano/libsoprano_sesame2backend.so
%{_datadir}/soprano/plugins/sesame2backend.desktop
++++++ soprano-backend-virtuoso.spec.in ++++++
--- /var/tmp/diff_new_pack.j82198/_old 2011-10-28 19:09:18.000000000 +0200
+++ /var/tmp/diff_new_pack.j82198/_new 2011-10-28 19:09:18.000000000 +0200
@@ -18,11 +18,8 @@
Name: soprano-backend-virtuoso
-Url: http://soprano.sourceforge.net/
-License: LGPLv2+
-Group: System/Libraries
Summary: Virtuoso backend for Soprano
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+License: GPL-2.0+
# COMMON1-BEGIN
# COMMON1-END
BuildRequires: libiodbc-devel
@@ -31,6 +28,7 @@
Requires: virtuoso-server
Provides: soprano_backend = %{version}
Provides: backend-virtuso = %{version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a Virtuoso based backend for Soprano.
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org