[PATCH 1/3] Hook up jenkins support into makebumpver.
by Chris Lumens
First, add a line to your ~/.rhbzauth file that points to the json API on your
jenkins server:
JENKINS=http://jenkins.wherever.com/api/json
If this is not set, then the jenkins check will be skipped.
Then, make sure the name being passed to makebumpver is the same as the
beginning of some jenkins job you want to check, and that self.git_branch
is the end of the same jenkins job. Naming is important.
For now this is only in an advisory role - jenkins will be checked and if the
tests do not pass, a warning will be logged. But it will not stop the build.
---
scripts/makebumpver | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 50 insertions(+), 4 deletions(-)
diff --git a/scripts/makebumpver b/scripts/makebumpver
index 798e7a7..4300d84 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -3,7 +3,7 @@
# makebumpver - Increment version number and add in RPM spec file changelog
# block. Ensures rhel*-branch commits reference RHEL bugs.
#
-# Copyright (C) 2009-2014 Red Hat, Inc.
+# Copyright (C) 2009-2015 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
@@ -26,14 +26,17 @@ log = logging.getLogger("bugzilla")
log.setLevel(logging.INFO)
import bugzilla
+from contextlib import closing
import datetime
import getopt
import getpass
+import json
import os
import re
import subprocess
import sys
import textwrap
+import urllib
from ConfigParser import ConfigParser
class MakeBumpVer:
@@ -41,6 +44,7 @@ class MakeBumpVer:
log.debug("%s", kwargs)
self.bzserver = 'bugzilla.redhat.com'
self.bzurl = "https://%s/xmlrpc.cgi" % self.bzserver
+ self.jenkins = None
self.username = None
self.password = None
self.bz = None
@@ -57,6 +61,8 @@ class MakeBumpVer:
self.username = line[10:].strip('"\'')
elif line.startswith('RHBZ_PASSWORD='):
self.password = line[14:].strip('"\'')
+ elif line.startswith('JENKINS='):
+ self.jenkins = line[8:].strip('"\'')
self.gituser = self._gitConfig('user.name')
self.gitemail = self._gitConfig('user.email')
@@ -82,9 +88,11 @@ class MakeBumpVer:
self.skip_all = kwargs.get('skip_all', False)
self.tx_config = kwargs.get('tx_config')
self.skip_tx = kwargs.get("skip_tx", False)
+ self.skip_jenkins = kwargs.get("skip_jenkins", False)
if self.skip_all:
self.skip_acks = True
+ self.skip_jenkins = True
self.skip_tx = True
self.git_branch = None
@@ -441,6 +449,36 @@ class MakeBumpVer:
f.writelines(bottom)
f.close()
+ def check_jenkins(self):
+ if not self.git_branch:
+ log.error("No git branch, cannot check jenkins")
+ return False
+
+ if not self.jenkins:
+ log.warning("No jenkins defined, skipping")
+ return True
+
+ ret = True
+
+ with closing(urllib.urlopen(self.jenkins)) as f:
+ contents = f.readlines()
+
+ j = json.loads(contents[0])
+
+ # Get the name of the job we should be looking for in jenkins.
+ # This name is composed from the name of the project, plus the
+ # branch of the project without any "-branch" stuff at the end.
+ targetJob = self.name + "-" + self.git_branch
+ if targetJob.endswith("-branch"):
+ targetJob = targetJob[:-7]
+
+ for job in j["jobs"]:
+ if job["name"] == targetJob:
+ ret = job["color"] == "blue"
+ break
+
+ return ret
+
def check_transifex(self):
"""
Make sure that the transifex branch matches the current git branch
@@ -475,6 +513,10 @@ class MakeBumpVer:
if not self.skip_tx and not self.check_transifex():
sys.exit(1)
+ # For now, jenkins is in an advisory role so do not require it to pass.
+ if not self.skip_jenkins and not self.check_jenkins():
+ log.warning("jenkins test results do not pass; ignoring for now")
+
newVersion = self._incrementVersion()
fixedIn = "%s-%s-%s" % (self.name, newVersion, self.release)
rpmlog = self._rpmLog(fixedIn)
@@ -495,6 +537,7 @@ def usage(cmd):
sys.stdout.write(" -S, --skip-all Skip all checks\n")
sys.stdout.write(" -d, --debug Turn on debug logging to stdout\n")
sys.stdout.write(" --skip-tx Skip checking Transifex config for branch name\n")
+ sys.stdout.write(" --skip-jenkins Skip checking Jenkins for test results\n")
sys.stdout.write("\nThe -i switch is intended for use with utility commits that we do not need to\n")
sys.stdout.write("reference in the spec file changelog. The -m switch is used to map a Fedora\n")
sys.stdout.write("BZ number to a RHEL BZ number for the spec file changelog. Use -m if you have\n")
@@ -509,14 +552,14 @@ def main(argv):
tx_config = os.path.realpath(cwd + '/.tx/config')
name, version, release, bugreport = None, None, None, None
ignore, bugmap = None, None
- show_help, unknown, skip_acks, skip_all, skip_tx = False, False, False, False, False
+ show_help, unknown, skip_acks, skip_all, skip_tx, skip_jenkins = False, False, False, False, False, False
opts = []
try:
opts, _args = getopt.getopt(sys.argv[1:], 'n:v:r:b:i:m:sSd?',
['name=', 'version=', 'release=',
'bugreport=', 'ignore=', 'map=',
- 'debug', 'help', 'skip-tx'])
+ 'debug', 'help', 'skip-tx', 'skip-jenkins'])
except getopt.GetoptError:
show_help = True
@@ -541,6 +584,8 @@ def main(argv):
log.setLevel(logging.DEBUG)
elif o in ('--skip-tx'):
skip_tx = True
+ elif o in ('--skip-jenkins'):
+ skip_jenkins = True
elif o in ('-?', '--help'):
show_help = True
else:
@@ -577,7 +622,8 @@ def main(argv):
mbv = MakeBumpVer(name=name, version=version, release=release,
bugreport=bugreport, ignore=ignore, bugmap=bugmap,
configure=configure, spec=spec, skip_acks=skip_acks,
- skip_all=skip_all, tx_config=tx_config, skip_tx=skip_tx)
+ skip_all=skip_all, tx_config=tx_config, skip_tx=skip_tx,
+ skip_jenkins=skip_jenkins)
mbv.run()
if __name__ == "__main__":
--
2.2.1
9 years, 4 months
[PATCH rhel7-branch] network: pass team opts to dracut for netroot (#1075666)
by Radek Vykydal
Resolves: rhbz#1075666
---
pyanaconda/network.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 05583b9..f86b0c2 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -365,6 +365,11 @@ def dracutBootArguments(devname, ifcfg, storage_ipaddr, hostname=None):
if hwaddr:
netargs.add("ifname=%s:%s" % (devname, hwaddr.lower()))
+ if ifcfg.get("TYPE") == "Team" or ifcfg.get("DEVICETYPE") == "Team":
+ slaves = get_team_slaves([devname, ifcfg.get("UUID")])
+ netargs.add("team=%s:%s" % (devname,
+ ",".join(dev for dev, _cfg in slaves)))
+
nettype = ifcfg.get("NETTYPE")
subchannels = ifcfg.get("SUBCHANNELS")
if blivet.arch.isS390() and nettype and subchannels:
--
1.9.3
9 years, 4 months
[anaconda/initial-setup][rhel7-branch][PATCH] Final help content enablement
by Martin Kolman
This patch set should be the last part of the puzzle needed to make the help system
in RHEL7 Anaconda complete.
The first patch adds handling for architectural suffixes, as unlike on Fedora, the
RHEL7 installation has some content that differs based on the current architecture.
The second patch is a quite minor one - it just redirects the EULA
spoke Help! button to show the Initial Setup hub content, as there is not really anything to
say about the EULA Spoke.
Martin Kolman (1):
Add support for architecture suffixes in help files (#1072033)
pyanaconda/ihelp.py | 42 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
--
2.1.0
9 years, 4 months
[lorax-rhel7] Remove imggraft from aarch64.tmpl (#1174475)
by Brian C. Lane
rhel7 branch doesn't use imggraft.
Related: rhbz#1174475
---
share/aarch64.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/aarch64.tmpl b/share/aarch64.tmpl
index 9f8c31c..be5871c 100644
--- a/share/aarch64.tmpl
+++ b/share/aarch64.tmpl
@@ -41,6 +41,6 @@ mkdir ${KERNELDIR}
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \
- ${efigraft} ${imggraft}
+ ${efigraft}
treeinfo images-${basearch} boot.iso images/boot.iso
%endif
--
1.9.3
9 years, 4 months
[PATCH] Show the event box immediately when setting infobar messages.
by David Shea
The only calls to set_info, set_warning and set_error that were not
immediately followed by a call to window.show_all() were bugs in that
the info bar would not be shown. Move the call to show() into the
widget, instead.
---
pyanaconda/ui/gui/helpers.py | 1 -
pyanaconda/ui/gui/hubs/__init__.py | 2 --
pyanaconda/ui/gui/spokes/custom.py | 22 ----------------------
pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 --
pyanaconda/ui/gui/spokes/network.py | 2 --
pyanaconda/ui/gui/spokes/storage.py | 2 --
widgets/src/BaseWindow.c | 1 +
7 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/pyanaconda/ui/gui/helpers.py b/pyanaconda/ui/gui/helpers.py
index 11b4b15..320f933 100644
--- a/pyanaconda/ui/gui/helpers.py
+++ b/pyanaconda/ui/gui/helpers.py
@@ -90,7 +90,6 @@ class GUISpokeInputCheckHandler(GUIInputCheckHandler):
self.clear_info()
if failed_check:
self.set_warning(failed_check.check_status)
- self.window.show_all()
# Implemented by GUIObject
@abstractmethod
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index a418c19..7da5888 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -220,12 +220,10 @@ class Hub(GUIObject, common.Hub):
if len(self._incompleteSpokes) == 0:
if self._checker and not self._checker.check():
self.set_warning(self._checker.error_message)
- self.window.show_all()
else:
msg = _("Please complete items marked with this icon before continuing to the next step.")
self.set_warning(msg)
- self.window.show_all()
self._updateContinueButton()
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index dd87a4d..2866011 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -691,7 +691,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._update_all_devices_in_selectors()
self._error = e
self.set_warning(_(DEVICE_CONFIGURATION_ERROR_MSG))
- self.window.show_all()
if not removed_device:
# nothing more to do
@@ -711,7 +710,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.refresh() # this calls self.clear_errors
self._error = e
self.set_warning(_(UNRECOVERABLE_ERROR_MSG))
- self.window.show_all()
return False
@ui_storage_logged
@@ -777,7 +775,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = e
self.set_warning(_("Device resize request failed. "
"Click for details."))
- self.window.show_all()
else:
_changed_size = True
@@ -851,7 +848,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = e
self.set_warning(_("Device reformat request failed. "
"Click for details."))
- self.window.show_all()
else:
# first, remove this selector from any old install page(s)
new_selector = None
@@ -984,7 +980,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if error:
self._error = error
self.set_warning(self._error)
- self.window.show_all()
self._populate_right_side(selector)
return
@@ -1006,7 +1001,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if error:
self._error = error
self.set_warning(self._error)
- self.window.show_all()
self._populate_right_side(selector)
return
@@ -1034,7 +1028,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
raid_level)
if error:
self.set_warning(error)
- self.window.show_all()
self._populate_right_side(selector)
return
@@ -1225,7 +1218,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
except ValueError as e:
self._error = e
self.set_error(_("Invalid device name: %s") % name)
- self.window.show_all()
else:
new_name = use_dev.name
log.debug("changing name of %s to %s", old_name, new_name)
@@ -1597,7 +1589,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# on_info_bar_clicked requires self._error to be set, so set it to the
# list of all errors and warnings that storage checking found.
- self.window.show_all()
self._error = "\n".join(self.errors + self.warnings)
return self._error == ""
@@ -1703,7 +1694,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.set_info(_("Added new %(type)s to existing "
"container %(name)s.")
% {"type" : type_str, "name" : container.name})
- self.window.show_all()
e = None
# the factory's error handling has replaced all of the devices
@@ -1714,12 +1704,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = e
self.set_error(_("Failed to add new device. Click for "
"details."))
- self.window.show_all()
except OverflowError as e:
log.error("invalid size set for partition")
self._error = e
self.set_error(_("Invalid partition size set. Use a valid integer."))
- self.window.show_all()
def on_add_clicked(self, button):
self._save_right_side(self._current_selector)
@@ -1828,7 +1816,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = e
self.set_warning(_("Device removal request failed. Click "
"for details."))
- self.window.show_all()
else:
if is_logical_partition:
self._storage_playground.removeEmptyExtendedPartitions()
@@ -2000,7 +1987,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if not disks:
self._error = "No disks selected. Keeping previous disk set."
self.set_info(self._error)
- self.window.show_all()
return
if set(disks) != self._device_disks:
@@ -2059,7 +2045,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if not disks:
self._error = "No disks selected. Not saving changes."
self.set_info(self._error)
- self.window.show_all()
return
log.debug("new container name: %s", name)
@@ -2067,7 +2052,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = _("Volume Group name %s is already in use. Not "
"saving changes.") % name
self.set_info(self._error)
- self.window.show_all()
return
if (set(disks) != set(self._device_disks) or
@@ -2125,7 +2109,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
except ValueError as e:
self._error = e
self.set_error(_("Invalid device name: %s") % self._device_container_name)
- self.window.show_all()
self._device_container_name = container_name
self.on_update_settings_clicked(None)
return
@@ -2333,20 +2316,17 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
log.error("doAutoPartition failed: %s", e)
self._error = e
self.set_error(_("No disks selected."))
- self.window.show_all()
except NotEnoughFreeSpaceError as e:
# No handling should be required for this.
log.error("doAutoPartition failed: %s", e)
self._error = e
self.set_error(_("Not enough free space on selected disks."))
- self.window.show_all()
except (StorageError, BootLoaderError) as e:
log.error("doAutoPartition failed: %s", e)
self._reset_storage()
self._error = e
self.set_error(_("Automatic partitioning failed. Click "
"for details."))
- self.window.show_all()
else:
self._devices = self._storage_playground.devices
# mark all new containers for automatic size management
@@ -2372,7 +2352,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = messages
self.set_error(_("Automatic partitioning failed. Click "
"for details."))
- self.window.show_all()
def on_create_clicked(self, button, autopartTypeCombo):
# Then do autopartitioning. We do not do any clearpart first. This is
@@ -2680,7 +2659,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._passphraseEntry.set_text("")
self.set_warning(_("Failed to unlock encrypted block device. "
"Click for details"))
- self.window.show_all()
return
log.info("unlocked %s, now going to populate devicetree...", device.name)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 703e8b8..1648c35 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -1050,11 +1050,9 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _show_no_network_warning(self):
self.set_warning(_("You need to set up networking first if you "\
"want to use NTP"))
- self.window.show_all()
def _show_no_ntp_server_warning(self):
self.set_warning(_("You have no working NTP server configured"))
- self.window.show_all()
def on_ntp_switched(self, switch, *args):
if switch.get_active():
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index a26bdbf..4f34853 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1446,7 +1446,6 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
msg = _("Host name is not valid: %s") % error
self.set_warning(msg)
self.network_control_box.entry_hostname.grab_focus()
- self.window.show_all()
else:
self.clear_info()
NormalSpoke.on_back_clicked(self, button)
@@ -1516,7 +1515,6 @@ class NetworkStandaloneSpoke(StandaloneSpoke):
msg = _("Host name is not valid: %s") % error
self.set_warning(msg)
self.network_control_box.entry_hostname.grab_focus()
- self.window.show_all()
else:
self.clear_info()
StandaloneSpoke._on_continue_clicked(self, window, user_data)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 4ecdfdc..455c394 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -519,7 +519,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.set_warning(_("Error checking storage configuration. Click for details."))
elif self.warnings:
self.set_warning(_("Warning checking storage configuration. Click for details."))
- self.window.show_all()
def initialize(self):
NormalSpoke.initialize(self)
@@ -691,7 +690,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
if self.data.bootloader.location == "none":
self.set_warning(_("You have chosen to skip boot loader installation. Your system may not be bootable."))
- self.window.show_all()
else:
self.clear_info()
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index a70f7cc..a9ce108 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -598,6 +598,7 @@ static void anaconda_base_window_set_info_bar(AnacondaBaseWindow *win, GtkMessag
gtk_container_add(GTK_CONTAINER(content_area), label);
gtk_info_bar_set_message_type(GTK_INFO_BAR(win->priv->info_bar), ty);
gtk_widget_show(win->priv->info_bar);
+ gtk_widget_show(win->priv->event_box);
win->priv->info_shown = TRUE;
}
--
2.1.0
9 years, 4 months
[PATCH 0/3] dnf environment selection
by David Shea
David Shea (3):
Remove unused methods for deselecting environments
Add a parameter to environmentGroups for wheter to include optionlist.
Move environment group selection logic to PackagePayload (#1179362)
pyanaconda/packaging/__init__.py | 9 +++++++--
pyanaconda/packaging/dnfpayload.py | 38 ++++++--------------------------------
pyanaconda/packaging/yumpayload.py | 35 +++++------------------------------
3 files changed, 18 insertions(+), 64 deletions(-)
--
2.1.0
9 years, 4 months
[blivet v2] Relax the blivet device name requirements (#1183061)
by David Shea
Allow ., .., and /'s in all kinds of btrfs device.
---
blivet/devices/btrfs.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index 13adbb4..b650854 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -138,6 +138,11 @@ class BTRFSDevice(StorageDevice):
spec = super(BTRFSDevice, self).fstabSpec
return spec
+ @classmethod
+ def isNameValid(cls, name):
+ # Override StorageDevice.isNameValid to allow pretty much anything
+ return not('\x00' in name)
+
class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice):
_type = "btrfs volume"
vol_id = btrfs.MAIN_VOLUME_ID
@@ -567,11 +572,6 @@ class BTRFSSubVolumeDevice(BTRFSDevice, RaidDevice):
data.name = self.name
data.preexist = self.exists
- @classmethod
- def isNameValid(cls, name):
- # Override StorageDevice.isNameValid to allow /
- return not('\x00' in name or name == '.' or name == '..')
-
class BTRFSSnapShotDevice(BTRFSSubVolumeDevice):
""" A btrfs snapshot pseudo-device.
--
2.1.0
9 years, 4 months
[anaconda][rhel7-branch][PATCH] Update help content version
by Martin Kolman
7.1.4 is the current latest help content version.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
anaconda.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index dc92a15..e0fae07 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -9,7 +9,7 @@ Group: Applications/System
URL: http://fedoraproject.org/wiki/Anaconda
%define anacondabuild %{name}-#VERSION#
-%define helpver 7.1.1
+%define helpver 7.1.4
# To generate Source0 do:
# git clone http://git.fedorahosted.org/git/anaconda.git
# git checkout -b archive-branch anaconda-%%{version}-%%{release}
--
2.1.0
9 years, 4 months
[PATCH] Switch to temporary transifex location
by Brian C. Lane
The patches are all pretty similar so I'll skip posting them all. I've created:
https://www.transifex.com/organization/bcl-anaconda/dashboard
with anaconda, blivet and pykickstart projects. I've uploaded the .po files from the last builds of:
anaconda
master
rhel7-branch
rhel6-branch
blivet
master
rhel7-branch
pykickstart
master
rhel7-branch
I've spot-checked the po files and I *think* they are ok, but transifex changes
the format when you pull them so a simple diff or checksum doesn't work.
Brian C. Lane (1):
Switch to temporary transifex branch
.tx/config | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
1.9.3
9 years, 4 months