From c094bc024f80cbadd1e7b54b11bb449bb3aa5e57 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 20 Nov 2008 21:58:30 +0000 Subject: [PATCH] * Thu Nov 20 2008 Rex Dieter 3.5.10-2 - upstream patch to fix hang on login (for older kernels) --- kdelibs-3.5.10-proc.patch | 20 ++++++++++++++++++++ kdelibs.spec | 8 +++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 kdelibs-3.5.10-proc.patch diff --git a/kdelibs-3.5.10-proc.patch b/kdelibs-3.5.10-proc.patch new file mode 100644 index 0000000..4500ce6 --- /dev/null +++ b/kdelibs-3.5.10-proc.patch @@ -0,0 +1,20 @@ +diff -up kdelibs-3.5.10/kinit/start_kdeinit.c.proc kdelibs-3.5.10/kinit/start_kdeinit.c +--- kdelibs-3.5.10/kinit/start_kdeinit.c.proc 2008-08-19 13:18:12.000000000 -0500 ++++ kdelibs-3.5.10/kinit/start_kdeinit.c 2008-11-20 15:54:54.000000000 -0600 +@@ -44,7 +44,7 @@ static int set_protection( pid_t pid, in + { + char buf[ 1024 ]; + int procfile; +- sprintf( buf, "/proc/%d/oom_adj", pid ); ++ sprintf( buf, "/proc/%d/stat", pid ); + if( !enable ) { + /* Be paranoid and check that the pid we got from the pipe + belongs to this user. */ +@@ -52,6 +52,7 @@ static int set_protection( pid_t pid, in + if( lstat( buf, &st ) < 0 || st.st_uid != getuid()) + return 0; + } ++ sprintf( buf, "/proc/%d/oom_adj", pid ); + procfile = open( buf, O_WRONLY ); + if( procfile >= 0 ) { + if( enable ) diff --git a/kdelibs.spec b/kdelibs.spec index bc83dfc..6617ef3 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -36,7 +36,7 @@ Summary: K Desktop Environment 3 - Libraries Version: 3.5.10 -Release: 1%{?dist} +Release: 2%{?dist} %if 0%{?fedora} > 8 Name: kdelibs3 @@ -93,6 +93,8 @@ Patch54: kdelibs-3.5.9-fix-flock-redefinition.patch Patch100: kdelibs-3.5.5-kstandarddirs.patch # http://bugs.kde.org/93359, alternative to export libltdl_cv_shlibext=".so" hack. Patch101: kde-3.5-libtool-shlibext.patch +# fix for old kernels, prevents hang on login +Patch102: kdelibs-3.5.10-proc.patch # kget ignores simultaneous download limit (kde #101956) Patch103: kdelibs-3.5.0-101956.patch @@ -273,6 +275,7 @@ format for easy browsing %patch101 -p1 -b .libtool-shlibext # upstream patches +%patch102 -p1 -b .proc sed -i -e "s,^#define KDE_VERSION_STRING .*,#define KDE_VERSION_STRING \"%{version}-%{release} %{distname}\"," kdecore/kdeversion.h @@ -625,6 +628,9 @@ touch --no-create %{_datadir}/icons/crystalsvg 2> /dev/null || : %changelog +* Thu Nov 20 2008 Rex Dieter 3.5.10-2 +- upstream patch to fix hang on login (for older kernels) + * Tue Aug 26 2008 Rex Dieter 3.5.10-1 - kde-3.5.10