From: Francesco Poli (wintermute) Date: Tue, 13 May 2025 16:29:31 +0000 (+0200) Subject: cpupower: do not write DESTDIR to cpupower.service X-Git-Tag: v6.16-rc1~160^2^2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a0eaa78ff4aa09d3a70f4bdcff13f5efe0f5861;p=thirdparty%2Fkernel%2Flinux.git cpupower: do not write DESTDIR to cpupower.service Fix the use of DESTDIR variable in the Makefile, as far as the installation of the systemd service unit 'cpupower.service' is concerned. This was caused by a misunderstanding about the purpose of the DESTDIR variable in the Makefile, which is instead meant to support staged installations: its value should not end up into installed file contents. Link: https://lore.kernel.org/linux-pm/20250509002206.bd2519ba52035d47c3c32aa6@paranoici.org/T/#mfbb938f9c0d5a21173acb92a061eb9205fd0abfe Link: https://www.gnu.org/prep/standards/html_node/DESTDIR.html Link: https://lore.kernel.org/r/20250513163937.61062-3-invernomuto@paranoici.org Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower") Signed-off-by: Francesco Poli (wintermute) Signed-off-by: Shuah Khan --- diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index 9c2b5f71fee1c..4ad931509eaac 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -310,7 +310,7 @@ install-tools: $(OUTPUT)cpupower $(INSTALL) -d $(DESTDIR)${libexecdir} $(INSTALL_PROGRAM) cpupower.sh '$(DESTDIR)${libexecdir}/cpupower' $(INSTALL) -d $(DESTDIR)${libdir}/systemd/system - sed 's|___CDIR___|$(DESTDIR)${confdir}|; s|___LDIR___|$(DESTDIR)${libexecdir}|' cpupower.service.in > '$(DESTDIR)${libdir}/systemd/system/cpupower.service' + sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${libdir}/systemd/system/cpupower.service' $(SETPERM_DATA) '$(DESTDIR)${libdir}/systemd/system/cpupower.service' if test -d /run/systemd/system; then systemctl daemon-reload; fi