[PATCH] Add liveimg install method
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pykickstart/commands/method.py | 52 +++++++++++++++++++++++++++++++++++++++++
pykickstart/handlers/control.py | 18 +++++++-------
tests/commands/method.py | 28 ++++++++++++++++++++++
3 files changed, 90 insertions(+), 8 deletions(-)
diff --git a/pykickstart/commands/method.py b/pykickstart/commands/method.py
index f91bf59..272e9bf 100644
--- a/pykickstart/commands/method.py
+++ b/pykickstart/commands/method.py
@@ -293,3 +293,55 @@ class F18_Method(F14_Method):
raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --url or --mirrorlist must be specified for url command."))
return retval
+
+class F19_Method(F18_Method):
+ removedKeywords = F18_Method.removedKeywords
+ removedAttrs = F18_Method.removedAttrs
+
+ def __init__(self, *args, **kwargs):
+ F18_Method.__init__(self, *args, **kwargs)
+ self.checksum = ""
+
+ def __eq__(self, other):
+ if not F18_Method.__eq__(self, other):
+ return False
+
+ if self.method == "liveimg":
+ return self.url == other.url and self.proxy == other.proxy and \
+ self.noverifyssl == other.noverifyssl and \
+ self.checksum == other.checksum
+ else:
+ return True
+
+ def __str__(self):
+ if self.method == "liveimg":
+ retval = KickstartCommand.__str__(self)
+ retval += "# Use live disk image installation\n"
+
+ retval += "liveimg --url=\"%s\"" % self.url
+
+ if self.proxy:
+ retval += " --proxy=\"%s\"" % self.proxy
+
+ if self.noverifyssl:
+ retval += " --noverifyssl"
+
+ if self.checksum:
+ retval += " --checksum=\"%s\"" % self.checksum
+
+ return retval + "\n"
+ else:
+ retval = F18_Method.__str__(self)
+
+ return retval
+
+ def _getParser(self):
+ op = F18_Method._getParser(self)
+
+ if self.currentCmd == "liveimg":
+ op.add_option("--url", required=1)
+ op.add_option("--proxy")
+ op.add_option("--noverifyssl", action="store_true", default=False)
+ op.add_option("--checksum")
+
+ return op
diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py
index 1993478..77349f3 100644
--- a/pykickstart/handlers/control.py
+++ b/pykickstart/handlers/control.py
@@ -952,7 +952,7 @@ commandMap = {
"autostep": autostep.FC3_AutoStep,
"bootloader": bootloader.F18_Bootloader,
"btrfs": btrfs.F17_BTRFS,
- "cdrom": method.F18_Method,
+ "cdrom": method.F19_Method,
"clearpart": clearpart.F17_ClearPart,
"cmdline": displaymode.FC3_DisplayMode,
"device": device.F8_Device,
@@ -965,19 +965,20 @@ commandMap = {
"graphical": displaymode.FC3_DisplayMode,
"group": group.F12_Group,
"halt": reboot.F18_Reboot,
- "harddrive": method.F18_Method,
+ "harddrive": method.F19_Method,
"ignoredisk": ignoredisk.F14_IgnoreDisk,
"install": upgrade.F11_Upgrade,
"iscsi": iscsi.F17_Iscsi,
"iscsiname": iscsiname.FC6_IscsiName,
"keyboard": keyboard.F18_Keyboard,
"lang": lang.F19_Lang,
+ "liveimg": method.F19_Method,
"logging": logging.FC6_Logging,
"logvol": logvol.F18_LogVol,
"mediacheck": mediacheck.FC4_MediaCheck,
"multipath": multipath.FC6_MultiPath,
"network": network.F19_Network,
- "nfs": method.F18_Method,
+ "nfs": method.F19_Method,
"part": partition.F18_Partition,
"partition": partition.F18_Partition,
"poweroff": reboot.F18_Reboot,
@@ -995,7 +996,7 @@ commandMap = {
"timezone": timezone.F18_Timezone,
"updates": updates.F7_Updates,
"upgrade": upgrade.F11_Upgrade,
- "url": method.F18_Method,
+ "url": method.F19_Method,
"user": user.F19_User,
"vnc": vnc.F9_Vnc,
"volgroup": volgroup.FC16_VolGroup,
@@ -1232,7 +1233,7 @@ commandMap = {
"autopart": autopart.F16_AutoPart,
"autostep": autostep.FC3_AutoStep,
"bootloader": bootloader.F17_Bootloader,
- "cdrom": method.F14_Method,
+ "cdrom": method.F19_Method,
"clearpart": clearpart.FC3_ClearPart,
"cmdline": displaymode.FC3_DisplayMode,
"device": device.F8_Device,
@@ -1245,19 +1246,20 @@ commandMap = {
"graphical": displaymode.FC3_DisplayMode,
"group": group.F12_Group,
"halt": reboot.FC6_Reboot,
- "harddrive": method.F14_Method,
+ "harddrive": method.F19_Method,
"ignoredisk": ignoredisk.F14_IgnoreDisk,
"install": upgrade.F11_Upgrade,
"iscsi": iscsi.F10_Iscsi,
"iscsiname": iscsiname.FC6_IscsiName,
"keyboard": keyboard.FC3_Keyboard,
"lang": lang.FC3_Lang,
+ "liveimg": method.F19_Method,
"logging": logging.FC6_Logging,
"logvol": logvol.F15_LogVol,
"mediacheck": mediacheck.FC4_MediaCheck,
"multipath": multipath.FC6_MultiPath,
"network": network.F19_Network,
- "nfs": method.F14_Method,
+ "nfs": method.F19_Method,
"part": partition.F14_Partition,
"partition": partition.F14_Partition,
"poweroff": reboot.FC6_Reboot,
@@ -1276,7 +1278,7 @@ commandMap = {
"unsupported_hardware": unsupported_hardware.RHEL6_UnsupportedHardware,
"updates": updates.F7_Updates,
"upgrade": upgrade.F11_Upgrade,
- "url": method.F14_Method,
+ "url": method.F19_Method,
"user": user.F19_User,
"vnc": vnc.F9_Vnc,
"volgroup": volgroup.FC16_VolGroup,
diff --git a/tests/commands/method.py b/tests/commands/method.py
index b80ca5e..7ca643b 100644
--- a/tests/commands/method.py
+++ b/tests/commands/method.py
@@ -133,5 +133,33 @@ class F18_TestCase(F14_TestCase):
self.assert_parse_error("url --url=www.wherever.com --mirrorlist=www.wherever.com",
KickstartValueError)
+class F19_TestCase(F18_TestCase):
+ def runTest(self):
+ # run F18 test case.
+ F18_TestCase.runTest(self)
+
+ # liveimg pass
+ self.assert_parse("liveimg --url=http://someplace/somewhere --proxy=http://wherever/other "
+ "--noverifyssl --checksum=e7a9fe500330a1cae4ca114833bb3df014e6d14e63ea9566896a848f3832d0ba",
+ "liveimg --url=\"http://someplace/somewhere\" --proxy=\"http://wherever/other\" "
+ "--noverifyssl --checksum=\"e7a9fe500330a1cae4ca114833bb3df014e6d14e63ea9566896a848f3832d0ba\"\n")
+ self.assert_parse("liveimg --url=http://someplace/somewhere --proxy=http://wherever/other "
+ "--noverifyssl",
+ "liveimg --url=\"http://someplace/somewhere\" --proxy=\"http://wherever/other\" "
+ "--noverifyssl\n")
+ self.assert_parse("liveimg --url=http://someplace/somewhere --proxy=http://wherever/other ",
+ "liveimg --url=\"http://someplace/somewhere\" --proxy=\"http://wherever/other\"\n")
+ self.assert_parse("liveimg --url=http://someplace/somewhere",
+ "liveimg --url=\"http://someplace/somewhere\"\n")
+
+ # liveimg fail
+ self.assert_parse_error("liveimg", KickstartValueError)
+ self.assert_parse_error("liveimg --url", KickstartParseError)
+ self.assert_parse_error("liveimg --url=http://someplace/somewhere --proxy", KickstartParseError)
+ self.assert_parse_error("liveimg --proxy=http://someplace/somewhere", KickstartValueError)
+ self.assert_parse_error("liveimg --noverifyssl", KickstartValueError)
+ self.assert_parse_error("liveimg --checksum=e7a9fe500330a1cae4ca114833bb3df014e6d14e63ea9566896a848f3832d0ba", KickstartValueError)
+
+
if __name__ == "__main__":
unittest.main()
--
1.8.1.4
11 years
[PATCH] Initial support for using NTP servers specified by DHCP
by Martin Kolman
This patch adds support for harvesting NTP server addresses from DHCP server
responses. The NTP server addresses are converted to hostnames and saved to
ksdata.timezone.ntpservers, provided no NTP servers were set from kickstart.
This is just the non-GUI part and another patch will add support for using
the data in the NTP configuration GUI.
Martin Kolman (1):
Support for getting NTP servers from DHCP
pyanaconda/network.py | 24 ++++++++++++++++++++++++
pyanaconda/nm.py | 34 +++++++++++++++++++++++++++++++++-
2 files changed, 57 insertions(+), 1 deletion(-)
--
1.8.1.4
11 years
[lorax][PATCH] Do not install chrony and rdate explicitly
by Vratislav Podzimek
These are pulled as Anaconda's dependencies and shouldn't be listed here
explicitly.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
share/runtime-install.tmpl | 1 -
1 file changed, 1 deletion(-)
diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl
index 89fb458..fe52d79 100644
--- a/share/runtime-install.tmpl
+++ b/share/runtime-install.tmpl
@@ -92,7 +92,6 @@ installpkg tigervnc-server-minimal
%if basearch != "s390x":
installpkg tigervnc-server-module
%endif
-installpkg chrony rdate
installpkg net-tools
## hardware utilities/libraries
--
1.7.11.7
11 years
[PATCH] Add realm command support
by Martin Kolman
This is basically just the patch originally sent by Stef,
applied to pykickstart master.
It adds support for parsing the realm command from kickstart;
the join, permit and deny sub-commands are supported.
Martin Kolman (1):
Add support for the realm command
pykickstart/commands/__init__.py | 2 +-
pykickstart/commands/realm.py | 120 +++++++++++++++++++++++++++++++++++++++
pykickstart/handlers/control.py | 1 +
tests/commands/realm.py | 54 ++++++++++++++++++
4 files changed, 176 insertions(+), 1 deletion(-)
create mode 100644 pykickstart/commands/realm.py
create mode 100644 tests/commands/realm.py
--
1.8.1.4
11 years
[master][PATCH] Use ntpdate instead of rdate (#950267)
by Vratislav Podzimek
The rdate utility uses the old protocol that is not supported by many NTP
servers.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda.spec.in | 2 +-
pyanaconda/ntp.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index af7452c..381dc4e 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -115,7 +115,7 @@ Requires: anaconda-yum-plugins
Requires: libselinux-python >= %{libselinuxver}
Requires: kbd
Requires: chrony
-Requires: rdate
+Requires: ntpdate
Requires: rsync
Requires: hostname
%ifnarch s390 s390x
diff --git a/pyanaconda/ntp.py b/pyanaconda/ntp.py
index 61e9a6a..0014a9d 100644
--- a/pyanaconda/ntp.py
+++ b/pyanaconda/ntp.py
@@ -44,7 +44,7 @@ class NTPconfigError(Exception):
def ntp_server_working(server):
"""
- Runs rdate to try to connect to the $server (timeout may take some time).
+ Runs ntpdate to try to connect to the $server (timeout may take some time).
:return: True if the given server is reachable and working, False otherwise
@@ -54,7 +54,7 @@ def ntp_server_working(server):
# thread-safe and hangs if this function is called from threads.
# By using tee (and block-buffered pipes) it is also much slower.
#we just need to know the exit status
- retc = os.system("rdate -p %s &>/dev/null" % server)
+ retc = os.system("ntpdate -q %s &>/dev/null" % server)
return retc == 0
@@ -164,7 +164,7 @@ def one_time_sync(server, callback=None):
"""
- ret = iutil.execWithRedirect("rdate", ["-s", server])
+ ret = iutil.execWithRedirect("ntpdate", [server])
success = ret == 0
--
1.7.11.7
11 years
[master] Two more for the busied cursor
by Vratislav Podzimek
I've found out that unfortunately the Gtk/Gdk switches the cursor only when the
main loop runs. Which means that if we want to use the busy cursor we need to
iterated the main loop after switching it. This is what the PATCH 1/2 does, but
I'm not sure if we really want to something like that. If anybody sees a problem
in it, maybe its better to revert the previous two patches for the busied_cursor
instead of applying these two.
PATCH 2/2 just adds the busied_cursor for environment toggling which takes a
while.
Vratislav Podzimek (2):
Let the Gtk main loop switch the cursor in busied_cursor
Toggle environment with a busied cursor
pyanaconda/ui/gui/spokes/software.py | 7 ++++---
pyanaconda/ui/gui/utils.py | 3 +++
2 files changed, 7 insertions(+), 3 deletions(-)
--
1.7.11.7
11 years
[PATCH] Make sure stage1_disk isn't empty (#950487)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/bootloader.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 3e4442a..475cacb 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1578,6 +1578,9 @@ class GRUB2(GRUB):
and self.stage2_device.type == "partition":
return ret
+ if not self.stage1_disk:
+ return False
+
# If the first partition starts too low show an error.
parts = self.stage1_disk.format.partedDisk.partitions
for p in parts:
--
1.8.1.4
11 years
[PATCH] Add /boot/efi to suggested mountpoints (#960677)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 4331942..0b857aa 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -171,7 +171,7 @@ def ui_storage_logger():
def populate_mountpoint_store(store, used_mountpoints):
# sure, add whatever you want to this list. this is just a start.
- paths = ["/", "/boot", "/home", "/usr", "/var",
+ paths = ["/", "/boot", "/boot/efi", "/home", "/usr", "/var",
"swap", "biosboot", "prepboot"]
for path in paths:
if path not in used_mountpoints:
--
1.8.1.4
11 years
[PATCH] Update biosboot error message (#960691)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
blivet/__init__.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 93ed9b9..2b9358b 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -1540,10 +1540,9 @@ class Blivet(object):
if missing:
errors.append(_("Your BIOS-based system needs a special "
- "partition to boot with %s's new "
- "disk label format (GPT). To continue, "
- "please create a 1MB 'BIOS Boot' type "
- "partition.") % productName)
+ "partition to boot from a GPT disk label. "
+ "To continue, please create a 1MB "
+ "'biosboot' type partition."))
if not swaps:
installed = Size(spec="%s kb" % util.total_memory())
--
1.8.1.4
11 years
[PATCH 1/4] Add a couple more things to .gitignore.
by Chris Lumens
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index 754631c..2b53f5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,7 @@ config.log
config.status
config.sub
configure
+data/liveinst/gnome/fedora-welcome.desktop
depcomp
dirbrowser
gtk-doc.m4
@@ -57,6 +58,8 @@ py-compile
stamp-h1
tags
updates.img
+utils/dd/dd_extract
+utils/dd/dd_list
widgets/doc/AnacondaWidgets-*.txt
widgets/doc/AnacondaWidgets.*
widgets/doc/*.stamp
--
1.8.1.2
11 years