* [PATCH] cpupower: split unitdir from libdir in Makefile
@ 2025-05-21 21:14 Francesco Poli (wintermute)
2025-05-22 11:43 ` Thorsten Leemhuis
0 siblings, 1 reply; 6+ messages in thread
From: Francesco Poli (wintermute) @ 2025-05-21 21:14 UTC (permalink / raw)
To: linux-pm list
Cc: Francesco Poli, Thomas Renninger, Shuah Khan, John B. Wyatt IV,
John Kacur, Thorsten Leemhuis, Justin Forbes
Improve the installation procedure for the systemd service unit
'cpupower.service', to be more flexible. Some distros install libraries
to /usr/lib64/, but systemd service units have to be installed to
/usr/lib/systemd/system: as a consequence, the installation procedure
should not assume that systemd service units can be installed to
${libdir}/systemd/system ...
Define a dedicated variable ("unitdir") in the Makefile.
Link: https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower")
Signed-off-by: Francesco Poli (wintermute) <invernomuto@paranoici.org>
---
tools/power/cpupower/Makefile | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index be8dfac14076..c43db1c41205 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -73,6 +73,7 @@ sbindir ?= /usr/sbin
mandir ?= /usr/man
libdir ?= /usr/lib
libexecdir ?= /usr/libexec
+unitdir ?= /usr/lib/systemd/system
includedir ?= /usr/include
localedir ?= /usr/share/locale
docdir ?= /usr/share/doc/packages/cpupower
@@ -309,9 +310,9 @@ install-tools: $(OUTPUT)cpupower
$(INSTALL_DATA) cpupower-service.conf '$(DESTDIR)${confdir}'
$(INSTALL) -d $(DESTDIR)${libexecdir}
$(INSTALL_PROGRAM) cpupower.sh '$(DESTDIR)${libexecdir}/cpupower'
- $(INSTALL) -d $(DESTDIR)${libdir}/systemd/system
- sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${libdir}/systemd/system/cpupower.service'
- $(SETPERM_DATA) '$(DESTDIR)${libdir}/systemd/system/cpupower.service'
+ $(INSTALL) -d $(DESTDIR)${unitdir}
+ sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${unitdir}/cpupower.service'
+ $(SETPERM_DATA) '$(DESTDIR)${unitdir}/cpupower.service'
install-man:
$(INSTALL_DATA) -D man/cpupower.1 $(DESTDIR)${mandir}/man1/cpupower.1
@@ -348,7 +349,7 @@ uninstall:
- rm -f $(DESTDIR)${bindir}/utils/cpupower
- rm -f $(DESTDIR)${confdir}cpupower-service.conf
- rm -f $(DESTDIR)${libexecdir}/cpupower
- - rm -f $(DESTDIR)${libdir}/systemd/system/cpupower.service
+ - rm -f $(DESTDIR)${unitdir}/cpupower.service
- rm -f $(DESTDIR)${mandir}/man1/cpupower.1
- rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1
- rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1
base-commit: e5174365c13246ed8fd2d40900edec37be6f7a34
--
2.47.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] cpupower: split unitdir from libdir in Makefile
2025-05-21 21:14 [PATCH] cpupower: split unitdir from libdir in Makefile Francesco Poli (wintermute)
@ 2025-05-22 11:43 ` Thorsten Leemhuis
2025-05-22 22:21 ` Francesco Poli
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Leemhuis @ 2025-05-22 11:43 UTC (permalink / raw)
To: Francesco Poli (wintermute), linux-pm list
Cc: Thomas Renninger, Shuah Khan, John B. Wyatt IV, John Kacur,
Justin Forbes
On 21.05.25 23:14, Francesco Poli (wintermute) wrote:
> Improve the installation procedure for the systemd service unit
> 'cpupower.service', to be more flexible. Some distros install libraries
> to /usr/lib64/, but systemd service units have to be installed to
> /usr/lib/systemd/system: as a consequence, the installation procedure
> should not assume that systemd service units can be installed to
> ${libdir}/systemd/system ...
> Define a dedicated variable ("unitdir") in the Makefile.
Many thx for doing this!
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Nitpicking:
> Link: https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
>
> Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower")
There should be no blank line between those two lines.
And you should use
https://lore.kernel.org/linux-pm/16ad2364-0161-4724-90e1-b57559168843@leemhuis.info/
as URL after "Link:", as it is shorter. That's the URL you get to when
you open
https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
and hit "permalink".
Some maintainers might reject patches due to such aspects, so I thought
it was better to let you know this before it causes trouble sooner or later.
Thx again! Ciao, Thorsten
> Signed-off-by: Francesco Poli (wintermute) <invernomuto@paranoici.org>
> ---
> tools/power/cpupower/Makefile | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
> index be8dfac14076..c43db1c41205 100644
> --- a/tools/power/cpupower/Makefile
> +++ b/tools/power/cpupower/Makefile
> @@ -73,6 +73,7 @@ sbindir ?= /usr/sbin
> mandir ?= /usr/man
> libdir ?= /usr/lib
> libexecdir ?= /usr/libexec
> +unitdir ?= /usr/lib/systemd/system
> includedir ?= /usr/include
> localedir ?= /usr/share/locale
> docdir ?= /usr/share/doc/packages/cpupower
> @@ -309,9 +310,9 @@ install-tools: $(OUTPUT)cpupower
> $(INSTALL_DATA) cpupower-service.conf '$(DESTDIR)${confdir}'
> $(INSTALL) -d $(DESTDIR)${libexecdir}
> $(INSTALL_PROGRAM) cpupower.sh '$(DESTDIR)${libexecdir}/cpupower'
> - $(INSTALL) -d $(DESTDIR)${libdir}/systemd/system
> - sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${libdir}/systemd/system/cpupower.service'
> - $(SETPERM_DATA) '$(DESTDIR)${libdir}/systemd/system/cpupower.service'
> + $(INSTALL) -d $(DESTDIR)${unitdir}
> + sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${unitdir}/cpupower.service'
> + $(SETPERM_DATA) '$(DESTDIR)${unitdir}/cpupower.service'
>
> install-man:
> $(INSTALL_DATA) -D man/cpupower.1 $(DESTDIR)${mandir}/man1/cpupower.1
> @@ -348,7 +349,7 @@ uninstall:
> - rm -f $(DESTDIR)${bindir}/utils/cpupower
> - rm -f $(DESTDIR)${confdir}cpupower-service.conf
> - rm -f $(DESTDIR)${libexecdir}/cpupower
> - - rm -f $(DESTDIR)${libdir}/systemd/system/cpupower.service
> + - rm -f $(DESTDIR)${unitdir}/cpupower.service
> - rm -f $(DESTDIR)${mandir}/man1/cpupower.1
> - rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1
> - rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1
>
> base-commit: e5174365c13246ed8fd2d40900edec37be6f7a34
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cpupower: split unitdir from libdir in Makefile
2025-05-22 11:43 ` Thorsten Leemhuis
@ 2025-05-22 22:21 ` Francesco Poli
2025-05-23 17:06 ` Shuah Khan
0 siblings, 1 reply; 6+ messages in thread
From: Francesco Poli @ 2025-05-22 22:21 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: linux-pm list, Thomas Renninger, Shuah Khan, John B. Wyatt IV,
John Kacur, Justin Forbes
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]
On Thu, 22 May 2025 13:43:49 +0200 Thorsten Leemhuis wrote:
> On 21.05.25 23:14, Francesco Poli (wintermute) wrote:
> > Improve the installation procedure for the systemd service unit
> > 'cpupower.service', to be more flexible. Some distros install libraries
> > to /usr/lib64/, but systemd service units have to be installed to
> > /usr/lib/systemd/system: as a consequence, the installation procedure
> > should not assume that systemd service units can be installed to
> > ${libdir}/systemd/system ...
> > Define a dedicated variable ("unitdir") in the Makefile.
>
> Many thx for doing this!
You're welcome! :-)
>
> Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
>
> Nitpicking:
>
> > Link: https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
> >
> > Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower")
>
> There should be no blank line between those two lines.
>
> And you should use
> https://lore.kernel.org/linux-pm/16ad2364-0161-4724-90e1-b57559168843@leemhuis.info/
> as URL after "Link:", as it is shorter. That's the URL you get to when
> you open
> https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
> and hit "permalink".
>
> Some maintainers might reject patches due to such aspects, so I thought
> it was better to let you know this before it causes trouble sooner or later.
[...]
Thank you for this nitpicking, I took note and I will do better
next time. I really appreciate that you took the time to report these
aspects.
Bye!
--
http://www.inventati.org/frx/
There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cpupower: split unitdir from libdir in Makefile
2025-05-22 22:21 ` Francesco Poli
@ 2025-05-23 17:06 ` Shuah Khan
2025-06-07 7:50 ` Thorsten Leemhuis
0 siblings, 1 reply; 6+ messages in thread
From: Shuah Khan @ 2025-05-23 17:06 UTC (permalink / raw)
To: Francesco Poli, Thorsten Leemhuis
Cc: linux-pm list, Thomas Renninger, Shuah Khan, John B. Wyatt IV,
John Kacur, Justin Forbes, Shuah Khan
On 5/22/25 16:21, Francesco Poli wrote:
> On Thu, 22 May 2025 13:43:49 +0200 Thorsten Leemhuis wrote:
>
>> On 21.05.25 23:14, Francesco Poli (wintermute) wrote:
>>> Improve the installation procedure for the systemd service unit
>>> 'cpupower.service', to be more flexible. Some distros install libraries
>>> to /usr/lib64/, but systemd service units have to be installed to
>>> /usr/lib/systemd/system: as a consequence, the installation procedure
>>> should not assume that systemd service units can be installed to
>>> ${libdir}/systemd/system ...
>>> Define a dedicated variable ("unitdir") in the Makefile.
>>
>> Many thx for doing this!
>
> You're welcome! :-)
>
>>
>> Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
>>
Thank you both. Applied to m,y cpupower branch. Will include it
in my next pr to PM maintainer.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cpupower: split unitdir from libdir in Makefile
2025-05-23 17:06 ` Shuah Khan
@ 2025-06-07 7:50 ` Thorsten Leemhuis
2025-06-10 15:13 ` Shuah Khan
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Leemhuis @ 2025-06-07 7:50 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-pm list, Thomas Renninger, Shuah Khan, John B. Wyatt IV,
John Kacur, Justin Forbes, Francesco Poli
On 23.05.25 19:06, Shuah Khan wrote:
> On 5/22/25 16:21, Francesco Poli wrote:
>> On Thu, 22 May 2025 13:43:49 +0200 Thorsten Leemhuis wrote:
>>
>>> On 21.05.25 23:14, Francesco Poli (wintermute) wrote:
>>>> Improve the installation procedure for the systemd service unit
>>>> 'cpupower.service', to be more flexible. Some distros install libraries
>>>> to /usr/lib64/, but systemd service units have to be installed to
>>>> /usr/lib/systemd/system: as a consequence, the installation procedure
>>>> should not assume that systemd service units can be installed to
>>>> ${libdir}/systemd/system ...
>>>> Define a dedicated variable ("unitdir") in the Makefile.
>>> Many thx for doing this!
>> You're welcome! :-)
>
> Thank you both. Applied to m,y cpupower branch. Will include it
> in my next pr to PM maintainer.
Thx. Sorry for pestering, but will you send that PR any time soon? The
current state of things in mainline creates small problems downstream;
not a big deal, but would be nice to get this resolved properly rather
sooner than later my mainlining this change.
Ciao, Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cpupower: split unitdir from libdir in Makefile
2025-06-07 7:50 ` Thorsten Leemhuis
@ 2025-06-10 15:13 ` Shuah Khan
0 siblings, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2025-06-10 15:13 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: linux-pm list, Thomas Renninger, Shuah Khan, John B. Wyatt IV,
John Kacur, Justin Forbes, Francesco Poli, Shuah Khan
On 6/7/25 01:50, Thorsten Leemhuis wrote:
> On 23.05.25 19:06, Shuah Khan wrote:
>> On 5/22/25 16:21, Francesco Poli wrote:
>>> On Thu, 22 May 2025 13:43:49 +0200 Thorsten Leemhuis wrote:
>>>
>>>> On 21.05.25 23:14, Francesco Poli (wintermute) wrote:
>>>>> Improve the installation procedure for the systemd service unit
>>>>> 'cpupower.service', to be more flexible. Some distros install libraries
>>>>> to /usr/lib64/, but systemd service units have to be installed to
>>>>> /usr/lib/systemd/system: as a consequence, the installation procedure
>>>>> should not assume that systemd service units can be installed to
>>>>> ${libdir}/systemd/system ...
>>>>> Define a dedicated variable ("unitdir") in the Makefile.
>>>> Many thx for doing this!
>>> You're welcome! :-)
>>
>> Thank you both. Applied to m,y cpupower branch. Will include it
>> in my next pr to PM maintainer.
>
> Thx. Sorry for pestering, but will you send that PR any time soon? The
> current state of things in mainline creates small problems downstream;
> not a big deal, but would be nice to get this resolved properly rather
> sooner than later my mainlining this change.
>
> Ciao, Thorsten
I am planning to send it today. I ran into merge issues when I tried to
send it on Friday.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-06-10 15:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 21:14 [PATCH] cpupower: split unitdir from libdir in Makefile Francesco Poli (wintermute)
2025-05-22 11:43 ` Thorsten Leemhuis
2025-05-22 22:21 ` Francesco Poli
2025-05-23 17:06 ` Shuah Khan
2025-06-07 7:50 ` Thorsten Leemhuis
2025-06-10 15:13 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox