[kernel] Revert commit that added bad rpath to cpupower (rhbz 1199312)

Josh Boyer jwboyer at fedoraproject.org
Wed Mar 11 14:19:53 UTC 2015


commit 73947052943a62125227728baddc88ef6934ae9d
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Wed Mar 11 08:51:00 2015 -0400

    Revert commit that added bad rpath to cpupower (rhbz 1199312)

 ...ower-Makefile-change-to-help-run-the-tool.patch | 42 ++++++++++++++++++++++
 kernel.spec                                        |  7 ++++
 2 files changed, 49 insertions(+)
---
diff --git a/Revert-cpupower-Makefile-change-to-help-run-the-tool.patch b/Revert-cpupower-Makefile-change-to-help-run-the-tool.patch
new file mode 100644
index 0000000..97461f3
--- /dev/null
+++ b/Revert-cpupower-Makefile-change-to-help-run-the-tool.patch
@@ -0,0 +1,42 @@
+From: Josh Boyer <jwboyer at fedoraproject.org>
+Date: Tue, 10 Mar 2015 20:21:24 -0400
+Subject: [PATCH] Revert "cpupower Makefile change to help run the tool without
+ 'make install'"
+
+This reverts commit 5c1de006e8e66b0be05be422416629e344c71652.
+
+While the original commit makes it easier to run cpupower from the local build
+directory, it also leaves the binary with a rather poor rpath of './' in it
+after it is installed on a system via 'make install'.
+
+This is considered bad practice and can cause cpupower to fail in rpmbuild
+with the following error:
+
+ERROR   0004: file '/usr/bin/cpupower' contains an insecure rpath './' in [./]
+error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
+    Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
+
+Developers should be able to use LD_LIBRARY_PATH to achieve the same effect
+and not introduce rpath into the binary.
+
+Signed-off-by: Josh Boyer <jwboyer at feoraproject.org>
+---
+ tools/power/cpupower/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
+index 3ed7c0476d48..2e2ba2efa0d9 100644
+--- a/tools/power/cpupower/Makefile
++++ b/tools/power/cpupower/Makefile
+@@ -209,7 +209,7 @@ $(OUTPUT)%.o: %.c
+ 
+ $(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)libcpupower.so.$(LIB_MAJ)
+ 	$(ECHO) "  CC      " $@
+-	$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -Wl,-rpath=./ -lrt -lpci -L$(OUTPUT) -o $@
++	$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -lrt -lpci -L$(OUTPUT) -o $@
+ 	$(QUIET) $(STRIPCMD) $@
+ 
+ $(OUTPUT)po/$(PACKAGE).pot: $(UTIL_SRC)
+-- 
+2.1.0
+
diff --git a/kernel.spec b/kernel.spec
index f2722a5..0ea747e 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -631,6 +631,9 @@ Patch26140: security-yama-Remove-unnecessary-selects-from-Kconfi.patch
 
 Patch26141: mfd-rtsx_usb-prevent-DMA-from-stack.patch
 
+#rhbz 1199312
+Patch26142: Revert-cpupower-Makefile-change-to-help-run-the-tool.patch
+
 # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
 Patch30000: kernel-arm64.patch
 
@@ -1366,6 +1369,9 @@ ApplyPatch security-yama-Remove-unnecessary-selects-from-Kconfi.patch
 
 ApplyPatch mfd-rtsx_usb-prevent-DMA-from-stack.patch
 
+#rhbz 1199312
+ApplyPatch Revert-cpupower-Makefile-change-to-help-run-the-tool.patch
+
 %if 0%{?aarch64patches}
 ApplyPatch kernel-arm64.patch
 %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does.
@@ -2225,6 +2231,7 @@ fi
 %changelog
 * Wed Mar 11 2015 Josh Boyer <jwboyer at fedoraproject.org> - 4.0.0-0.rc3.git1.1
 - Linux v4.0-rc3-111-gaffb8172de39
+- Revert commit that added bad rpath to cpupower (rhbz 1199312)
 - Reenable debugging options.
 
 * Mon Mar 09 2015 Josh Boyer <jwboyer at fedoraproject.org> - 4.0.0-0.rc3.git0.1


More information about the scm-commits mailing list