public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/hd-idle] epel10: Initial import (#1432993)
Date: Sat, 06 Jun 2026 22:57:37 GMT	[thread overview]
Message-ID: <178078665765.1.14064379258028551373.rpms-hd-idle-c7fe4499981c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/hd-idle
Branch : epel10
Commit : c7fe4499981c67e6c1b5e241c74a10043f14a805
Author : Samuel Rakitničan <samuel.rakitnican@gmail.com>
Date   : 2017-08-11T10:28:08+02:00
Stats  : +119/-0 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/hd-idle/c/c7fe4499981c67e6c1b5e241c74a10043f14a805?branch=epel10

Log:
Initial import (#1432993)

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..92dc08f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/hd-idle-1.05.tgz

diff --git a/hd-idle.logrotate b/hd-idle.logrotate
new file mode 100644
index 0000000..a6efe14
--- /dev/null
+++ b/hd-idle.logrotate
@@ -0,0 +1,6 @@
+/var/log/hd-idle/*log {
+	missingok
+	notifempty
+	compress
+	delaycompress
+}

diff --git a/hd-idle.service b/hd-idle.service
new file mode 100644
index 0000000..1b252b4
--- /dev/null
+++ b/hd-idle.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=hd-idle - spin down idle hard disks
+Documentation=man:hd-idle(1)
+
+[Service]
+Type=forking
+EnvironmentFile=-/etc/sysconfig/hd-idle
+ExecStart=/usr/sbin/hd-idle $HD_IDLE_OPTS
+
+[Install]
+WantedBy=multi-user.target

diff --git a/hd-idle.spec b/hd-idle.spec
new file mode 100644
index 0000000..9268bce
--- /dev/null
+++ b/hd-idle.spec
@@ -0,0 +1,100 @@
+Name:           hd-idle
+Version:        1.05
+Release:        4%{?dist}
+Summary:        Spin down idle [USB] hard disks
+
+Group:          Applications/System
+License:        GPLv2
+URL:            http://hd-idle.sourceforge.net
+Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
+Source1:        hd-idle.service
+Source2:        hd-idle.logrotate
+
+BuildRequires:  gcc
+BuildRequires:  systemd
+Requires:       logrotate
+Requires:       systemd
+
+%description
+hd-idle is a utility program for spinning-down external disks after a period
+of idle time. Since most external IDE disk enclosures don't support setting
+the IDE idle timer, a program like hd-idle is required to spin down idle disks
+automatically.
+
+A word of caution: hard disks don't like spinning up too often. Laptop disks
+are more robust in this respect than desktop disks but if you set your disks
+to spin down after a few seconds you may damage the disk over time due to the
+stress the spin-up causes on the spindle motor and bearings. It seems that
+manufacturers recommend a minimum idle time of 3-5 minutes, the default in
+hd-idle is 10 minutes.
+
+One more word of caution: hd-idle will spin down any disk accessible via the
+SCSI layer (USB, IEEE1394, ...) but it will not work with real SCSI disks
+because they don't spin up automatically. Thus it's not called scsi-idle and
+I don't recommend using it on a real SCSI system unless you have a kernel
+patch that automatically starts the SCSI disks after receiving a sense buffer
+indicating the disk has been stopped. Without such a patch, real SCSI disks
+won't start again and you can as well pull the plug.
+
+
+%prep
+%setup -q -n %{name}
+sed -i 's/install -D -g root -o root/install -D/' Makefile
+
+
+%build
+export CFLAGS="%{optflags}"
+%make_build
+
+
+%install
+%make_install
+# Remove executable bit from manual page
+find "%{buildroot}%{_mandir}" -executable -type f -exec chmod -x {} \;
+
+install -d -m 755 %{buildroot}%{_unitdir}
+install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
+install -d %{buildroot}%{_sysconfdir}/sysconfig
+echo 'HD_IDLE_OPTS="-i 1200 -l /var/log/hd-idle/hd-idle.log"' > \
+     %{buildroot}%{_sysconfdir}/sysconfig/%{name}
+install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
+install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
+install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+
+
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_postun_with_restart %{name}.service
+
+
+%files
+%{_sbindir}/*
+%{_mandir}/man1/%{name}.1*
+%{_unitdir}/*
+%config(noreplace) %{_sysconfdir}/logrotate.d/*
+%config(noreplace) %{_sysconfdir}/sysconfig/*
+%dir %{_localstatedir}/log/%{name}
+%license LICENSE
+%doc README
+
+
+
+%changelog
+* Thu Aug 03 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.05-4
+- Add requirement on logrotate and systemd
+- Remove executable bit from manual page
+
+* Wed Aug 02 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.05-3
+- Use %%{optflags} macro
+
+* Wed Aug 02 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.05-2
+- Use macros for building and installing
+- Add gcc build requirement
+
+* Sun Feb 26 2017 Samuel Rakitničan <samuel.rakitnican@gmail.com> 1.05-1
+- Initialize

diff --git a/sources b/sources
new file mode 100644
index 0000000..3debf11
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (hd-idle-1.05.tgz) = 8636d8bf2bce40f380afdea859aef7d142258071c62f87884a9af55c7c84310d89de712f56dff2bd825f0c7d79b04356df92e3012d8f683d8c41ebb23cd3920b

                 reply	other threads:[~2026-06-06 22:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178078665765.1.14064379258028551373.rpms-hd-idle-c7fe4499981c@fedoraproject.org \
    --to=git-commits@fedoraproject.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