[f21/master] Use first part of Product as repo name (#1128474)
by Brian C. Lane
Anaconda uses the Product from .buildstamp as the name of the repo to
use for mirror installations. This has to match an entry in
/etc/anaconda.repos.d/
We share the repositories between the various Products so we should only
use the first element (splitting on '-') as the name of the repo.
---
pyanaconda/packaging/__init__.py | 2 +-
pyanaconda/packaging/yumpayload.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index c368e0d..b8f13e2 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -677,7 +677,7 @@ class ArchivePayload(ImagePayload):
class PackagePayload(Payload):
""" A PackagePayload installs a set of packages onto the target system. """
- DEFAULT_REPOS = [productName.lower(), "rawhide"]
+ DEFAULT_REPOS = [productName.split('-')[0].lower(), "rawhide"]
def __init__(self, data):
if self.__class__ is PackagePayload:
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 6dca7f6..3c1994e 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -439,6 +439,7 @@ reposdir=%s
else:
# didn't find any base repo set and enabled
with self._base_repo_lock:
+ log.debug("No base_repo found in %s", BASE_REPO_NAMES)
self._base_repo = None
@property
--
1.9.3
9 years, 8 months
[PATCH] For yum-based installs, move the progress bar while packages install
by Chris Lumens
This is for master. For rhel7-branch, I need this plus a backport of
bd3e86eaf9d1b44bd272bdce753ed7fe485f9e4a to resolve the referenced bug.
Note that this only takes care of yuminstall.py. Other payloads:
* dnf - probably could use the same treatment
* live - appears to have its own progress bar already
* ostree - the number of objects jumps around during installation, making
this kind of progress bar problematic
* tar - doesn't appear to fully work right now, but should have this same
treatment when it does
- Chris
9 years, 8 months
[PATCH] Remove the mnemonics from the custom part toolbar.
by Chris Lumens
These kind of buttons only have mnemonics if they appear in an overflow menu,
which is not the case on custom partitioning.
---
pyanaconda/ui/gui/spokes/custom.glade | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index 8b46847..8c09b12 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -978,8 +978,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Add a new mount point.</property>
- <property name="label" translatable="yes" context="GUI|Custom Partitioning">_Add</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes" context="GUI|Custom Partitioning">Add</property>
<property name="icon_name">list-add-symbolic</property>
<signal name="clicked" handler="on_add_clicked" swapped="no"/>
</object>
@@ -995,8 +994,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Remove the selected mount point(s).</property>
- <property name="label" translatable="yes" context="GUI|Custom Partitioning">Remo_ve</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes" context="GUI|Custom Partitioning">Remove</property>
<property name="icon_name">list-remove-symbolic</property>
<signal name="clicked" handler="on_remove_clicked" swapped="no"/>
</object>
@@ -1012,8 +1010,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Configure selected mount point.</property>
- <property name="label" translatable="yes" context="GUI|Custom Partitioning">_Configure</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes" context="GUI|Custom Partitioning">Configure</property>
<property name="icon_name">preferences-system-symbolic</property>
<signal name="clicked" handler="on_configure_clicked" swapped="no"/>
</object>
@@ -1029,8 +1026,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Reload storage configuration from disk.</property>
- <property name="label" translatable="yes" context="GUI|Custom Partitioning">Re_fresh</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes" context="GUI|Custom Partitioning">Refresh</property>
<property name="icon_name">view-refresh-symbolic</property>
<signal name="clicked" handler="on_refresh_clicked" swapped="no"/>
</object>
@@ -1046,8 +1042,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Click for help.</property>
- <property name="label" translatable="yes" context="GUI|Custom Partitioning">_Help</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes" context="GUI|Custom Partitioning">Help</property>
<property name="icon_name">system-help-symbolic</property>
<signal name="clicked" handler="on_help_clicked" swapped="no"/>
</object>
--
1.9.3
9 years, 8 months
[PATCH] makeupdates: Report git diff errors
by Brian C. Lane
---
scripts/makeupdates | 42 +++++++++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 9 deletions(-)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 4d143cd..ece273a 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -170,20 +170,30 @@ def check_package_version(filename, package, check_release_id=True):
def doGitDiff(tag, args=None):
if args is None:
args=[]
- proc = subprocess.Popen(['git', 'diff', '--name-status', tag] + args,
+ cmd = ['git', 'diff', '--name-status', tag] + args
+ proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()
+ stderr=subprocess.PIPE)
+ output = proc.communicate()
+
+ if proc.returncode:
+ raise RuntimeError("Error running %s: %s" % (" ".join(cmd), output[1]))
- lines = proc[0].split('\n')
+ lines = output[0].split('\n')
return lines
def doGitContentDiff(tag, args=None):
if args is None:
args = []
- proc = subprocess.Popen(['git', 'diff', tag] + args,
+ cmd = ['git', 'diff', tag] + args
+ proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE).communicate()
- lines = proc[0].split('\n')
+ stderr=subprocess.PIPE)
+ output = proc.communicate()
+ if proc.returncode:
+ raise RuntimeError("Error running %s: %s" % (" ".join(cmd), output[1]))
+
+ lines = output[0].split('\n')
return lines
def download_to_file(url, path):
@@ -223,7 +233,12 @@ def copyUpdatedFiles(tag, updates, cwd):
if not tmpupdates.endswith("/run/install/updates"):
tmpupdates = os.path.join(tmpupdates, "run/install/updates")
- lines = doGitDiff(tag)
+ try:
+ lines = doGitDiff(tag)
+ except RuntimeError as e:
+ print("ERROR: %s" % e)
+ return
+
for line in lines:
fields = line.split()
@@ -316,7 +331,11 @@ def copyUpdatedFiles(tag, updates, cwd):
install_to_dir(gitfile, tmpupdates)
def _compilableChanged(tag, compilable):
- lines = doGitDiff(tag, [compilable])
+ try:
+ lines = doGitDiff(tag, [compilable])
+ except RuntimeError as e:
+ print("ERROR: %s" % e)
+ return
for line in lines:
fields = line.split()
@@ -460,7 +479,12 @@ def check_for_new_packages(tag, arch, added_rpms, specfile_path):
Package = namedtuple("Package", "name version version_request req_tuple")
- diff = doGitContentDiff(tag, ["anaconda.spec.in"])
+ try:
+ diff = doGitContentDiff(tag, ["anaconda.spec.in"])
+ except RuntimeError as e:
+ print("ERROR: %s" % e)
+ return
+
new_requires = filter(lambda x: x.startswith("+Requires:"), diff)
new_defines = filter(lambda x: x.startswith("+%define"), diff)
with open(specfile_path) as f:
--
1.9.3
9 years, 8 months
[rhel7/master] Add ppc64le arch (#1136490)
by Brian C. Lane
basearch is ppc64le so we needs to check for that in addition to ppc64.
Resolves:rhbz#1136490
---
lorax.spec | 2 +-
share/live/ppc.tmpl | 4 ++--
share/ppc.tmpl | 4 ++--
share/runtime-install.tmpl | 2 +-
src/pylorax/__init__.py | 6 +++---
src/pylorax/treebuilder.py | 3 ++-
6 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/lorax.spec b/lorax.spec
index 2d22205..6ff8f4e 100644
--- a/lorax.spec
+++ b/lorax.spec
@@ -52,7 +52,7 @@ Requires: redhat-upgrade-dracut-plymouth
Requires: syslinux >= 4.02-5
%endif
-%ifarch ppc ppc64
+%ifarch ppc ppc64 ppc64le
Requires: kernel-bootwrapper
Requires: grub2
Requires: grub2-tools
diff --git a/share/live/ppc.tmpl b/share/live/ppc.tmpl
index 790817a..80c0383 100644
--- a/share/live/ppc.tmpl
+++ b/share/live/ppc.tmpl
@@ -51,12 +51,12 @@ install ${configdir}/mapping ${BOOTDIR}
install ${configdir}/magic ${BOOTDIR}
## NOTE: PPC is kind of funky. There's three possible "arch" setups here:
-## ppc, ppc64, and 'hybrid' (ppc userspace, both ppc & ppc64 kernels).
+## ppc, ppc64, ppc64le and 'hybrid' (ppc userspace, both ppc & ppc64 kernels).
## Install kernel and bootloader config (in separate places for each arch)
%for kernel in kernels:
<%
- bits = 64 if kernel.arch == "ppc64" else 32
+ bits = 64 if kernel.arch in ("ppc64", "ppc64le") else 32
## separate dirs/images for each arch
KERNELDIR=BOOTDIR+"/ppc%s" % bits
NETIMG=NETBOOTDIR+"/ppc%s.img" % bits
diff --git a/share/ppc.tmpl b/share/ppc.tmpl
index 025f1df..23f4b08 100644
--- a/share/ppc.tmpl
+++ b/share/ppc.tmpl
@@ -54,12 +54,12 @@ install ${configdir}/mapping ${BOOTDIR}
install ${configdir}/magic ${BOOTDIR}
## NOTE: PPC is kind of funky. There's three possible "arch" setups here:
-## ppc, ppc64, and 'hybrid' (ppc userspace, both ppc & ppc64 kernels).
+## ppc, ppc64, ppc64le, and 'hybrid' (ppc userspace, both ppc & ppc64 kernels).
## Install kernel and bootloader config (in separate places for each arch)
%for kernel in kernels:
<%
- bits = 64 if kernel.arch == "ppc64" else 32
+ bits = 64 if kernel.arch in ("ppc64", "ppc64le") else 32
## separate dirs/images for each arch
KERNELDIR=BOOTDIR+"/ppc%s" % bits
NETIMG=NETBOOTDIR+"/ppc%s.img" % bits
diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl
index 86667ab..0050124 100644
--- a/share/runtime-install.tmpl
+++ b/share/runtime-install.tmpl
@@ -32,7 +32,7 @@ installpkg kernel
installpkg grub2 grub2-tools biosdevname memtest86+ syslinux
installpkg efibootmgr grub2-efi shim shim-unsigned
%endif
-%if basearch in ("ppc", "ppc64"):
+%if basearch in ("ppc", "ppc64", "ppc64le"):
installpkg grub2 grub2-tools fbset hfsutils kernel-bootwrapper ppc64-utils
%endif
%if basearch == "s390x":
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 0c3f263..ea51718 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -54,9 +54,9 @@ REMOVE_PPC64_DRIVERS = "floppy scsi_debug nouveau radeon cirrus mgag200"
REMOVE_PPC64_MODULES = "drm plymouth"
class ArchData(DataHolder):
- lib64_arches = ("x86_64", "ppc64", "s390x", "ia64", "aarch64")
+ lib64_arches = ("x86_64", "ppc64", "ppc64le", "s390x", "ia64", "aarch64")
bcj_arch = dict(i386="x86", x86_64="x86",
- ppc="powerpc", ppc64="powerpc",
+ ppc="powerpc", ppc64="powerpc", ppc64le="powerpc",
arm="arm", armhfp="arm")
def __init__(self, buildarch):
@@ -299,7 +299,7 @@ class Lorax(BaseLoraxClass):
dracut_args = ["--xz", "--install", "/.buildstamp"]
# ppc64 cannot boot an initrd > 32MiB so remove some drivers
- if self.arch.basearch == "ppc64":
+ if self.arch.basearch in ("ppc64", "ppc64le"):
dracut_args.extend(["--omit-drivers", REMOVE_PPC64_DRIVERS])
dracut_args.extend(["--omit", REMOVE_PPC64_MODULES])
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
index 0ae1bc3..7924803 100644
--- a/src/pylorax/treebuilder.py
+++ b/src/pylorax/treebuilder.py
@@ -35,6 +35,7 @@ templatemap = {
'x86_64': 'x86.tmpl',
'ppc': 'ppc.tmpl',
'ppc64': 'ppc.tmpl',
+ 'ppc64le': 'ppc.tmpl',
's390': 's390.tmpl',
's390x': 's390.tmpl',
'aarch64': 'aarch64.tmpl',
@@ -216,7 +217,7 @@ class TreeBuilder(object):
runcmd(cmd, root=self.vars.inroot)
# ppc64 cannot boot images > 32MiB, check size and warn
- if self.vars.arch.basearch == "ppc64" and os.path.exists(outfile):
+ if self.vars.arch.basearch in ("ppc64", "ppc64le") and os.path.exists(outfile):
st = os.stat(outfile)
if st.st_size > 32 * 1024 * 1024:
logging.warning("ppc64 initrd %s is > 32MiB", outfile)
--
1.9.3
9 years, 8 months
[PATCH] Remove references to ia64.
by Chris Lumens
---
anaconda.spec.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 47341b8..bdc9574 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -135,10 +135,10 @@ Requires: systemd
Requires: fcoe-utils >= %{fcoeutilsver}
%endif
Requires: iscsi-initiator-utils >= %{iscsiver}
-%ifarch %{ix86} x86_64 ia64 aarch64
+%ifarch %{ix86} x86_64 aarch64
Requires: dmidecode
%endif
-%ifarch %{ix86} x86_64 ia64
+%ifarch %{ix86} x86_64
%if ! 0%{?rhel}
Requires: hfsplus-tools
%endif
--
1.9.3
9 years, 8 months
[rhel7-branch][PATCH] Move the EULA to licensing category
by Martin Kolman
The EULA spoke in Initial Setup has been previously for some reason in the Localization
category. So I have added the new Licensing category & moved it there.
BTW, I've added the category on the Anaconda side, even though it is currently only used
by Initial Setup - mostly for consistency (keeping all GUI category definitions in a single place).
Martin Kolman (1):
Add a Licensing category (#1039677)
pyanaconda/ui/gui/categories/licensing.py | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 pyanaconda/ui/gui/categories/licensing.py
--
1.9.3
9 years, 8 months
[blivet:master] Split string of symlinks into array of strings (#1136214)
by Anne Mulhern
Resolves: fed#1136214
pyudev library returns a string whereas blivet's pyudev library returned an
array of string. Our udev code should persist in returning an array of
strings.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/udev.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/blivet/udev.py b/blivet/udev.py
index 890b05a..107d12e 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -286,7 +286,13 @@ def device_get_path(info):
return info["ID_PATH"]
def device_get_symlinks(info):
- return info.get("DEVLINKS", [])
+ """ Get an array of symbolic links for a device.
+
+ :param info: a :class:`pyudev.Device` instance
+ :returns: list of symbolic links
+ :rtype: list of str
+ """
+ return info.get("DEVLINKS", "").split()
def device_get_by_path(info):
for link in device_get_symlinks(info):
--
1.9.3
9 years, 8 months
[PATCH 1/3] Require a larger /boot (#1129629).
by Chris Lumens
Things are getting bigger these days, and we should require that /boot
be larger to accomodate. Note that this is not the same as the default
autopart size.
---
pyanaconda/storage_utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py
index 069302c..2044bf7 100644
--- a/pyanaconda/storage_utils.py
+++ b/pyanaconda/storage_utils.py
@@ -166,7 +166,7 @@ def sanity_check(storage, min_ram=isys.MIN_RAM):
exns = []
checkSizes = [('/usr', 250), ('/tmp', 50), ('/var', 384),
- ('/home', 100), ('/boot', 75)]
+ ('/home', 100), ('/boot', 200)]
mustbeonlinuxfs = ['/', '/var', '/tmp', '/usr', '/home', '/usr/share', '/usr/lib']
mustbeonroot = ['/bin','/dev','/sbin','/etc','/lib','/root', '/mnt', 'lost+found', '/proc']
--
1.9.3
9 years, 8 months
[anaconda][master/f21-branch][v2][PATCH 0/2] Help for every screen
by Martin Kolman
V2 of the help patch is here! :)
Changes from the previous patch set:
* the patch that removes the custom spoke help dialog has been dropped for
now and will be pushed once we actually have some content for the new help system
* the placeholders have been moved to the data/help directory and now have a Fedora* prefix
* the base help path definitions have been moved to the base install class and Fedora install class
* this makes it possible for different install classes to easily define their own paths
* the autotools magic should now be correct (Thanks to David Shea for the feedback!)
* help text content can now be translated (Anaconda now looks for /usr/share/doc/anaconda/<lang code>,
there is also a fallback to default language if no content is found for current language)
Things that still need to be done, but can be done once this patch set is "in" (so that it can be tested, etc.):
* placeholder translation
* final button design & placement
Martin Kolman (2):
Add a help button to every Anaconda screen
Specify help file names for hubs and spokes
anaconda.spec.in | 1 +
data/help/FedoraPlaceholder.html | 5 ++
data/help/FedoraPlaceholderWithLinks.html | 13 +++
data/help/Makefile.am | 22 ++++++
pyanaconda/ihelp.py | 123 +++++++++++++++++++++++++++++
pyanaconda/installclass.py | 6 ++
pyanaconda/installclasses/fedora.py | 3 +
pyanaconda/ui/gui/__init__.py | 12 +++
pyanaconda/ui/gui/hubs/progress.py | 1 +
pyanaconda/ui/gui/hubs/summary.py | 1 +
pyanaconda/ui/gui/spokes/__init__.py | 9 +++
pyanaconda/ui/gui/spokes/custom.py | 1 +
pyanaconda/ui/gui/spokes/datetime_spoke.py | 1 +
pyanaconda/ui/gui/spokes/filter.py | 1 +
pyanaconda/ui/gui/spokes/keyboard.py | 1 +
pyanaconda/ui/gui/spokes/langsupport.py | 1 +
pyanaconda/ui/gui/spokes/network.py | 1 +
pyanaconda/ui/gui/spokes/password.py | 1 +
pyanaconda/ui/gui/spokes/software.py | 1 +
pyanaconda/ui/gui/spokes/source.py | 1 +
pyanaconda/ui/gui/spokes/storage.py | 1 +
pyanaconda/ui/gui/spokes/user.py | 1 +
pyanaconda/ui/gui/spokes/welcome.py | 1 +
widgets/configure.ac | 2 +-
widgets/glade/AnacondaWidgets.xml | 9 ++-
widgets/src/BaseWindow.c | 48 +++++++++++
widgets/src/BaseWindow.h | 3 +
widgets/src/Makefile.am | 2 +-
28 files changed, 268 insertions(+), 4 deletions(-)
create mode 100644 data/help/FedoraPlaceholder.html
create mode 100644 data/help/FedoraPlaceholderWithLinks.html
create mode 100644 data/help/Makefile.am
create mode 100644 pyanaconda/ihelp.py
--
1.9.3
9 years, 8 months