Revert "cpupower Makefile change to help run the tool without 'make install'"
PATCH 1/1 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.
--- tools/power/cpupower/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/cpupower/Makefile +1 -1
@@ -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)
Signature · 1 line
2.1.0
Rafael J. Wysocki
AppliedQuoted 9 lines · Josh Boyer
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:
Quoted 8 lines
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_PATHto achieve the same effect and not introduce rpath into the binary.Signed-off-by Josh Boyer <[email protected]>
Queued up for 4.0-rc4, thanks!
Quoted 18 lines
--- tools/power/cpupower/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/power/cpupower/Makefile +1
-1@@ -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)
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.