summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xredhat/dependencies/arts/trinity-arts-3.5.13.spec1
-rw-r--r--redhat/kdebase/kdebase-3.5.13-fix_kdm_cpu_usage.patch47
-rw-r--r--redhat/kdebase/kdebase-3.5.13-replicate_led_status_on_virtual_keyboard.patch95
-rw-r--r--redhat/kdebase/kdebase-3.5.13-tsak_keyboard_hotplug.patch641
-rw-r--r--redhat/kdebase/trinity-kdebase-3.5.13.spec26
-rw-r--r--redhat/kdelibs/kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch45
-rw-r--r--redhat/kdelibs/kdelibs-3.5.13-fix_add_printer.patch20
-rwxr-xr-xredhat/kdelibs/trinity-kdelibs-3.5.13.spec13
-rw-r--r--redhat/kdemultimedia/kdemultimedia-3.5.13-fix_mmx_detection.patch12
-rw-r--r--redhat/kdemultimedia/trinity-kdemultimedia-3.5.13.spec5
-rw-r--r--redhat/kdenetwork/trinity-kdenetwork-3.5.13.spec2
11 files changed, 900 insertions, 7 deletions
diff --git a/redhat/dependencies/arts/trinity-arts-3.5.13.spec b/redhat/dependencies/arts/trinity-arts-3.5.13.spec
index 7e032efef..8b639a8f0 100755
--- a/redhat/dependencies/arts/trinity-arts-3.5.13.spec
+++ b/redhat/dependencies/arts/trinity-arts-3.5.13.spec
@@ -42,6 +42,7 @@ BuildRequires: glib2-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: gsl-devel
BuildRequires: libvorbis-devel
+BuildRequires: esound-devel
BuildRequires: jack-audio-connection-kit-devel
Requires: tqtinterface
diff --git a/redhat/kdebase/kdebase-3.5.13-fix_kdm_cpu_usage.patch b/redhat/kdebase/kdebase-3.5.13-fix_kdm_cpu_usage.patch
new file mode 100644
index 000000000..1a80c00f1
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-fix_kdm_cpu_usage.patch
@@ -0,0 +1,47 @@
+commit 1e2983ad0107fb1d26e3e9931528701f30632c6d
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1326856834 -0600
+
+ Fix kdm_greet high CPU usage
+ Clean up a few build warnings
+
+diff --git a/kdm/kfrontend/kgreeter.cpp b/kdm/kfrontend/kgreeter.cpp
+index 9b974cc..5877cb6 100644
+--- a/kdm/kfrontend/kgreeter.cpp
++++ b/kdm/kfrontend/kgreeter.cpp
+@@ -273,6 +273,9 @@ void KGreeter::handleInputPipe(void) {
+ readbuf[numread] = 0;
+ readbuf[2047] = 0;
+ inputcommand += readbuf;
++ if (!tqApp->hasPendingEvents()) {
++ usleep(500);
++ }
+ tqApp->processEvents();
+ }
+ if (closingDown) {
+@@ -508,11 +511,11 @@ KGreeter::insertUsers(int limit_users)
+ int count = 0;
+ for (setpwent(); (ps = getpwent()) != 0;) {
+ if (*ps->pw_dir && *ps->pw_shell &&
+- (ps->pw_uid >= (unsigned)_lowUserId ||
+- !ps->pw_uid && _showRoot) &&
+- ps->pw_uid <= (unsigned)_highUserId &&
+- !noUsers.hasUser( ps->pw_name ) &&
+- !noUsers.hasGroup( ps->pw_gid ))
++ ((ps->pw_uid >= (unsigned)_lowUserId) ||
++ ((!ps->pw_uid) && _showRoot)) &&
++ (ps->pw_uid <= (unsigned)_highUserId) &&
++ (!noUsers.hasUser( ps->pw_name )) &&
++ (!noUsers.hasGroup( ps->pw_gid )))
+ {
+ TQString username( TQFile::decodeName( ps->pw_name ) );
+ if (!dupes.find( username )) {
+@@ -574,7 +577,7 @@ KGreeter::insertUsers(int limit_users)
+ for (setpwent(); (ps = getpwent()) != 0;) {
+ if (*ps->pw_dir && *ps->pw_shell &&
+ (ps->pw_uid >= (unsigned)_lowUserId ||
+- !ps->pw_uid && _showRoot) &&
++ ((!ps->pw_uid) && _showRoot)) &&
+ ps->pw_uid <= (unsigned)_highUserId &&
+ (users.hasUser( ps->pw_name ) ||
+ users.hasGroup( ps->pw_gid )))
diff --git a/redhat/kdebase/kdebase-3.5.13-replicate_led_status_on_virtual_keyboard.patch b/redhat/kdebase/kdebase-3.5.13-replicate_led_status_on_virtual_keyboard.patch
new file mode 100644
index 000000000..1d3f73ceb
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-replicate_led_status_on_virtual_keyboard.patch
@@ -0,0 +1,95 @@
+commit 8468d9bd5c66fe402acbc06f728b12ea996848de
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1327049889 -0600
+
+ Replicate LED status from virtual keyboards to physical keyboards
+ Fix keyboard attribute cloning
+ This commit closes Bug 561
+
+diff --git a/tsak/main.cpp b/tsak/main.cpp
+index df485a0..26aad00 100644
+--- a/tsak/main.cpp
++++ b/tsak/main.cpp
+@@ -126,22 +126,23 @@ static void copy_features(int devin, int devout)
+ for(i=0;i<EV_MAX;++i) {
+ if (bit_set(i, evtypes)) {
+ switch(i) {
+- case EV_KEY: op = UI_SET_KEYBIT; break;
+- case EV_REL: op = UI_SET_RELBIT; break;
+- case EV_ABS: op = UI_SET_ABSBIT; break;
+- case EV_MSC: op = UI_SET_MSCBIT; break;
+- case EV_LED: op = UI_SET_LEDBIT; break;
+- case EV_SND: op = UI_SET_SNDBIT; break;
+- case EV_SW: op = UI_SET_SWBIT; break;
+- default: op = -1;
++ case EV_KEY: op = UI_SET_KEYBIT; break;
++ case EV_REL: op = UI_SET_RELBIT; break;
++ case EV_ABS: op = UI_SET_ABSBIT; break;
++ case EV_MSC: op = UI_SET_MSCBIT; break;
++ case EV_LED: op = UI_SET_LEDBIT; break;
++ case EV_SND: op = UI_SET_SNDBIT; break;
++ case EV_SW: op = UI_SET_SWBIT; break;
++ default: op = -1;
++ }
+ }
+- }
+- if (op == -1) continue;
+- ioctl(devout, UI_SET_EVBIT, i);
+- memset(codes,0,sizeof(codes));
+- if (ioctl(devin, EVIOCGBIT(i, sizeof(codes)), codes) < 0) return;
+- for(code=0;code<KEY_MAX;code++) {
+- if (bit_set(code, codes)) ioctl(devout, op, code);
++ if (op == -1) continue;
++ ioctl(devout, UI_SET_EVBIT, i);
++ memset(codes,0,sizeof(codes));
++ if (ioctl(devin, EVIOCGBIT(i, sizeof(codes)), codes) >= 0) {
++ for(code=0;code<KEY_MAX;code++) {
++ if (bit_set(code, codes)) ioctl(devout, op, code);
++ }
+ }
+ }
+ }
+@@ -342,6 +343,7 @@ int main (int argc, char *argv[])
+ {
+ struct input_event ev[64];
+ struct input_event event;
++ struct input_event revev;
+ struct uinput_user_dev devinfo={0};
+ int devout[MAX_KEYBOARDS], rd, i, value, size = sizeof (struct input_event);
+ char name[256] = "Unknown";
+@@ -416,9 +418,9 @@ int main (int argc, char *argv[])
+ fprintf(stderr, "Reading from keyboard: (%s)\n", name);
+
+ // Create filtered virtual output device
+- devout[current_keyboard]=open("/dev/misc/uinput",O_WRONLY|O_NONBLOCK);
++ devout[current_keyboard]=open("/dev/misc/uinput",O_RDWR|O_NONBLOCK);
+ if (devout[current_keyboard]<0) {
+- devout[current_keyboard]=open("/dev/uinput",O_WRONLY|O_NONBLOCK);
++ devout[current_keyboard]=open("/dev/uinput",O_RDWR|O_NONBLOCK);
+ if (devout[current_keyboard]<0) {
+ perror("open(\"/dev/misc/uinput\")");
+ }
+@@ -483,6 +485,14 @@ int main (int argc, char *argv[])
+ fprintf(stderr, "Read failed.\n");
+ break;
+ }
++
++ // Replicate LED events from the virtual keyboard to the physical keyboard
++ int rrd = read(devout[current_keyboard], &revev, size);
++ if (rrd >= size) {
++ if (revev.type == EV_LED) {
++ write(keyboard_fds[current_keyboard], &revev, sizeof(revev));
++ }
++ }
+
+ value = ev[0].value;
+
+@@ -506,7 +516,7 @@ int main (int argc, char *argv[])
+ }
+ }
+
+- if (hide_event == false) {
++ if ((hide_event == false) && (ev[0].type != EV_LED) && (ev[1].type != EV_LED)) {
+ // Pass the event on...
+ event = ev[0];
+ write(devout[current_keyboard], &event, sizeof event);
diff --git a/redhat/kdebase/kdebase-3.5.13-tsak_keyboard_hotplug.patch b/redhat/kdebase/kdebase-3.5.13-tsak_keyboard_hotplug.patch
new file mode 100644
index 000000000..8c8ab415f
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13-tsak_keyboard_hotplug.patch
@@ -0,0 +1,641 @@
+commit 5f413b26ebaab8a6478427e4125bda628058ff85
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1327015159 -0600
+
+ Add keyboard hotplug (add/remove) support to tsak
+ This closes Bug 587
+ Fix warning in kompmgr
+
+diff --git a/tsak/CMakeLists.txt b/tsak/CMakeLists.txt
+index 6aa5b49..4490636 100644
+--- a/tsak/CMakeLists.txt
++++ b/tsak/CMakeLists.txt
+@@ -23,5 +23,6 @@ link_directories(
+
+ tde_add_executable( tsak
+ SOURCES main.cpp
++ LINK udev
+ DESTINATION ${BIN_INSTALL_DIR}
+ )
+diff --git a/tsak/main.cpp b/tsak/main.cpp
+index 050d6c0..df485a0 100644
+--- a/tsak/main.cpp
++++ b/tsak/main.cpp
+@@ -1,8 +1,8 @@
+ /*
+ Copyright 2010 Adam Marchetti
+-Copyright 2011 Timothy Pearson <kb9vqf@pearsoncomputing.net>
++Copyright 2011-2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+
+-This file is part of tsak.
++This file is part of tsak, the TDE Secure Attention Key daemon
+
+ tsak is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+@@ -35,9 +35,15 @@ License along with tsak. If not, see http://www.gnu.org/licenses/.
+ #include <sys/time.h>
+ #include <termios.h>
+ #include <signal.h>
++#include <libudev.h>
++#include <libgen.h>
+
+ #define FIFO_DIR "/tmp/ksocket-global"
+ #define FIFO_FILE_OUT "/tmp/ksocket-global/tsak"
++#define FIFO_LOCKFILE_OUT "/tmp/ksocket-global/tsak.lock"
++
++#define MAX_KEYBOARDS 64
++#define MAX_INPUT_NODE 128
+
+ #define TestBit(bit, array) (array[(bit) / 8] & (1 << ((bit) % 8)))
+
+@@ -46,9 +52,18 @@ typedef unsigned char byte;
+ bool mPipeOpen_out = false;
+ int mPipe_fd_out = -1;
+
++int mPipe_lockfd_out = -1;
++
++char filename[32];
++char key_bitmask[(KEY_MAX + 7) / 8];
++
+ struct sigaction usr_action;
+ sigset_t block_mask;
+
++int keyboard_fd_num;
++int keyboard_fds[MAX_KEYBOARDS];
++int child_pids[MAX_KEYBOARDS];
++
+ const char *keycode[256] =
+ {
+ "", "<esc>", "1", "2", "3", "4", "5", "6", "7", "8",
+@@ -79,6 +94,26 @@ int bit_set(size_t i, const byte* a)
+ return a[i/CHAR_BIT] & (1 << i%CHAR_BIT);
+ }
+
++// --------------------------------------------------------------------------------------
++// Useful function from Stack Overflow
++// http://stackoverflow.com/questions/874134/find-if-string-endswith-another-string-in-c
++// --------------------------------------------------------------------------------------
++/* returns 1 iff str ends with suffix */
++int str_ends_with(const char * str, const char * suffix) {
++
++ if( str == NULL || suffix == NULL )
++ return 0;
++
++ size_t str_len = strlen(str);
++ size_t suffix_len = strlen(suffix);
++
++ if(suffix_len > str_len)
++ return 0;
++
++ return 0 == strncmp( str + str_len - suffix_len, suffix, suffix_len );
++}
++// --------------------------------------------------------------------------------------
++
+ /* Assign features (supported axes and keys) of the physical input device (devin)
+ * to the virtual input device (devout) */
+ static void copy_features(int devin, int devout)
+@@ -111,26 +146,40 @@ static void copy_features(int devin, int devout)
+ }
+ }
+
+-int find_keyboard() {
++int find_keyboards() {
+ int i, j;
+ int fd;
+- char filename[32];
+- char key_bitmask[(KEY_MAX + 7) / 8];
++ char name[256] = "Unknown";
++
++ keyboard_fd_num = 0;
++ for (i=0; i<MAX_KEYBOARDS; i++) {
++ keyboard_fds[i] = 0;
++ }
+
+- for (i=0; i<32; i++) {
++ for (i=0; i<MAX_INPUT_NODE; i++) {
+ snprintf(filename,sizeof(filename), "/dev/input/event%d", i);
+-
++
+ fd = open(filename, O_RDWR|O_SYNC);
+ ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
+-
+- /* We assume that anything that has an alphabetic key in the
+- QWERTYUIOP range in it is the main keyboard. */
+- for (j = KEY_Q; j <= KEY_P; j++) {
+- if (TestBit(j, key_bitmask))
+- return fd;
++
++ // Ensure that we do not detect our own tsak faked keyboards
++ ioctl (fd, EVIOCGNAME (sizeof (name)), name);
++ if (str_ends_with(name, "+tsak") == 0) {
++ /* We assume that anything that has an alphabetic key in the
++ QWERTYUIOP range in it is the main keyboard. */
++ for (j = KEY_Q; j <= KEY_P; j++) {
++ if (TestBit(j, key_bitmask)) {
++ keyboard_fds[keyboard_fd_num] = fd;
++ }
++ }
++ }
++
++ if (keyboard_fds[keyboard_fd_num] == 0) {
++ close (fd);
++ }
++ else {
++ keyboard_fd_num++;
+ }
+-
+- close (fd);
+ }
+ return 0;
+ }
+@@ -144,6 +193,12 @@ void tearDownPipe()
+ }
+ }
+
++void tearDownLockingPipe()
++{
++ close(mPipe_lockfd_out);
++ unlink(FIFO_LOCKFILE_OUT);
++}
++
+ bool setFileLock(int fd, bool close_on_failure)
+ {
+ struct flock fl;
+@@ -154,8 +209,8 @@ bool setFileLock(int fd, bool close_on_failure)
+ fl.l_len = 1;
+
+ // Set the exclusive file lock
+- if (fcntl(mPipe_fd_out, F_SETLK, &fl) == -1) {
+- close(mPipe_fd_out);
++ if (fcntl(fd, F_SETLK, &fl) == -1) {
++ close(fd);
+ return false;
+ }
+
+@@ -171,7 +226,7 @@ bool checkFileLock()
+ fl.l_whence = SEEK_SET;
+ fl.l_len = 0;
+
+- int fd = open(FIFO_FILE_OUT, O_RDWR | O_NONBLOCK);
++ int fd = open(FIFO_LOCKFILE_OUT, O_RDWR | O_NONBLOCK);
+ fcntl(fd, F_GETLK, &fl); /* Overwrites lock structure with preventors. */
+
+ if (fd > -1) {
+@@ -202,6 +257,71 @@ bool setupPipe()
+ return setFileLock(mPipe_fd_out, true);
+ }
+
++bool setupLockingPipe()
++{
++ /* Create the FIFOs if they do not exist */
++ umask(0);
++ mkdir(FIFO_DIR,0644);
++
++ mknod(FIFO_LOCKFILE_OUT, S_IFIFO|0600, 0);
++ chmod(FIFO_LOCKFILE_OUT, 0600);
++
++ mPipe_lockfd_out = open(FIFO_LOCKFILE_OUT, O_RDWR | O_NONBLOCK);
++ if (mPipe_lockfd_out > -1) {
++ // Set the exclusive file lock
++ return setFileLock(mPipe_lockfd_out, true);
++ }
++
++ return false;
++}
++
++void broadcast_sak()
++{
++ // Let anyone listening to our interface know that an SAK keypress was received
++ // I highly doubt there are more than 255 VTs active at once...
++ int i;
++ for (i=0;i<255;i++) {
++ write(mPipe_fd_out, "SAK\n\r", 6);
++ }
++}
++
++void restart_tsak()
++{
++ int i;
++
++ fprintf(stderr, "Forcibly terminating...\n");
++
++ // Close down all child processes
++ for (i=0; i<MAX_KEYBOARDS; i++) {
++ if (child_pids[i] != 0) {
++ kill(child_pids[i], SIGKILL);
++ }
++ }
++
++ // Wait for process termination
++ sleep(1);
++
++ // Release all exclusive keyboard locks
++ for (int current_keyboard=0;current_keyboard<keyboard_fd_num;current_keyboard++) {
++ if(ioctl(keyboard_fds[current_keyboard], EVIOCGRAB, 0) < 0) {
++ fprintf(stderr, "Failed to release exclusive input device lock");
++ }
++ close(keyboard_fds[current_keyboard]);
++ }
++
++#if 1
++ // Restart now
++ // Note that the execl function never returns
++ char me[2048];
++ int chars = readlink("/proc/self/exe", me, sizeof(me));
++ me[chars] = 0;
++ me[2047] = 0;
++ execl(me, basename(me), (char*)NULL);
++#else
++ _exit(0);
++#endif
++}
++
+ class PipeHandler
+ {
+ public:
+@@ -215,7 +335,7 @@ PipeHandler::PipeHandler()
+
+ PipeHandler::~PipeHandler()
+ {
+- tearDownPipe();
++ tearDownLockingPipe();
+ }
+
+ int main (int argc, char *argv[])
+@@ -223,13 +343,19 @@ int main (int argc, char *argv[])
+ struct input_event ev[64];
+ struct input_event event;
+ struct uinput_user_dev devinfo={0};
+- int fd, devout, rd, value, size = sizeof (struct input_event);
++ int devout[MAX_KEYBOARDS], rd, i, value, size = sizeof (struct input_event);
+ char name[256] = "Unknown";
+ bool ctrl_down = false;
+ bool alt_down = false;
+ bool hide_event = false;
+ bool established = false;
+ bool testrun = false;
++ int current_keyboard;
++ bool can_proceed;
++
++ for (i=0; i<MAX_KEYBOARDS; i++) {
++ child_pids[i] = 0;
++ }
+
+ if (argc == 2) {
+ if (strcmp(argv[1], "checkactive") == 0) {
+@@ -239,7 +365,11 @@ int main (int argc, char *argv[])
+
+ // Check for existing file locks
+ if (!checkFileLock()) {
+- fprintf(stderr, "Another instance of this program is already running\n");
++ fprintf(stderr, "Another instance of this program is already running [1]\n");
++ return 8;
++ }
++ if (!setupLockingPipe()) {
++ fprintf(stderr, "Another instance of this program is already running [2]\n");
+ return 8;
+ }
+
+@@ -256,125 +386,227 @@ int main (int argc, char *argv[])
+ return 5;
+ }
+
+- // Open Device
+- fd = find_keyboard();
+- if (fd == -1) {
+- printf ("Could not find your keyboard!\n");
++ // Find keyboards
++ find_keyboards();
++ if (keyboard_fd_num == 0) {
++ printf ("Could not find any usable keyboard(s)!\n");
++ // Make sure everyone knows we physically can't detect a SAK
++ // Before we do this we broadcast one so that active dialogs are updated appropriately
++ // Also, we keep watching for a keyboard to be added via a forked child process...
++ broadcast_sak();
+ if (established)
+ sleep(1);
+- else
+- return 4;
++ else {
++ int i=fork();
++ if (i<0) return 12; // fork failed
++ if (i>0) {
++ return 4;
++ }
++ sleep(1);
++ restart_tsak();
++ }
+ }
+ else {
+- // Print Device Name
+- ioctl (fd, EVIOCGNAME (sizeof (name)), name);
+- fprintf(stderr, "Reading From : (%s)\n", name);
+-
+- // Create filtered virtual output device
+- devout=open("/dev/misc/uinput",O_WRONLY|O_NONBLOCK);
+- if (devout<0) {
+- perror("open(\"/dev/misc/uinput\")");
+- devout=open("/dev/uinput",O_WRONLY|O_NONBLOCK);
+- }
+- if (devout<0) {
+- fprintf(stderr,"Unable to open /dev/uinput or /dev/misc/uinput (char device 10:223).\nPossible causes:\n 1) Device node does not exist\n 2) Kernel not compiled with evdev [INPUT_EVDEV] and uinput [INPUT_UINPUT] user level driver support\n 3) Permission denied.\n");
+- perror("open(\"/dev/uinput\")");
+- if (established)
+- sleep(1);
+- else
+- return 3;
+- }
+- else {
+- if(ioctl(fd, EVIOCGRAB, 2) < 0) {
+- close(fd);
+- fprintf(stderr, "Failed to grab exclusive input device lock");
++ fprintf(stderr, "Found %d keyboard(s)\n", keyboard_fd_num);
++
++ can_proceed = true;
++ for (current_keyboard=0;current_keyboard<keyboard_fd_num;current_keyboard++) {
++ // Print Device Name
++ ioctl (keyboard_fds[current_keyboard], EVIOCGNAME (sizeof (name)), name);
++ fprintf(stderr, "Reading from keyboard: (%s)\n", name);
++
++ // Create filtered virtual output device
++ devout[current_keyboard]=open("/dev/misc/uinput",O_WRONLY|O_NONBLOCK);
++ if (devout[current_keyboard]<0) {
++ devout[current_keyboard]=open("/dev/uinput",O_WRONLY|O_NONBLOCK);
++ if (devout[current_keyboard]<0) {
++ perror("open(\"/dev/misc/uinput\")");
++ }
++ }
++ if (devout[current_keyboard]<0) {
++ can_proceed = false;
++ fprintf(stderr, "Unable to open /dev/uinput or /dev/misc/uinput (char device 10:223).\nPossible causes:\n 1) Device node does not exist\n 2) Kernel not compiled with evdev [INPUT_EVDEV] and uinput [INPUT_UINPUT] user level driver support\n 3) Permission denied.\n");
++ perror("open(\"/dev/uinput\")");
+ if (established)
+ sleep(1);
+ else
+- return 1;
++ return 3;
+ }
+- else {
+- ioctl(fd, EVIOCGNAME(UINPUT_MAX_NAME_SIZE), devinfo.name);
+- strncat(devinfo.name, "+tsak", UINPUT_MAX_NAME_SIZE-1);
+- fprintf(stderr, "%s\n", devinfo.name);
+- ioctl(fd, EVIOCGID, &devinfo.id);
+-
+- copy_features(fd, devout);
+- write(devout,&devinfo,sizeof(devinfo));
+- if (ioctl(devout,UI_DEV_CREATE)<0) {
+- fprintf(stderr,"Unable to create input device with UI_DEV_CREATE\n");
++ }
++
++ if (can_proceed == true) {
++ for (current_keyboard=0;current_keyboard<keyboard_fd_num;current_keyboard++) {
++ if(ioctl(keyboard_fds[current_keyboard], EVIOCGRAB, 2) < 0) {
++ close(keyboard_fds[current_keyboard]);
++ fprintf(stderr, "Failed to grab exclusive input device lock");
+ if (established)
+ sleep(1);
+ else
+- return 2;
++ return 1;
+ }
+ else {
+- fprintf(stderr,"Device created.\n");
+-
+- if (established == false) {
+- tearDownPipe();
+- int i=fork();
+- if (i<0) return 9; // fork failed
+- if (i>0) {
+- // close parent process
+- close(mPipe_fd_out);
+- return 0;
+- }
+- setupPipe();
++ ioctl(keyboard_fds[current_keyboard], EVIOCGNAME(UINPUT_MAX_NAME_SIZE), devinfo.name);
++ strncat(devinfo.name, "+tsak", UINPUT_MAX_NAME_SIZE-1);
++ fprintf(stderr, "%s\n", devinfo.name);
++ ioctl(keyboard_fds[current_keyboard], EVIOCGID, &devinfo.id);
++
++ copy_features(keyboard_fds[current_keyboard], devout[current_keyboard]);
++ write(devout[current_keyboard],&devinfo,sizeof(devinfo));
++ if (ioctl(devout[current_keyboard],UI_DEV_CREATE)<0) {
++ fprintf(stderr, "Unable to create input device with UI_DEV_CREATE\n");
++ if (established)
++ sleep(1);
++ else
++ return 2;
+ }
+-
+- established = true;
+-
+- if (testrun == true) {
+- return 0;
+- }
+-
+- while (1) {
+- if ((rd = read (fd, ev, size * 2)) < size) {
+- fprintf(stderr,"Read failed.\n");
+- break;
+- }
+-
+- value = ev[0].value;
+-
+- if (value != ' ' && ev[1].value == 0 && ev[1].type == 1){ // Read the key release event
+- if (keycode[(ev[1].code)]) {
+- if (strcmp(keycode[(ev[1].code)], "<control>") == 0) ctrl_down = false;
+- if (strcmp(keycode[(ev[1].code)], "<alt>") == 0) alt_down = false;
++ else {
++ fprintf(stderr, "Device created.\n");
++
++ if (established == false) {
++ int i=fork();
++ if (i<0) return 9; // fork failed
++ if (i>0) {
++ child_pids[current_keyboard] = i;
++ continue;
+ }
++ setupLockingPipe();
+ }
+- if (value != ' ' && ev[1].value == 1 && ev[1].type == 1){ // Read the key press event
+- if (keycode[(ev[1].code)]) {
+- if (strcmp(keycode[(ev[1].code)], "<control>") == 0) ctrl_down = true;
+- if (strcmp(keycode[(ev[1].code)], "<alt>") == 0) alt_down = true;
+- }
++
++ established = true;
++
++ if (testrun == true) {
++ return 0;
+ }
+
+- hide_event = false;
+- if (keycode[(ev[1].code)]) {
+- if (alt_down && ctrl_down && (strcmp(keycode[(ev[1].code)], "<del>") == 0)) {
+- hide_event = true;
++ while (1) {
++ if ((rd = read (keyboard_fds[current_keyboard], ev, size * 2)) < size) {
++ fprintf(stderr, "Read failed.\n");
++ break;
++ }
++
++ value = ev[0].value;
++
++ if (value != ' ' && ev[1].value == 0 && ev[1].type == 1){ // Read the key release event
++ if (keycode[(ev[1].code)]) {
++ if (strcmp(keycode[(ev[1].code)], "<control>") == 0) ctrl_down = false;
++ if (strcmp(keycode[(ev[1].code)], "<alt>") == 0) alt_down = false;
++ }
++ }
++ if (value != ' ' && ev[1].value == 1 && ev[1].type == 1){ // Read the key press event
++ if (keycode[(ev[1].code)]) {
++ if (strcmp(keycode[(ev[1].code)], "<control>") == 0) ctrl_down = true;
++ if (strcmp(keycode[(ev[1].code)], "<alt>") == 0) alt_down = true;
++ }
++ }
++
++ hide_event = false;
++ if (keycode[(ev[1].code)]) {
++ if (alt_down && ctrl_down && (strcmp(keycode[(ev[1].code)], "<del>") == 0)) {
++ hide_event = true;
++ }
++ }
++
++ if (hide_event == false) {
++ // Pass the event on...
++ event = ev[0];
++ write(devout[current_keyboard], &event, sizeof event);
++ event = ev[1];
++ write(devout[current_keyboard], &event, sizeof event);
++ }
++ if (hide_event == true) {
++ // Let anyone listening to our interface know that an SAK keypress was received
++ broadcast_sak();
+ }
+ }
++ }
++ }
++ }
++
++ // fork udev monitor process
++ int i=fork();
++ if (i<0) return 10; // fork failed
++ if (i>0) {
++ // Terminate parent
++ return 0;
++ }
++
++ // Prevent multiple process instances from starting
++ setupLockingPipe();
++
++ // Wait a little bit so that udev hotplug can stabilize before we start monitoring
++ sleep(1);
++
++ fprintf(stderr, "Hotplug monitoring process started\n");
++
++ // Monitor for hotplugged keyboards
++ int j;
++ int hotplug_fd;
++ bool is_new_keyboard;
++ struct udev *udev;
++ struct udev_device *dev;
++ struct udev_monitor *mon;
++
++ // Create the udev object
++ udev = udev_new();
++ if (!udev) {
++ fprintf(stderr, "Cannot connect to udev interface\n");
++ return 11;
++ }
++
++ // Set up a udev monitor to monitor input devices
++ mon = udev_monitor_new_from_netlink(udev, "udev");
++ udev_monitor_filter_add_match_subsystem_devtype(mon, "input", NULL);
++ udev_monitor_enable_receiving(mon);
++
++ while (1) {
++ // Watch for input from the monitoring process
++ dev = udev_monitor_receive_device(mon);
++ if (dev) {
++ // If a keyboard was removed we need to restart...
++ if (strcmp(udev_device_get_action(dev), "remove") == 0) {
++ udev_device_unref(dev);
++ udev_unref(udev);
++ restart_tsak();
++ }
++
++ is_new_keyboard = false;
++ snprintf(filename,sizeof(filename), "%s", udev_device_get_devnode(dev));
++ udev_device_unref(dev);
++
++ // Print name of keyboard
++ hotplug_fd = open(filename, O_RDWR|O_SYNC);
++ ioctl(hotplug_fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
+
+- if (hide_event == false) {
+- // Pass the event on...
+- event = ev[0];
+- write(devout, &event, sizeof event);
+- event = ev[1];
+- write(devout, &event, sizeof event);
+- }
+- if (hide_event == true) {
+- // Let anyone listening to our interface know that an SAK keypress was received
+- // I highly doubt there are more than 255 VTs active at once...
+- int i;
+- for (i=0;i<255;i++) {
+- write(mPipe_fd_out, "SAK\n\r", 6);
+- }
++ /* We assume that anything that has an alphabetic key in the
++ QWERTYUIOP range in it is the main keyboard. */
++ for (j = KEY_Q; j <= KEY_P; j++) {
++ if (TestBit(j, key_bitmask)) {
++ is_new_keyboard = true;
+ }
+ }
++ ioctl (hotplug_fd, EVIOCGNAME (sizeof (name)), name);
++ close(hotplug_fd);
++
++ // Ensure that we do not detect our own tsak faked keyboards
++ if (str_ends_with(name, "+tsak") == 1) {
++ is_new_keyboard = false;
++ }
++
++ // If a keyboard was added we need to restart...
++ if (is_new_keyboard == true) {
++ fprintf(stderr, "Hotplugged new keyboard: (%s)\n", name);
++ udev_unref(udev);
++ restart_tsak();
++ }
++ }
++ else {
++ fprintf(stderr, "No Device from receive_device(). An error occured.\n");
+ }
+ }
++
++ udev_unref(udev);
++
++ fprintf(stderr, "Hotplug monitoring process terminated\n");
+ }
+ }
+ }
+diff --git a/twin/kompmgr/kompmgr.c b/twin/kompmgr/kompmgr.c
+index 5daf8c2..8216676 100644
+--- a/kwin/kompmgr/kompmgr.c
++++ b/kwin/kompmgr/kompmgr.c
+@@ -60,6 +60,7 @@ check baghira.sf.net for more infos
+ #include <signal.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <libgen.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
+@@ -397,7 +398,7 @@ void delete_pid_file()
+ int chars = readlink("/proc/self/exe", me, sizeof(me));
+ me[chars] = 0;
+ me[2047] = 0;
+- execl(me, NULL);
++ execl(me, basename(me), (char*)NULL);
+ }
+ #endif
+ }
diff --git a/redhat/kdebase/trinity-kdebase-3.5.13.spec b/redhat/kdebase/trinity-kdebase-3.5.13.spec
index bc99f494d..7496f1ec9 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 15
+%define release 16
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
@@ -99,6 +99,12 @@ Patch29: kdebase-3.5.13-fix_multihead_desktop_lock.patch
Patch30: kdebase-3.5.12-kdm_hide_menu_button.patch
## [kdebase/kxkb] Enables xtest support
Patch31: kdebase-3.5.13-enable_xtest_support.patch
+## [kdebase/kdm/kfrontend] fix KDM high CPU usage when inactive [Bug #690]
+Patch32: kdebase-3.5.13-fix_kdm_cpu_usage.patch
+## [kdebase/tsak] Add keyboard hotplug (add/remove) support to tsak [Bug #587]
+Patch33: kdebase-3.5.13-tsak_keyboard_hotplug.patch
+## [kdebase/tsak] Replicate LED status from virtual keyboards to physical keyboards [Bug #561]
+Patch34: kdebase-3.5.13-replicate_led_status_on_virtual_keyboard.patch
# Fedora 15 Theme: "Lovelock"
%if 0%{?fedora} == 15
@@ -169,11 +175,11 @@ BuildRequires: libXcomposite-devel
BuildRequires: libXtst-devel
BuildRequires: libXdamage-devel
BuildRequires: xorg-x11-font-utils
-
-# These dependancies are not met in RHEL
-%if 0%{?fedora}
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: nas-devel
+
+%if 0%{?rhel} >= 6 || 0%{?fedora} >= 15
+BuildRequires: libudev-devel
%endif
Requires: tqtinterface
@@ -306,6 +312,11 @@ Protocol handlers (KIOslaves) for personal information management, including:
%patch29 -p0
%patch30 -p1
%patch31 -p1
+%patch32 -p1
+%if 0%{?fedora} >= 15
+%patch33 -p1
+%patch34 -p1
+%endif
# Applies an optional distro-specific graphical theme
%if "%{?tde_bg}" != ""
@@ -354,7 +365,7 @@ cd build
-DWITH_XCOMPOSITE=ON \
-DWITH_XCURSOR=ON \
-DWITH_XFIXES=ON \
-%if 0%{?fedora} || 0%{?rhel} > 5
+%if 0%{?fedora} || 0%{?rhel} >= 6
-DWITH_XRANDR=ON \
%else
-DWITH_XRANDR=OFF \
@@ -692,6 +703,11 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
%{_datadir}/cmake/*.cmake
%changelog
+* Sat Jan 21 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-16
+- Fix KDM high CPU usage when inactive [Bug #690]
+- Add keyboard hotplug (add/remove) support to tsak [Bug #587]
+- Replicate LED status from virtual keyboards to physical keyboards [Bug #561]
+
* Thu Jan 05 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-15
- Add a KDM option to hide 'Menu' button on login prompt
- Fix corrupted PNG tiles [Bug #298]
diff --git a/redhat/kdelibs/kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch b/redhat/kdelibs/kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch
new file mode 100644
index 000000000..6fa9a085a
--- /dev/null
+++ b/redhat/kdelibs/kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch
@@ -0,0 +1,45 @@
+From 1f37c9cdb9bb47f8453cf26af8006c7c8d4ca3b3 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <t.glaser@tarent.de>
+Date: Tue, 27 Dec 2011 14:28:27 +0100
+Subject: [PATCH] fix UTF-8 encoding for WebDAV directories
+
+idea derived from KIO slave http.cpp from KDE 4; reimplemented
+on top of Qt3/KDE3 APIs
+
+Bug: http://bugs.kde.org/show_bug.cgi?id=127251
+
+Signed-off-by: Thorsten Glaser <t.glaser@tarent.de>
+---
+ kioslave/http/http.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
+index a1495d7..16b785d 100644
+--- a/kioslave/http/http.cc
++++ b/kioslave/http/http.cc
+@@ -45,6 +45,7 @@
+ #include <tqregexp.h>
+ #include <tqdatetime.h>
+ #include <tqstringlist.h>
++#include <tqurl.h>
+
+ #include <kurl.h>
+ #include <kidna.h>
+@@ -750,9 +751,14 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
+ entry.clear();
+
+ TQString urlStr = href.text();
++#if 0
+ int encoding = remoteEncoding()->encodingMib();
+ if ((encoding == 106) && (!KStringHandler::isUtf8(KURL::decode_string(urlStr, 4).latin1())))
+ encoding = 4; // Use latin1 if the file is not actually utf-8
++#else
++ TQUrl::decode(urlStr);
++ int encoding = 106;
++#endif
+
+ KURL thisURL ( urlStr, encoding );
+
+--
+1.7.2.3
+
diff --git a/redhat/kdelibs/kdelibs-3.5.13-fix_add_printer.patch b/redhat/kdelibs/kdelibs-3.5.13-fix_add_printer.patch
new file mode 100644
index 000000000..5fb5aa576
--- /dev/null
+++ b/redhat/kdelibs/kdelibs-3.5.13-fix_add_printer.patch
@@ -0,0 +1,20 @@
+commit 87201a3741bd9d4b4638be7b3d8c44a737115b0f
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1325899796 -0600
+
+ Fix make_driver_db_cups path
+ This closes Bug 383
+
+diff --git a/kdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp
+index 635cfd5..4a64248 100644
+--- a/kdeprint/cups/kmcupsmanager.cpp
++++ b/kdeprint/cups/kmcupsmanager.cpp
+@@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager()
+
+ TQString KMCupsManager::driverDbCreationProgram()
+ {
+- return TQString::tqfromLatin1("/opt/trinity/bin/make_driver_db_cups");
++ return TQString(__KDE_BINDIR).append(TQString::fromLatin1("/make_driver_db_cups"));
+ }
+
+ TQString KMCupsManager::driverDirectory()
diff --git a/redhat/kdelibs/trinity-kdelibs-3.5.13.spec b/redhat/kdelibs/trinity-kdelibs-3.5.13.spec
index 21e80ffd8..c6a44125f 100755
--- a/redhat/kdelibs/trinity-kdelibs-3.5.13.spec
+++ b/redhat/kdelibs/trinity-kdelibs-3.5.13.spec
@@ -2,7 +2,7 @@
%if "%{?version}" == ""
%define version 3.5.13
%endif
-%define release 6
+%define release 7
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
@@ -48,6 +48,10 @@ Patch12: kdelibs-3.5.13-kate_syntax.patch.gz
Patch13: kdelibs-3.5.13-add_inotify_support.patch
## [kdelibs] Add fam/gamin support to tdelibs CMake (backport commit 2b035349c31fe64c31d2c050892b117a3a807179)
Patch14: kdelibs-3.5.13-enable_fam_gamin.patch
+## [kdelibs/kioslave/http] Fix UTF8 Encoding for WebDAV directories
+Patch15: kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch
+## [kdelibs/kdeprint] Fix add printer [Bug #383]
+Patch16: kdelibs-3.5.13-fix_add_printer.patch
BuildRequires: libtool
BuildRequires: tqtinterface-devel
@@ -69,6 +73,7 @@ BuildRequires: OpenEXR-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: glib2-devel
BuildRequires: gamin-devel
+BuildRequires: xorg-x11-proto-devel
Requires: tqtinterface
Requires: trinity-arts
@@ -124,6 +129,8 @@ format for easy browsing
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p1
+%patch16 -p1
%build
@@ -324,6 +331,10 @@ EOF
%changelog
+* Sat Jan 21 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-7
+- Fix UTF8 Encoding for WebDAV directories
+- Fix hardcoded path in 'add printer' [Bug #383]
+
* Mon Jan 16 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-6
- Adds 'fam' and 'gamin' support
diff --git a/redhat/kdemultimedia/kdemultimedia-3.5.13-fix_mmx_detection.patch b/redhat/kdemultimedia/kdemultimedia-3.5.13-fix_mmx_detection.patch
new file mode 100644
index 000000000..785b9d150
--- /dev/null
+++ b/redhat/kdemultimedia/kdemultimedia-3.5.13-fix_mmx_detection.patch
@@ -0,0 +1,12 @@
+diff -urN tdemultimedia/configure.in.in tdemultimedia.new/configure.in.in
+--- tdemultimedia/configure.in.in 2010-08-11 22:36:30.000000000 -0500
++++ tdemultimedia.new/configure.in.in 2012-01-12 22:54:04.000000000 -0600
+@@ -35,7 +35,7 @@
+ then
+ MMX_SUPPORT="no"
+ else
+- as_ver=`echo $as_ver |sed -e "s/.*version //;s/ .*//"`
++ as_ver=`echo|as -v 2>&1 | grep ".*version.*" | awk '{print $NF}'`
+ as_major=`echo $as_ver |cut -d. -f1`
+ if test $as_major -gt 2
+ then
diff --git a/redhat/kdemultimedia/trinity-kdemultimedia-3.5.13.spec b/redhat/kdemultimedia/trinity-kdemultimedia-3.5.13.spec
index 24dcdb176..d896d0a06 100644
--- a/redhat/kdemultimedia/trinity-kdemultimedia-3.5.13.spec
+++ b/redhat/kdemultimedia/trinity-kdemultimedia-3.5.13.spec
@@ -54,6 +54,9 @@ Provides: kdemultimedia3 = %{version}-%{release}
Patch3: kdemultimedia-3.4.0-xdg.patch
Patch5: kdemultimedia-3.5.7-pthread.patch
+# [kdemultimedia] Fix MMX detection [Bug #800]
+Patch10: kdemultimedia-3.5.13-fix_mmx_detection.patch
+
Requires: %{name}-libs = %{version}-%{release}
BuildRequires: trinity-arts-devel
@@ -132,6 +135,7 @@ Requires: %{name} = %{version}-%{release}
%setup -q -n kdemultimedia
%patch3 -p1 -b .xdg
%patch5 -p1 -b .pthread
+%patch10 -p1
# Ugly hack to modify TQT include directory inside autoconf files.
# If TQT detection fails, it fallbacks to TQT4 instead of TQT3 !
@@ -413,6 +417,7 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
%changelog
* Mon Jan 16 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13-5
- Enables 'akode' support
+- Fix MMX support [Bug #800]
* Fri Nov 25 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.13-4
- Fix HTML directory location
diff --git a/redhat/kdenetwork/trinity-kdenetwork-3.5.13.spec b/redhat/kdenetwork/trinity-kdenetwork-3.5.13.spec
index a9171f867..82f176b5e 100644
--- a/redhat/kdenetwork/trinity-kdenetwork-3.5.13.spec
+++ b/redhat/kdenetwork/trinity-kdenetwork-3.5.13.spec
@@ -185,7 +185,7 @@ Requires: %{name} = %{version}-%{release}
%patch11 -p1
%patch12 -p1
%patch13 -p1
-%patch14 -p1
+%patch14 -p4
# TDE 3.5.13: missing 'dummy.cpp' in MSN protocol