From 41c2a598177a1d3eeaf3970b6744b9dacbfee79d Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 3 Apr 2013 20:50:02 -0500 Subject: [PATCH 01/21] New upstream release - 2.4.0-beta4 Conflicts: cobbler.spec --- cobbler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cobbler.spec b/cobbler.spec index f7c62fc..88a207c 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -8,7 +8,7 @@ Name: cobbler License: GPLv2+ AutoReq: no Version: 2.4.0 -Release: beta3%{?dist}.2 +Release: beta4%{?dist} Source0: http://shenson.fedorapeople.org/cobbler/cobbler-%{version}.tar.gz # Make httpd configuration compatible with Apache 2.2/2.4 @@ -342,6 +342,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ /var/www/cobbler_webui_content/ %changelog +* Wed Apr 03 2013 James Cammarata 2.4.0-beta4 +- 2.4.0-beta4 release + * Wed Feb 13 2013 Fedora Release Engineering - 2.4.0-beta3.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 9ca878626b358534d1da8b142e1a8bb2d973e854 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 22 Apr 2013 10:34:35 -0500 Subject: [PATCH 02/21] New upstream release, 2.4.0-beta5 --- cobbler.spec | 22 +++++----------------- sources | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 88a207c..8248985 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -8,12 +8,8 @@ Name: cobbler License: GPLv2+ AutoReq: no Version: 2.4.0 -Release: beta4%{?dist} +Release: beta5%{?dist} Source0: http://shenson.fedorapeople.org/cobbler/cobbler-%{version}.tar.gz - -# Make httpd configuration compatible with Apache 2.2/2.4 -Patch0: %{name}-httpd24.patch - Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch @@ -77,9 +73,6 @@ other applications. %prep %setup -q -%patch0 -p1 -b .httpd24 - - %build %{__python} setup.py build @@ -336,22 +329,17 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %doc AUTHORS COPYING CHANGELOG README %config(noreplace) /etc/httpd/conf.d/cobbler_web.conf %defattr(-,apache,apache,-) -%dir /usr/share/cobbler /usr/share/cobbler/web %dir %attr(700,apache,root) /var/lib/cobbler/webui_sessions /var/www/cobbler_webui_content/ %changelog +* Mon Apr 22 2013 James Cammarata 2.4.0-beta5 +- A few bugfixes and rebuilding the RPM because of a goof + (jimi@sngx.net) + * Wed Apr 03 2013 James Cammarata 2.4.0-beta4 - 2.4.0-beta4 release - -* Wed Feb 13 2013 Fedora Release Engineering - 2.4.0-beta3.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Jan 8 2013 Remi Collet 2.4.0-beta3.1 -- fix configuration for httpd 2.4, #871383 -- own /usr/share/cobbler - * Wed Dec 12 2012 James Cammarata 2.4.0-beta3 - New release 2.4.0-beta3 * Thu Oct 11 2012 James Cammarata 2.4.0-beta2 diff --git a/sources b/sources index 4183bb4..4896a9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ec541e4c6af4603f86cde141f380f96e cobbler-2.4.0.tar.gz +ede78f714ddf22e54593512c4b25dabc cobbler-2.4.0.tar.gz From a0f637a834a2f82680bb239844c77fb75fea9fee Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 9 May 2013 20:34:23 -0400 Subject: [PATCH 03/21] python-virtinst is no more, require virt-install (bz #958489) --- cobbler.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 8248985..a091f86 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -8,7 +8,7 @@ Name: cobbler License: GPLv2+ AutoReq: no Version: 2.4.0 -Release: beta5%{?dist} +Release: beta5%{?dist}.1 Source0: http://shenson.fedorapeople.org/cobbler/cobbler-%{version}.tar.gz Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -270,7 +270,7 @@ Requires: python >= 2.0 %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 Requires: python(abi) >= %{pyver} Requires: python-simplejson -Requires: python-virtinst +Requires: virt-install %endif @@ -334,6 +334,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ /var/www/cobbler_webui_content/ %changelog +* Thu May 09 2013 Cole Robinson 2.4.0-beta5.1 +- python-virtinst is no more, require virt-install (bz 958489) + * Mon Apr 22 2013 James Cammarata 2.4.0-beta5 - A few bugfixes and rebuilding the RPM because of a goof (jimi@sngx.net) From 7150fb718ea9678464e9075c1742fc4f5558f503 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 24 May 2013 16:11:24 -0500 Subject: [PATCH 04/21] New upstream release: 2.4.0-beta6 Conflicts: cobbler.spec --- cobbler.spec | 11 ++++++----- sources | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 8248985..7725f90 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -8,12 +8,12 @@ Name: cobbler License: GPLv2+ AutoReq: no Version: 2.4.0 -Release: beta5%{?dist} +Release: beta6%{?dist} Source0: http://shenson.fedorapeople.org/cobbler/cobbler-%{version}.tar.gz Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch -Url: http://cobbler.github.com/ +Url: http://www.cobblerd.org/ BuildRequires: redhat-rpm-config BuildRequires: git @@ -25,13 +25,13 @@ Requires: httpd Requires: tftp-server Requires: mod_wsgi Requires: createrepo -Requires: python-augeas Requires: python-cheetah Requires: python-netaddr Requires: python-simplejson Requires: python-urlgrabber Requires: PyYAML Requires: rsync +Requires: syslinux %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 Requires: python(abi) >= %{pyver} @@ -258,8 +258,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT /tftpboot/images %endif -/usr/share/augeas/lenses/cobblersettings.aug - %doc AUTHORS CHANGELOG README COPYING %package -n koan @@ -334,6 +332,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ /var/www/cobbler_webui_content/ %changelog +* Fri May 24 2013 James Cammarata 2.4.0-beta6 +- New BETA release - 2.4.0 beta6 + * Mon Apr 22 2013 James Cammarata 2.4.0-beta5 - A few bugfixes and rebuilding the RPM because of a goof (jimi@sngx.net) diff --git a/sources b/sources index 4896a9f..76a9381 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ede78f714ddf22e54593512c4b25dabc cobbler-2.4.0.tar.gz +8412d444850bd84cd9123749698b403e cobbler-2.4.0.tar.gz From e8cedda572baf48784b5e32a38fb2c03e41e6481 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 20 Jun 2013 00:48:31 -0500 Subject: [PATCH 05/21] New upstream release: 2.4.0-1 --- cobbler.spec | 5 +++-- sources | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 815b6a4..22caa51 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -8,7 +8,7 @@ Name: cobbler License: GPLv2+ AutoReq: no Version: 2.4.0 -Release: beta6%{?dist} +Release: 1%{?dist} Source0: http://shenson.fedorapeople.org/cobbler/cobbler-%{version}.tar.gz Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -332,9 +332,10 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ /var/www/cobbler_webui_content/ %changelog +* Thu Jun 20 2013 James Cammarata 2.4.0-1 +- Release 2.4.0-1 (jimi@sngx.net) * Fri May 24 2013 James Cammarata 2.4.0-beta6 - New BETA release - 2.4.0 beta6 - * Mon Apr 22 2013 James Cammarata 2.4.0-beta5 - A few bugfixes and rebuilding the RPM because of a goof (jimi@sngx.net) diff --git a/sources b/sources index 76a9381..4012368 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8412d444850bd84cd9123749698b403e cobbler-2.4.0.tar.gz +de66765e71d8d64d179b762fae1c9096 cobbler-2.4.0.tar.gz From 874e5f4d4f97cff4d0ee58773bfe1c80d374a9ce Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 22 Apr 2014 09:22:00 -0600 Subject: [PATCH 06/21] Update to 2.4.4 - Drop koan patch applied upstream --- .gitignore | 1 + cobbler-httpd24.patch | 45 ------------------------------------------- cobbler-koan.patch | 21 -------------------- cobbler.spec | 11 +++++------ sources | 2 +- 5 files changed, 7 insertions(+), 73 deletions(-) delete mode 100644 cobbler-httpd24.patch delete mode 100644 cobbler-koan.patch diff --git a/.gitignore b/.gitignore index dc7dd36..5309a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ cobbler-2.0.5.tar.gz /cobbler-2.2.3.tar.gz /cobbler-2.4.0.tar.gz /cobbler-2.4.3.tar.gz +/cobbler-2.4.4.tar.gz diff --git a/cobbler-httpd24.patch b/cobbler-httpd24.patch deleted file mode 100644 index 7528b96..0000000 --- a/cobbler-httpd24.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up cobbler-2.4.0/config/cobbler.conf.httpd24 cobbler-2.4.0/config/cobbler.conf ---- cobbler-2.4.0/config/cobbler.conf.httpd24 2013-01-08 10:22:56.000000000 +0100 -+++ cobbler-2.4.0/config/cobbler.conf 2013-01-08 10:25:00.000000000 +0100 -@@ -11,8 +11,6 @@ WSGIScriptAliasMatch ^/cblr/svc/([^/]*) - - - Options Indexes FollowSymLinks -- Order allow,deny -- Allow from all - - - ProxyRequests off -@@ -22,13 +20,3 @@ ProxyPassReverse /cobbler_api http://loc - - BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On - --# the webui is now part of the "cobbler-web" package --# and is visited at http://.../cobbler_web not this URL. --# this is only a pointer to the new page. -- -- -- Options Indexes FollowSymLinks -- Order allow,deny -- Allow from all -- -- -diff -up cobbler-2.4.0/config/cobbler_web.conf.httpd24 cobbler-2.4.0/config/cobbler_web.conf ---- cobbler-2.4.0/config/cobbler_web.conf.httpd24 2013-01-08 10:23:22.000000000 +0100 -+++ cobbler-2.4.0/config/cobbler_web.conf 2013-01-08 10:23:25.000000000 +0100 -@@ -8,3 +8,15 @@ RewriteCond %{REQUEST_URI} ^/cobbler_web - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} - - WSGIScriptAlias /cobbler_web /usr/share/cobbler/web/cobbler.wsgi -+ -+ -+ -+ # Apache 2.4 -+ Require all granted -+ -+ -+ Order allow,deny -+ Allow from all -+ -+ -+ diff --git a/cobbler-koan.patch b/cobbler-koan.patch deleted file mode 100644 index e8f1a26..0000000 --- a/cobbler-koan.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 4d9b1fe2b9d8442525abd9862d6ae4e57f758ace -Author: Orion Poplawski -Date: Mon Apr 21 11:37:53 2014 -0600 - - Fix koan's get_insert_script() - - See https://bugzilla.redhat.com/show_bug.cgi?id=1047350 - -diff --git a/koan/app.py b/koan/app.py -index e0a49dd..195eece 100755 ---- a/koan/app.py -+++ b/koan/app.py -@@ -1195,7 +1195,7 @@ class Koan: - find . | cpio -o -H newc | gzip -9 > ../initrd_final - echo "...done" - fi -- """ % initrd -+ """ % (initrd, initrd) - - #--------------------------------------------------- - diff --git a/cobbler.spec b/cobbler.spec index 186ffd5..41bf449 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -10,13 +10,9 @@ Summary: Boot server configurator Name: cobbler License: GPLv2+ AutoReq: no -Version: 2.4.3 +Version: 2.4.4 Release: 1%{?dist} Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -# Fix koan's get_insert_script() -# https://github.com/cobbler/cobbler/pull/866 -# https://bugzilla.redhat.com/show_bug.cgi?id=1047350 -Patch0: cobbler-koan.patch Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch @@ -74,7 +70,6 @@ other applications. %prep %setup -q -%patch0 -p1 %build %{__python2} setup.py build @@ -302,6 +297,10 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %attr(-,apache,apache) /var/www/cobbler_webui_content/ %changelog +* Tue Apr 22 2014 Orion Poplawski - 2.4.4-1 +- Update to 2.4.4 +- Drop koan patch applied upstream + * Mon Apr 21 2014 Orion Poplawski - 2.4.3-1 - Update to 2.4.3 - Add patch to fix bug #1047350 diff --git a/sources b/sources index 95ce27f..299bb2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fea66884216cb3851d138118ae0c4c62 cobbler-2.4.3.tar.gz +3fb19873d5d408341ecea489c6f8c276 cobbler-2.4.4.tar.gz From 40cda21513ea2a748f7c119b4c807ce2663ae7d7 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 22 Jun 2015 12:03:55 -0600 Subject: [PATCH 07/21] Cleanup changelog --- cobbler.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 7076295..54167d9 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -287,12 +287,6 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ * Mon Jun 22 2015 Orion Poplawski - 2.6.9-1 - Update to 2.6.9 -* Wed Jun 17 2015 Fedora Release Engineering - 2.6.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue May 12 2015 Orion Poplawski - 2.6.8-2 -- Support django 1.8 in Fedora 22+ - * Fri May 8 2015 Orion Poplawski - 2.6.8-1 - Update to 2.6.8 - Backport upstream patch to fix centos version detection (bug #1201879) From a48483fe26eb05215341316c85424979b25bb961 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 21 Jul 2016 11:22:48 -0600 Subject: [PATCH 08/21] Clean changelog --- cobbler.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 651bcff..b3d6322 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -277,9 +277,6 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ * Thu Jul 21 2016 Orion Poplawski - 2.6.11-8.git5680bf8 - Fix handling unknown os variants with osinfo-query -* Tue Jul 19 2016 Fedora Release Engineering - 2.6.11-7.git95749a6 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - * Wed Jul 13 2016 Orion Poplawski - 2.6.11-6.git95749a6 - Fix typo in koan/app.py From 64e0c05fd4200c2b85c4d68e6be2bbf536133169 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 21 Jun 2017 11:46:25 -0600 Subject: [PATCH 09/21] Suppress logrotate output --- 1804.patch | 23 +++++++++++++++++++++++ cobbler.spec | 10 +++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 1804.patch diff --git a/1804.patch b/1804.patch new file mode 100644 index 0000000..95fe1d2 --- /dev/null +++ b/1804.patch @@ -0,0 +1,23 @@ +From 6759cc1b1834eb6b50b6a3c583fc531d8452eaf0 Mon Sep 17 00:00:00 2001 +From: Orion Poplawski +Date: Wed, 21 Jun 2017 11:41:45 -0600 +Subject: [PATCH] Suppress "edirecting to /bin/systemctl condrestart + cobblerd.service" messages from logrotate on systemd systems + +--- + config/cobblerd_rotate | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/cobblerd_rotate b/config/cobblerd_rotate +index 2224f6600..17cb10e17 100644 +--- a/config/cobblerd_rotate ++++ b/config/cobblerd_rotate +@@ -4,7 +4,7 @@ + rotate 4 + weekly + postrotate +- /sbin/service cobblerd condrestart > /dev/null ++ /sbin/service cobblerd condrestart > /dev/null 2>&1 + endscript + } + diff --git a/cobbler.spec b/cobbler.spec index 50b02b0..c8a14b3 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -11,13 +11,15 @@ Name: cobbler Version: 2.8.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # Upstream patch to fix module loading Patch0: https://github.com/cobbler/cobbler/commit/0f5330c9cd9250450bb04b680aadc6e142fc19d1.patch +# Suppress logrotate output +Patch1: https://patch-diff.githubusercontent.com/raw/cobbler/cobbler/pull/1804.patch BuildRequires: git BuildRequires: python2-devel @@ -101,8 +103,7 @@ of an existing system. For use with a boot-server configured with Cobbler %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build %py2_build @@ -247,6 +248,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Wed Jun 21 2017 Orion Poplawski - 2.8.1-3 +- Suppress logrotate output + * Mon Jun 12 2017 Orion Poplawski - 2.8.1-2 - Fix module loading From 708c34790c770c1c33495ecc28c115258e4cc25d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 28 May 2018 12:44:38 +0200 Subject: [PATCH 10/21] Squashed commit of the following: commit a340d23ce3ac25f678f0d7a9ee165cbc2c0bc687 Author: Orion Poplawski Date: Wed Feb 21 16:47:14 2018 -0700 Really fix django requires for Fedora 28+ commit ed3dc22bcaa45eddd569990aba7eefa1ca9300a6 Author: Nicolas Chauvet Date: Mon May 28 12:17:42 2018 +0200 Update to 2.8.3 security bugfix commit e7675c9ffa0021f358050c30cee2745b600e42f2 Author: Orion Poplawski Date: Tue Feb 20 14:32:47 2018 -0700 Fix django requires for Fedora 28+ commit 382b85b7b9321b7ad9936a9f7693b5efa76bd81d Author: Igor Gnatenko Date: Fri Feb 9 09:04:14 2018 +0100 Escape macros in %changelog Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/ Signed-off-by: Igor Gnatenko commit 7d7612ed31c66f53ddb1a0059a93c7dc45896765 Author: Fedora Release Engineering Date: Wed Feb 7 05:17:15 2018 +0000 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering commit 7c672d424e00e4a663c6e97ef19bd304b6e5b64e Author: Iryna Shcherbina Date: Tue Feb 6 22:36:11 2018 +0100 Update Python 2 dependency declarations to new packaging standards --- .gitignore | 1 + cobbler.spec | 59 ++++++++++++++++++++++++++++++++++------------------ sources | 2 +- 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index a72cbbf..e5d9c17 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ cobbler-2.0.5.tar.gz /cobbler-2.8.0.tar.gz /cobbler-2.8.1.tar.gz /cobbler-2.8.2.tar.gz +/cobbler-2.8.3.tar.gz diff --git a/cobbler.spec b/cobbler.spec index 0d38792..f12c32a 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -10,7 +10,7 @@ %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: cobbler -Version: 2.8.2 +Version: 2.8.3 Release: 1%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ @@ -19,19 +19,19 @@ Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/% BuildRequires: git BuildRequires: python2-devel -BuildRequires: PyYAML -BuildRequires: python-cheetah -BuildRequires: python-setuptools +BuildRequires: python2-pyyaml +BuildRequires: python2-cheetah +BuildRequires: python2-setuptools Requires: httpd Requires: tftp-server -Requires: mod_wsgi +Requires: python2-mod_wsgi Requires: createrepo -Requires: python-cheetah -Requires: python-netaddr -Requires: python-simplejson -Requires: python-urlgrabber -Requires: PyYAML +Requires: python2-cheetah +Requires: python2-netaddr +Requires: python2-simplejson +Requires: python2-urlgrabber +Requires: python2-pyyaml Requires: rsync # syslinux is only available on x86 %ifarch %{ix86} x86_64 @@ -71,12 +71,12 @@ Summary: Web interface for Cobbler Group: Applications/System BuildArch: noarch Requires: cobbler -%if 0%{?fedora} || 0%{?rhel} >= 7 -Requires: python-django +%if 0%{?fedora} >= 28 +Requires: python2-django1.11 %else -Requires: Django >= 1.4 +Requires: python2-django %endif -Requires: mod_wsgi +Requires: python2-mod_wsgi Requires: mod_ssl Requires(post): openssl @@ -89,7 +89,7 @@ http://server/cobbler_web to configure the install server. Summary: Helper tool that performs cobbler orders on remote machines Group: Applications/System BuildArch: noarch -Requires: python-simplejson +Requires: python2-simplejson Requires: virt-install %description -n koan @@ -244,6 +244,25 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Mon May 28 2018 Nicolas Chauvet - 2.8.3-1 +- Update to 2.8.3 - security bugfix + +* Wed Feb 21 2018 Orion Poplawski - 2.8.2-6 +- Really fix django requires for Fedora 28+ + +* Tue Feb 20 2018 Orion Poplawski - 2.8.2-5 +- Fix django requires for Fedora 28+ + +* Fri Feb 09 2018 Igor Gnatenko - 2.8.2-4 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 2.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Feb 06 2018 Iryna Shcherbina - 2.8.2-2 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + * Mon Sep 18 2017 Orion Poplawski - 2.8.2-1 - Update to 2.8.2 @@ -840,7 +859,7 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ by Simon Woolsgrove (jorgen.maas@gmail.com) - Fix for koan, where vmwcreate.py was not updated to accept the network type, causing failures. (jimi@sngx.net) -- Added a %post section for the cobbler-web package, which replaces the +- Added a %%post section for the cobbler-web package, which replaces the SECRET_KEY field in the Django settings.py with a random string (jimi@sngx.net) - BUGFIX: added sign_puppet_certs_automatically to settings.py. The fact that @@ -1187,7 +1206,7 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ (gregswift@gmail.com) - New cleanup at the top negates the need for this table entry (gregswift@gmail.com) -- Removed the body height to 99%. Was doing this for sticky footer, but +- Removed the body height to 99%%. Was doing this for sticky footer, but current path says its not needed (gregswift@gmail.com) - Added some windows and mac default fonts Made the body relative, supposed to help with the layout Set text color to slightly off black.. was told there is @@ -1598,8 +1617,8 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ - Move kickstart_done and kickstart_start out of kickgen.py and into their own snippets. This also adds support for VMware ESX triggers and magic urls by checking for the "vmware" breed and then using curl when that's all thats - available vs wget. VMware's installer makes wget available during the %pre - section but only curl is around following install at %post time. Yay! I've + available vs wget. VMware's installer makes wget available during the %%pre + section but only curl is around following install at %%post time. Yay! I've also updated the sample kickstarts to use $SNIPPET('kickstart_done') and $SNIPPET('kickstart_start') (jonathan.sabo@gmail.com) - No more getting confused between otype and obj_type (shenson@redhat.com) @@ -1712,7 +1731,7 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ - When adding in distros/profiles from disk don't bomb out if missing kernel or ramdisk. just don't add it. (bpeck@redhat.com) - add X log to anamon tracking as well. (bpeck@redhat.com) -- Added new remote method clear_logs. Clearing console and anamon logs in %pre +- Added new remote method clear_logs. Clearing console and anamon logs in %%pre is too late if the install never happens. (bpeck@redhat.com) - fixes /var/www/cobbler/svc/services.py to canonicalize the uri before parsing it. This fixes a regression with mod_wsgi enabled and trying to provision a diff --git a/sources b/sources index e8f67cf..24439e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cobbler-2.8.2.tar.gz) = 44497fa47d51c5f472aac8c6e670d01c7299741e04679d6f82653febe6ef47567e646017b0e188ad0e31347ef804a8bc32704b55fdd44dfbd74e1d7d4983f01c +SHA512 (cobbler-2.8.3.tar.gz) = c83656bad9b1b1982b22cf4e370f3fbf4b90b20c932e2ef494c00acfb7365045ce756ec7857c8b707764ca70bcefa6d2c415297b640cec52e2b92ae8fd32d4ff From 741c25f506ca894569f4584de71ed979d594ea0a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 28 May 2018 14:33:17 +0200 Subject: [PATCH 11/21] Squashed commit of the following: commit 61179e935d5ce5dc4ca3bb255370ad6be18df13c Author: Nicolas Chauvet Date: Mon May 28 14:18:15 2018 +0200 Update changelog commit 38dd02fc84f0b665866640fd802f90e88e055378 Author: Nicolas Chauvet Date: Mon May 28 14:17:16 2018 +0200 Restore mergeability with epel7 commit a340d23ce3ac25f678f0d7a9ee165cbc2c0bc687 Author: Orion Poplawski Date: Wed Feb 21 16:47:14 2018 -0700 Really fix django requires for Fedora 28+ commit ed3dc22bcaa45eddd569990aba7eefa1ca9300a6 Author: Nicolas Chauvet Date: Mon May 28 12:17:42 2018 +0200 Update to 2.8.3 security bugfix commit e7675c9ffa0021f358050c30cee2745b600e42f2 Author: Orion Poplawski Date: Tue Feb 20 14:32:47 2018 -0700 Fix django requires for Fedora 28+ commit 382b85b7b9321b7ad9936a9f7693b5efa76bd81d Author: Igor Gnatenko Date: Fri Feb 9 09:04:14 2018 +0100 Escape macros in %changelog Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/ Signed-off-by: Igor Gnatenko commit 7d7612ed31c66f53ddb1a0059a93c7dc45896765 Author: Fedora Release Engineering Date: Wed Feb 7 05:17:15 2018 +0000 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering commit 7c672d424e00e4a663c6e97ef19bd304b6e5b64e Author: Iryna Shcherbina Date: Tue Feb 6 22:36:11 2018 +0100 Update Python 2 dependency declarations to new packaging standards --- cobbler.spec | 53 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index f12c32a..c8280ce 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -11,7 +11,7 @@ Name: cobbler Version: 2.8.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -19,20 +19,35 @@ Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/% BuildRequires: git BuildRequires: python2-devel +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 BuildRequires: python2-pyyaml BuildRequires: python2-cheetah BuildRequires: python2-setuptools +%else +BuildRequires: PyYAML +BuildRequires: python-cheetah +BuildRequires: python-setuptools +%endif Requires: httpd Requires: tftp-server -Requires: python2-mod_wsgi Requires: createrepo +Requires: rsync +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +Requires: python2-mod_wsgi Requires: python2-cheetah Requires: python2-netaddr Requires: python2-simplejson Requires: python2-urlgrabber Requires: python2-pyyaml -Requires: rsync +%else +Requires: mod_wsgi +Requires: python-cheetah +Requires: python-netaddr +Requires: python-simplejson +Requires: python-urlgrabber +Requires: PyYAML +%endif # syslinux is only available on x86 %ifarch %{ix86} x86_64 Requires: syslinux @@ -71,12 +86,13 @@ Summary: Web interface for Cobbler Group: Applications/System BuildArch: noarch Requires: cobbler -%if 0%{?fedora} >= 28 +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 Requires: python2-django1.11 -%else -Requires: python2-django -%endif Requires: python2-mod_wsgi +%else +Requires: Django > 1.6 +Requires: mod_wsgi +%endif Requires: mod_ssl Requires(post): openssl @@ -89,7 +105,11 @@ http://server/cobbler_web to configure the install server. Summary: Helper tool that performs cobbler orders on remote machines Group: Applications/System BuildArch: noarch +%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 Requires: python2-simplejson +%else +Requires: python-simplejson +%endif Requires: virt-install %description -n koan @@ -244,6 +264,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Mon May 28 2018 Nicolas Chauvet - 2.8.3-2 +- Restore mergeability with epel7 + * Mon May 28 2018 Nicolas Chauvet - 2.8.3-1 - Update to 2.8.3 - security bugfix @@ -266,6 +289,22 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ * Mon Sep 18 2017 Orion Poplawski - 2.8.2-1 - Update to 2.8.2 +* Tue Feb 20 2018 Orion Poplawski - 2.8.2-5 +- Fix django requires for Fedora 28+ + +* Fri Feb 09 2018 Igor Gnatenko - 2.8.2-4 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 2.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Feb 06 2018 Iryna Shcherbina - 2.8.2-2 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Mon Sep 18 2017 Orion Poplawski - 2.8.2-1 +- Update to 2.8.2 + * Wed Jun 21 2017 Orion Poplawski - 2.8.1-3 - Suppress logrotate output From 14f10e29ceba88b8963f680359d905b31db08d6e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 28 May 2018 14:39:37 +0200 Subject: [PATCH 12/21] Fix merge for epel7 --- cobbler.spec | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index c8280ce..b1fe96d 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -289,22 +289,6 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ * Mon Sep 18 2017 Orion Poplawski - 2.8.2-1 - Update to 2.8.2 -* Tue Feb 20 2018 Orion Poplawski - 2.8.2-5 -- Fix django requires for Fedora 28+ - -* Fri Feb 09 2018 Igor Gnatenko - 2.8.2-4 -- Escape macros in %%changelog - -* Wed Feb 07 2018 Fedora Release Engineering - 2.8.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Feb 06 2018 Iryna Shcherbina - 2.8.2-2 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Mon Sep 18 2017 Orion Poplawski - 2.8.2-1 -- Update to 2.8.2 - * Wed Jun 21 2017 Orion Poplawski - 2.8.1-3 - Suppress logrotate output From cc56685952dd5ff8471fbd0ad98ae5c1f64d21b8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 10 Oct 2019 18:22:53 -0600 Subject: [PATCH 13/21] Require /sbin/service --- cobbler.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cobbler.spec b/cobbler.spec index df1242e..0ed81b3 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,7 +7,7 @@ Name: cobbler Version: 2.8.5 -Release: 0.1%{?dist} +Release: 0.2%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -52,6 +52,8 @@ Requires: dnf-plugins-core %else Requires: yum-utils %endif +# https://github.com/cobbler/cobbler/issues/1685 +Requires: /sbin/service %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: systemd Requires(post): systemd @@ -109,6 +111,7 @@ Requires: python2-urlgrabber Requires: python-ethtool Requires: python-urlgrabber %endif +Requires: /sbin/service Requires: virt-install %description -n koan @@ -264,6 +267,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Thu Oct 10 2019 Orion Poplawski - 2.8.5-0.2 +- Require /sbin/service + * Mon Aug 26 2019 Nicolas Chauvet - 2.8.5-0.1 - Update to 2.8.5 - pre-release From b3db39dbee5501ac3c886e46e669be180f6da381 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 14 Oct 2019 19:53:47 -0600 Subject: [PATCH 14/21] Require python2-iptables --- cobbler.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 0ed81b3..a7ff0a3 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,7 +7,7 @@ Name: cobbler Version: 2.8.5 -Release: 0.2%{?dist} +Release: 0.3%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -18,7 +18,7 @@ BuildRequires: /usr/bin/pathfix.py BuildRequires: python2-devel BuildRequires: python2-pyyaml BuildRequires: python2-setuptools -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: python2-cheetah %else BuildRequires: python-cheetah @@ -30,7 +30,7 @@ Requires: createrepo Requires: rsync Requires: python2-simplejson Requires: python2-pyyaml -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-mod_wsgi Requires: python2-cheetah Requires: python2-netaddr @@ -80,13 +80,15 @@ other applications. Summary: Web interface for Cobbler BuildArch: noarch Requires: cobbler -%if 0%{?fedora} >= 28 +%if 0%{?fedora} Requires: python2-django1.11 +Requires: python2-ipaddress %endif %if 0%{?el7} Requires: python2-django +Requires: python-ipaddress %endif -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-mod_wsgi %else Requires: Django > 1.6 @@ -104,7 +106,7 @@ http://server/cobbler_web to configure the install server. Summary: Helper tool that performs cobbler orders on remote machines BuildArch: noarch Requires: python2-simplejson -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-ethtool Requires: python2-urlgrabber %else @@ -267,6 +269,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Mon Oct 14 2019 Orion Poplawski - 2.8.5-0.3 +- Require python2-iptables + * Thu Oct 10 2019 Orion Poplawski - 2.8.5-0.2 - Require /sbin/service From 3fffbe1bfc64d6584722cfe69d6734228fd1ae29 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 14 Oct 2019 20:01:17 -0600 Subject: [PATCH 15/21] Fix changelog --- cobbler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobbler.spec b/cobbler.spec index a7ff0a3..17b016e 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -270,7 +270,7 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog * Mon Oct 14 2019 Orion Poplawski - 2.8.5-0.3 -- Require python2-iptables +- Require python2-ipaddress * Thu Oct 10 2019 Orion Poplawski - 2.8.5-0.2 - Require /sbin/service From 26c83ee708222c651850bbb23cd0f518a8fd7572 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 29 Dec 2019 12:52:50 -0700 Subject: [PATCH 16/21] Udate to 2.8.5 final release --- cobbler.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 17b016e..ef2c04e 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,11 +7,11 @@ Name: cobbler Version: 2.8.5 -Release: 0.3%{?dist} +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}-%{version}.tar.gz +Source0: https://github.com/cobbler/cobbler/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: git BuildRequires: /usr/bin/pathfix.py @@ -269,6 +269,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Sun Dec 29 2019 Orion Poplawski - 2.8.5-1 +- Udate to 2.8.5 final release + * Mon Oct 14 2019 Orion Poplawski - 2.8.5-0.3 - Require python2-ipaddress diff --git a/sources b/sources index 5301563..d7a28a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cobbler-2.8.5.tar.gz) = 6097618b6ad394f23f496eee14a74a334162b2d420c39059bf54472a44b4a6a645faf9ee50139f7c169503d34524489282b03a2f7318ca8b276745cc518567a7 +SHA512 (cobbler-2.8.5.tar.gz) = 6587308eb9eb49f7a894ddd052e1e3e226b4bcbffcf5c7e909e035b3faba1a8ae00631b96e11f0274d058b41b985b9a53776428b4587708111ef8158dec4e9d1 From 6c42a12b294bab451240cba579b2ec0a1f4fe6ce Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 8 Dec 2021 20:21:57 -0700 Subject: [PATCH 17/21] Remove defunct get-loaders command --- cobbler-remove-get-loaders.patch | 111 +++++++++++++++++++++++++++++++ cobbler.spec | 7 +- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 cobbler-remove-get-loaders.patch diff --git a/cobbler-remove-get-loaders.patch b/cobbler-remove-get-loaders.patch new file mode 100644 index 0000000..a5b46bd --- /dev/null +++ b/cobbler-remove-get-loaders.patch @@ -0,0 +1,111 @@ +commit fdf493ae4095c3266997e8b9c9cbcb31767b06d6 +Author: Orion Poplawski +Date: Wed Dec 8 20:19:51 2021 -0700 + + Remove get-loaders + +diff --git a/cobbler/action_check.py b/cobbler/action_check.py +index c1980a39..825e666d 100644 +--- a/cobbler/action_check.py ++++ b/cobbler/action_check.py +@@ -335,7 +335,7 @@ class BootCheck: + not_found.append(loader_name) + + if len(not_found) > 0: +- status.append("Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.") ++ status.append("Some network boot-loaders are missing from /var/lib/cobbler/loaders. If you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot.") + + def check_tftpd_bin(self,status): + """ +diff --git a/cobbler/api.py b/cobbler/api.py +index 77ffc689..30f4b878 100644 +--- a/cobbler/api.py ++++ b/cobbler/api.py +@@ -36,7 +36,6 @@ import action_report + import action_power + import action_log + import action_hardlink +-import action_dlcontent + from cexceptions import CX + import kickgen + import yumgen +@@ -723,19 +722,6 @@ class BootAPI: + + # ========================================================================== + +- def dlcontent(self,force=False,logger=None): +- """ +- Downloads bootloader content that may not be avialable in packages +- for the given arch, ex: if installing on PPC, get syslinux. If installing +- on x86_64, get elilo, etc. +- """ +- # FIXME: teach code that copies it to grab from the right place +- self.log("dlcontent") +- grabber = action_dlcontent.ContentDownloader(self._config, logger=logger) +- return grabber.run(force) +- +- # ========================================================================== +- + def validateks(self, logger=None): + """ + Use ksvalidator (from pykickstart, if available) to determine +diff --git a/cobbler/cli.py b/cobbler/cli.py +index a1aa815e..71af6853 100755 +--- a/cobbler/cli.py ++++ b/cobbler/cli.py +@@ -56,7 +56,7 @@ OBJECT_TYPES = OBJECT_ACTIONS_MAP.keys() + OBJECT_ACTIONS = [] + for actions in OBJECT_ACTIONS_MAP.values(): + OBJECT_ACTIONS += actions +-DIRECT_ACTIONS = "aclsetup buildiso import list replicate report reposync sync validateks version signature get-loaders hardlink".split() ++DIRECT_ACTIONS = "aclsetup buildiso import list replicate report reposync sync validateks version signature hardlink".split() + + #################################################### + +@@ -501,10 +501,6 @@ class BootCLI: + elif action_name == "validateks": + (options, args) = self.parser.parse_args() + task_id = self.start_task("validateks",options) +- elif action_name == "get-loaders": +- self.parser.add_option("--force", dest="force", action="store_true", help="overwrite any existing content in /var/lib/cobbler/loaders") +- (options, args) = self.parser.parse_args() +- task_id = self.start_task("dlcontent",options) + elif action_name == "import": + self.parser.add_option("--arch", dest="arch", help="OS architecture being imported") + self.parser.add_option("--breed", dest="breed", help="the breed being imported") +diff --git a/cobbler/remote.py b/cobbler/remote.py +index f7b93abc..d2b5d0b5 100644 +--- a/cobbler/remote.py ++++ b/cobbler/remote.py +@@ -168,14 +168,6 @@ class CobblerXMLRPCInterface: + ) + return self.__start_task(runner, token, "aclsetup", "(CLI) ACL Configuration", options) + +- def background_dlcontent(self, options, token): +- """ +- Download bootloaders and other support files. +- """ +- def runner(self): +- return self.remote.api.dlcontent(self.options.get("force",False), self.logger) +- return self.__start_task(runner, token, "get_loaders", "Download Bootloader Content", options) +- + def background_sync(self, options, token): + def runner(self): + return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) +diff --git a/docs/appendix.rst b/docs/appendix.rst +index b1945c72..7dc73411 100644 +--- a/docs/appendix.rst ++++ b/docs/appendix.rst +@@ -611,12 +611,6 @@ Steps + DBAN 2.2.6 + ********** + +-Retrieve the extra loader parts that DBAN 2.2.6 needs: +- +-.. code-block:: bash +- +- cobbler get-loaders +- + Download DBAN: + + .. code-block:: bash diff --git a/cobbler.spec b/cobbler.spec index f469381..a012093 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,11 +7,13 @@ Name: cobbler Version: 2.8.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ Source0: https://github.com/cobbler/cobbler/archive/v%{version}/%{name}-%{version}.tar.gz +# Remove get-loaders +Patch0: cobbler-remove-get-loaders.patch BuildRequires: git BuildRequires: /usr/bin/pathfix.py @@ -269,6 +271,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Thu Dec 09 2021 Orion Poplawski - 2.8.5-2 +- Remove defunct get-loaders command + * Sun Dec 29 2019 Orion Poplawski - 2.8.5-1 - Udate to 2.8.5 final release From ad73eb12ceb44defd33b2160d673d6fde10f44cd Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 2 Mar 2022 21:47:12 -0700 Subject: [PATCH 18/21] Apply fixes for CVE-2021-45082/3 Drop EL6 support --- cobbler-CVE-2021-45082.patch | 34 +++++++++++ cobbler.spec | 109 +++++++++++++++-------------------- 2 files changed, 79 insertions(+), 64 deletions(-) create mode 100644 cobbler-CVE-2021-45082.patch diff --git a/cobbler-CVE-2021-45082.patch b/cobbler-CVE-2021-45082.patch new file mode 100644 index 0000000..243117d --- /dev/null +++ b/cobbler-CVE-2021-45082.patch @@ -0,0 +1,34 @@ +commit 267184cc5c8db764847eee2d9ba0f5006879adfe +Author: Alexander Graul +Date: Wed Feb 16 09:48:40 2022 +0100 + + Security: Fix incomplete template sanitization + + This only affects Cheetah templating. + + Without this commit, it is possible to evade the + "cheetah_import_whitelist" and import arbitraty Python code. + + Example exploit: #from exploit import pwned + + CVE-ID: CVE-2021-45082 + +diff --git a/cobbler/templar.py b/cobbler/templar.py +index c425908f..b2b99cb2 100644 +--- a/cobbler/templar.py ++++ b/cobbler/templar.py +@@ -76,10 +76,10 @@ class Templar: + """ + lines = data.split("\n") + for line in lines: +- if line.find("#import") != -1: +- rest=line.replace("#import","").replace(" ","").strip() +- if self.settings and rest not in self.settings.cheetah_import_whitelist: +- raise CX("potentially insecure import in template: %s" % rest) ++ if "#import" in line or "#from" in line: ++ rest = line.replace("#import", "").replace("#from", "").replace("import", ".").replace(" ", "").strip() ++ if self.settings and rest not in self.settings.cheetah_import_whitelist: ++ raise CX("Potentially insecure import in template: %s" % rest) + + def render(self, data_input, search_table, out_path, subject=None, template_type=None): + """ diff --git a/cobbler.spec b/cobbler.spec index a012093..8e2586c 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,24 +7,22 @@ Name: cobbler Version: 2.8.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ Source0: https://github.com/cobbler/cobbler/archive/v%{version}/%{name}-%{version}.tar.gz # Remove get-loaders Patch0: cobbler-remove-get-loaders.patch +# Fix unsafe cheetah imports +Patch1: cobbler-CVE-2021-45082.patch BuildRequires: git BuildRequires: /usr/bin/pathfix.py BuildRequires: python2-devel BuildRequires: python2-pyyaml BuildRequires: python2-setuptools -%if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: python2-cheetah -%else -BuildRequires: python-cheetah -%endif Requires: httpd Requires: tftp-server @@ -32,17 +30,10 @@ Requires: createrepo Requires: rsync Requires: python2-simplejson Requires: python2-pyyaml -%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-mod_wsgi Requires: python2-cheetah Requires: python2-netaddr Requires: python2-urlgrabber -%else -Requires: mod_wsgi -Requires: python-cheetah -Requires: python-netaddr -Requires: python-urlgrabber -%endif # syslinux is only available on x86 %ifarch %{ix86} x86_64 Requires: syslinux @@ -56,16 +47,10 @@ Requires: yum-utils %endif # https://github.com/cobbler/cobbler/issues/1685 Requires: /sbin/service -%if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -%else -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -%endif %description Cobbler is a network install server. Cobbler supports PXE, ISO @@ -90,12 +75,7 @@ Requires: python2-ipaddress Requires: python2-django Requires: python-ipaddress %endif -%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-mod_wsgi -%else -Requires: Django > 1.6 -Requires: mod_wsgi -%endif Requires: mod_ssl Requires(post): openssl @@ -108,13 +88,8 @@ http://server/cobbler_web to configure the install server. Summary: Helper tool that performs cobbler orders on remote machines BuildArch: noarch Requires: python2-simplejson -%if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-ethtool Requires: python2-urlgrabber -%else -Requires: python-ethtool -Requires: python-urlgrabber -%endif Requires: /sbin/service Requires: virt-install @@ -143,18 +118,11 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd_rotate $RPM_BUILD_ROOT%{_sysco # Create data directories in tftp_dir mkdir -p $RPM_BUILD_ROOT%{tftp_dir}/{boot,etc,grub,images{,2},ppc,pxelinux.cfg,s390x} -%if 0%{?rhel} == 6 -# sysvinit -mkdir -p %{_sysconfdir}/init.d -mv $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/cobblerd -rm $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd.service -%else # systemd rm $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd rm $RPM_BUILD_ROOT%{_sysconfdir}/init.d/cobblerd mkdir -p $RPM_BUILD_ROOT%{_unitdir} mv $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobblerd.service $RPM_BUILD_ROOT%{_unitdir} -%endif # cobbler-web rm $RPM_BUILD_ROOT%{_sysconfdir}/cobbler/cobbler_web.conf @@ -181,38 +149,23 @@ if (( $1 >= 2 )); then fi -%if 0%{?rhel} == 6 -%post -# package install -if (( $1 == 1 )); then - /sbin/chkconfig --add cobblerd > /dev/null 2>&1 - /etc/init.d/cobblerd start > /dev/null 2>&1 - /etc/init.d/httpd restart > /dev/null 2>&1 -fi -%preun -# before last package is removed -if (( $1 == 0 )); then - /sbin/chkconfig --del cobblerd > /dev/null 2>&1 - /etc/init.d/cobblerd stop > /dev/null 2>&1 -fi -%postun -# after last package is removed -if (( $1 == 0 )); then - /etc/init.d/httpd condrestart > /dev/null 2>&1 -fi -%endif - - -%if 0%{?fedora} || 0%{?rhel} >= 7 %post %systemd_post cobblerd.service +# Fixup permission for world readable settings files +chmod 640 %{_sysconfdir}/cobbler/settings +chmod 600 %{_sysconfdir}/cobbler/mongodb.conf +chmod 600 %{_sysconfdir}/cobbler/modules.conf +chmod 640 %{_sysconfdir}/cobbler/users.conf +chmod 640 %{_sysconfdir}/cobbler/users.digest +chgrp %{apache_group} %{_sysconfdir}/cobbler/settings +chgrp %{apache_group} %{_sysconfdir}/cobbler/users.conf +chgrp %{apache_group} %{_sysconfdir}/cobbler/users.digest %preun %systemd_preun cobblerd.service %postun %systemd_postun_with_restart cobblerd.service -%endif %post -n cobbler-web # Change the SECRET_KEY option in the Django settings.py file @@ -224,7 +177,35 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %files %license COPYING %doc AUTHORS README.md docs/README.openvz docs/README.mysql -%config(noreplace) %{_sysconfdir}/cobbler +%dir %{_sysconfdir}/cobbler +%config(noreplace) %{_sysconfdir}/cobbler/auth.conf +%config(noreplace) %{_sysconfdir}/cobbler/cheetah_macros +%config(noreplace) %{_sysconfdir}/cobbler/cobbler_bash +%config(noreplace) %{_sysconfdir}/cobbler/completions +%config(noreplace) %{_sysconfdir}/cobbler/dhcp.template +%config(noreplace) %{_sysconfdir}/cobbler/dnsmasq.template +%config(noreplace) %{_sysconfdir}/cobbler/genders.template +%config(noreplace) %{_sysconfdir}/cobbler/import_rsync_whitelist +%dir %{_sysconfdir}/cobbler/iso +%config(noreplace) %{_sysconfdir}/cobbler/iso/buildiso.template +%config(noreplace) %{_sysconfdir}/cobbler/ldap/ +%attr(600, root, root) %config(noreplace) %{_sysconfdir}/cobbler/modules.conf +%attr(600, root, root) %config(noreplace) %{_sysconfdir}/cobbler/mongodb.conf +%config(noreplace) %{_sysconfdir}/cobbler/named.template +%config(noreplace) %{_sysconfdir}/cobbler/power/ +%config(noreplace) %{_sysconfdir}/cobbler/pxe/ +%dir %{_sysconfdir}/cobbler/reporting +%config(noreplace) %{_sysconfdir}/cobbler/reporting/build_report_email.template +%config(noreplace) %{_sysconfdir}/cobbler/rsync.exclude +%config(noreplace) %{_sysconfdir}/cobbler/rsync.template +%config(noreplace) %{_sysconfdir}/cobbler/secondary.template +%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/settings +%config(noreplace) %{_sysconfdir}/cobbler/tftpd.template +%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/users.conf +%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/users.digest +%config(noreplace) %{_sysconfdir}/cobbler/version +%config(noreplace) %{_sysconfdir}/cobbler/zone.template +%dir %{_sysconfdir}/cobbler/zone_templates %config(noreplace) %{_sysconfdir}/logrotate.d/cobblerd %config(noreplace) /etc/httpd/conf.d/cobbler.conf %{_bindir}/cobbler @@ -234,11 +215,7 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %{_mandir}/man1/cobbler.1* %{python2_sitelib}/cobbler/ %{python2_sitelib}/cobbler*.egg-info -%if 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/cobblerd.service -%else -/etc/init.d/cobblerd -%endif %{tftp_dir}/* /var/www/cobbler %config(noreplace) /var/lib/cobbler @@ -271,6 +248,10 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Thu Mar 03 2022 Orion Poplawski - 2.8.5-3 +- Apply fixes for CVE-2021-45082/3 +- Drop EL6 support + * Thu Dec 09 2021 Orion Poplawski - 2.8.5-2 - Remove defunct get-loaders command From 7ad7c967bcaf3d8c08be770e753e568d2e96715c Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 3 Mar 2022 08:37:12 -0700 Subject: [PATCH 19/21] Fix apache group --- cobbler.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 8e2586c..e06688d 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,7 +7,7 @@ Name: cobbler Version: 2.8.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -157,9 +157,9 @@ chmod 600 %{_sysconfdir}/cobbler/mongodb.conf chmod 600 %{_sysconfdir}/cobbler/modules.conf chmod 640 %{_sysconfdir}/cobbler/users.conf chmod 640 %{_sysconfdir}/cobbler/users.digest -chgrp %{apache_group} %{_sysconfdir}/cobbler/settings -chgrp %{apache_group} %{_sysconfdir}/cobbler/users.conf -chgrp %{apache_group} %{_sysconfdir}/cobbler/users.digest +chgrp apache %{_sysconfdir}/cobbler/settings +chgrp apache %{_sysconfdir}/cobbler/users.conf +chgrp apache %{_sysconfdir}/cobbler/users.digest %preun %systemd_preun cobblerd.service @@ -199,10 +199,10 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %config(noreplace) %{_sysconfdir}/cobbler/rsync.exclude %config(noreplace) %{_sysconfdir}/cobbler/rsync.template %config(noreplace) %{_sysconfdir}/cobbler/secondary.template -%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/settings +%attr(640, root, apache) %config(noreplace) %{_sysconfdir}/cobbler/settings %config(noreplace) %{_sysconfdir}/cobbler/tftpd.template -%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/users.conf -%attr(640, root, %{apache_group}) %config(noreplace) %{_sysconfdir}/cobbler/users.digest +%attr(640, root, apache) %config(noreplace) %{_sysconfdir}/cobbler/users.conf +%attr(640, root, apache) %config(noreplace) %{_sysconfdir}/cobbler/users.digest %config(noreplace) %{_sysconfdir}/cobbler/version %config(noreplace) %{_sysconfdir}/cobbler/zone.template %dir %{_sysconfdir}/cobbler/zone_templates @@ -248,6 +248,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Thu Mar 03 2022 Orion Poplawski - 2.8.5-4 +- Fix apache group + * Thu Mar 03 2022 Orion Poplawski - 2.8.5-3 - Apply fixes for CVE-2021-45082/3 - Drop EL6 support From 1a1895e5f34c7051a319a1511dc93ece90ecd3e0 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 7 Mar 2022 10:29:07 -0700 Subject: [PATCH 20/21] Restore EL7 requires --- cobbler.spec | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index e06688d..ac1b8b0 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,7 +7,7 @@ Name: cobbler Version: 2.8.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -22,18 +22,28 @@ BuildRequires: /usr/bin/pathfix.py BuildRequires: python2-devel BuildRequires: python2-pyyaml BuildRequires: python2-setuptools +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: python2-cheetah +%else +BuildRequires: python-cheetah +%endif Requires: httpd Requires: tftp-server Requires: createrepo Requires: rsync +Requires: python2-cheetah Requires: python2-simplejson Requires: python2-pyyaml +%if 0%{?fedora} || 0%{?rhel} >= 8 Requires: python2-mod_wsgi -Requires: python2-cheetah Requires: python2-netaddr Requires: python2-urlgrabber +%else +Requires: mod_wsgi +Requires: python-netaddr +Requires: python-urlgrabber +%endif # syslinux is only available on x86 %ifarch %{ix86} x86_64 Requires: syslinux @@ -75,7 +85,11 @@ Requires: python2-ipaddress Requires: python2-django Requires: python-ipaddress %endif +%if 0%{?fedora} || 0%{?rhel} >= 8 Requires: python2-mod_wsgi +%else +Requires: mod_wsgi +%endif Requires: mod_ssl Requires(post): openssl @@ -88,8 +102,13 @@ http://server/cobbler_web to configure the install server. Summary: Helper tool that performs cobbler orders on remote machines BuildArch: noarch Requires: python2-simplejson +%if 0%{?fedora} || 0%{?rhel} >= 8 Requires: python2-ethtool Requires: python2-urlgrabber +%else +Requires: python-ethtool +Requires: python-urlgrabber +%endif Requires: /sbin/service Requires: virt-install @@ -248,6 +267,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Mon Mar 07 2022 Orion Poplawski - 2.8.5-5 +- Restore EL7 requires + * Thu Mar 03 2022 Orion Poplawski - 2.8.5-4 - Fix apache group From aed96123ed55de0b1e3b008f1de04f73cd914f7c Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 23 Mar 2022 07:07:43 -0600 Subject: [PATCH 21/21] Add upstream patch for CVE-2022-0860 (bz#2066592) --- cobbler-CVE-2022-0860.patch | 25 +++++++++++++++++++++++++ cobbler.spec | 9 +++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 cobbler-CVE-2022-0860.patch diff --git a/cobbler-CVE-2022-0860.patch b/cobbler-CVE-2022-0860.patch new file mode 100644 index 0000000..ca06763 --- /dev/null +++ b/cobbler-CVE-2022-0860.patch @@ -0,0 +1,25 @@ +diff --git a/cobbler/modules/authn_pam.py b/cobbler/modules/authn_pam.py +index 80ac4e7..26981f7 100644 +--- a/cobbler/modules/authn_pam.py ++++ b/cobbler/modules/authn_pam.py +@@ -114,6 +114,10 @@ PAM_AUTHENTICATE = LIBPAM.pam_authenticate + PAM_AUTHENTICATE.restype = c_int + PAM_AUTHENTICATE.argtypes = [PamHandle, c_int] + ++PAM_ACCT_MGMT = LIBPAM.pam_acct_mgmt ++PAM_ACCT_MGMT.restype = c_int ++PAM_ACCT_MGMT.argtypes = [PamHandle, c_int] ++ + def authenticate(api_handle, username, password): + """ + Returns True if the given username and password authenticate for the +@@ -152,5 +156,9 @@ def authenticate(api_handle, username, password): + return False + + retval = PAM_AUTHENTICATE(handle, 0) ++ ++ if retval == 0: ++ retval = PAM_ACCT_MGMT(handle, 0) ++ + return retval == 0 + diff --git a/cobbler.spec b/cobbler.spec index ac1b8b0..de3752f 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,7 +7,7 @@ Name: cobbler Version: 2.8.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ @@ -16,6 +16,8 @@ Source0: https://github.com/cobbler/cobbler/archive/v%{version}/%{name}-% Patch0: cobbler-remove-get-loaders.patch # Fix unsafe cheetah imports Patch1: cobbler-CVE-2021-45082.patch +# Upstream fix for CVE-2022-0860 (expired accounts) +Patch2: cobbler-CVE-2022-0860.patch BuildRequires: git BuildRequires: /usr/bin/pathfix.py @@ -153,7 +155,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/koan %pre if (( $1 >= 2 )); then # package upgrade: backup configuration - DATE=$(date "+%Y%m%d-%H%M%S") + DATE=$(date "+%Y%m%d-%H%M%%S") if [[ ! -d /var/lib/cobbler/backup/upgrade-${DATE} ]]; then mkdir -p /var/lib/cobbler/backup/upgrade-${DATE} fi @@ -267,6 +269,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Wed Mar 23 2022 Orion Poplawski - 2.8.5-6 +- Add upstream patch for CVE-2022-0860 (bz#2066592) + * Mon Mar 07 2022 Orion Poplawski - 2.8.5-5 - Restore EL7 requires