2 # - processing files from system dir has little side effect:
3 # if file specified in system (or any) table has inexistent paths, incrond
4 # will report on the whole table an error without much detail which entry was it:
5 # haarber incrond[4025]: cannot create watch for system table ble: (2) No such file or directory
6 # - systemd service spits some pid notice on startup, but service startups itself fine:
7 # Oct 21 21:36:48 haarber incrond[4670]: starting service (version 0.5.10, built on Oct 21 2012 19:20:10)
8 # Oct 21 21:36:48 haarber systemd[1]: PID file /var/run/incrond.pid not readable (yet?) after start.
9 # Oct 21 21:36:48 haarber incrond[4671]: loading system tables
10 Summary: incron :: inotify cron system
16 Source0: http://inotify.aiken.cz/download/incron/%{name}-%{version}.tar.bz2
17 # Source0-md5: 038190dc64568883a206f3d58269b850
19 Source2: %{name}.service
20 Source3: %{name}.allow
22 Patch0: %{name}-DESTDIR.patch
23 Patch1: %{name}-gcc47.patch
24 Patch2: %{name}-man_bugs.patch
25 Patch3: configdir.patch
26 Patch4: excludefiles.patch
27 URL: http://incron.aiken.cz/
28 BuildRequires: rpmbuild(macros) >= 1.644
29 Requires: systemd-units >= 38
30 Requires(post): fileutils
31 Requires(post,preun,postun): systemd-units >= 38
32 Requires(post,preun): /sbin/chkconfig
33 Requires(postun): /usr/sbin/groupdel
34 Requires(pre): /bin/id
35 Requires(pre): /usr/bin/getgid
36 Requires(pre): /usr/sbin/groupadd
37 Requires(pre): /usr/sbin/useradd
39 Requires: uname(release) >= 2.6.13
40 Provides: group(crontab)
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 This program is an "inotify cron" system. It consists of a daemon and
45 a table manipulator. You can use it a similar way as the regular cron.
46 The difference is that the inotify cron handles filesystem events
47 rather than time periods.
59 LDFLAGS="%{rpmldflags} -Wall" \
61 OPTIMIZE="%{rpmcxxflags}" \
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{%{name},%{name}.d}} \
67 $RPM_BUILD_ROOT{/var/spool/%{name},%{systemdunitdir}}
70 DESTDIR=$RPM_BUILD_ROOT \
73 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
74 cp -p incron.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
75 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
76 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
77 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
80 rm -rf $RPM_BUILD_ROOT
83 %groupadd -g 117 -r -f crontab
84 %useradd -u 134 -r -d /var/spool/%{name} -s /bin/false -c "crontab User" -g crontab crontab
87 /sbin/chkconfig --add %{name}
88 %service %{name} restart "incron Daemon"
89 %systemd_post %{name}.service
92 if [ "$1" = "0" ]; then
94 /sbin/chkconfig --del %{name}
96 %systemd_preun %{name}.service
99 if [ "$1" = "0" ]; then
106 %defattr(644,root,root,755)
107 %doc CHANGELOG COPYING README TODO
108 %attr(750,root,crontab) %dir %{_sysconfdir}/%{name}
109 %attr(640,root,crontab) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
110 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.allow
111 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.deny
112 %attr(754,root,root) /etc/rc.d/init.d/%{name}
113 %{systemdunitdir}/%{name}.service
114 %attr(755,root,root) %{_sbindir}/incrond
115 %attr(4755,root,crontab) %{_bindir}/incrontab
116 %dir %attr(751,root,crontab) %{_sysconfdir}/%{name}.d
117 %{_mandir}/man1/incrontab.1*
118 %{_mandir}/man5/incron.conf.5*
119 %{_mandir}/man5/incrontab.5*
120 %{_mandir}/man8/incrond.8*
121 %attr(1730,root,crontab) /var/spool/%{name}