From 490775161abc396b338273335294c1666122af64 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 7 Sep 2017 10:13:35 -0400 Subject: [PATCH 1/5] Add url --metalink support (#1464843) (rvykydal) Add repo --metalink support (#1464843) (rvykydal) Add Fedora 27 support. (rvykydal) Update Repo command tests. (rvykydal) Split the import of commands to multiple lines (vponcova) Move the installclass command to the %anaconda section (vponcova) --- .gitignore | 1 + pykickstart.spec | 10 +++++++++- sources | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e1c7520..2b2da73 100644 --- a/.gitignore +++ b/.gitignore @@ -175,3 +175,4 @@ pykickstart-1.78.tar.gz /pykickstart-2.35.tar.gz /pykickstart-2.36.tar.gz /pykickstart-2.37.tar.gz +/pykickstart-2.38.tar.gz diff --git a/pykickstart.spec b/pykickstart.spec index 2705f8e..cfc2c72 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -1,5 +1,5 @@ Name: pykickstart -Version: 2.37 +Version: 2.38 Release: 1%{?dist} License: GPLv2 and MIT Group: System Environment/Libraries @@ -120,6 +120,14 @@ popd %{python3_sitelib}/pykickstart/locale/ %changelog +* Thu Sep 07 2017 Chris Lumens - 2.38-1 +- Add url --metalink support (#1464843) (rvykydal) +- Add repo --metalink support (#1464843) (rvykydal) +- Add Fedora 27 support. (rvykydal) +- Update Repo command tests. (rvykydal) +- Split the import of commands to multiple lines (vponcova) +- Move the installclass command to the %anaconda section (vponcova) + * Mon Jul 31 2017 Chris Lumens - 2.37-1 - Remove the type annotations (dshea) - Remove mypy checks. (dshea) diff --git a/sources b/sources index 0b9d5ef..27cc7dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pykickstart-2.37.tar.gz) = 8c7f09c1a75dde5ef91ff51470eac7f7d2646bdd4ac728afb35a7f326f0a007c855d8f0804d6937a955d359f425664d9f72fc76afd4cb2c827cc263118277a84 +SHA512 (pykickstart-2.38.tar.gz) = 70ae0f76b538f41870f1cd524851e9901fa88b6665fc35fa141d021da54a9380321c1d2c240c2c52bb31b95a6b274d092060b2f427ed0b78736272edccb77c64 From 4aac0d634abd28f98d5a7c99c66182f6334543c6 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 15 Sep 2017 14:50:55 -0400 Subject: [PATCH 2/5] network: add network --bindto option (Fedora) (#1483981) (rvykydal) network: add network --bindto option (RHEL) (#1483981) (rvykydal) --- .gitignore | 1 + pykickstart.spec | 19 +++++++++++++++---- sources | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2b2da73..e8ad83e 100644 --- a/.gitignore +++ b/.gitignore @@ -176,3 +176,4 @@ pykickstart-1.78.tar.gz /pykickstart-2.36.tar.gz /pykickstart-2.37.tar.gz /pykickstart-2.38.tar.gz +/pykickstart-2.39.tar.gz diff --git a/pykickstart.spec b/pykickstart.spec index cfc2c72..5bdcb59 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -1,5 +1,5 @@ Name: pykickstart -Version: 2.38 +Version: 2.39 Release: 1%{?dist} License: GPLv2 and MIT Group: System Environment/Libraries @@ -36,13 +36,15 @@ can be found in the packages python-kickstart and python3-kickstart respectively. # Python 2 library -%package -n python-kickstart +%package -n python2-kickstart +%{?python_provide:%python_provide python2-kickstart} +%{?python_provide:%python_provide python2-pykickstart} Summary: Python 2 library for manipulating kickstart files. Requires: python-six Requires: python-requests Requires: python-ordered-set -%description -n python-kickstart +%description -n python2-kickstart Python 2 library for manipulating kickstart files. The binaries are found in the pykickstart package. @@ -97,7 +99,7 @@ popd %{_bindir}/ksshell %{_mandir}/man1/* -%files -n python-kickstart +%files -n python2-kickstart %defattr(-,root,root,-) %doc docs/2to3 %doc docs/programmers-guide @@ -120,6 +122,15 @@ popd %{python3_sitelib}/pykickstart/locale/ %changelog +* Fri Sep 15 2017 Chris Lumens - 2.39-1 +- network: add network --bindto option (Fedora) (#1483981) (rvykydal) +- network: add network --bindto option (RHEL) (#1483981) (rvykydal) + +* Fri Sep 15 2017 Jiri Konecny - 2.38-2 +- Backport of the Zbigniew Jędrzejewski-Szmek from downstream spec + Python 2 binary package renamed to python2-pykickstart + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + * Thu Sep 07 2017 Chris Lumens - 2.38-1 - Add url --metalink support (#1464843) (rvykydal) - Add repo --metalink support (#1464843) (rvykydal) diff --git a/sources b/sources index 27cc7dc..3751a32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pykickstart-2.38.tar.gz) = 70ae0f76b538f41870f1cd524851e9901fa88b6665fc35fa141d021da54a9380321c1d2c240c2c52bb31b95a6b274d092060b2f427ed0b78736272edccb77c64 +SHA512 (pykickstart-2.39.tar.gz) = 9a675d5ae362930a81c6e8ac781011ee8025342b26146ca8a9f5f470a13d6bbd997f18ede15ebacc07c5aa567e6c0bae74b63e7253a982eb3026c1276f300ce1 From 3d28226d9b8638460b307fb9e01da3c97b5d1298 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 12 Oct 2017 11:16:34 -0400 Subject: [PATCH 3/5] Add a new 'mount' command (vpodzime) --- .gitignore | 1 + pykickstart.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e8ad83e..7bed1aa 100644 --- a/.gitignore +++ b/.gitignore @@ -177,3 +177,4 @@ pykickstart-1.78.tar.gz /pykickstart-2.37.tar.gz /pykickstart-2.38.tar.gz /pykickstart-2.39.tar.gz +/pykickstart-2.40.tar.gz diff --git a/pykickstart.spec b/pykickstart.spec index 5bdcb59..55c2521 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -1,5 +1,5 @@ Name: pykickstart -Version: 2.39 +Version: 2.40 Release: 1%{?dist} License: GPLv2 and MIT Group: System Environment/Libraries @@ -122,6 +122,9 @@ popd %{python3_sitelib}/pykickstart/locale/ %changelog +* Thu Oct 12 2017 Chris Lumens - 2.40-1 +- Add a new 'mount' command (vpodzime) + * Fri Sep 15 2017 Chris Lumens - 2.39-1 - network: add network --bindto option (Fedora) (#1483981) (rvykydal) - network: add network --bindto option (RHEL) (#1483981) (rvykydal) diff --git a/sources b/sources index 3751a32..d6d2449 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pykickstart-2.39.tar.gz) = 9a675d5ae362930a81c6e8ac781011ee8025342b26146ca8a9f5f470a13d6bbd997f18ede15ebacc07c5aa567e6c0bae74b63e7253a982eb3026c1276f300ce1 +SHA512 (pykickstart-2.40.tar.gz) = f40dc71ff9dd496c99d5aeb4168ea290a6a65e5c5f247d30a14b486e56fa08e7154ad88d7f253e7dce44177d6f0626ab97dc95db7c2b9228cea10154666a7b50 From 62c7fdcd8e4f07cfd42a63b7e10f90b459195c0e Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Mon, 16 Oct 2017 11:57:03 -0400 Subject: [PATCH 4/5] Pylint fixes (vponcova) Add command hmc to support SE/HMC file access in RHEL7 (vponcova) Add timeout and retries options to %packages section in RHEL7 (vponcova) Call the _ method from i18n.py (jkonecny) --- .gitignore | 1 + pykickstart.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7bed1aa..273a23b 100644 --- a/.gitignore +++ b/.gitignore @@ -178,3 +178,4 @@ pykickstart-1.78.tar.gz /pykickstart-2.38.tar.gz /pykickstart-2.39.tar.gz /pykickstart-2.40.tar.gz +/pykickstart-2.41.tar.gz diff --git a/pykickstart.spec b/pykickstart.spec index 55c2521..4994713 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -1,5 +1,5 @@ Name: pykickstart -Version: 2.40 +Version: 2.41 Release: 1%{?dist} License: GPLv2 and MIT Group: System Environment/Libraries @@ -122,6 +122,12 @@ popd %{python3_sitelib}/pykickstart/locale/ %changelog +* Mon Oct 16 2017 Chris Lumens - 2.41-1 +- Pylint fixes (vponcova) +- Add command hmc to support SE/HMC file access in RHEL7 (vponcova) +- Add timeout and retries options to %packages section in RHEL7 (vponcova) +- Call the _ method from i18n.py (jkonecny) + * Thu Oct 12 2017 Chris Lumens - 2.40-1 - Add a new 'mount' command (vpodzime) diff --git a/sources b/sources index d6d2449..dc48246 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pykickstart-2.40.tar.gz) = f40dc71ff9dd496c99d5aeb4168ea290a6a65e5c5f247d30a14b486e56fa08e7154ad88d7f253e7dce44177d6f0626ab97dc95db7c2b9228cea10154666a7b50 +SHA512 (pykickstart-2.41.tar.gz) = c7ed3565ff53433b616de707d15fd6c7b07f7d9612c1422ba88d06575be7cada2dad3432ad3c3b746d5bf8c0bd88ccbf8ada92cf682dca4a577830693cbe6219 From efdb64965ec11dc8c16c38006c2db81bda6430a5 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 5 Jan 2018 14:28:39 -0500 Subject: [PATCH 5/5] firewall: add --use-system-defaults arg to command (#1526486) This is different from the patch on master in a couple ways. The most important is that classes are named F27 here, not F28. --- ...rt-the-F20-firewall-test-from-master.patch | 60 ++++++++++++++ ...-system-defaults-arg-to-command-1526.patch | 78 +++++++++++++++++++ 0003-Disable-translation-canary.patch | 25 ++++++ pykickstart.spec | 8 +- 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 0001-Port-the-F20-firewall-test-from-master.patch create mode 100644 0002-firewall-add-use-system-defaults-arg-to-command-1526.patch create mode 100644 0003-Disable-translation-canary.patch diff --git a/0001-Port-the-F20-firewall-test-from-master.patch b/0001-Port-the-F20-firewall-test-from-master.patch new file mode 100644 index 0000000..b092da6 --- /dev/null +++ b/0001-Port-the-F20-firewall-test-from-master.patch @@ -0,0 +1,60 @@ +From 86d7f78340309ef41b001c0598b1ec1ad75d9945 Mon Sep 17 00:00:00 2001 +From: Chris Lumens +Date: Tue, 2 Jan 2018 16:16:49 -0500 +Subject: [PATCH 1/3] Port the F20 firewall test from master. + +--- + tests/commands/firewall.py | 31 +++++++++++++++++-------------- + 1 file changed, 17 insertions(+), 14 deletions(-) + +diff --git a/tests/commands/firewall.py b/tests/commands/firewall.py +index 80cf59d..db5e44d 100644 +--- a/tests/commands/firewall.py ++++ b/tests/commands/firewall.py +@@ -45,20 +45,6 @@ class FC3_TestCase(CommandTest): + self.assert_parse("firewall --enable --trust=eth0,eth1 --ssh --http --smtp --ftp --port=1234:udp" + "firewall --enabled --port=1234:udp --trust=eth0,eth1 --service=ssh,http,smtp,ftp\n") + +- # remove service +- if "--remove-service" in self.optionList: +- self.assert_parse("firewall --remove-service=mdns", +- "firewall --remove-service=mdns\n") # remove only +- # service & remove service at once +- self.assert_parse("firewall --service=ssh --remove-service=mdns", +- "firewall --service=ssh --remove-service=mdns\n") +- # with alternative service notation +- self.assert_parse("firewall --ssh --smtp --ftp --remove-service=mdns", +- "firewall --ssh --smtp --ftp --remove-service=mdns\n") +- # multiple remove & remove ssh +- self.assert_parse("firewall --service=mdns --remove-service=dhcpv6-client --remove-service=ssh", +- "firewall --service=mdns --remove-service=dhcpv6-client --remove-service=ssh\n") +- + # disable firewall + self.assert_parse("firewall --disabled", "firewall --disabled\n") + self.assert_parse("firewall --disable", "firewall --disabled\n") +@@ -102,5 +88,22 @@ class F14_TestCase(F10_TestCase): + # removed + self.assert_removed("firewall", "--telnet") + ++class F20_TestCase(F14_TestCase): ++ def runTest(self): ++ F14_TestCase.runTest(self) ++ ++ # remove service ++ self.assert_parse("firewall --remove-service=mdns", ++ "firewall --enabled --remove-service=mdns\n") # remove only ++ # service & remove service at once ++ self.assert_parse("firewall --service=ssh --remove-service=mdns", ++ "firewall --enabled --service=ssh --remove-service=mdns\n") ++ # with alternative service notation ++ self.assert_parse("firewall --ssh --smtp --ftp --remove-service=mdns", ++ "firewall --enabled --service=ssh,smtp,ftp --remove-service=mdns\n") ++ # multiple remove & remove ssh ++ self.assert_parse("firewall --service=mdns --remove-service=dhcpv6-client --remove-service=ssh", ++ "firewall --enabled --service=mdns --remove-service=dhcpv6-client,ssh\n") ++ + if __name__ == "__main__": + unittest.main() +-- +2.9.4 + diff --git a/0002-firewall-add-use-system-defaults-arg-to-command-1526.patch b/0002-firewall-add-use-system-defaults-arg-to-command-1526.patch new file mode 100644 index 0000000..3b70c14 --- /dev/null +++ b/0002-firewall-add-use-system-defaults-arg-to-command-1526.patch @@ -0,0 +1,78 @@ +From 74a377fefeac8020bcc852e3ecf83a8a36e9ab58 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Thu, 14 Dec 2017 15:11:37 -0500 +Subject: [PATCH 2/3] firewall: add --use-system-defaults arg to command + (#1526486) + +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. + +[1] https://pagure.io/atomic-wg/issue/401 + +Resolves: rhbz#1526486 +--- + pykickstart/commands/firewall.py | 17 +++++++++++++++++ + pykickstart/handlers/f27.py | 2 +- + tests/commands/firewall.py | 8 ++++++++ + 4 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/pykickstart/commands/firewall.py b/pykickstart/commands/firewall.py +index 4b94aad..473d21c 100644 +--- a/pykickstart/commands/firewall.py ++++ b/pykickstart/commands/firewall.py +@@ -233,3 +233,20 @@ class F20_Firewall(F14_Firewall): + return retval + "%s\n" % svcstr + else: + return retval ++ ++class F27_Firewall(F20_Firewall): ++ def __init__(self, writePriority=0, *args, **kwargs): ++ F20_Firewall.__init__(self, writePriority, *args, **kwargs) ++ self.use_system_defaults = kwargs.get("use_system_defaults", None) ++ ++ def _getParser(self): ++ op = F20_Firewall._getParser(self) ++ op.add_option("--use-system-defaults", dest="use_system_defaults", ++ action="store_true", default=False) ++ return op ++ ++ def __str__(self): ++ if self.use_system_defaults: ++ return "# Firewall configuration\nfirewall --use-system-defaults\n" ++ else: ++ return F20_Firewall.__str__(self) +diff --git a/pykickstart/handlers/f27.py b/pykickstart/handlers/f27.py +index b57fd41..5582468 100644 +--- a/pykickstart/handlers/f27.py ++++ b/pykickstart/handlers/f27.py +@@ -42,7 +42,7 @@ class F27Handler(BaseHandler): + "driverdisk": commands.driverdisk.F14_DriverDisk, + "eula": commands.eula.F20_Eula, + "fcoe": commands.fcoe.F13_Fcoe, +- "firewall": commands.firewall.F20_Firewall, ++ "firewall": commands.firewall.F27_Firewall, + "firstboot": commands.firstboot.FC3_Firstboot, + "graphical": commands.displaymode.F26_DisplayMode, + "group": commands.group.F12_Group, +diff --git a/tests/commands/firewall.py b/tests/commands/firewall.py +index db5e44d..1531352 100644 +--- a/tests/commands/firewall.py ++++ b/tests/commands/firewall.py +@@ -105,5 +105,13 @@ class F20_TestCase(F14_TestCase): + self.assert_parse("firewall --service=mdns --remove-service=dhcpv6-client --remove-service=ssh", + "firewall --enabled --service=mdns --remove-service=dhcpv6-client,ssh\n") + ++class F27_TestCase(F20_TestCase): ++ def runTest(self): ++ F20_TestCase.runTest(self) ++ ++ # use-system-defaults ++ self.assert_parse("firewall --use-system-defaults", "firewall --use-system-defaults\n") ++ self.assert_parse("firewall --enabled --service=ssh --use-system-defaults", "firewall --use-system-defaults\n") ++ + if __name__ == "__main__": + unittest.main() +-- +2.9.4 + diff --git a/0003-Disable-translation-canary.patch b/0003-Disable-translation-canary.patch new file mode 100644 index 0000000..b6f8189 --- /dev/null +++ b/0003-Disable-translation-canary.patch @@ -0,0 +1,25 @@ +From 71b2c1bfbae8c921ea241ba49bee419427286403 Mon Sep 17 00:00:00 2001 +From: Chris Lumens +Date: Fri, 5 Jan 2018 14:56:51 -0500 +Subject: [PATCH 3/3] Disable translation-canary. + +--- + po/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/po/Makefile b/po/Makefile +index 828b59e..e514fc9 100644 +--- a/po/Makefile ++++ b/po/Makefile +@@ -12,7 +12,7 @@ INSTALL_NLS_DIR = $(DESTDIR)/`$(PYTHON) -c "from distutils.sysconfig import get_ + + # PO catalog handling + MSGMERGE = msgmerge -v +-XGETTEXT = ../translation-canary/xgettext_werror.sh --default-domain=$(NLSPACKAGE) \ ++XGETTEXT = xgettext --default-domain=$(NLSPACKAGE) \ + --add-comments + MSGFMT = msgfmt --statistics --verbose + +-- +2.9.4 + diff --git a/pykickstart.spec b/pykickstart.spec index 4994713..efaf649 100644 --- a/pykickstart.spec +++ b/pykickstart.spec @@ -1,6 +1,6 @@ Name: pykickstart Version: 2.41 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and MIT Group: System Environment/Libraries Summary: Python utilities for manipulating kickstart files. @@ -9,6 +9,9 @@ Url: http://fedoraproject.org/wiki/pykickstart # our distribution. Thus the source is only available from # within this srpm. Source0: %{name}-%{version}.tar.gz +Patch0: 0001-Port-the-F20-firewall-test-from-master.patch +Patch1: 0002-firewall-add-use-system-defaults-arg-to-command-1526.patch +Patch2: 0003-Disable-translation-canary.patch BuildArch: noarch @@ -61,6 +64,9 @@ the pykickstart package. %prep %setup -q +%patch -P 0 -p 1 +%patch -P 1 -p 1 +%patch -P 2 -p 1 rm -rf %{py3dir} mkdir %{py3dir}