public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jon Ciesla <limburgher@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/incron] epel8: Migrate to systemd.
Date: Thu, 12 Nov 2026 02:01:31 GMT [thread overview]
Message-ID: <179444889102.1.2295802607741865402.rpms-incron-fa1b06b92c5a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/incron
Branch : epel8
Commit : fa1b06b92c5a7b28d1102d9e9b47c9b37dcec5eb
Author : Jon Ciesla <limburgher@gmail.com>
Date : 2012-02-16T10:22:41-06:00
Stats : +58/-13 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/incron/c/fa1b06b92c5a7b28d1102d9e9b47c9b37dcec5eb?branch=epel8
Log:
Migrate to systemd.
---
diff --git a/incron.spec b/incron.spec
index b856609..5cee955 100644
--- a/incron.spec
+++ b/incron.spec
@@ -1,18 +1,22 @@
Summary: Inotify cron system
Name: incron
Version: 0.5.9
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: System Environment/Base
License: GPLv2
URL: http://inotify.aiken.cz
Source0: http://inotify.aiken.cz/download/incron/%{name}-%{version}.tar.bz2
-Source1: incrond.init
+Source1: incrond.service
Patch0: incron-gcc44.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig, /sbin/service
+#Requires(post): /sbin/chkconfig
+#Requires(preun): /sbin/chkconfig, /sbin/service
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+
%description
This program is an "inotify cron" system.
@@ -37,28 +41,56 @@ install -D -p incrond %{buildroot}%{_sbindir}/incrond
install -D -p -m 4755 incrontab %{buildroot}%{_bindir}/incrontab
install -d %{buildroot}%{_localstatedir}/spool/%{name}
install -d %{buildroot}%{_sysconfdir}/%{name}.d
-install -D -p %{SOURCE1} %{buildroot}%{_initrddir}/incrond
+install -D -p %{SOURCE1} %{buildroot}%{_unitdir}/incrond.service
install -D -p -m 0644 incron.conf.example %{buildroot}%{_sysconfdir}/%{name}.conf
# install manpages
make install-man MANPATH="%{buildroot}%{_mandir}" INSTALL="install -D -p"
%post
-if [ $1 -eq 1 ]; then
- /sbin/chkconfig --add incrond
+#if [ $1 -eq 1 ]; then
+# /sbin/chkconfig --add incrond
+#fi
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
+
%preun
-if [ $1 -eq 0 ]; then
- /sbin/service %{name} stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del incrond
+#if [ $1 -eq 0 ]; then
+# /sbin/service %{name} stop >/dev/null 2>&1 || :
+# /sbin/chkconfig --del incrond
+#fi
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable incrond.service > /dev/null 2>&1 || :
+ /bin/systemctl stop incrond.service > /dev/null 2>&1 || :
fi
+
%postun
-if [ $1 -ge 1 ]; then
- /sbin/service incrond condrestart >/dev/null 2>&1 || :
+#if [ $1 -ge 1 ]; then
+# /sbin/service incrond condrestart >/dev/null 2>&1 || :
+#fi
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart incrond.service >/dev/null 2>&1 || :
fi
+
+%triggerun -- incron < 0.5.9-4
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply incrond
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save incrond >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del incrond >/dev/null 2>&1 || :
+/bin/systemctl try-restart incrond.service >/dev/null 2>&1 || :
+
+
%clean
rm -rf %{buildroot}
@@ -66,7 +98,7 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%attr(4755,root,root) %{_bindir}/incrontab
%{_sbindir}/incrond
-%{_initrddir}/incrond
+%{_unitdir}/incrond.service
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_mandir}/man1/incrontab.1.gz
%{_mandir}/man5/incrontab.5.gz
@@ -79,6 +111,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Feb 16 2012 Jon Ciesla <limburgher@gmail.com> - 0.5.9-4
+- Migrate to systemd, BZ 789688.
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/incrond.service b/incrond.service
new file mode 100644
index 0000000..54fcfa9
--- /dev/null
+++ b/incrond.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Inotify System Scheduler
+
+[Service]
+Type=forking
+PIDFile=/run/incrond.pid
+ExecStart=/usr/sbin/incrond
+
+[Install]
+WantedBy=multi-user.target
reply other threads:[~2026-11-12 2:01 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=179444889102.1.2295802607741865402.rpms-incron-fa1b06b92c5a@fedoraproject.org \
--to=limburgher@gmail.com \
--cc=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