From be81a5ca51e558b75ad23e5681be9b5d1c989d2c Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Thu, 11 Aug 2016 10:29:39 -0600
Subject: Force IPv4 connections to cobblerd from web proxy
---
cobbler-ipv4.patch | 14 ++++++++++++++
cobbler.spec | 9 ++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 cobbler-ipv4.patch
diff --git a/cobbler-ipv4.patch b/cobbler-ipv4.patch
new file mode 100644
index 0000000..ab0914c
--- /dev/null
+++ b/cobbler-ipv4.patch
@@ -0,0 +1,14 @@
+diff -up cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf.ipv4
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf
+--- cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf.ipv4 2016-07-21
11:48:46.000000000 -0600
++++ cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf 2016-08-10
15:52:22.903671504 -0600
+@@ -18,8 +18,8 @@ WSGIScriptAliasMatch ^/cblr/svc/([^/]*)
+
+ ProxyRequests off
+
+-ProxyPass /cobbler_api
http://localhost:25151/
+-ProxyPassReverse /cobbler_api
http://localhost:25151/
++ProxyPass /cobbler_api
http://127.0.0.1:25151/
++ProxyPassReverse /cobbler_api
http://127.0.0.1:25151/
+
+ BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
+
diff --git a/cobbler.spec b/cobbler.spec
index 0ece1cd..0c59f89 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -13,7 +13,7 @@ Summary: Boot server configurator
Name: cobbler
License: GPLv2+
Version: 2.6.11
-Release: 9.git%{shortcommit0}%{?dist}
+Release: 10.git%{shortcommit0}%{?dist}
#Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{...
Source0:
https://github.com/cobbler/cobbler/archive/%{commit0}.tar.gz#/%{name}-%{v...
# Support centos release numbering
@@ -22,6 +22,9 @@ Patch1: cobbler-centos.patch
# Support django1.7+
#
https://github.com/cobbler/cobbler/issues/1488
Patch2: cobbler-django17.patch
+# Force IPv4 connection to cobblerd
+#
https://github.com/cobbler/cobbler/pull/1679
+Patch3: cobbler-ipv4.patch
Url:
http://cobbler.github.io/
BuildRequires: git
@@ -79,6 +82,7 @@ other applications.
%if 0%{?fedora} >= 22
%patch2 -p1 -b .django17
%endif
+%patch3 -p1 -b .ipv4
%build
%py2_build
@@ -274,6 +278,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY =
\'$RAND_SECRET\'/" /usr/share/cobbler/
%changelog
+* Thu Aug 11 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.6.11-10.gitf78af86
+- Force IPv4 connections to cobblerd from web proxy
+
* Thu Jul 21 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.6.11-9.gitf78af86
- Suppress "virt-install --os-variant list" error messages
--
cgit v1.1
From 2499a9e4cb82c0299f4e916ad3379b009dcff8eb Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Thu, 1 Sep 2016 14:41:15 -0600
Subject: Add patches to fix TEMPLATE_DIRS and use OrderedDict
---
cobbler-OrderedDict.patch | 20 ++++++++++++++++++++
cobbler-template_dirs.patch | 12 ++++++++++++
cobbler.spec | 13 ++++++++++++-
3 files changed, 44 insertions(+), 1 deletion(-)
create mode 100644 cobbler-OrderedDict.patch
create mode 100644 cobbler-template_dirs.patch
diff --git a/cobbler-OrderedDict.patch b/cobbler-OrderedDict.patch
new file mode 100644
index 0000000..8d0ae1b
--- /dev/null
+++ b/cobbler-OrderedDict.patch
@@ -0,0 +1,20 @@
+diff -up
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py.OrderedDict
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py
+---
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py.OrderedDict 2016-09-01
14:36:49.847833319 -0600
++++
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py 2016-09-01
14:37:36.392626911 -0600
+@@ -1,6 +1,6 @@
+ from django import template
+ from django.template import Node, NodeList
+-from django.utils.datastructures import SortedDict
++from collections import OrderedDict
+
+ register = template.Library()
+
+@@ -372,7 +372,7 @@ ifinlist = register.tag(smart_if)
+ @register.filter(name='sort')
+ def listsort(value):
+ if isinstance(value, dict):
+- new_dict = SortedDict()
++ new_dict = OrderedDict()
+ key_list = value.keys()
+ key_list.sort()
+ for key in key_list:
diff --git a/cobbler-template_dirs.patch b/cobbler-template_dirs.patch
new file mode 100644
index 0000000..9b47ea4
--- /dev/null
+++ b/cobbler-template_dirs.patch
@@ -0,0 +1,12 @@
+diff -up cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py.template_dirs
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py
+---
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py.template_dirs 2016-09-01
14:38:20.687435136 -0600
++++ cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py 2016-09-01
14:38:40.997349602 -0600
+@@ -72,7 +72,7 @@ else:
+ ROOT_URLCONF = 'urls'
+
+ TEMPLATE_DIRS = (
+- '/usr/share/cobbler/web/templates',
++ '/usr/share/cobbler/web/cobbler_web/templates',
+ )
+ INSTALLED_APPS = (
+ 'django.contrib.auth',
diff --git a/cobbler.spec b/cobbler.spec
index 0c59f89..39f2fa2 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -13,7 +13,7 @@ Summary: Boot server configurator
Name: cobbler
License: GPLv2+
Version: 2.6.11
-Release: 10.git%{shortcommit0}%{?dist}
+Release: 11.git%{shortcommit0}%{?dist}
#Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{...
Source0:
https://github.com/cobbler/cobbler/archive/%{commit0}.tar.gz#/%{name}-%{v...
# Support centos release numbering
@@ -25,6 +25,12 @@ Patch2: cobbler-django17.patch
# Force IPv4 connection to cobblerd
#
https://github.com/cobbler/cobbler/pull/1679
Patch3: cobbler-ipv4.patch
+# Use OrderedDict
+#
https://github.com/cobbler/cobbler/pull/1686
+Patch4: cobbler-OrderedDict.patch
+# Fix TEMPALATE_DIRS
+#
https://github.com/cobbler/cobbler/pull/1687
+Patch5: cobbler-template_dirs.patch
Url:
http://cobbler.github.io/
BuildRequires: git
@@ -83,6 +89,8 @@ other applications.
%patch2 -p1 -b .django17
%endif
%patch3 -p1 -b .ipv4
+%patch4 -p1 -b .OrderedDict
+%patch5 -p1 -b .template_dirs
%build
%py2_build
@@ -278,6 +286,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY =
\'$RAND_SECRET\'/" /usr/share/cobbler/
%changelog
+* Thu Sep 1 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.6.11-11.gitf78af86
+- Add patches to fix TEMPLATE_DIRS and use OrderedDict
+
* Thu Aug 11 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.6.11-10.gitf78af86
- Force IPv4 connections to cobblerd from web proxy
--
cgit v1.1
From b161a77db5922e6556a8209df558b60d9e7c6926 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Thu, 1 Dec 2016 14:52:44 -0700
Subject: Update to 2.8.0
- Restructure spec file
---
.gitignore | 1 +
cobbler-OrderedDict.patch | 20 -----
cobbler-centos.patch | 14 ----
cobbler-django17.patch | 12 ---
cobbler-ipv4.patch | 14 ----
cobbler-template_dirs.patch | 12 ---
cobbler.spec | 182 ++++++++++++++++++--------------------------
sources | 2 +-
8 files changed, 74 insertions(+), 183 deletions(-)
delete mode 100644 cobbler-OrderedDict.patch
delete mode 100644 cobbler-centos.patch
delete mode 100644 cobbler-django17.patch
delete mode 100644 cobbler-ipv4.patch
delete mode 100644 cobbler-template_dirs.patch
diff --git a/.gitignore b/.gitignore
index 16266bb..d37aca8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ cobbler-2.0.5.tar.gz
/cobbler-2.6.11-95749a6.tar.gz
/cobbler-2.6.11-5680bf8.tar.gz
/cobbler-2.6.11-f78af86.tar.gz
+/cobbler-2.8.0.tar.gz
diff --git a/cobbler-OrderedDict.patch b/cobbler-OrderedDict.patch
deleted file mode 100644
index 8d0ae1b..0000000
--- a/cobbler-OrderedDict.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py.OrderedDict
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py
----
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py.OrderedDict 2016-09-01
14:36:49.847833319 -0600
-+++
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/cobbler_web/templatetags/site.py 2016-09-01
14:37:36.392626911 -0600
-@@ -1,6 +1,6 @@
- from django import template
- from django.template import Node, NodeList
--from django.utils.datastructures import SortedDict
-+from collections import OrderedDict
-
- register = template.Library()
-
-@@ -372,7 +372,7 @@ ifinlist = register.tag(smart_if)
- @register.filter(name='sort')
- def listsort(value):
- if isinstance(value, dict):
-- new_dict = SortedDict()
-+ new_dict = OrderedDict()
- key_list = value.keys()
- key_list.sort()
- for key in key_list:
diff --git a/cobbler-centos.patch b/cobbler-centos.patch
deleted file mode 100644
index d87eef5..0000000
--- a/cobbler-centos.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up cobbler-2.6.8/koan/utils.py.centos cobbler-2.6.8/koan/utils.py
---- cobbler-2.6.8/koan/utils.py.centos 2015-05-08 19:25:57.530993499 -0600
-+++ cobbler-2.6.8/koan/utils.py 2015-05-08 19:27:48.124509895 -0600
-@@ -360,7 +360,9 @@ def os_release():
- tokens = rest.split(" ")
- for t in tokens:
- try:
-- return (make,float(t))
-+ match = re.match('^\d+(?:\.\d+)?', t)
-+ if match:
-+ return (make, float(match.group(0)))
- except ValueError, ve:
- pass
- raise CX("failed to detect local OS version from /etc/redhat-release")
diff --git a/cobbler-django17.patch b/cobbler-django17.patch
deleted file mode 100644
index 48e8fe4..0000000
--- a/cobbler-django17.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up cobbler-2.6.8/web/cobbler.wsgi.django17 cobbler-2.6.8/web/cobbler.wsgi
---- cobbler-2.6.8/web/cobbler.wsgi.django17 2015-05-06 13:36:59.000000000 -0600
-+++ cobbler-2.6.8/web/cobbler.wsgi 2015-05-12 09:25:12.742538892 -0600
-@@ -22,6 +22,6 @@ def application(environ, start_response)
-
site.addsitedir(distutils.sysconfig.get_python_lib(prefix=environ['VIRTUALENV']))
- # Now all modules are available even under a virtualenv
-
-- import django.core.handlers.wsgi
-- _application = django.core.handlers.wsgi.WSGIHandler()
-+ from django.core.wsgi import get_wsgi_application
-+ _application = get_wsgi_application()
- return _application(environ, start_response)
diff --git a/cobbler-ipv4.patch b/cobbler-ipv4.patch
deleted file mode 100644
index ab0914c..0000000
--- a/cobbler-ipv4.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf.ipv4
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf
---- cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf.ipv4 2016-07-21
11:48:46.000000000 -0600
-+++ cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/config/cobbler.conf 2016-08-10
15:52:22.903671504 -0600
-@@ -18,8 +18,8 @@ WSGIScriptAliasMatch ^/cblr/svc/([^/]*)
-
- ProxyRequests off
-
--ProxyPass /cobbler_api
http://localhost:25151/
--ProxyPassReverse /cobbler_api
http://localhost:25151/
-+ProxyPass /cobbler_api
http://127.0.0.1:25151/
-+ProxyPassReverse /cobbler_api
http://127.0.0.1:25151/
-
- BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
-
diff --git a/cobbler-template_dirs.patch b/cobbler-template_dirs.patch
deleted file mode 100644
index 9b47ea4..0000000
--- a/cobbler-template_dirs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py.template_dirs
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py
----
cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py.template_dirs 2016-09-01
14:38:20.687435136 -0600
-+++ cobbler-f78af86a963b099d1e22586b24aedff9062da9c1/web/settings.py 2016-09-01
14:38:40.997349602 -0600
-@@ -72,7 +72,7 @@ else:
- ROOT_URLCONF = 'urls'
-
- TEMPLATE_DIRS = (
-- '/usr/share/cobbler/web/templates',
-+ '/usr/share/cobbler/web/cobbler_web/templates',
- )
- INSTALLED_APPS = (
- 'django.contrib.auth',
diff --git a/cobbler.spec b/cobbler.spec
index 39f2fa2..6c1a006 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -9,29 +9,13 @@
%global commit0 f78af86a963b099d1e22586b24aedff9062da9c1
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
-Summary: Boot server configurator
-Name: cobbler
-License: GPLv2+
-Version: 2.6.11
-Release: 11.git%{shortcommit0}%{?dist}
-#Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{...
-Source0:
https://github.com/cobbler/cobbler/archive/%{commit0}.tar.gz#/%{name}-%{v...
-# Support centos release numbering
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1201879
-Patch1: cobbler-centos.patch
-# Support django1.7+
-#
https://github.com/cobbler/cobbler/issues/1488
-Patch2: cobbler-django17.patch
-# Force IPv4 connection to cobblerd
-#
https://github.com/cobbler/cobbler/pull/1679
-Patch3: cobbler-ipv4.patch
-# Use OrderedDict
-#
https://github.com/cobbler/cobbler/pull/1686
-Patch4: cobbler-OrderedDict.patch
-# Fix TEMPALATE_DIRS
-#
https://github.com/cobbler/cobbler/pull/1687
-Patch5: cobbler-template_dirs.patch
-Url:
http://cobbler.github.io/
+Name: cobbler
+Version: 2.8.0
+Release: 1%{?dist}
+Summary: Boot server configurator
+URL:
http://cobbler.github.io/
+License: GPLv2+
+Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{...
BuildRequires: git
BuildRequires: python2-devel
@@ -55,7 +39,7 @@ Requires: syslinux
%endif
Requires: genisoimage
-%if 0%{?fedora} >= 23
+%if 0%{?fedora}
Requires: dnf-plugins-core
%else
Requires: yum-utils
@@ -81,16 +65,41 @@ mirrors, kickstart templating, integrated yum mirroring, and built-in
DHCP/DNS Management. Cobbler has a XMLRPC API for integration with
other applications.
-%prep
-%setup -q -n %{name}-%{commit0}
-%patch1 -p1 -b .centos
-# django 1.8 on Fedora 22+
-%if 0%{?fedora} >= 22
-%patch2 -p1 -b .django17
+
+%package -n cobbler-web
+Summary: Web interface for Cobbler
+Group: Applications/System
+BuildArch: noarch
+Requires: cobbler
+%if 0%{?fedora} || 0%{?rhel} >= 7
+Requires: python-django
+%else
+Requires: Django >= 1.4
%endif
-%patch3 -p1 -b .ipv4
-%patch4 -p1 -b .OrderedDict
-%patch5 -p1 -b .template_dirs
+Requires: mod_wsgi
+Requires: mod_ssl
+Requires(post): openssl
+
+%description -n cobbler-web
+Web interface for Cobbler that allows visiting
+http://server/cobbler_web to configure the install server.
+
+
+%package -n koan
+Summary: Helper tool that performs cobbler orders on remote machines
+Group: Applications/System
+BuildArch: noarch
+Requires: python-simplejson
+Requires: virt-install
+
+%description -n koan
+Koan stands for kickstart-over-a-network and allows for both
+network installation of new virtualized guests and reinstallation
+of an existing system. For use with a boot-server configured with Cobbler
+
+
+%prep
+%setup -q
%build
%py2_build
@@ -178,114 +187,67 @@ fi
%systemd_postun_with_restart cobblerd.service
%endif
+%post -n cobbler-web
+# Change the SECRET_KEY option in the Django settings.py file
+# required for security reasons, should be unique on all systems
+RAND_SECRET=$(openssl rand -base64 40 | sed 's/\//\\\//g')
+sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/"
/usr/share/cobbler/web/settings.py
+
%files
%license COPYING
-# binaries
+%doc AUTHORS README.md docs/README.openvz docs/README.mysql
+%config(noreplace) %{_sysconfdir}/cobbler
+%config(noreplace) %{_sysconfdir}/logrotate.d/cobblerd
+%config(noreplace) /etc/httpd/conf.d/cobbler.conf
%{_bindir}/cobbler
%{_bindir}/cobbler-ext-nodes
%{_bindir}/cobblerd
%{_sbindir}/tftpd.py
-
-# python
-%{python2_sitelib}/cobbler
+%{_mandir}/man1/cobbler.1*
+%{python2_sitelib}/cobbler/
%{python2_sitelib}/cobbler*.egg-info
-
-# configuration
-%config(noreplace) %{_sysconfdir}/cobbler
-%config(noreplace) %{_sysconfdir}/logrotate.d/cobblerd
-%config(noreplace) /etc/httpd/conf.d/cobbler.conf
%if 0%{?fedora} || 0%{?rhel} >= 7
%{_unitdir}/cobblerd.service
%else
/etc/init.d/cobblerd
%endif
-
-# data
%{tftp_dir}/*
/var/www/cobbler
%config(noreplace) /var/lib/cobbler
%exclude /var/lib/cobbler/webui_sessions
-
-# log
/var/log/cobbler
-# documentation
-%doc AUTHORS README docs/README.openvz docs/README.mysql
-%{_mandir}/man1/cobbler.1.gz
-
-
-%package -n koan
-
-Summary: Helper tool that performs cobbler orders on remote machines
-Group: Applications/System
-BuildArch: noarch
-Requires: python-simplejson
-Requires: virt-install
-
-
-%description -n koan
-Koan stands for kickstart-over-a-network and allows for both
-network installation of new virtualized guests and reinstallation
-of an existing system. For use with a boot-server configured with Cobbler
-
+%files -n cobbler-web
+%license COPYING
+%doc AUTHORS README.md
+%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
+%attr(-,apache,apache) /usr/share/cobbler/web
+%dir %attr(700,apache,root) /var/lib/cobbler/webui_sessions
+%attr(-,apache,apache) /var/www/cobbler_webui_content/
%files -n koan
%license COPYING
-/var/spool/koan
-/var/lib/koan
+%doc AUTHORS README.md
+%{_bindir}/cobbler-register
%{_bindir}/koan
%{_bindir}/ovz-install
-%{_bindir}/cobbler-register
-%{python2_sitelib}/koan
-
+%{_mandir}/man1/koan.1*
+%{_mandir}/man1/cobbler-register.1*
+%{python2_sitelib}/koan/
%exclude %{python2_sitelib}/koan/sub_process.py*
%exclude %{python2_sitelib}/koan/opt_parse.py*
%exclude %{python2_sitelib}/koan/text_wrap.py*
-
-%{_mandir}/man1/koan.1.gz
-%{_mandir}/man1/cobbler-register.1.gz
+/var/lib/koan
/var/log/koan
-%doc AUTHORS README
-
-
-%package -n cobbler-web
-
-Summary: Web interface for Cobbler
-Group: Applications/System
-BuildArch: noarch
-Requires: cobbler
-%if 0%{?fedora} || 0%{?rhel} >= 7
-Requires: python-django
-%else
-Requires: Django >= 1.4
-%endif
-Requires: mod_wsgi
-Requires: mod_ssl
-Requires(post): openssl
-
-
-%description -n cobbler-web
-Web interface for Cobbler that allows visiting
-http://server/cobbler_web to configure the install server.
-
-
-%post -n cobbler-web
-# Change the SECRET_KEY option in the Django settings.py file
-# required for security reasons, should be unique on all systems
-RAND_SECRET=$(openssl rand -base64 40 | sed 's/\//\\\//g')
-sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/"
/usr/share/cobbler/web/settings.py
-
-%files -n cobbler-web
-%license COPYING
-%doc AUTHORS README
-%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
-%attr(-,apache,apache) /usr/share/cobbler/web
-%dir %attr(700,apache,root) /var/lib/cobbler/webui_sessions
-%attr(-,apache,apache) /var/www/cobbler_webui_content/
+/var/spool/koan
%changelog
+* Thu Dec 1 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-1
+- Update to 2.8.0
+- Restructure spec file
+
* Thu Sep 1 2016 Orion Poplawski <orion(a)cora.nwra.com> - 2.6.11-11.gitf78af86
- Add patches to fix TEMPLATE_DIRS and use OrderedDict
diff --git a/sources b/sources
index 4f7d1c8..9f5af69 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9d049a2cba74d8a18a80c38743cb916b cobbler-2.6.11-f78af86.tar.gz
+795a2fd3a22262f8eec629210cf38495 cobbler-2.8.0.tar.gz
--
cgit v1.1
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
From 7e4242dd5317f8b06260f4a16650901f2e4be78e Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Tue, 24 Jan 2017 15:21:48 -0700
Subject: Bump release
---
cobbler.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cobbler.spec b/cobbler.spec
index 52dc2e3..ae47e7d 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -11,7 +11,7 @@
Name: cobbler
Version: 2.8.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Boot server configurator
URL:
http://cobbler.github.io/
License: GPLv2+
--
cgit v1.1
From 3159220b2ab0924152b81b8d35e7d19ef7ec8cf9 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Thu, 26 Jan 2017 16:39:26 -0700
Subject: Restart named-chroot service if used
---
cobbler-named.patch | 37 +++++++++++++++++++++++++++++++++++++
cobbler.spec | 9 ++++++++-
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 cobbler-named.patch
diff --git a/cobbler-named.patch b/cobbler-named.patch
new file mode 100644
index 0000000..327fb70
--- /dev/null
+++ b/cobbler-named.patch
@@ -0,0 +1,37 @@
+diff -up cobbler-2.8.0/cobbler/utils.py.named cobbler-2.8.0/cobbler/utils.py
+--- cobbler-2.8.0/cobbler/utils.py.named 2016-11-16 12:09:20.000000000 -0700
++++ cobbler-2.8.0/cobbler/utils.py 2017-01-24 16:54:37.617706855 -0700
+@@ -236,6 +236,16 @@ def is_mac(strdata):
+ return False
+ return bool(_re_is_mac.match(strdata) or _re_is_ibmac.match(strdata))
+
++
++def is_systemd():
++ """
++ Return whether or not this system uses systemd
++ """
++ if os.path.exists("/usr/lib/systemd/systemd"):
++ return True
++ return False
++
++
+ def get_random_mac(api_handle,virt_type="xenpv"):
+ """
+ Generate a random MAC address.
+@@ -2251,11 +2261,15 @@ def dhcp_service_name(api):
+ else:
+ return "dhcpd"
+
+-def named_service_name(api):
++def named_service_name(api, logger=None):
+ (dist, ver) = api.os_version
+ if dist == "debian" or dist == "ubuntu":
+ return "bind9"
+ else:
++ if is_systemd():
++ rc = subprocess_call(logger, "/usr/bin/systemctl is-active
named-chroot", shell=False)
++ if rc == 0:
++ return "named-chroot"
+ return "named"
+
+ def link_distro(settings, distro):
diff --git a/cobbler.spec b/cobbler.spec
index ae47e7d..f0e0307 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -11,7 +11,7 @@
Name: cobbler
Version: 2.8.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Boot server configurator
URL:
http://cobbler.github.io/
License: GPLv2+
@@ -19,6 +19,9 @@ Source0:
https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%
# Make logrotate work with systemd
#
https://github.com/cobbler/cobbler/issues/1745
Patch0: cobbler-logrotate.patch
+# Handle named-chroot service
+#
https://github.com/cobbler/cobbler/pull/1748
+Patch1: cobbler-named.patch
BuildRequires: git
BuildRequires: python2-devel
@@ -104,6 +107,7 @@ of an existing system. For use with a boot-server configured with
Cobbler
%prep
%setup -q
%patch0 -p1 -b .logrotate
+%patch1 -p1 -b .named
%build
%py2_build
@@ -248,6 +252,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY =
\'$RAND_SECRET\'/" /usr/share/cobbler/
%changelog
+* Tue Jan 24 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-3
+- Restart named-chroot service if used
+
* Fri Jan 20 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-2
- Fix logrotate script for systemd (bug #1414617)
--
cgit v1.1
From 0324c0ceeb33d2531bf8c2f2c212f7e9ddfc2168 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion(a)cora.nwra.com>
Date: Fri, 27 Jan 2017 09:32:33 -0700
Subject: Fix named patch
---
cobbler-named.patch | 4 ++--
cobbler.spec | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/cobbler-named.patch b/cobbler-named.patch
index 327fb70..be58478 100644
--- a/cobbler-named.patch
+++ b/cobbler-named.patch
@@ -1,6 +1,6 @@
diff -up cobbler-2.8.0/cobbler/utils.py.named cobbler-2.8.0/cobbler/utils.py
--- cobbler-2.8.0/cobbler/utils.py.named 2016-11-16 12:09:20.000000000 -0700
-+++ cobbler-2.8.0/cobbler/utils.py 2017-01-24 16:54:37.617706855 -0700
++++ cobbler-2.8.0/cobbler/utils.py 2017-01-27 09:30:02.085566171 -0700
@@ -236,6 +236,16 @@ def is_mac(strdata):
return False
return bool(_re_is_mac.match(strdata) or _re_is_ibmac.match(strdata))
@@ -29,7 +29,7 @@ diff -up cobbler-2.8.0/cobbler/utils.py.named
cobbler-2.8.0/cobbler/utils.py
return "bind9"
else:
+ if is_systemd():
-+ rc = subprocess_call(logger, "/usr/bin/systemctl is-active
named-chroot", shell=False)
++ rc = subprocess_call(logger,
["/usr/bin/systemctl","is-active","named-chroot"],
shell=False)
+ if rc == 0:
+ return "named-chroot"
return "named"
diff --git a/cobbler.spec b/cobbler.spec
index f0e0307..fb05b47 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -11,7 +11,7 @@
Name: cobbler
Version: 2.8.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Boot server configurator
URL:
http://cobbler.github.io/
License: GPLv2+
@@ -252,6 +252,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY =
\'$RAND_SECRET\'/" /usr/share/cobbler/
%changelog
+* Fri Jan 27 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-4
+- Fix named patch
+
* Tue Jan 24 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.8.0-3
- Restart named-chroot service if used
--
cgit v1.1
https://src.fedoraproject.org/cgit/cobbler.git/commit/?h=epel7&id=c20...