summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--redhat/kdebase/kdebase-3.5.13-engage_lock_in_near_real_time.patch252
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_kio_sftp.patch (renamed from redhat/kdebase/1335166907:e72f4926c094b2bd94501518fbcd2a3e66a74f6a.diff)0
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch23
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_kxdglauncher_document.patch (renamed from redhat/kdebase/1333232616:f752bcbf6585c61f414963ad83e1300a1da08504.diff)0
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch84
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_race_condition.patch22
-rw-r--r--redhat/kdebase/kdebase-3.5.13-start_dcop_in_tdm.patch34
-rw-r--r--redhat/kdebase/trinity-kdebase-3.5.13.spec28
8 files changed, 440 insertions, 3 deletions
diff --git a/redhat/kdebase/kdebase-3.5.13-engage_lock_in_near_real_time.patch b/redhat/kdebase/kdebase-3.5.13-engage_lock_in_near_real_time.patch
new file mode 100644
index 000000000..54e35c45a
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-engage_lock_in_near_real_time.patch
@@ -0,0 +1,252 @@
+commit 8d521d0b6ba88c6e679e7453f02897c8db7bbdf5
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1328671935 -0600
+
+ Update lock process to engage the lock in near real time
+
+diff --git a/kdesktop/lock/CMakeLists.txt b/kdesktop/lock/CMakeLists.txt
+index 5530d4c..7a35121 100644
+--- a/kdesktop/lock/CMakeLists.txt
++++ b/kdesktop/lock/CMakeLists.txt
+@@ -35,6 +35,6 @@ set( ${target}_SRCS
+
+ tde_add_executable( ${target} AUTOMOC
+ SOURCES ${${target}_SRCS}
+- LINK kdesktopsettings-static dmctl-static kio-shared Xext ${GL_LIBRARY}
++ LINK kdesktopsettings-static dmctl-static kio-shared Xext ${GL_LIBRARY} "-z\ now"
+ DESTINATION ${BIN_INSTALL_DIR}
+ )
+diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
+index 0cbef60..132ff30 100644
+--- a/kdesktop/lock/main.cc
++++ b/kdesktop/lock/main.cc
+@@ -1,6 +1,7 @@
+ /* This file is part of the KDE project
+ Copyright (C) 1999 David Faure
+ Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org>
++ Copyright (c) 2010-2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+@@ -43,6 +44,13 @@ bool trinity_desktop_lock_use_sak = FALSE;
+
+ bool trinity_desktop_lock_forced = FALSE;
+
++bool signalled_forcelock;
++bool signalled_dontlock;
++bool signalled_securedialog;
++bool signalled_blank;
++bool signalled_run;
++bool in_internal_mode = FALSE;
++
+ bool MyApp::x11EventFilter( XEvent *ev )
+ {
+ if (ev->type == XKeyPress || ev->type == ButtonPress) {
+diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc
+index 5307c5c..79d27db 100644
+--- a/kdesktop/lockeng.cc
++++ b/kdesktop/lockeng.cc
+@@ -1,8 +1,9 @@
+ //===========================================================================
+ //
+-// This file is part of the KDE project
++// This file is part of the TDE project
+ //
+ // Copyright (c) 1999 Martin R. Jones <mjones@kde.org>
++// Copyright (c) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+ //
+
+
+@@ -29,6 +30,14 @@ extern xautolock_corner_t xautolock_corners[ 4 ];
+
+ bool trinity_lockeng_sak_available = TRUE;
+
++SaverEngine* m_masterSaverEngine = NULL;
++static void sigusr1_handler(int)
++{
++ if (m_masterSaverEngine) {
++ m_masterSaverEngine->lockProcessWaiting();
++ }
++}
++
+ //===========================================================================
+ //
+ // Screen saver engine. Doesn't handle the actual screensaver window,
+@@ -42,6 +51,16 @@ SaverEngine::SaverEngine()
+ mSAKProcess(NULL),
+ mTerminationRequested(false)
+ {
++ struct sigaction act;
++
++ // handle SIGUSR1
++ m_masterSaverEngine = this;
++ act.sa_handler= sigusr1_handler;
++ sigemptyset(&(act.sa_mask));
++ sigaddset(&(act.sa_mask), SIGUSR1);
++ act.sa_flags = 0;
++ sigaction(SIGUSR1, &act, 0L);
++
+ // Save X screensaver parameters
+ XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
+ &mXBlanking, &mXExposures);
+@@ -60,6 +79,19 @@ SaverEngine::SaverEngine()
+ TQTimer::singleShot( 0, this, TQT_SLOT(handleSecureDialog()) );
+
+ configure();
++
++ mLockProcess.clearArguments();
++ TQString path = KStandardDirs::findExe( "kdesktop_lock" );
++ if( path.isEmpty())
++ {
++ kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
++ }
++ mLockProcess << path;
++ mLockProcess << TQString( "--internal" ) << TQString( "%1" ).arg(getpid());
++ if (mLockProcess.start() == false )
++ {
++ kdDebug( 1204 ) << "Failed to start kdesktop_lock!" << endl;
++ }
+ }
+
+ //---------------------------------------------------------------------------
+@@ -68,6 +100,10 @@ SaverEngine::SaverEngine()
+ //
+ SaverEngine::~SaverEngine()
+ {
++ if (mState == Waiting) {
++ kill(mLockProcess.pid(), SIGKILL);
++ }
++
+ mLockProcess.detach(); // don't kill it if we crash
+ delete mXAutoLock;
+
+@@ -86,9 +122,9 @@ void SaverEngine::lock()
+ {
+ mSAKProcess->kill(SIGTERM);
+ ok = startLockProcess( ForceLock );
+-// It takes a while for kdesktop_lock to start and lock the screen.
+-// Therefore delay the DCOP call until it tells kdesktop that the locking is in effect.
+-// This is done only for --forcelock .
++ // It takes a while for kdesktop_lock to start and lock the screen.
++ // Therefore delay the DCOP call until it tells kdesktop that the locking is in effect.
++ // This is done only for --forcelock .
+ if( ok && mState != Saving )
+ {
+ DCOPClientTransaction* trans = kapp->dcopClient()->beginTransaction();
+@@ -283,40 +319,42 @@ bool SaverEngine::startLockProcess( LockType lock_type )
+ kdDebug(1204) << "SaverEngine: starting saver" << endl;
+ emitDCOPSignal("KDE_start_screensaver()", TQByteArray());
+
+- if (mLockProcess.isRunning())
+- {
+- stopLockProcess();
+- }
+- mLockProcess.clearArguments();
+- TQString path = KStandardDirs::findExe( "kdesktop_lock" );
+- if( path.isEmpty())
+- {
+- kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
+- return false;
++ if (!mLockProcess.isRunning()) {
++ mLockProcess.clearArguments();
++ TQString path = KStandardDirs::findExe( "kdesktop_lock" );
++ if( path.isEmpty())
++ {
++ kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
++ return false;
++ }
++ mLockProcess << path;
++ mLockProcess << TQString( "--internal" ) << TQString( "%1" ).arg(getpid());
++ if (mLockProcess.start() == false )
++ {
++ kdDebug( 1204 ) << "Failed to start kdesktop_lock!" << endl;
++ return false;
++ }
+ }
+- mLockProcess << path;
++
+ switch( lock_type )
+ {
+ case ForceLock:
+- mLockProcess << TQString( "--forcelock" );
++ mLockProcess.kill(SIGUSR1); // Request forcelock
+ break;
+ case DontLock:
+- mLockProcess << TQString( "--dontlock" );
++ mLockProcess.kill(SIGUSR2); // Request dontlock
+ break;
+ case SecureDialog:
+- mLockProcess << TQString( "--securedialog" );
++ mLockProcess.kill(SIGWINCH); // Request secure dialog
+ break;
+ default:
+ break;
+ }
+- if (mBlankOnly)
+- mLockProcess << TQString( "--blank" );
+-
+- if (mLockProcess.start() == false )
+- {
+- kdDebug( 1204 ) << "Failed to start kdesktop_lock!" << endl;
+- return false;
++ if (mBlankOnly) {
++ mLockProcess.kill(SIGTTIN); // Request blanking
+ }
++
++ mLockProcess.kill(SIGTTOU); // Start lock
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, PreferBlanking, mXExposures);
+
+ mState = Preparing;
+@@ -359,9 +397,7 @@ void SaverEngine::stopLockProcess()
+
+ void SaverEngine::lockProcessExited()
+ {
+-printf("Lock process exited\n\r"); fflush(stdout);
+ bool abnormalExit = false;
+- kdDebug(1204) << "SaverEngine: lock exited" << endl;
+ if (mLockProcess.normalExit() == false) {
+ abnormalExit = true;
+ }
+@@ -387,6 +423,28 @@ printf("Lock process exited\n\r"); fflush(stdout);
+ system("logout");
+ }
+ }
++ else {
++ // Restart the lock process
++ if (!mLockProcess.isRunning()) {
++ mLockProcess.clearArguments();
++ TQString path = KStandardDirs::findExe( "kdesktop_lock" );
++ if( path.isEmpty())
++ {
++ kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
++ }
++ mLockProcess << path;
++ mLockProcess << TQString( "--internal" ) << TQString( "%1" ).arg(getpid());
++ if (mLockProcess.start() == false )
++ {
++ kdDebug( 1204 ) << "Failed to start kdesktop_lock!" << endl;
++ }
++ }
++ }
++}
++
++void SaverEngine::lockProcessWaiting()
++{
++ kdDebug(1204) << "SaverEngine: lock exited" << endl;
+ if (trinity_lockeng_sak_available == TRUE) {
+ handleSecureDialog();
+ }
+diff --git a/kdesktop/lockeng.h b/kdesktop/lockeng.h
+index ae81f90..ae08e9a 100644
+--- a/kdesktop/lockeng.h
++++ b/kdesktop/lockeng.h
+@@ -78,6 +78,9 @@ public:
+ */
+ virtual void saverLockReady();
+
++public slots:
++ void lockProcessWaiting();
++
+ protected slots:
+ void idleTimeout();
+ void lockProcessExited();
diff --git a/redhat/kdebase/1335166907:e72f4926c094b2bd94501518fbcd2a3e66a74f6a.diff b/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp.patch
index 64dfa8e21..64dfa8e21 100644
--- a/redhat/kdebase/1335166907:e72f4926c094b2bd94501518fbcd2a3e66a74f6a.diff
+++ b/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp.patch
diff --git a/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch b/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch
new file mode 100644
index 000000000..00d3eea50
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch
@@ -0,0 +1,23 @@
+commit 073dc86aceaa060597d7653747c3c6c14d0ed59d
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1335311121 -0500
+
+ Fix sftp when nonstandard port is specified in ssh config
+
+diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
+index 2316c8c..04a2b33 100644
+--- a/kioslave/sftp/kio_sftp.cpp
++++ b/kioslave/sftp/kio_sftp.cpp
+@@ -481,11 +481,7 @@ void sftpProtocol::setHost (const TQString& h, int port, const TQString& user, c
+ if( port > 0 )
+ mPort = port;
+ else {
+- struct servent *pse;
+- if( (pse = getservbyname("ssh", "tcp") ) == NULL )
+- mPort = 22;
+- else
+- mPort = ntohs(pse->s_port);
++ mPort = -1;
+ }
+
+ mUsername = user;
diff --git a/redhat/kdebase/1333232616:f752bcbf6585c61f414963ad83e1300a1da08504.diff b/redhat/kdebase/kdebase-3.5.13-fix_kxdglauncher_document.patch
index 015270759..015270759 100644
--- a/redhat/kdebase/1333232616:f752bcbf6585c61f414963ad83e1300a1da08504.diff
+++ b/redhat/kdebase/kdebase-3.5.13-fix_kxdglauncher_document.patch
diff --git a/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch b/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch
new file mode 100644
index 000000000..73220e70d
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch
@@ -0,0 +1,84 @@
+commit 67a3a8f34892a6491ba0073a3f583503b44e58e7
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1335211141 -0500
+
+ Fix desktop lock failure due to race condition within signal handler between qt and xcb
+
+diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
+index c0050d3..3c67ac0 100644
+--- a/kdesktop/lock/lockprocess.cc
++++ b/kdesktop/lock/lockprocess.cc
+@@ -659,6 +659,7 @@ void LockProcess::startSecureDialog()
+ mBusy = false;
+ trinity_desktop_lock_in_sec_dlg = false;
+ if (ret == 0) {
++ trinity_desktop_lock_closing_windows = 1;
+ kapp->quit();
+ }
+ if (ret == 1) {
+@@ -687,6 +688,7 @@ void LockProcess::startSecureDialog()
+ mBusy = false;
+ }
+ if (ret == 2) {
++ trinity_desktop_lock_closing_windows = 1;
+ if (system("ksysguard &") == -1) {
+ // Error handler to shut up gcc warnings
+ }
+diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
+index 5853da1..225d9c5 100644
+--- a/kdesktop/lock/main.cc
++++ b/kdesktop/lock/main.cc
+@@ -168,7 +168,7 @@ int main( int argc, char **argv )
+
+ bool rt;
+ bool sig = false;
+- if( !child && args->isSet( "forcelock" ))
++ if( (!child) && (args->isSet( "forcelock" )))
+ {
+ rt = process.lock();
+ sig = true;
+diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc
+index 9eb88e1..f24d02f 100644
+--- a/kdesktop/lockeng.cc
++++ b/kdesktop/lockeng.cc
+@@ -34,7 +34,7 @@ SaverEngine* m_masterSaverEngine = NULL;
+ static void sigusr1_handler(int)
+ {
+ if (m_masterSaverEngine) {
+- m_masterSaverEngine->lockProcessWaiting();
++ m_masterSaverEngine->slotLockProcessWaiting();
+ }
+ }
+
+@@ -445,6 +445,13 @@ void SaverEngine::lockProcessExited()
+ }
+ }
+
++void SaverEngine::slotLockProcessWaiting()
++{
++ // lockProcessWaiting cannot be called directly from a signal handler, as it will hang in certain obscure circumstances
++ // Instead we use a single-shot timer to immediately call lockProcessWaiting once control has returned to the Qt main loop
++ TQTimer::singleShot(0, this, SLOT(lockProcessWaiting()));
++}
++
+ void SaverEngine::lockProcessWaiting()
+ {
+ kdDebug(1204) << "SaverEngine: lock exited" << endl;
+diff --git a/kdesktop/lockeng.h b/kdesktop/lockeng.h
+index ae08e9a..e42a048 100644
+--- a/kdesktop/lockeng.h
++++ b/kdesktop/lockeng.h
+@@ -79,11 +79,12 @@ public:
+ virtual void saverLockReady();
+
+ public slots:
+- void lockProcessWaiting();
++ void slotLockProcessWaiting();
+
+ protected slots:
+ void idleTimeout();
+ void lockProcessExited();
++ void lockProcessWaiting();
+
+ private slots:
+ void handleSecureDialog();
diff --git a/redhat/kdebase/kdebase-3.5.13-fix_race_condition.patch b/redhat/kdebase/kdebase-3.5.13-fix_race_condition.patch
new file mode 100644
index 000000000..868c8c3cb
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-fix_race_condition.patch
@@ -0,0 +1,22 @@
+commit 9e172fa7a1e93cc77e09616eb793b823d29ebaec
+Author: Darrell Anderson <humanreadable@yahoo.com>
+Date: 1333594438 -0500
+
+ Temporary fix for a probable race condition on some systems.
+ Still needs to be resolved by determining the root cause.
+ Partially resolves bug report 760.
+
+diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp
+index 162d966..99b9ac7 100644
+--- a/kioslave/system/kdedmodule/systemdirnotify.cpp
++++ b/kioslave/system/kdedmodule/systemdirnotify.cpp
+@@ -36,6 +36,9 @@ SystemDirNotify::SystemDirNotify()
+ void SystemDirNotify::init()
+ {
+ if( mInited )
++ // FIXME Work around a race condition by inserting kdDebug delay before following
++ // code is executed -- the root cause of the race should be investigated and fixed.
++ kdDebug() << "SystemDirNotify::init(" << mInited << ")" << endl;
+ return;
+ mInited = true;
+ KGlobal::dirs()->addResourceType("system_entries",
diff --git a/redhat/kdebase/kdebase-3.5.13-start_dcop_in_tdm.patch b/redhat/kdebase/kdebase-3.5.13-start_dcop_in_tdm.patch
new file mode 100644
index 000000000..53d7d6cde
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-start_dcop_in_tdm.patch
@@ -0,0 +1,34 @@
+--- kdebase/kdm/kfrontend/kgapp.cpp.orig 2012-04-27 22:08:53.729331548 +0200
++++ kdebase/kdm/kfrontend/kgapp.cpp 2012-04-27 22:06:29.169359295 +0200
+@@ -190,6 +190,7 @@
+ KProcess *tsak = 0;
+ KProcess *proc = 0;
+ KProcess *comp = 0;
++ KProcess *dcop = 0;
+ KProcess *kwin = 0;
+
+ trinity_desktop_lock_use_sak = _useSAK;
+@@ -310,6 +311,13 @@
+ }
+
+ if (!_windowManager.isEmpty()) {
++ if (_windowManager == "kwin") {
++ // Special case
++ // Start DCOP...
++ dcop = new KProcess;
++ *dcop << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + "dcopserver" << TQCString("--suicide");
++ dcop->start();
++ }
+ kwin = new KProcess;
+ *kwin << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + _windowManager.ascii();
+ kwin->start();
+@@ -453,7 +461,9 @@
+ if (kwin) {
+ kwin->closeStdin();
+ kwin->detach();
++ dcop->detach();
+ delete kwin;
++ delete dcop;
+ }
+ delete proc;
+ UnsecureDisplay( dpy );
diff --git a/redhat/kdebase/trinity-kdebase-3.5.13.spec b/redhat/kdebase/trinity-kdebase-3.5.13.spec
index 1feb46f18..7b569588c 100644
--- a/redhat/kdebase/trinity-kdebase-3.5.13.spec
+++ b/redhat/kdebase/trinity-kdebase-3.5.13.spec
@@ -2,7 +2,7 @@
%if "%{?version}" == ""
%define version 3.5.13
%endif
-%define release 19
+%define release 20
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
@@ -122,11 +122,21 @@ Patch43: kdebase-3.5.13-kate_focus_fix.patch
## [kdebase/kicker] Ensures that 'pagersettings.kcfg' is installed [Bug #908, Commit bd9c1479]
Patch44: kdebase-3.5.13-ensure_pagersettings_is_installed.patch
## [kdebase] Fix "Malformed URL $( kxdglauncher --getpath xdgname DOCUMENTS )" error dialog.
-Patch45: 1333232616:f752bcbf6585c61f414963ad83e1300a1da08504.diff
+Patch45: kdebase-3.5.13-fix_kxdglauncher_document.patch
## [kdebase/kioslave] Fix sftp failure on newer systems [Bug #897]
-Patch46: 1335166907:e72f4926c094b2bd94501518fbcd2a3e66a74f6a.diff
+Patch46: kdebase-3.5.13-fix_kio_sftp.patch
## [kdebase/kicker] Fix compilation with GCC 4.7 [Bug #958]
Patch47: kdebase-3.5.13-kicker-easyvector.patch
+## [kdebase/kioslave] Fix sftp when nonstandard port is specified in ssh config [Bug #897]
+Patch48: kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch
+## [kdebase/kdm] Start minimal dcop system to support twin in tdm [Commit #66a19439]
+Patch49: kdebase-3.5.13-start_dcop_in_tdm.patch
+## [kdebase/kdesktop/lock] Update lock process to engage the lock in near real time [Commit #8d521d0b]
+Patch50: kdebase-3.5.13-engage_lock_in_near_real_time.patch
+## [kdebase/kdesktop/lock] Fix desktop lock failure due to race condition within signal handler between qt and xcb [Commit #67a3a8f3]
+Patch51: kdebase-3.5.13-fix_lock_failure.patch
+## [kdebase/kioslave] Temporary fix for a probable race condition on some systems. [Bug #760]
+Patch52: kdebase-3.5.13-fix_race_condition.patch
# Fedora 15 Theme: "Lovelock"
%if 0%{?fedora} == 15
@@ -362,6 +372,11 @@ Protocol handlers (KIOslaves) for personal information management, including:
%patch45 -p1
%patch46 -p1
%patch47 -p0
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p1
# Applies an optional distro-specific graphical theme
%if "%{?tde_bg}" != ""
@@ -748,6 +763,13 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
%{_datadir}/cmake/*.cmake
%changelog
+* Fri Apr 27 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-20
+- Fix sftp when nonstandard port is specified in ssh config [Bug #897]
+- Start minimal dcop system to support twin in tdm [Commit #66a19439]
+- Update lock process to engage the lock in near real time [Commit #8d521d0b]
+- Fix desktop lock failure due to race condition within signal handler between qt and xcb [Commit #67a3a8f3]
+- Temporary fix for a probable race condition on some systems. [Bug #760]
+
* Tue Apr 24 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-19
- Build for Fedora 17
- Fix compilation with GCC 4.7 [Bug #958]