]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpupower: do not write DESTDIR to cpupower.service
authorFrancesco Poli (wintermute) <invernomuto@paranoici.org>
Tue, 13 May 2025 16:29:31 +0000 (18:29 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 13 May 2025 22:06:12 +0000 (16:06 -0600)
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) <invernomuto@paranoici.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/Makefile

index 9c2b5f71fee1cc67f7eb7759dc2feaf59d676318..4ad931509eaacc6ab8b2d233205a25ac8db5e48b 100644 (file)
@@ -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