[PATCH rhel7-branch] Fix unused variable name pylint doesn't like (#804511)
by Radek Vykydal
Related: rhbz#804511
---
pyanaconda/nm.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index c56f610..64b045e 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -511,7 +511,7 @@ def _device_settings(name):
settings = _find_settings(name, 'vlan', 'interface-name')
if not settings:
# connections generated by NM from iBFT
- parent, _sep, vlanid = name.partition(".")
+ _parent, _sep, vlanid = name.partition(".")
settings = _find_settings(int(vlanid), 'vlan', 'id')
else:
settings = _find_settings(name, 'connection', 'interface-name')
--
1.9.3
9 years, 7 months
[initial-setup][rhel7-branch/master][PATCH] Populate README (#1110178)
by Martin Kolman
Resolves: rhbz#1110178
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
MANIFEST.in | 1 +
README | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/MANIFEST.in b/MANIFEST.in
index 9c43888..b127f11 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,5 @@
include COPYING
+include README.rst
include Makefile
recursive-include systemd *
recursive-include scripts *
diff --git a/README b/README
index e69de29..9e115f0 100644
--- a/README
+++ b/README
@@ -0,0 +1,57 @@
+Initial Setup
+=============
+Initial Setup is an application that can run during the first start
+of a newly installed computer and makes it possible to configure the
+computer according to better serve the needs of the user.
+
+As most os the configuration options are already present during the
+OS installation in Anaconda, Initial Setup mainly host options that
+can need to be presented during the first start, such as displaying the
+EULA on RHEL. Initial Setup is also often used to create a user
+as many systems are often automatically installed with kickstart
+and the user is only expected to create their own user account.
+
+Still, while Initial Setup normally indeed does not have many options
+available, if the firstboot --recofing kickstart command is provided
+during the installation, Initial Setup will provide all configuration
+options available. This is usually used for the so called OEM installation
+where an OEM installs the computer, which is then shipped to the end user
+which uses Initial Setup for the final configuration according to their
+need.
+
+Architecture
+============
+Initial Setup is basically just a thin wrapper for running spokes from Anaconda.
+Still, it has its own Hub, one spoke (the EULA spoke) and a translation domain ("initial-setup").
+
+As with Anaconda, Initial Setup has both a GUI and TUI version and the package is split
+to a core and GUI & TUI sub packages.
+
+As Initial Setup needs to run during the early boot, it is started by a systemd unit
+configured to start before the normal login screen. On RHEL7 Initial Setup is by default
+followed by the legacy Firstboot utility, which hosts the Subscription Manager plugin.
+If the given OS instance uses the Gnome 3 desktop environment Firstboot is followed by
+the Gnome Initial Setup, that enables the user to customize their computer even more.
+On Fedora Initial Setup is followed directly by GIS, provided Gnome 3 is installed.
+
+* RHEL7: IS -> Firstboot -> [GIS]
+* Fedora: IS -> [GIS]
+
+Addons
+======
+Just as Anaconda, also Initial Setup can be used to host third party addons - flexible
+yet powerful modules that can configure the system based on data in kickstart
+while presenting a nice UI to the user. Addons can have a GUI, TUI or can be even
+headless, working only with data in their kickstart section or from other sources.
+
+For a comprehensive documentation about Anaconda/Intial Setup see the
+"Anaconda Addon Development Guide" from Vratislav Podzimek:
+
+* https://vpodzime.fedorapeople.org/anaconda-addon-development-guide/
+
+Contributing
+============
+* Initial Setup is released under GPLv2+
+* upstream source code repository is on Fedorahosted: https://git.fedorahosted.org/git/initial-setup.git
+* for patch review Initial Setup uses the Anaconda Patches mailing list: https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
+ (please note that you need to be subscribed to the list to send patches, due to previous issues with SPAM on the list)
--
1.9.3
9 years, 7 months
[PATCH] When in doubt, use "Done"
by Martin Kolman
So after digging through the horrendous Firstboot source code,
it looks like there is indeed no way to check if a page of a given
firstboot multi-page module is the last or not...
This probably did not surface earlier as the multi page modules, such
as Subscription Manager, were probably followed by a single page module,
so all their pages just had a "Forward" label on their next-button and
everything was fine. On the other hand, we will soon have the Subscription
Manager module as the only Firstboot module since the KDUMP plugin has been
converted to an Anaconda addon.
As there does not seem to be any straightforward solution without changes to
both the module interface and to the Subscription Manager module (and any other
multi-page modules), I've done the only think that can in my opinion improve the
current situation at least a bit, and that is I've changed the label for all pages
of the last (or only) module from "Finished" to "Done", as clicking "Done" a few
times makes more sense than clicking "Finish" multiple times.
Martin Kolman (1):
Replace Finish with Done on the next button (#1107887)
firstboot/interface.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.9.3
9 years, 7 months
[PATCH rhel7-branch] network: GUI: reactivate connection automatically after configuration (#1033063)
by Radek Vykydal
Resolves: rhbz#1033063
We used to require turning the connection off and on for the configuration to
be actually applied which is what most of the users doesn't seem to expect.
---
pyanaconda/ui/gui/spokes/network.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 355756f..6354041 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -541,6 +541,13 @@ class NetworkControlBox(GObject.GObject):
log.debug("network: on_edit_connection: can't find connection for device %s", devname)
return
+ if dev_cfg.device_type != NetworkManager.DeviceType.WIFI \
+ and dev_cfg.get_iface() in nm.nm_activated_devices():
+ # Reactivate the connection after configuring it (if it changed)
+ settings = nm.nm_get_settings(uuid, "connection", "uuid")
+ settings_changed = lambda: settings != nm.nm_get_settings(uuid, "connection", "uuid")
+ activate = (uuid, devname, settings_changed)
+
log.info("network: configuring connection %s device %s ssid %s",
uuid, devname, self.selected_ssid)
self.kill_nmce(msg="Configure button clicked")
--
1.9.3
9 years, 7 months
[PATCH] Use shim on aarch64.
by Peter Jones
We have shim and grub working together on aarch64 now, so we may as well
use them.
(this also makes the case of boot${arch}.efi not mixed-case, which
should guarantee it's in FAT rather than VFAT...)
Related: rhbz#1100048
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
share/aarch64.tmpl | 2 +-
share/efi.tmpl | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/share/aarch64.tmpl b/share/aarch64.tmpl
index c341aae..66af43f 100644
--- a/share/aarch64.tmpl
+++ b/share/aarch64.tmpl
@@ -27,7 +27,7 @@ mkdir ${KERNELDIR}
<% efiargs=""; efigraft="" %>
%if exists("boot/efi/EFI/*/grubaa64.efi"):
<%
- efiarch = 'AARCH64'
+ efiarch = 'AA64'
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
images = ["images/efiboot.img"]
for img in images:
diff --git a/share/efi.tmpl b/share/efi.tmpl
index 6e0c600..3e3ca19 100644
--- a/share/efi.tmpl
+++ b/share/efi.tmpl
@@ -1,5 +1,6 @@
<%page args="configdir, KERNELDIR, efiarch, isolabel"/>
<%
+from string import lower
EFIBOOTDIR="EFI/BOOT"
APPLE_EFI_ICON=inroot+"/usr/share/pixmaps/bootloader/fedora.icns"
APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol"
@@ -7,14 +8,9 @@ APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol"
mkdir ${EFIBOOTDIR}
mkdir ${EFIBOOTDIR}/fonts/
-%if efiarch == 'AARCH64':
-install boot/efi/EFI/*/grubaa64.efi ${EFIBOOTDIR}/BOOTAA64.efi
-install boot/efi/EFI/*/grubaa64.efi ${EFIBOOTDIR}/grubaa64.efi
-%else:
-install boot/efi/EFI/*/shim.efi ${EFIBOOTDIR}/BOOT${efiarch}.efi
+install boot/efi/EFI/*/shim.efi ${EFIBOOTDIR}/BOOT${efiarch}.EFI
install boot/efi/EFI/*/MokManager.efi ${EFIBOOTDIR}/
-install boot/efi/EFI/*/gcdx64.efi ${EFIBOOTDIR}/grubx64.efi
-%endif
+install boot/efi/EFI/*/gcd${efiarch|lower}.efi ${EFIBOOTDIR}/grub${efiarch|lower}.efi
install boot/efi/EFI/*/fonts/unicode.pf2 ${EFIBOOTDIR}/fonts/
%if exists("usr/share/shim/lockdown.efi"):
install usr/share/shim/lockdown.efi ${EFIBOOTDIR}/
--
1.9.3
9 years, 7 months
[PATCH master/rhel7] Allow disc swapping with "inst.ks=cdrom[:...]" (#1122104)
by Will Woods
Hi!
So here's a couple patches that will let you swap CDs to load your kickstart
off CD if you're also installing off a CD/DVD. I guess people do this
sometimes?
I've tested it out locally - yes, I had to dust off my CD-Rs because
virt-manager doesn't seem to like you ejecting a virtual CD? Whatever.
Anyway it totally works and stuff.
And it *only* triggers if you're using literally "inst.ks=cdrom[:...]" as a
boot argument, so it shouldn't affect any other boot paths.
First patch adds some helper functions, the second patch uses them to do
stuff.
diffstat:
dracut/anaconda-diskroot | 11 +++++++++++
dracut/fetch-kickstart-disk | 15 +++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
Thanks for your time, etc.
-w
9 years, 7 months
[PATCH rhel7-branch] yumpayload: correctly handle new NFS installation source when using inst.stage2=nfs:...
by Will Woods
This block of code runs when you're setting up a new NFS installation
source (i.e. method.method is 'nfs'). At this point 'device' is the
mount device for DRACUT_REPODIR.
If you have "inst.stage2=nfs:host:/path", 'device' is going to be
"host:/path", and iutil.parseNfsUrl('nfs:%s' % device) yields
host="host" and path="/path".
(If you have "inst.stage2=hd:sdX:..." you'll get host="sdX" and
path="path"; otherwise you probably won't have DRACUT_REPODIR mounted
and thus no 'device'.)
The problem, then, is this: if you have 'path', then 'path in device' is
always true, because 'path' was just split out of 'device'. Which means
we'll always assume that DRACUT_REPODIR is the mount we want, even if
it's not!
To fix this, we need to actually check to see if the thing mounted at
DRACUT_REPODIR is actually the same as the thing in our 'method' object.
If we have the same host and path, we can just use the mount as-is,
otherwise we should mount the newly-provided source.
Resolves: rhbz#1001638
---
pyanaconda/packaging/yumpayload.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 1516cbb..d5ee8f3 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -746,7 +746,8 @@ reposdir=%s
needmount = True
if device:
_options, host, path = iutil.parseNfsUrl('nfs:%s' % device)
- if path and path in device:
+ if method.server and method.server == host and \
+ method.dir and method.dir == path:
needmount = False
path = DRACUT_REPODIR
if needmount:
--
1.9.3
9 years, 7 months
[blivet][rhel7-branch][PATCH] Return early when setting new size for non-existent partition.
by David Lehman
Related: rhbz#978266
---
blivet/devices.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/blivet/devices.py b/blivet/devices.py
index 4496ad9..b22ee25 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1979,6 +1979,7 @@ class PartitionDevice(StorageDevice):
self._size = newsize
self.req_size = newsize
self.req_base_size = newsize
+ return
if newsize > self.disk.size:
raise ValueError("partition size would exceed disk size")
--
1.9.3
9 years, 7 months
[blivet][PATCH] Use Decimal for math in Size.convertTo.
by David Lehman
Size.__div__ converts the Decimal result to a Size, which rounds its
numerical argument (byte count) down to an integer. Size.convertTo is
meant to retain precision.
---
blivet/size.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/size.py b/blivet/size.py
index 4c23c11..f2a32ce 100644
--- a/blivet/size.py
+++ b/blivet/size.py
@@ -269,7 +269,7 @@ class Size(Decimal):
check = _makeSpecs(prefix, abbr, False)
if spec in check:
- return Decimal(self / Decimal(factor))
+ return Decimal(Decimal(self) / Decimal(factor))
return None
--
1.9.3
9 years, 7 months