License: GPLv2+
AutoReq: no
Version: 2.6.9
-Release: 1%{?dist}~mos12
+Release: 1%{?dist}~mos13
Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source1: cobblerd.logrotate
# Support newer virt-install - https://bugzilla.redhat.com/show_bug.cgi?id=1188424
Patch0: cobbler-virtinstall.patch
# Support centos release numbering
rm $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobbler.conf
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+%if 0%{?rhel} < 7
mv $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd_rotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cobblerd
+%else
+mv %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cobblerd
+%endif
# Create data directories in tftp_dir
mkdir -p $RPM_BUILD_ROOT%{tftp_dir}/{boot,etc,grub,images{,2},ppc,pxelinux.cfg,s390x}
--- /dev/null
+/var/log/cobbler/cobbler.log {
+ missingok
+ notifempty
+ rotate 4
+ weekly
+ postrotate
+ systemctl try-restart cobblerd
+ endscript
+}
+
+/var/log/cobbler/tasks/*.log {
+ weekly
+ rotate 0
+ missingok
+ ifempty
+ nocompress
+ nocreate
+ nomail
+}
+
+/var/log/cobbler/install.log {
+ missingok
+ notifempty
+ rotate 4
+ weekly
+}