[lorax-master/rhel7] Use string for releasever not int (#1067746)
by Brian C. Lane
environmental variables need to be strings and there is no compelling
reason to force this to an int.
Related: rhbz#1067746
---
src/sbin/livemedia-creator | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
index ee91855..324edc2 100755
--- a/src/sbin/livemedia-creator
+++ b/src/sbin/livemedia-creator
@@ -393,7 +393,7 @@ class KernelInfo(object):
def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024,
vcpus=1, arch=None, title="Linux", project="Linux",
- releasever=17):
+ releasever="7.0"):
"""
Generate an appliance description file
@@ -823,7 +823,7 @@ if __name__ == '__main__':
help="Substituted for @TITLE@ in bootloader config files" )
parser.add_argument( "--project", default="Red Hat Enterprise Linux",
help="substituted for @PROJECT@ in bootloader config files" )
- parser.add_argument( "--releasever", type=int, default=7,
+ parser.add_argument( "--releasever", default="7.0",
help="substituted for @VERSION@ in bootloader config files" )
parser.add_argument( "--volid", default=None, help="volume id")
parser.add_argument( "--squashfs_args",
--
1.8.5.3
10 years, 1 month
[PATCH 0/2] pylint changes for master
by Brian C. Lane
These changes result in an almost clean pylint 1.1.0 run on master -- there is
a bug where it is complaining about an illegal symbol that is picked up by
NetworkManager introspection, dshea is looking into that. These all also work
with pylint 1.0.0
Brian C. Lane (2):
pylint: change disable-msg to disable
pylint: Add a pile of new E1101 exceptions
anaconda | 8 +--
dracut/parse-kickstart | 10 ++--
dracut/python-deps | 4 +-
pyanaconda/anaconda_log.py | 2 +-
pyanaconda/anaconda_optparse.py | 2 +-
pyanaconda/bootloader.py | 2 +-
pyanaconda/constants.py | 2 +-
pyanaconda/constants_text.py | 2 +-
pyanaconda/exception.py | 2 +-
pyanaconda/flags.py | 2 +-
pyanaconda/network.py | 4 +-
pyanaconda/packaging/__init__.py | 4 +-
pyanaconda/packaging/tarpayload.py | 2 +-
pyanaconda/packaging/yumpayload.py | 2 +-
pyanaconda/sitecustomize.py | 2 +-
pyanaconda/threads.py | 2 +-
pyanaconda/ui/common.py | 4 +-
pyanaconda/ui/gui/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/__init__.py | 4 +-
pyanaconda/ui/gui/spokes/custom.py | 2 +-
pyanaconda/ui/gui/spokes/lib/accordion.py | 4 +-
pyanaconda/ui/gui/spokes/lib/cart.py | 6 +--
pyanaconda/ui/gui/spokes/lib/detailederror.py | 2 +-
pyanaconda/ui/gui/spokes/lib/resize.py | 2 +-
pyanaconda/ui/gui/spokes/lib/summary.py | 4 +-
pyanaconda/ui/gui/spokes/network.py | 12 ++---
pyanaconda/ui/gui/spokes/software.py | 4 +-
pyanaconda/ui/gui/spokes/source.py | 6 +--
pyanaconda/ui/gui/spokes/storage.py | 4 +-
pyanaconda/ui/helpers.py | 2 +-
pyanaconda/ui/tui/simpleline/__init__.py | 4 +-
pyanaconda/ui/tui/spokes/__init__.py | 6 +--
pyanaconda/ui/tui/spokes/source.py | 4 +-
scripts/anaconda-yum | 4 +-
tests/glade/markup/check_markup.py | 2 +-
tests/pyanaconda_tests/iutil_test.py | 10 ++--
tests/pyanaconda_tests/timezone_test.py | 4 +-
tests/pylint/markup.py | 2 +-
tests/pylint/pylint-false-positives | 73 +++++++++++++++++++++++++++
tests/storage/cases/__init__.py | 4 +-
40 files changed, 148 insertions(+), 75 deletions(-)
--
1.8.5.3
10 years, 1 month
[master/rhel7-branch] /etc/adjtime not wanted on s390(x)
by Vratislav Podzimek
Easy fix for the bug with wrong /etc/adjtime file written out on s390(x)
systems. I cannot push the patch now, but I want to deal with it now and put it
into my backlog and push it once it's possible.
Vratislav Podzimek (1):
Do not write out /etc/adjtime file on s390(x) (#1070748)
pyanaconda/timezone.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
1.8.5.3
10 years, 1 month
[PATCH] Fix console for s390 and 'noshell' mode (#1070672)
by Will Woods
So the way sshd installs work, we actually do need to run tmux on s390 -
when the user connects to the system, it'll attach them to the existing
tmux session.
Relatedly, we also actually need to use tmux when in 'noshell' mode,
because anaconda-direct.service doesn't allow any input from stdin, so
e.g. you can't answer the VNC question.
So: instead of disabling tmux for noshell or s390x, we should do the
following:
1) Start anaconda inside a detached tmux session
2) If "noshell", lock down tmux (close the shell, disallow new windows)
3) If s390x, run anaconda-direct.service like usual
This commit also silences an error message about the missing 'null' in
anaconda-direct.service.
---
data/systemd/Makefile.am | 1 +
data/systemd/anaconda-direct.service | 7 +------
data/systemd/anaconda-noshell.service | 18 ++++++++++++++++++
data/systemd/anaconda-tmux@.service | 4 ++--
data/systemd/anaconda.service | 3 +--
5 files changed, 23 insertions(+), 10 deletions(-)
create mode 100644 data/systemd/anaconda-noshell.service
diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am
index 2c4e692..d27ba2f 100644
--- a/data/systemd/Makefile.am
+++ b/data/systemd/Makefile.am
@@ -21,6 +21,7 @@ systemddir = $(prefix)/lib/systemd/system
generatordir = $(prefix)/lib/systemd/system-generators
dist_systemd_DATA = anaconda.service \
+ anaconda-noshell.service \
anaconda-direct.service \
anaconda.target \
anaconda-tmux@.service \
diff --git a/data/systemd/anaconda-direct.service b/data/systemd/anaconda-direct.service
index b4c1f2f..9bf172a 100644
--- a/data/systemd/anaconda-direct.service
+++ b/data/systemd/anaconda-direct.service
@@ -1,6 +1,3 @@
-[Install]
-WantedBy=anaconda.target
-
[Unit]
Description=the anaconda installation program
Wants=instperf.service rsyslog.service systemd-udev-settle.service NetworkManager.service
@@ -8,15 +5,13 @@ After=instperf.service rsyslog.service systemd-udev-settle.service NetworkManage
Requires=anaconda.service
# TODO: use ConditionArchitecture in systemd v210 or later
ConditionPathIsDirectory=|/sys/hypervisor/s390
-ConditionKernelCommandLine=|noshell
-ConditionKernelCommandLine=|inst.noshell
[Service]
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr
Type=oneshot
WorkingDirectory=/root
ExecStart=/usr/sbin/anaconda
-StandardInput=
+StandardInput=null
StandardOutput=journal+console
StandardError=journal+console
TimeoutSec=0
diff --git a/data/systemd/anaconda-noshell.service b/data/systemd/anaconda-noshell.service
new file mode 100644
index 0000000..a57af39
--- /dev/null
+++ b/data/systemd/anaconda-noshell.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Restrict Anaconda Text Console
+After=anaconda.service
+Before=anaconda-tmux@.service anaconda-sshd.service
+ConditionKernelCommandLine=|inst.noshell
+ConditionKernelCommandLine=|noshell
+
+[Service]
+Type=oneshot
+WorkingDirectory=/root
+ExecStart=/usr/bin/tmux unbind-key -a; \
+ kill-window -t anaconda:shell; \
+ bind-key 1 select-window -t :1; \
+ bind-key 2 select-window -t :2; \
+ bind-key 3 select-window -t :3; \
+ bind-key 4 select-window -t :4; \
+ bind-key 5 select-window -t :5; \
+ bind-key ? list-keys
diff --git a/data/systemd/anaconda-tmux@.service b/data/systemd/anaconda-tmux@.service
index 6a3f58d..e2fd1b8 100644
--- a/data/systemd/anaconda-tmux@.service
+++ b/data/systemd/anaconda-tmux@.service
@@ -2,8 +2,8 @@
Description=Anaconda Text Console
Requires=anaconda.service
After=anaconda.target anaconda.service
-ConditionKernelCommandLine=!noshell
-ConditionKernelCommandLine=!inst.noshell
+# TODO: use ConditionArchitecture in systemd v210 or later
+ConditionPathIsDirectory=!/sys/hypervisor/s390
[Service]
Type=idle
diff --git a/data/systemd/anaconda.service b/data/systemd/anaconda.service
index e6104b0..a70528b 100644
--- a/data/systemd/anaconda.service
+++ b/data/systemd/anaconda.service
@@ -1,8 +1,7 @@
[Unit]
Description=Anaconda
After=anaconda.target
-ConditionKernelCommandLine=!noshell
-ConditionKernelCommandLine=!inst.noshell
+Wants=anaconda-noshell.service
[Service]
Type=forking
--
1.8.5.3
10 years, 1 month
[PATCH rhel7-branch] network kickstart: do not bind to MAC if SUBCHANNELS are present (#1070232)
by Radek Vykydal
Resolves: rhbz#1070232
---
dracut/parse-kickstart | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 2c70078..562d4f9 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -338,6 +338,7 @@ def ksnet_to_ifcfg(net, filename=None):
s390cfg = s390_settings(dev)
if s390cfg['SUBCHANNELS']:
+ ifcfg.pop('HWADDR')
ifcfg['SUBCHANNELS'] = s390cfg['SUBCHANNELS']
if s390cfg['NETTYPE']:
ifcfg['NETTYPE'] = s390cfg['NETTYPE']
--
1.7.11.7
10 years, 1 month
[PATCH] Check that the addon selection state exists before reading it
by David Shea
An addon state may not be present if switching from an installation
source with a different set of groups.
---
pyanaconda/ui/gui/spokes/software.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index bfae3ae..6302827 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -309,13 +309,16 @@ class SoftwareSelectionSpoke(NormalSpoke):
def _addAddon(self, grp):
(name, desc) = self.payload.groupDescription(grp)
- # If the add-on was previously selected by the user, select it
- if self._addonStates[grp] == self._ADDON_SELECTED:
- selected = True
- # If the add-on was previously de-selected by the user, de-select it
- elif self._addonStates[grp] == self._ADDON_DESELECTED:
- selected = False
- # Otherwise, use the default state
+ if grp in self._addonStates:
+ # If the add-on was previously selected by the user, select it
+ if self._addonStates[grp] == self._ADDON_SELECTED:
+ selected = True
+ # If the add-on was previously de-selected by the user, de-select it
+ elif self._addonStates[grp] == self._ADDON_DESELECTED:
+ selected = False
+ # Otherwise, use the default state
+ else:
+ selected = self.payload.environmentOptionIsDefault(self.environment, grp)
else:
selected = self.payload.environmentOptionIsDefault(self.environment, grp)
--
1.8.5.3
10 years, 1 month
[rhel7/master] Set the name in the volume group store (#1070854)
by David Shea
The row insert when renaming a volume group was inserting the freespace
into the name column.
Resolves: rhbz#1070854
---
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 c6456bd..2e391b9 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2476,7 +2476,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
c = self.__storage.devicetree.getDeviceByName(self._device_container_name)
freeSpace = getattr(c, "freeSpace", None)
- self._containerStore.insert(idx, self._container_store_row(freeSpace))
+ self._containerStore.insert(idx, self._container_store_row(self._device_container_name, freeSpace))
self._containerCombo.set_active(idx)
self._modifyContainerButton.set_sensitive(not container_exists)
--
1.8.5.3
10 years, 1 month
[PATCH] Let Gtk pick the size for the isoChooserDialog (#973376)
by David Shea
If it's not big enough now, it's not our problem.
Also converted the dialog from a GtkDialog containing a
GtkFileChooserWidget into just a GtkFileChooserDialog, which is
basically the same thing but one less layer of objects that we have to
define for ourselves.
Unrelated things that glade changed but that seem ok enough to keep: a
<style> element was moved from the middle of an <object> element to the
end of it, and two instances of "icon-size" were changed to "icon_size".
---
pyanaconda/ui/gui/spokes/source.glade | 32 +++++++++++---------------------
pyanaconda/ui/gui/spokes/source.py | 2 +-
2 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 25b8ff3..033f06c 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Jan 16 14:59:10 2014 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<!-- interface-requires AnacondaWidgets 1.0 -->
<object class="GtkFileFilter" id="isoFilter">
<patterns>
<pattern>*.iso</pattern>
</patterns>
</object>
- <object class="GtkDialog" id="isoChooserDialog">
- <property name="width_request">550</property>
- <property name="height_request">320</property>
+ <object class="GtkFileChooserDialog" id="isoChooserDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="type_hint">dialog</property>
<property name="decorated">False</property>
+ <property name="create_folders">False</property>
+ <property name="filter">isoFilter</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="can_focus">False</property>
@@ -61,17 +61,7 @@
</packing>
</child>
<child>
- <object class="GtkFileChooserWidget" id="isoChooser">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="create_folders">False</property>
- <property name="filter">isoFilter</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
@@ -1040,9 +1030,6 @@
<property name="can_focus">False</property>
<property name="toolbar_style">icons</property>
<property name="show_arrow">False</property>
- <style>
- <class name="inline-toolbar"/>
- </style>
<property name="icon_size">1</property>
<child>
<object class="GtkToolButton" id="addButton">
@@ -1101,6 +1088,9 @@
<property name="homogeneous">True</property>
</packing>
</child>
+ <style>
+ <class name="inline-toolbar"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
@@ -1306,7 +1296,7 @@
<property name="can_focus">False</property>
<property name="ypad">3</property>
<property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">2</property>
+ <property name="icon_size">2</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1381,7 +1371,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">2</property>
+ <property name="icon_size">2</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 3b724dd..a3445d6 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -233,7 +233,7 @@ class IsoChooser(GUIObject):
def __init__(self, data):
GUIObject.__init__(self, data)
- self._chooser = self.builder.get_object("isoChooser")
+ self._chooser = self.builder.get_object("isoChooserDialog")
# pylint: disable-msg=W0221
def refresh(self, currentFile=""):
--
1.8.5.3
10 years, 1 month
[master/rhel7] Only run gtk actions in the gtk thread.
by David Shea
Move a couple of things out of the AnaDataTimeThread that don't depend
on anything happening in the rest of the thread. Decorate _set_timezone
so that it can be called from the thread.
Resolves: rhbz#1067405
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 2ad9f95..103338c 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -395,6 +395,15 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
self._regions_zones = timezone.get_all_regions_and_timezones()
+ # Set the initial sensitivity of the AM/PM toggle based on the time-type selected
+ self._radioButton24h.emit("toggled")
+
+ if not flags.can_touch_runtime_system("modify system time and date"):
+ self._set_date_time_setting_sensitive(False)
+
+ self._config_dialog = NTPconfigDialog(self.data)
+ self._config_dialog.initialize()
+
threadMgr.add(AnacondaThread(name=constants.THREAD_DATE_TIME,
target=self._initialize))
@@ -424,9 +433,6 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
for city, xlated in sorted(cities, cmp=_compare_cities):
self.add_to_store_xlated(self._citiesStore, city, xlated)
- if self._radioButton24h.get_active():
- self._set_amPm_part_sensitive(False)
-
self._update_datetime_timer_id = None
if timezone.is_valid_timezone(self.data.timezone.timezone):
self._set_timezone(self.data.timezone.timezone)
@@ -436,12 +442,6 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
self._set_timezone(DEFAULT_TZ)
self.data.timezone.timezone = DEFAULT_TZ
- if not flags.can_touch_runtime_system("modify system time and date"):
- self._set_date_time_setting_sensitive(False)
-
- self._config_dialog = NTPconfigDialog(self.data)
- self._config_dialog.initialize()
-
time_init_thread = threadMgr.get(constants.THREAD_TIME_INIT)
if time_init_thread is not None:
hubQ.send_message(self.__class__.__name__,
@@ -531,6 +531,7 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
self._ntpSwitch.set_active(ntp_working)
+ @gtk_action_nowait
def _set_timezone(self, timezone):
"""
Sets timezone to the city/region comboboxes and the timezone map.
--
1.8.5.3
10 years, 2 months