public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/hd-idle/, sys-apps/hd-idle/files/
Date: Thu,  9 Feb 2023 13:33:59 +0000 (UTC)	[thread overview]
Message-ID: <1675949377.f367f6a6be36721959a7d638b1388b4589d098aa.juippis@gentoo> (raw)

commit:     f367f6a6be36721959a7d638b1388b4589d098aa
Author:     Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com>
AuthorDate: Wed Jan 25 22:13:34 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Feb  9 13:29:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f367f6a6

sys-apps/hd-idle: systemd units must not use conf.d

Add a drop-in file to allow configuration for systemd users
and inform about the change via elog.
Also, bump to EAPI 8 and use https for HOMEPAGE.

Closes: https://bugs.gentoo.org/892005
Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com>
Closes: https://github.com/gentoo/gentoo/pull/29270
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-apps/hd-idle/files/hd-idle-dropin.conf | 30 ++++++++++++++++++++++++++
 sys-apps/hd-idle/files/hd-idle.service     | 12 +++++++++++
 sys-apps/hd-idle/hd-idle-1.05-r2.ebuild    | 34 ++++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+)

diff --git a/sys-apps/hd-idle/files/hd-idle-dropin.conf b/sys-apps/hd-idle/files/hd-idle-dropin.conf
new file mode 100644
index 000000000000..d8c9eea5ff89
--- /dev/null
+++ b/sys-apps/hd-idle/files/hd-idle-dropin.conf
@@ -0,0 +1,30 @@
+# Copyright 1999-2023 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# override settings for hd-idle
+
+# hd-idle command line options
+# Options are:
+#  -a                      Set (partial) device name of disks for subsequent
+#                          idle-time parameters (-i). This parameter is optional
+#                          in the sense that there's a default entry for all
+#                          disks which are not named otherwise by using this
+#                          parameter.
+#  -i <idle_time>          Idle time in seconds.
+#  -l <logfile>            Name of logfile (written only after a disk has spun
+#                          up). Please note that this option might cause the
+#                          disk which holds the logfile to spin up just because
+#                          another disk had some activity. This option should
+#                          not be used on systems with more than one disk
+#                          except for tuning purposes. On single-disk systems,
+#                          this option should not cause any additional spinups.
+#
+# Options not exactly useful here:
+#  -t <disk>               Spin-down the specfified disk immediately and exit.
+#  -d                      Debug mode. This will prevent hd-idle from
+#                          becoming a daemon and print debugging info to
+#                          stdout/stderr
+#  -h                      Print usage information.
+
+# To override, uncomment the following line to override ExecStart:
+#ExecStart=/usr/sbin/hd-idle -i 180 -l /var/log/hd-idle.log

diff --git a/sys-apps/hd-idle/files/hd-idle.service b/sys-apps/hd-idle/files/hd-idle.service
new file mode 100644
index 000000000000..4b33904483bc
--- /dev/null
+++ b/sys-apps/hd-idle/files/hd-idle.service
@@ -0,0 +1,12 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+[Unit]
+Description=hd-idle - spinning down HDDs after a period of idle time
+Documentation=man:hd-idle(1)
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/hd-idle -i 180 -l /var/log/hd-idle.log
+
+[Install]
+WantedBy=multi-user.target

diff --git a/sys-apps/hd-idle/hd-idle-1.05-r2.ebuild b/sys-apps/hd-idle/hd-idle-1.05-r2.ebuild
new file mode 100644
index 000000000000..4a75d8212141
--- /dev/null
+++ b/sys-apps/hd-idle/hd-idle-1.05-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info systemd
+
+DESCRIPTION="Utility for spinning down hard disks after a period of idle time"
+HOMEPAGE="https://hd-idle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+
+S="${WORKDIR}/${PN}"
+
+CONFIG_CHECK="~PROC_FS"
+
+DOCS=( debian/changelog README )
+
+src_install() {
+	default
+	systemd_newunit "${FILESDIR}"/hd-idle.service ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/hd-idle-dropin.conf
+	newinitd "${FILESDIR}"/hd-idle-init hd-idle
+	newconfd "${FILESDIR}"/hd-idle-conf hd-idle
+
+	elog "The systemd unit file for hd-idle no longer sources ${EPREFIX}/etc/conf.d/hd-idle ."
+	elog "Configuration is still done via ${EPREFIX}/etc/conf.d/hd-idle for OpenRC systems"
+	elog "while for systemd systems, a systemd drop-in file located at"
+	elog "${EPREFIX}/etc/systemd/system/hd-idle.service.d/00gentoo.conf"
+	elog "is used for configuration."
+}


             reply	other threads:[~2023-02-09 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 13:33 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-05  8:47 [gentoo-commits] repo/gentoo:master commit in: sys-apps/hd-idle/, sys-apps/hd-idle/files/ Joonas Niilola

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=1675949377.f367f6a6be36721959a7d638b1388b4589d098aa.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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