rpms/tuned/devel 0001-ktune-added-insufficient-user-rights.patch, NONE, 1.1 0002-logging-initialization-fix-module-inclusion.patch, NONE, 1.1 tuned.spec, 1.17, 1.18

jvcelak jvcelak at fedoraproject.org
Tue Jan 26 15:44:04 UTC 2010


Author: jvcelak

Update of /cvs/pkgs/rpms/tuned/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2642

Modified Files:
	tuned.spec 
Added Files:
	0001-ktune-added-insufficient-user-rights.patch 
	0002-logging-initialization-fix-module-inclusion.patch 
Log Message:
Added latest changes from upstream.



0001-ktune-added-insufficient-user-rights.patch:
 ktune.init |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- NEW FILE 0001-ktune-added-insufficient-user-rights.patch ---
>From 98063947dd683e89e15aebca05fc464605fe479c Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner at redhat.com>
Date: Fri, 22 Jan 2010 19:00:41 +0100
Subject: [PATCH] - ktune: added insufficient user rights test to start, reload, stop and status
   service commands

---
 ktune/ktune.init |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ktune/ktune.init b/ktune/ktune.init
index f573b86..d5d0cb5 100644
--- a/ktune/ktune.init
+++ b/ktune/ktune.init
@@ -134,6 +134,7 @@ revert_sysctl() {
 }
 
 start() {
+    [ "$EUID" != "0" ] && exit 4
     ret=0
 
     load_sysctl
@@ -159,11 +160,13 @@ start() {
 }
 
 reload() {
+    [ "$EUID" != "0" ] && exit 4
     revert_sysctl
     load_sysctl
 }
 
 stop() {
+    [ "$EUID" != "0" ] && exit 4
     ret=0
 
     revert_sysctl
@@ -189,6 +192,8 @@ stop() {
 }
 
 status() {
+    [ "$EUID" != "0" ] && exit 4
+
     if [ ! -f "$VAR_SUBSYS_KTUNE" ]; then
 	echo $"ktune settings are not applied."
 	return 3
-- 
1.6.6


0002-logging-initialization-fix-module-inclusion.patch:
 Makefile |    1 +
 tuned    |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE 0002-logging-initialization-fix-module-inclusion.patch ---
>From 7dbf7151f37588f61f2c57fe4f374e3bd8c7d145 Mon Sep 17 00:00:00 2001
From: Jan Vcelak <jvcelak at redhat.com>
Date: Tue, 26 Jan 2010 16:19:51 +0100
Subject: [PATCH] logging: initialization fix, module inclusion into result rpm package

---
 Makefile |    1 +
 tuned    |   10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 3ae3f76..ce98e08 100644
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,7 @@ install:
 	install -m 0644 tuned.py $(DESTDIR)/usr/share/$(NAME)/
 	install -m 0644 tuned_adm.py $(DESTDIR)/usr/share/$(NAME)/
 	install -m 0644 tuned_nettool.py $(DESTDIR)/usr/share/$(NAME)/
+	install -m 0644 tuned_logging.py $(DESTDIR)/usr/share/$(NAME)/
 	for file in $(FILES_tuningplugins); do \
 		install -m 0644 $$file $(DESTDIR)/usr/share/$(NAME)/tuningplugins; \
 	done
diff --git a/tuned b/tuned
index 1dda946..1fa2f57 100755
--- a/tuned
+++ b/tuned
@@ -22,8 +22,12 @@
 #
 
 import sys, os.path, getopt, atexit, signal
-import logging, tuned_logging
 
+TUNEDDIR = "/usr/share/tuned"
+if not TUNEDDIR in sys.path:
+	sys.path.append(TUNEDDIR)
+
+import logging, tuned_logging
 log = logging.getLogger("tuned")
 
 def usage():
@@ -83,10 +87,6 @@ if __name__ == "__main__":
 		elif opt in ['-D', "--debug"]:
 			debug = True
 
-	TUNEDDIR = "/usr/share/tuned"
-	if not TUNEDDIR in sys.path:
-		sys.path.append(TUNEDDIR)
-
 	from tuned import tuned
 
 	tuned.init(TUNEDDIR, cfgfile, debug = debug)
-- 
1.6.6



Index: tuned.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tuned/devel/tuned.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- tuned.spec	8 Jan 2010 16:37:54 -0000	1.17
+++ tuned.spec	26 Jan 2010 15:44:04 -0000	1.18
@@ -1,7 +1,7 @@
 Summary: A dynamic adaptive system tuning daemon
 Name: tuned
 Version: 0.2.8
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 # The source for this package was pulled from upstream git.  Use the
@@ -11,6 +11,10 @@ Group: System Environment/Daemons
 #  git checkout v%{version}
 #  make archive
 Source: tuned-%{version}.tar.bz2
+# upstream git 9806394
+Patch0: 0001-ktune-added-insufficient-user-rights.patch
+# upstream git 7dbf715
+Patch1: 0002-logging-initialization-fix-module-inclusion.patch
 URL: https://fedorahosted.org/tuned/
 Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: python
@@ -42,6 +46,8 @@ instead of fewer large ones).
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 
@@ -102,6 +108,11 @@ fi
 
 
 %changelog
+* Tue Jan 26 2010 Jan Vcelak <jvcelak at redhat.com> 0.2.8-2
+- Included Thomas Woerner's patch checking user rights when executing
+  ktune service commands.
+- Included Jan Vcelak's patch fixing logging module initialization.
+
 * Fri Jan 08 2010 Jan Vcelak <jvcelak at redhat.com> 0.2.8-1
 - New release. Adds logging support.
 



More information about the scm-commits mailing list