From: "John B. Wyatt IV" <jwyatt@redhat.com>
To: Francesco Poli <invernomuto@paranoici.org>
Cc: Thorsten Leemhuis <linux@leemhuis.info>,
linux-pm list <linux-pm@vger.kernel.org>,
Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
John Kacur <jkacur@redhat.com>
Subject: Re: [PATCH v2] cpupower: add a systemd service to run cpupower
Date: Thu, 8 May 2025 12:22:54 -0400 [thread overview]
Message-ID: <aBzaXqz4TQkHxJjV@thinkpad2024> (raw)
In-Reply-To: <20250508001857.ef90d07f43868b2b12c2f432@paranoici.org>
On Thu, May 08, 2025 at 12:18:57AM +0200, Francesco Poli wrote:
> On Wed, 7 May 2025 10:07:33 +0200 Thorsten Leemhuis wrote:
> > /etc/default/ is to the best of my knowledge (everyone: please correct
> > me if I'm wrong!) a Debianism and on rarely used (or maybe not at all,
> > not sure) in distros unrelated to Debian.
>
> I thought that /etc/default was used in other distros, as well, not
> only on Debian-derivatives...
>
> For instance on [RedHat] Enterprise Linux and (consequently) on [Rocky]
> Linux for [GRUB], for [useradd], and so forth...
>
> [RedHat]: <https://access.redhat.com/solutions/3185891>
> [GRUB]: <https://docs.rockylinux.org/books/admin_guide/10-boot/#the-grub2-bootloader>
> [useradd]: <https://docs.rockylinux.org/books/admin_guide/06-users/#default-value-for-user-creation>
>
> What do others think?
You are correct about it not being Debian family specific.
My Fedora install has the following: google-chrome grub pcscd useradd
Citing RHEL 7 or a clone of RHEL 8 is outdated information fyi. RHEL will
usually follow it's upstream, which is Fedora.
>
> > So I'd say it's a bad choice
> > to place that file. Why not put it simply straight into /etc/ ?
>
> Because /etc/cpupower.conf makes me think it's a configuration file for
> cpupower, rather than for the cpupower.service that runs cpupower at
> boot.
Despite reviewing it, in retrospect, it makes me think the name of the
file should be different instead; perhaps cpupower-service.conf ?
Trying not to do bike shedding [1] for you as a new contributor, but
I do feel changing the filename would make it much more clear at a
glance, especially if it is moved to /etc.
[1] https://en.wikipedia.org/wiki/Law_of_triviality
If packagers would like to keep /etc/default clean I do not see a reason
not to. Not sure where else it would go besides /etc or /etc/cpupower;
/etc/systemd/system seems specific for systemd unit files.
>
> > Side node: the config file is also basically a template, which makes me
> > wonder if it should land in /usr/share/doc or something like that anyway
> > so users take a look at adjust it to their needs. But it's just a
> > thought, I have no strong opinions with regards to this.
> Well, I would prefer to have a configuration file in the right
> location, ready to be edited by the sysadmin.
Agreed. Also, that seems to be for readonly info and this file is
intended to be modified to have any effect. Plenty of programs place a
default configuration file in /etc or a subdirectory.
--
Sincerely,
John Wyatt
Software Engineer, Core Kernel
Red Hat
next prev parent reply other threads:[~2025-05-08 16:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 15:07 [PATCH v2] cpupower: add a systemd service to run cpupower Francesco Poli (wintermute)
2025-04-29 20:59 ` John B. Wyatt IV
2025-05-02 15:53 ` Francesco Poli
2025-05-02 16:41 ` Shuah Khan
2025-05-02 19:55 ` Shuah Khan
2025-05-03 10:59 ` Francesco Poli
2025-05-05 16:06 ` Thorsten Leemhuis
2025-05-05 20:55 ` Francesco Poli
2025-05-06 4:40 ` Thorsten Leemhuis
2025-05-07 8:07 ` Thorsten Leemhuis
2025-05-07 22:18 ` Francesco Poli
2025-05-08 8:02 ` Thorsten Leemhuis
2025-05-08 16:22 ` John B. Wyatt IV [this message]
2025-05-08 22:22 ` Francesco Poli
2025-05-14 12:41 ` Thorsten Leemhuis
2025-05-14 17:53 ` John B. Wyatt IV
2025-05-14 20:39 ` Francesco Poli
2025-05-14 20:23 ` Francesco Poli
2025-05-15 6:12 ` Thorsten Leemhuis
2025-05-21 21:23 ` Francesco Poli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBzaXqz4TQkHxJjV@thinkpad2024 \
--to=jwyatt@redhat.com \
--cc=invernomuto@paranoici.org \
--cc=jkacur@redhat.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=shuah@kernel.org \
--cc=trenn@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox