[blivet:master 0/2] Fixes for a bug in Size.humanReadable
by Anne Mulhern
mulhern (2):
Add some tests about fractional quantities near whole unit values
Correct bug where fractional quantities were shown as exact.
blivet/size.py | 21 +++++++++++----------
tests/size_test.py | 32 ++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 10 deletions(-)
--
1.9.3
9 years, 9 months
[f21/master] Use first part of Product for UEFI entry (#1128474)
by Brian C. Lane
Otherwise we'll end up with different entries for each product, all
trying to use the same path. This splits on "-" and uses the first part,
which should be Fedora or the whole product name if no - are used.
---
pyanaconda/bootloader.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 509796e..7a22d92 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1699,7 +1699,7 @@ class EFIGRUB(GRUB2):
except ValueError:
continue
- if _product == productName:
+ if _product == productName.split("-")[0]:
slot_id = slot[4:8]
# slot_id is hex, we can't use .isint and use this regex:
if not re.match("^[0-9a-fA-F]+$", slot_id):
@@ -1719,7 +1719,7 @@ class EFIGRUB(GRUB2):
boot_disk = partition.disk
boot_part_num = str(partition.partedPartition.number)
- rc = self.efibootmgr("-c", "-w", "-L", productName,
+ rc = self.efibootmgr("-c", "-w", "-L", productName.split("-")[0],
"-d", boot_disk.path, "-p", boot_part_num,
"-l",
self.efi_dir_as_efifs_dir + self._efi_binary,
--
1.9.3
9 years, 9 months
[rhel7/master] Fix noselinux cmdline default (#1137049)
by Brian C. Lane
Commit fc8f719114 change the cmdline noselinux behavior but didn't set
the default to the new -1 value so it would always enable selinux, even
if the kickstart used selinux --disabled and no cmdline option was
passed.
This fixes things so that they work as expected. kickstart selinux
commands work, cmdline overrides only if it has been passed.
Resolves: rhbz#1137049
---
anaconda | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/anaconda b/anaconda
index ffce0f0..d451ad3 100755
--- a/anaconda
+++ b/anaconda
@@ -277,8 +277,9 @@ def parseOptions(argv=None, cmdline=None):
op.add_option("--loglevel")
op.add_option("--syslog")
- op.add_option("--noselinux", dest="selinux", action="store_false", default=True)
- op.add_option("--selinux", action="store_true")
+ from pykickstart.constants import SELINUX_DISABLED, SELINUX_ENFORCING
+ op.add_option("--noselinux", dest="selinux", action="store_const", const=SELINUX_DISABLED, default=constants.SELINUX_DEFAULT)
+ op.add_option("--selinux", action="store_const", const=SELINUX_ENFORCING)
op.add_option("--nompath", dest="mpath", action="store_false", default=True)
op.add_option("--mpath", action="store_true")
--
1.9.3
9 years, 9 months
[rhel7-branch] TUI category backports (#1128616)
by Samantha N. Bueno
This just backports and squashes together some commits from master,
specifically:
[anaconda]
69484b44
823ad562
b65c9247
4e3a8082
5821956a
674f596c
[initial-setup]
1276f37c
Things are pretty much the same as when these were first reviewed, but I
figured I'd post them again since the changes touch a lot of files.
9 years, 9 months
[libblockdev 0/3] bd_utils_size_human_readable patches (v2)
by Anne Mulhern
Patches are all either new or different from previous versions.
I took a look at this code because of the Coverity error report about it:
Error: OVERRUN (CWE-119):
src/utils/sizes.c:40: cond_const: Checking "i < 7" implies that "i" has the value 7 on the false branch.
src/utils/sizes.c:51: overrun-local: Overrunning array "size_prefixes" of 7 8-byte elements at element index 7 (byte offset 56) using index "i" (which evaluates to 7).
mulhern (3):
Omit always true condition and document some invariants.
Add a test for the maximum representable size.
Omit cast based distinction and print all as floats
src/utils/sizes.c | 19 ++++++++++++++-----
src/utils/test_sizes.c | 4 ++++
2 files changed, 18 insertions(+), 5 deletions(-)
--
1.9.3
9 years, 9 months
[f21/master] Remove inactive languages from LINGUAS.
by David Shea
Remove Hebrew at the request of the outgoing translator (#1137003) since
the project is inactive and about to become more so.
Remove Balochi (bal), Armenian (hy), Low German (nds), and Norrwegian
Nyorsk (nn) since each of these languages is under 5% translated on
Transifex and haven't seen any significant activity since F17 or so.
---
po/LINGUAS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/LINGUAS b/po/LINGUAS
index 890efd4..fe6a91f 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
# Set of available languages.
-af am ar as ast bal be bg bn bn_IN bs ca cs cy da de de_CH el en_GB es et eu fa fi fr gl gu he hi hr hu hy ia id ilo is it ja ka kk kn ko lt lv mai mk ml mr ms nb nds ne nl nn nso or pa pl pt pt_BR ro ru si sk sl sq sr sr@latin sv ta te tg th tr uk ur vi zh_CN zh_TW zu
+af am ar as ast be bg bn bn_IN bs ca cs cy da de de_CH el en_GB es et eu fa fi fr gl gu hi hr hu ia id ilo is it ja ka kk kn ko lt lv mai mk ml mr ms nb ne nl nso or pa pl pt pt_BR ro ru si sk sl sq sr sr@latin sv ta te tg th tr uk ur vi zh_CN zh_TW zu
--
2.0.0
9 years, 9 months
[rhel7/master] Skip nvram update on ppc64 image/dir installations (#1136486)
by Brian C. Lane
We don't want to modify the host's nvram.
Resolves: rhbz#1136486
---
pyanaconda/bootloader.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 839ebd9..6995214 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1943,6 +1943,9 @@ class IPSeriesYaboot(Yaboot):
super(IPSeriesYaboot, self).install()
def updatePowerPCBootList(self):
+ if flags.imageInstall or flags.dirInstall:
+ log.info("Skipping updatePowerPCBootList for image/directory install.")
+ return
log.debug("updatePowerPCBootList: self.stage1_device.path = %s", self.stage1_device.path)
@@ -2003,6 +2006,9 @@ class IPSeriesGRUB2(GRUB2):
# This will update the PowerPC's (ppc) bios boot devive order list
def updateNVRAMBootList(self):
+ if flags.imageInstall or flags.dirInstall:
+ log.info("Skipping updateNVRAMBootList for image/directory install.")
+ return
log.debug("updateNVRAMBootList: self.stage1_device.path = %s", self.stage1_device.path)
--
1.9.3
9 years, 9 months
[libblockdev 1/2] Omit i < NUM_PREFIXES check.
by Anne Mulhern
Because the size we are dealing with is an unsigned 64 bit integer
the maximum representable value is 2^64 - 1 which means that
INT_LT_FLOAT(1024, value) must be false when i is 6. Therefore, i
can never reach NUM_PREFIXES, i.e., 7, so the check is pointless.
If i could reach NUM_PREFIXES then there would exist a path such that
i was 7 when size_prefixes[i] is evaluated, which would be an
access outside the bounds of the array.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
src/utils/sizes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/sizes.c b/src/utils/sizes.c
index d4eb622..0c5c504 100644
--- a/src/utils/sizes.c
+++ b/src/utils/sizes.c
@@ -37,7 +37,7 @@ gchar* bd_utils_size_human_readable (guint64 size) {
gdouble value = (gdouble) size;
gdouble prev_value = (gdouble) value;
- for (i=0; i < NUM_PREFIXES && INT_LT_FLOAT(1024, value); i++) {
+ for (i=0; INT_LT_FLOAT(1024, value); i++) {
prev_value = value;
value = value / 1024.0;
}
--
1.9.3
9 years, 9 months
Let's add some DASDs ....again (#1070115)
by Samantha N. Bueno
Contains all suggestions from prior review, minus bcl's one suggestion
for blivet patches, which I later realized isn't needed:
> > + if dev is None or dev == "":
> > + raise ValueError("You have not specified a device number or the number is invalid")
> > + dev = dev.lower()
> > + bus = dev[:string.rfind(dev, ".") + 1]
> > + dev = dev[string.rfind(dev, ".") + 1:]
>
> I'd pull the rfind out into its own variable so you can check for -1
> and raise an error (assuming no . is an error)
Lack of '.' is not necessarily an error. There's now a docstring which
notes valid formats for the device number, but basically either 0.0.abcd
or abcd (or caps are also ok if a-f appear in the dev number).
9 years, 9 months
[rhel7-branch] Split UI code into separate subpackages
by Vratislav Podzimek
If anybody remembers anything else we had to do after the split, please let me
know. Other than that these are quite simple changes.
Vratislav Podzimek (1):
Split out anaconda's user interfaces into separate packages (#1012509)
anaconda | 10 ++++++++++
anaconda.spec.in | 5 -----
configure.ac | 4 ----
pyanaconda/isys/Makefile.am | 2 +-
pyanaconda/isys/isys.c | 26 --------------------------
pyanaconda/keyboard.py | 4 ++--
6 files changed, 13 insertions(+), 38 deletions(-)
--
1.9.3
9 years, 9 months