From 2137f4e900711201369cdacf767e73738dc8a3d7 Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Jan 08 2018 17:26:51 +0000 Subject: Add patch for Atomic and a pykickstart usage fix - kickstart: support firewall --use-system-defaults (#1526450) (dusty) - Set correct pykickstart version (jkonecny) --- diff --git a/0007-Set-correct-pykickstart-version.patch b/0007-Set-correct-pykickstart-version.patch new file mode 100644 index 0000000..50bfd1b --- /dev/null +++ b/0007-Set-correct-pykickstart-version.patch @@ -0,0 +1,58 @@ +From 9c5298ffa02314e1ea25c7fa13ddcef456a39af8 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Thu, 4 Jan 2018 11:04:52 +0100 +Subject: [PATCH 7/8] Set correct pykickstart version + +For Fedora devel branch the pykickstart version should be set correctly. +--- + dracut/parse-kickstart | 4 ++-- + pyanaconda/kickstart.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart +index 202898215..35c139d31 100755 +--- a/dracut/parse-kickstart ++++ b/dracut/parse-kickstart +@@ -36,7 +36,7 @@ import uuid + import glob + from pykickstart.parser import KickstartParser, preprocessKickstart + from pykickstart.sections import NullSection +-from pykickstart.version import returnClassForVersion ++from pykickstart.version import returnClassForVersion, F27 + from pykickstart.errors import KickstartError + # pylint: disable=wildcard-import,unused-wildcard-import + from pykickstart.constants import * +@@ -263,7 +263,7 @@ dracutCmds = { + 'text': DisplayMode, + 'bootloader': Bootloader, + } +-handlerclass = returnClassForVersion() ++handlerclass = returnClassForVersion(F27) + class DracutHandler(handlerclass): + def __init__(self): + handlerclass.__init__(self, commandUpdates=dracutCmds) +diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py +index d277c012d..793fb21f5 100644 +--- a/pyanaconda/kickstart.py ++++ b/pyanaconda/kickstart.py +@@ -78,7 +78,7 @@ from pykickstart.parser import KickstartParser + from pykickstart.parser import Script as KSScript + from pykickstart.sections import NullSection, PackageSection, PostScriptSection, PreScriptSection, PreInstallScriptSection, \ + OnErrorScriptSection, TracebackScriptSection, Section +-from pykickstart.version import returnClassForVersion ++from pykickstart.version import returnClassForVersion, F27 + + from pyanaconda import anaconda_logging + from pyanaconda.anaconda_loggers import get_module_logger, get_stdout_logger, get_stderr_logger, get_blivet_logger, get_anaconda_root_logger +@@ -2275,7 +2275,7 @@ dataMap = { + "VolGroupData": VolGroupData, + } + +-superclass = returnClassForVersion() ++superclass = returnClassForVersion(version=F27) + + class AnacondaKSHandler(superclass): + AddonClassType = AddonData +-- +2.14.3 + diff --git a/0008-kickstart-support-firewall-use-system-defaults-15264.patch b/0008-kickstart-support-firewall-use-system-defaults-15264.patch new file mode 100644 index 0000000..22a868b --- /dev/null +++ b/0008-kickstart-support-firewall-use-system-defaults-15264.patch @@ -0,0 +1,77 @@ +From 660e896b085b189f058664be95760cd90bf9a8a7 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Thu, 14 Dec 2017 15:54:23 -0500 +Subject: [PATCH 8/8] kickstart: support firewall --use-system-defaults + (#1526450) + +Needed for [1] where we would like to include firewalld +and configure firewalld in Atomic Host (in the ostree) and +have Anaconda leave the delivered "defaults" in place. The +action here is to do nothing if the user specified +--use-system-defaults. + +[1] https://pagure.io/atomic-wg/issue/401 + +Resolves: rhbz#1526450 +(cherry picked from commit 8d064062e71fd313f67e3522faf8d11e768c1986) +--- + anaconda.spec.in | 2 +- + pyanaconda/kickstart.py | 14 ++++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/anaconda.spec.in b/anaconda.spec.in +index 2bd76cfdb..4ce60159d 100644 +--- a/anaconda.spec.in ++++ b/anaconda.spec.in +@@ -37,7 +37,7 @@ Source0: %{name}-%{version}.tar.bz2 + %define mehver 0.23-1 + %define nmver 1.0 + %define partedver 1.8.1 +-%define pykickstartver 2.40-1 ++%define pykickstartver 2.44-1 + %define pypartedver 2.5-2 + %define rpmver 4.10.0 + %define simplelinever 0.6-1 +diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py +index 793fb21f5..b75d9be3f 100644 +--- a/pyanaconda/kickstart.py ++++ b/pyanaconda/kickstart.py +@@ -109,6 +109,7 @@ timezone_log = log.getChild("kickstart.timezone") + realm_log = log.getChild("kickstart.realm") + escrow_log = log.getChild("kickstart.escrow") + upgrade_log = log.getChild("kickstart.upgrade") ++firewall_log = log.getChild("kickstart.firewall") + + @contextmanager + def check_kickstart_error(): +@@ -706,9 +707,9 @@ class Fcoe(commands.fcoe.F13_Fcoe): + + return fc + +-class Firewall(commands.firewall.F20_Firewall): ++class Firewall(commands.firewall.F28_Firewall): + def __init__(self, *args, **kwargs): +- commands.firewall.F20_Firewall.__init__(self, *args, **kwargs) ++ commands.firewall.F28_Firewall.__init__(self, *args, **kwargs) + self.packages = [] + + def setup(self): +@@ -717,6 +718,15 @@ class Firewall(commands.firewall.F20_Firewall): + + def execute(self, storage, ksdata, instClass): + args = [] ++ ++ # If --use-system-defaults was passed then the user wants ++ # whatever was provided by the rpms or ostree to be the ++ # default, do nothing. ++ if self.use_system_defaults: ++ firewall_log.info("ks file instructs to use system defaults for " ++ "firewall, skipping configuration.") ++ return ++ + # enabled is None if neither --enable or --disable is passed + # default to enabled if nothing has been set. + if self.enabled == False: +-- +2.14.3 + diff --git a/anaconda.spec b/anaconda.spec index 43ff77b..380df23 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -3,7 +3,7 @@ Summary: Graphical system installer Name: anaconda Version: 27.20.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT Group: Applications/System URL: http://fedoraproject.org/wiki/Anaconda @@ -32,6 +32,12 @@ Patch5: 0005-Add-modular-server-repo-to-the-base-repositories-150.patch # Second attempt to fix Mac EFI Patch6: 0006-Fix-MAC-EFI-try-2.patch +# Use correct Pykickstart version +Patch7: 0007-Set-correct-pykickstart-version.patch + +# Add support for the --use-system-defaults option for the firewall kickstart command +Patch8: 0008-kickstart-support-firewall-use-system-defaults-15264.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -54,7 +60,7 @@ Patch6: 0006-Fix-MAC-EFI-try-2.patch %define mehver 0.23-1 %define nmver 1.0 %define partedver 1.8.1 -%define pykickstartver 2.40-1 +%define pykickstartver 2.41-2 %define pypartedver 2.5-2 %define rpmver 4.10.0 %define simplelinever 0.6-1 @@ -262,6 +268,8 @@ runtime on NFS/HTTP/FTP servers or local disks. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build %configure @@ -355,6 +363,10 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Mon Jan 08 2018 Martin Kolman - 27.20.4-5 +- kickstart: support firewall --use-system-defaults (#1526450) (dusty) +- Set correct pykickstart version (jkonecny) + * Thu Nov 02 2017 Martin Kolman - 27.20.4-4 - Really install all the right packages on Mac UEFI installs (adamw)