Compare commits

...

5 Commits
master ... f27

Author SHA1 Message Date
Chris Lumens efdb64965e 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.
2018-01-05 15:21:24 -05:00
Chris Lumens 62c7fdcd8e 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)
2017-10-16 11:57:03 -04:00
Chris Lumens 3d28226d9b Add a new 'mount' command (vpodzime) 2017-10-12 11:32:17 -04:00
Chris Lumens 4aac0d634a network: add network --bindto option (Fedora) (#1483981) (rvykydal)
network: add network --bindto option (RHEL) (#1483981) (rvykydal)
2017-09-15 14:50:55 -04:00
Chris Lumens 490775161a 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)
2017-09-07 10:13:35 -04:00
6 changed files with 207 additions and 6 deletions

4
.gitignore vendored
View File

@ -175,3 +175,7 @@ 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
/pykickstart-2.39.tar.gz
/pykickstart-2.40.tar.gz
/pykickstart-2.41.tar.gz

View File

@ -0,0 +1,60 @@
From 86d7f78340309ef41b001c0598b1ec1ad75d9945 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
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

View File

@ -0,0 +1,78 @@
From 74a377fefeac8020bcc852e3ecf83a8a36e9ab58 Mon Sep 17 00:00:00 2001
From: Dusty Mabe <dusty@dustymabe.com>
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

View File

@ -0,0 +1,25 @@
From 71b2c1bfbae8c921ea241ba49bee419427286403 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
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

View File

@ -1,6 +1,6 @@
Name: pykickstart
Version: 2.37
Release: 1%{?dist}
Version: 2.41
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
@ -36,13 +39,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.
@ -59,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}
@ -97,7 +105,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 +128,32 @@ popd
%{python3_sitelib}/pykickstart/locale/
%changelog
* Mon Oct 16 2017 Chris Lumens <clumens@redhat.com> - 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 <clumens@redhat.com> - 2.40-1
- Add a new 'mount' command (vpodzime)
* Fri Sep 15 2017 Chris Lumens <clumens@redhat.com> - 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 <jkonecny@redhat.com> - 2.38-2
- Backport of the Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> from downstream spec
Python 2 binary package renamed to python2-pykickstart
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Sep 07 2017 Chris Lumens <clumens@redhat.com> - 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 <clumens@redhat.com> - 2.37-1
- Remove the type annotations (dshea)
- Remove mypy checks. (dshea)

View File

@ -1 +1 @@
SHA512 (pykickstart-2.37.tar.gz) = 8c7f09c1a75dde5ef91ff51470eac7f7d2646bdd4ac728afb35a7f326f0a007c855d8f0804d6937a955d359f425664d9f72fc76afd4cb2c827cc263118277a84
SHA512 (pykickstart-2.41.tar.gz) = c7ed3565ff53433b616de707d15fd6c7b07f7d9612c1422ba88d06575be7cada2dad3432ad3c3b746d5bf8c0bd88ccbf8ada92cf682dca4a577830693cbe6219