public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/inn] epel10: Migrating from cron to systemd timer
@ 2026-08-26 8:06 Jochen Schmitt
0 siblings, 0 replies; only message in thread
From: Jochen Schmitt @ 2026-08-26 8:06 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/inn
Branch : epel10
Commit : 4e80434b2c5560fb0a261f6e1c12adde539007cc
Author : Jochen Schmitt <Jochen@herr-schmitt.de>
Date : 2013-01-16T22:32:30+01:00
Stats : +122/-22 in 11 file(s)
URL : https://src.fedoraproject.org/rpms/inn/c/4e80434b2c5560fb0a261f6e1c12adde539007cc?branch=epel10
Log:
Migrating from cron to systemd timer
---
diff --git a/inn-cron-expire b/inn-cron-expire
deleted file mode 100644
index 8ec1b2b..0000000
--- a/inn-cron-expire
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-/sbin/chkconfig innd >& /dev/null || exit 0
-runuser -m news -c "unset LANG; unset LC_COLLATE; /usr/libexec/news/news.daily delayrm"
diff --git a/inn-cron-nntpsend b/inn-cron-nntpsend
deleted file mode 100755
index 8345c58..0000000
--- a/inn-cron-nntpsend
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-/sbin/chkconfig innd >& /dev/null || exit 0
-runuser -m news -c "unset LANG; unset LC_COLLATE; /usr/libexec/news/nntpsend"
diff --git a/inn-cron-rnews b/inn-cron-rnews
deleted file mode 100644
index 71401da..0000000
--- a/inn-cron-rnews
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-/sbin/chkconfig innd >& /dev/null || exit 0
-runuser -m news -c 'unset LANG; unset LC_COLLATE; /usr/libexec/news/rnews -U'
diff --git a/inn.spec b/inn.spec
index 13f138f..76f38f1 100644
--- a/inn.spec
+++ b/inn.spec
@@ -1,18 +1,21 @@
Summary: The InterNetNews system, an Usenet news server
Name: inn
Version: 2.5.3
-Release: 4%{?dist}
+Release: 5%{?dist}
#see LICENSE file for details
License: GPLv2+ and BSD and MIT and Public Domain
Group: System Environment/Daemons
URL: https://www.isc.org/software/INN/
Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz
Source2: inn-default-distributions
-Source4: inn-cron-expire
-Source5: inn-cron-rnews
-Source7: inn-cron-nntpsend
Source10: inn-faq.tar.gz
Source20: innd.service
+Source21: innd-expire.service
+Source22: innd-expire.timer
+Source23: innd-nntpsend.service
+Source24: innd-nntpsend.timer
+Source25: innd-rnews.service
+Source26: innd-rnews.timer
Patch1: inn-2.4.3.rh.patch
Patch4: inn-2.5.1.pie.patch
Patch6: inn-2.5.2.posix.patch
@@ -165,14 +168,17 @@ chmod 644 $RPM_BUILD_ROOT%{_sharedstatedir}/news/subscriptions
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sharedstatedir}/news/distributions
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.{hourly,daily}
-install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/inn-cron-expire
-install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/inn-cron-rnews
-install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/inn-cron-nntpsend
-
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -p -m 0644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 0644 %{SOURCE21} $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 0644 %{SOURCE22} $RPM_BUILD_ROOT%{_unitdir}
+
+install -p -m 0644 %{SOURCE23} $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 0644 %{SOURCE24} $RPM_BUILD_ROOT%{_unitdir}
+
+install -p -m 0644 %{SOURCE25} $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 0644 %{SOURCE26} $RPM_BUILD_ROOT%{_unitdir}
tar xf %{SOURCE10}
mv inn.html FAQ.html
@@ -221,6 +227,9 @@ touch /var/log/news/news.err
chown -R news:news /var/log/news*
%systemd_post innd.service
+%systemd_post innd-expire.service
+%systemd_post innd-nntpsend.service
+%systemd_post innd-rnews.service
%post libs -p /sbin/ldconfig
@@ -274,6 +283,9 @@ fi
%preun
%systemd_preun innd.service
+%systemd_preun innd-expire.service
+%systemd_preun innd-nntpsend.service
+%systemd_preun innd-rnews.service
if [ $1 = 0 ]; then
if [ -f /var/lib/news/history.dir ]; then
rm -f /var/lib/news/history.*
@@ -282,6 +294,9 @@ fi
%postun
%systemd_postun_with_restart innd.service
+%systemd_postun_with_restart innd-expire.service
+%systemd_postun_with_restart innd-nntpsend.serivce
+%systemd_postun_with_restart innd-rnews.service
%postun libs -p /sbin/ldconfig
@@ -289,11 +304,14 @@ fi
%defattr(0755,news,news,-)
%{_bindir}/rnews
%defattr(0755,root,root,-)
-# /etc config files plus cron config
-%{_sysconfdir}/cron.hourly/inn-cron-rnews
-%{_sysconfdir}/cron.hourly/inn-cron-nntpsend
-%{_sysconfdir}/cron.daily/inn-cron-expire
+# /etc config files plus config
%{_unitdir}/innd.service
+%{_unitdir}/innd-expire.service
+%{_unitdir}/innd-expire.timer
+%{_unitdir}/innd-nntpsend.service
+%{_unitdir}/innd-nntpsend.timer
+%{_unitdir}/innd-rnews.service
+%{_unitdir}/innd-rnews.timer
%defattr(-,news,news,-)
# tmpfile.d files
%config(noreplace) %attr(-,root,root) %{_sysconfdir}/tmpfiles.d/inn.conf
@@ -524,6 +542,9 @@ fi
%{_mandir}/man1/inews*
%changelog
+* Wed Jan 16 2013 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-5
+- Migrating from cron to systemd timer
+
* Fri Oct 5 2012 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-4
- Introduction of systemd rpm macros
diff --git a/innd-expire.service b/innd-expire.service
new file mode 100644
index 0000000..8aa9cbd
--- /dev/null
+++ b/innd-expire.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Inetnet News Daemon Expiring
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Service]
+User=news
+PermissionsStartOnly=true
+Type=oneshot
+ExecStart=/usr/libexec/news/news.daily delayrm
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-expire.timer b/innd-expire.timer
new file mode 100644
index 0000000..f04aabb
--- /dev/null
+++ b/innd-expire.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Inetnet News Daemon Exp
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Timer]
+OnUnitActSec=1d
+Unit=innd-expire.service
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-hourly.timer b/innd-hourly.timer
new file mode 100644
index 0000000..59183f3
--- /dev/null
+++ b/innd-hourly.timer
@@ -0,0 +1,16 @@
+[Unit]
+Description=Inetnet News Daemon
+After=syslog.target network.target
+ConditionPathExists=/etc/news/inn.conf
+
+[Service]
+User=news
+PermissionsStartOnly=true
+PIDFile=/run/news/innd.pid
+Type=forking
+ExecStart=/usr/libexec/news/rc.news
+ExecStop=/bin/su -m news -c '/usr/libexec/news/rc.news stop'
+KillMode=control-group
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-nntpsend.service b/innd-nntpsend.service
new file mode 100644
index 0000000..0b8973f
--- /dev/null
+++ b/innd-nntpsend.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Inetnet News Daemon Sending News
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Service]
+User=news
+PermissionsStartOnly=true
+Type=oneshot
+ExecStart=/usr/libexec/news/nntpsend
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-nntpsend.timer b/innd-nntpsend.timer
new file mode 100644
index 0000000..ba6f686
--- /dev/null
+++ b/innd-nntpsend.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Inetnet News Daemon NNTP Send
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Timer]
+OnUnitActSec=1h
+Unit=innd-nntp.service
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-rnews.service b/innd-rnews.service
new file mode 100644
index 0000000..4889337
--- /dev/null
+++ b/innd-rnews.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Inetnet News Daemon Receiving News
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Service]
+User=news
+PermissionsStartOnly=true
+Type=oneshot
+ExecStart=/usr/libexec/news/rnews -U
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/innd-rnews.timer b/innd-rnews.timer
new file mode 100644
index 0000000..7aff983
--- /dev/null
+++ b/innd-rnews.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Inetnet News Daemon Receiving News
+After=syslog.target network.target innd.service
+ConditionPathExists=/etc/news/inn.conf
+
+[Timer]
+OnUnitActSec=1h
+Unit=innd-rnews.service
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-26 8:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 8:06 [rpms/inn] epel10: Migrating from cron to systemd timer Jochen Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox