From 8c47787711ef5c67128b68f1348a0253fb90c003 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Tue, 24 Jan 2017 15:21:16 -0700
Subject: Fix logrotate script for systemd (bug #1414617)
---
cobbler-logrotate.patch | 14 ++++++++++++++
cobbler.spec | 7 +++++++
2 files changed, 21 insertions(+)
create mode 100644 cobbler-logrotate.patch
diff --git a/cobbler-logrotate.patch b/cobbler-logrotate.patch
new file mode 100644
index 0000000..3e0ffc8
--- /dev/null
+++ b/cobbler-logrotate.patch
@@ -0,0 +1,14 @@
+diff -up cobbler-2.8.0/config/cobblerd_rotate.logrotate
cobbler-2.8.0/config/cobblerd_rotate
+--- cobbler-2.8.0/config/cobblerd_rotate.logrotate 2016-11-16 12:09:20.000000000 -0700
++++ cobbler-2.8.0/config/cobblerd_rotate 2017-01-20 13:15:01.773509389 -0700
+@@ -4,9 +4,7 @@
+ rotate 4
+ weekly
+ postrotate
+- if [ -f /var/lock/subsys/cobblerd ]; then
+- /etc/init.d/cobblerd condrestart > /dev/null
+- fi
++ /sbin/service cobblerd condrestart > /dev/null 2>&1
+ endscript
+ }
+
diff --git a/cobbler.spec b/cobbler.spec
index 6c1a006..52dc2e3 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -16,6 +16,9 @@ Summary: Boot server configurator
URL:
http://cobbler.github.io/
License: GPLv2+
Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{...
+# Make logrotate work with systemd
+#
https://github.com/cobbler/cobbler/issues/1745
+Patch0: cobbler-logrotate.patch
BuildRequires: git
BuildRequires: python2-devel
@@ -100,6 +103,7 @@ of an existing system. For use with a boot-server configured with
Cobbler
%prep
%setup -q
+%patch0 -p1 -b .logrotate
%build
%py2_build
@@ -244,6 +248,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY =
\'$RAND_SECRET\'/" /usr/share/cobbler/
%changelog
+* Fri Jan 20 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-2
+- Fix logrotate script for systemd (bug #1414617)
+
* Thu Dec 1 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-1
- Update to 2.8.0
- Restructure spec file
--
cgit v1.1
https://src.fedoraproject.org/cgit/cobbler.git/commit/?h=epel7&id=8c4...