[rhel7/blivet] prevent traceback when root device is not defined #rhbz883768
by Samantha N. Bueno
root defined as None was causing tracebacks when attempts to
determine root device's properties were run later in sanityCheck
resolves: rhbz#883768
---
blivet/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 9dc7f23..f7f03c2 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -1412,6 +1412,7 @@ class Blivet(object):
errors.append(_("You have not defined a root partition (/),
"
"which is required for installation of %s "
"to continue.") % (productName,))
+ return (errors, warnings)
if root and root.size < 250:
warnings.append(_("Your root partition is less than 250 "
--
1.7.11.7
11 years, 2 months
[rhel7/master] unpack product.img to /updates (#911873)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
product.img should place its files under /run/install/product
This maintains consistency between updates.img and product.img and
supports correct operation whether or not tmpfs is used for /tmp
---
dracut/anaconda-lib.sh | 2 +-
dracut/anaconda-netroot.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index 19573ed..30bf51e 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -95,7 +95,7 @@ anaconda_auto_updates() {
unpack_updates_img $dir/updates.img /updates
fi
if [ -e $dir/product.img ]; then
- unpack_updates_img $dir/product.img /updates/tmp/product
+ unpack_updates_img $dir/product.img /updates
fi
}
diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh
index 0425661..6217953 100755
--- a/dracut/anaconda-netroot.sh
+++ b/dracut/anaconda-netroot.sh
@@ -58,7 +58,7 @@ case $repo in
updates=$(fetch_url $repo/images/updates.img)
[ -n "$updates" ] && unpack_updates_img $updates /updates
product=$(fetch_url $repo/images/product.img)
- [ -n "$product" ] && unpack_updates_img $product /updates/tmp/product
+ [ -n "$product" ] && unpack_updates_img $product /updates
/sbin/dmsquash-live-root $runtime
fi
;;
--
1.8.1
11 years, 2 months
[PATCH 1/3] Swap the order of the part scheme combo and encryption checkbox.
by Chris Lumens
Currently, the encryption checkbox kind of looks like it belongs with the
radio button group. A little extra padding might also help.
---
pyanaconda/ui/gui/spokes/storage.glade | 72 +++++++++++++++++-----------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 85c2756..be81660 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -158,24 +158,6 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="encryption1_checkbutton">
- <property name="label" translatable="yes">_Encrypt my data. I'll set a passphrase later.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="hexpand">True</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_encrypt_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
<object class="GtkExpander" id="options1_expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -233,6 +215,24 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encryption1_checkbutton">
+ <property name="label" translatable="yes">_Encrypt my data. I'll set a passphrase later.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_encrypt_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
@@ -474,24 +474,6 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="encryption2_checkbutton">
- <property name="label" translatable="yes">_Encrypt my data. I'll set a passphrase later.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="hexpand">True</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_encrypt_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
<object class="GtkExpander" id="options2_expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -549,6 +531,24 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encryption2_checkbutton">
+ <property name="label" translatable="yes">_Encrypt my data. I'll set a passphrase later.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_encrypt_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
--
1.8.1.2
11 years, 2 months
[PATCH] Don't use "type" to name a variable.
by Radek Vykydal
---
pyanaconda/nm.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index 0991020..ab497a2 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -411,13 +411,13 @@ if __name__ == "__main__":
print devname
try:
- type = nm_device_type(devname)
+ devtype = nm_device_type(devname)
except UnknownDeviceError as e:
print " %s" % e
- type = None
- if type == NetworkManager.DeviceType.ETHERNET:
+ devtype = None
+ if devtype == NetworkManager.DeviceType.ETHERNET:
print " type %s" % "ETHERNET"
- elif type == NetworkManager.DeviceType.WIFI:
+ elif devtype == NetworkManager.DeviceType.WIFI:
print " type %s" % "WIFI"
wireless_device = devname
--
1.7.11.7
11 years, 2 months
[master] [PATCH] Unpack product.img to / and use /run/install/product (#911873)
by Vratislav Podzimek
This needs a change in product.img creation process so that the
product.img looks similar as our updates.img (i.e. containing the whole
directory tree with /run/install/product).
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
dracut/anaconda-netroot.sh | 2 +-
pyanaconda/installclass.py | 2 +-
pyanaconda/packaging/yumpayload.py | 2 +-
pyanaconda/product.py | 2 +-
pyanaconda/ui/gui/hubs/progress.py | 2 +-
tests/pyanaconda_test/product_test.py | 4 ++--
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh
index 0425661..6217953 100755
--- a/dracut/anaconda-netroot.sh
+++ b/dracut/anaconda-netroot.sh
@@ -58,7 +58,7 @@ case $repo in
updates=$(fetch_url $repo/images/updates.img)
[ -n "$updates" ] && unpack_updates_img $updates /updates
product=$(fetch_url $repo/images/product.img)
- [ -n "$product" ] && unpack_updates_img $product /updates/tmp/product
+ [ -n "$product" ] && unpack_updates_img $product /updates
/sbin/dmsquash-live-root $runtime
fi
;;
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index 753de20..1a39ca5 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -198,7 +198,7 @@ def availableClasses(showHidden=0):
for dir in env_path + ["installclasses",
"/tmp/updates/pyanaconda/installclasses",
- "/tmp/product/pyanaconda/installclasses",
+ "/run/install/product/pyanaconda/installclasses",
"%s/pyanaconda/installclasses" % get_python_lib(plat_specific=1) ]:
if os.access(dir, os.R_OK):
path.append(dir)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 9fe60ad..caa8649 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -116,7 +116,7 @@ class YumPayload(PackagePayload):
self.install_device = None
self._root_dir = "/tmp/yum.root"
- self._repos_dir = "/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anaconda.repos.d"
+ self._repos_dir = "/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/run/install/product/anaconda.repos.d"
self._yum = None
self._setup = False
diff --git a/pyanaconda/product.py b/pyanaconda/product.py
index 0edab7d..97e248e 100644
--- a/pyanaconda/product.py
+++ b/pyanaconda/product.py
@@ -35,7 +35,7 @@ config.set("Main", "UUID", "")
config.set("Main", "Version", os.environ.get("ANACONDA_PRODUCTVERSION", "bluesky"))
# Now read in the .buildstamp file, wherever it may be.
-config.read(["/tmp/product/.buildstamp", "/.buildstamp", os.environ.get("PRODBUILDPATH", "")])
+config.read(["/run/install/product/.buildstamp", "/.buildstamp", os.environ.get("PRODBUILDPATH", "")])
# Set up some variables we import throughout, applying a couple transforms as necessary.
bugUrl = config.get("Main", "BugURL")
diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
index 65cd9e4..06d63ad 100644
--- a/pyanaconda/ui/gui/hubs/progress.py
+++ b/pyanaconda/ui/gui/hubs/progress.py
@@ -147,7 +147,7 @@ class ProgressHub(Hub):
# directories without the language component. You know, just in case.
langs = expand_langs(os.environ["LANG"]) + [""]
paths = ["/tmp/updates/pixmaps/rnotes/%s/*.png",
- "/tmp/product/pixmaps/rnotes/%s/*.png",
+ "/run/install/product/pixmaps/rnotes/%s/*.png",
"/usr/share/anaconda/pixmaps/rnotes/%s/*.png"]
for (l, d) in itertools.product(langs, paths):
diff --git a/tests/pyanaconda_test/product_test.py b/tests/pyanaconda_test/product_test.py
index 9b0d864..9338f8a 100644
--- a/tests/pyanaconda_test/product_test.py
+++ b/tests/pyanaconda_test/product_test.py
@@ -19,14 +19,14 @@ class ProductTest(mock.TestCase):
os.uname.return_value = ('', '', '', '', 'i386')
os.environ = {}
- # fake /tmp/product/.buildstamp file
+ # fake /run/install/product/.buildstamp file
self.BUGURL = 'http://bug.url'
self.FINAL = 'false'
self.ARCH = 'i386'
self.NAME = '__anaconda'
self.UUID = '123456.%s' % self.ARCH
self.VERSION = '14'
- self.FILENAME = '/tmp/product/.buildstamp'
+ self.FILENAME = '/run/install/product/.buildstamp'
self.FILE = \
"[Main]\n"\
"BugURL: %s\n"\
--
1.7.11.7
11 years, 2 months
[master] [PATCH] Fix for the addons kickstart support
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/addons.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py
index 6028737..7c517c6 100644
--- a/pyanaconda/addons.py
+++ b/pyanaconda/addons.py
@@ -23,7 +23,8 @@ __all__ = ["AddonSection", "AddonRegistry", "AddonData", "collect_addon_paths"]
import os
from pykickstart.sections import Section
-
+from pykickstart.options import KSOptionParser
+
def collect_addon_paths(toplevel_addon_paths, ui_subdir="gui"):
"""This method looks into the directories present
in toplevel_addon_paths and registers each subdirectory
@@ -159,6 +160,6 @@ class AddonSection(Section):
self.addon_id = extra[0]
# if the addon is not registered, create dummy placeholder for it
- if self.addon_id and not hasattr(self.handler.addon, self.addon_id):
- setattr(self.handler.addon, self.addon_id, AddonData(self.addon_id))
+ if self.addon_id and not hasattr(self.handler.addons, self.addon_id):
+ setattr(self.handler.addons, self.addon_id, AddonData(self.addon_id))
--
1.7.11.7
11 years, 2 months
[master] Friday's bit of refactoring
by Vratislav Podzimek
PATCH 1/2 is refactoring and preparation for full-featured text mode.
PATCH 2/2 is something pylint suggested
Vratislav Podzimek (2):
Refactor pieces of the Datetime spoke and move some parts to
kickstart.py
kickstart.py needs udev that now lives in blivet
pyanaconda/kickstart.py | 58 +++++++++++++++++++++++------
pyanaconda/timezone.py | 3 ++
pyanaconda/ui/gui/spokes/datetime_spoke.py | 60 +++++++++---------------------
3 files changed, 68 insertions(+), 53 deletions(-)
--
1.7.11.7
11 years, 2 months
[LORAX rhel7/master] Make sure tmpfs is enabled (#908253)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
NOTE: better solution, but requires systemd to include tmp.mount
---
share/runtime-postinstall.tmpl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl
index e87a627..1c0f9ba 100644
--- a/share/runtime-postinstall.tmpl
+++ b/share/runtime-postinstall.tmpl
@@ -22,6 +22,10 @@ move etc/yum.repos.d etc/anaconda.repos.d
remove etc/systemd/system/default.target
symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
+## Make sure tmpfs is enabled
+mkdir etc/systemd/system/local-fs.target.wants/
+symlink /lib/systemd/system/tmp.mount etc/systemd/system/local-fs.target.wants/tmp.mount
+
## Disable unwanted systemd services
systemctl disable systemd-readahead-collect.service \
systemd-readahead-replay.service \
--
1.8.1
11 years, 2 months
[LORAX] Remove some env variables (#907692)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Some package scripts may call utilities using dbus. Since this is just a
chroot that will fail. This unsets DESKTOP and DBUS_SESSION_BUS_ADDRESS
to keep them from crashing.
---
src/pylorax/__init__.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index e1c0069..3eff6e8 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -121,6 +121,10 @@ class Lorax(BaseLoraxClass):
# so we have to add it ourselves
os.environ["PATH"] = "{0}:/sbin:/usr/sbin".format(os.environ["PATH"])
+ # remove some environmental variables that can cause problems with package scripts
+ env_remove = ('DISPLAY', 'DBUS_SESSION_BUS_ADDRESS')
+ [os.environ.pop(k) for k in env_remove if k in os.environ]
+
self._configured = True
def init_stream_logging(self):
--
1.8.1
11 years, 2 months
[PATCH] enable tmpfs (#908253)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
NOTE: This depends on systemd updating the tmp.mount unit so that it can be enabled with systemctl.
---
share/runtime-postinstall.tmpl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl
index e87a627..3153969 100644
--- a/share/runtime-postinstall.tmpl
+++ b/share/runtime-postinstall.tmpl
@@ -22,6 +22,9 @@ move etc/yum.repos.d etc/anaconda.repos.d
remove etc/systemd/system/default.target
symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
+## Enable tmpfs
+systemctl enable tmp.mount
+
## Disable unwanted systemd services
systemctl disable systemd-readahead-collect.service \
systemd-readahead-replay.service \
--
1.8.1
11 years, 2 months