[master] Hook for checking BZ IDs in commit messages
by Vratislav Podzimek
The following patch adds a git hook that can be used to ensure all commits that
are about to be pushed on some rhelX-branch reference proper RHEL bugs.
I didn't bothered with updating, patching or tweaking the commit-msg hook
because I think we could remove it and use the pre-push hook instead. If we want
to keep them both, it would be nice to have parts of their code shared, but for
now it seems like an unnecessary extra work to me.
Vratislav Podzimek (1):
pre-push hook checking bugzilla IDs on rhelX branches
docs/commit-log.txt | 5 +++
scripts/githooks/check_commit_msg.sh | 70 +++++++++++++++++++++++++++++++++
scripts/githooks/pre-push | 76 ++++++++++++++++++++++++++++++++++++
3 files changed, 151 insertions(+)
create mode 100755 scripts/githooks/check_commit_msg.sh
create mode 100755 scripts/githooks/pre-push
--
1.8.5.3
10 years, 3 months
[PATCH] driverdisk: Rename skip_dds to make pylint happy
by Brian C. Lane
---
dracut/driver-updates | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut/driver-updates b/dracut/driver-updates
index 47850b1..8d659c6 100755
--- a/dracut/driver-updates
+++ b/dracut/driver-updates
@@ -725,8 +725,8 @@ if __name__ == '__main__':
# Kickstart driverdisk command, skip existing OEMDRV devices and
# process cmdline dd entries. This will process any OEMDRV that
# appear after loading the other drivers.
- skip_dds = set(oemdrv_list())
- dd_scan(skip_dds)
+ skip_devices = set(oemdrv_list())
+ dd_scan(skip_devices)
else:
# Process /tmp/dd_args and OEMDRV devices
dd_scan()
--
1.8.4.2
10 years, 3 months
[blivet:rhel7/master 0/4] Change sanity checking to handle more diverse calling contexts
by Anne Mulhern
This is a setup in blivet for an anaconda bug fix. The really significant
changes are:
1) sanityCheck now returns a list of Errors instead of strings
2) sanityCheck is no longer called from doAutoPartition
mulhern (4):
Remove unused exception class (#1060255)
Separate sanityCheck-ing from doAutoPartition (#1060255)
Introduce two new SanityErrors (#1060255)
Change messages to SanityError objects (#1060255)
blivet/__init__.py | 108 +++++++++++++++++++++----------------------------
blivet/errors.py | 10 +++--
blivet/partitioning.py | 8 +++-
3 files changed, 60 insertions(+), 66 deletions(-)
--
1.8.3.1
10 years, 3 months
[master/rhel7 0/5] kickstart driverdisk command
by Brian C. Lane
This implements the kickstart driverdisk command. The changes are mostly
re-structuring things a bit to make it cleaner for the kickstart code. In a
couple places in the first 3 commits you may notice comments that aren't quite
right, and I changed from using /tmp/dd_ks to /tmp/dd_args_ks in another place.
Everything matches up by the end.
I have tested this with a current (3.10.0-83) driverdisk iso and both
partition and kickstart driverdisk sources work, as well as the previously
working commandline inst.dd options.
Brian C. Lane (5):
driverdisk: Use getargs instead of the env variable (#1035663)
driverdisk: Handle kickstart driverdisk command (#1035663)
driverdisk: Process kickstart driverdisk commands (#1035663)
driverdisk: Add dd_args_ks handling to driver-updates (#1035663)
driverdisk: Use a single systemd service to start DD UI (#1035663)
dracut/Makefile.am | 1 -
dracut/README-dd | 26 +++++++++++-------
dracut/anaconda-lib.sh | 37 +++++++++++++++++++++++++
dracut/driver-updates | 56 +++++++++++++++++++++++++++-----------
dracut/driver-updates-net.sh | 11 +-------
dracut/driver-updates-net@.service | 17 ------------
dracut/driver-updates.sh | 15 +++-------
dracut/fetch-driver-net.sh | 9 +++---
dracut/module-setup.sh | 3 +-
dracut/parse-anaconda-dd.sh | 3 +-
dracut/parse-kickstart | 24 +++++++++++-----
11 files changed, 121 insertions(+), 81 deletions(-)
delete mode 100644 dracut/driver-updates-net@.service
--
1.8.4.2
10 years, 3 months
[anaconda:rhel7/master 0/8] Don't rebuke user for not having set a password until we actually give them a chance to
by Anne Mulhern
There was a previous bug, where kickstart install didn't stop to prompt for a
LUKS password because sanityCheck didn't check if one was there. Unfortunately,
in GUI there are places where sanityCheck is called before user has a chance
to set a password and sometimes before there is any reason even to give them
a chance without making them extremely busy knocking down password dialogs.
I admit I'm still deeply in favor of making prompting for LUKS password have
nothing to do with flow through custom and storage screens. A separate hardware
security hub is still an exciting idea to me. Alternatively, if they check
encrypt checkbox, enable a button "Set LUKS Password" which they can click at
any time, but must have clicked before leaving storage spoke.
Requires some blivet changes, will bump version as appropriate.
The breakdown is:
Removed unused...trivial.
Add sanityCheck...pretty mechanical.
Adapt StorageChecker class...pretty mechanical.
Adapt to new blivet.sanityCheck()...pretty mechanical.
Do not consider no available...a real change, here.
Remove some unnecessary resets...a simple change, but I may be wrong.
Handle LUKS passphrase...pretty important, but fairly obvious, I think. The
important addition is actually setting the passphrase on the format object
where necessary.
Make sure LUKS devices can...this is important, because not only must we
prompt for a passphrase before sanity checking, but also we must actually
set the value for the luks format device.
mulhern (8):
Removed unused ErrorRecoveryFailure import (#1060255)
Add sanityCheck functionality back into AutoPart.execute() (#1060255)
Adapt StorageChecker class for changed return type of sanityCheck
(#1060255)
Adapt to new blivet.sanityCheck() return type (#1060255)
Do not consider no available LUKS passphrase an error in do_autopart
(#1060255)
Remove some unnecessary resets (#1060255)
Handle LUKS passphrase before doing sanity check (#1060255)
Make sure LUKS devices can say they have a key (#1060255)
pyanaconda/kickstart.py | 2 ++
pyanaconda/ui/gui/spokes/custom.py | 57 ++++++++++++++++++++++++++-----------
pyanaconda/ui/gui/spokes/storage.py | 22 ++++++++++----
pyanaconda/ui/tui/spokes/storage.py | 10 ++++---
4 files changed, 65 insertions(+), 26 deletions(-)
--
1.8.3.1
10 years, 3 months
[PATCH] Provide a way to skip the LUKS key check.
by Chris Lumens
Basically, custom partitioning does a storage check before you leave. However,
there's no chance to set a passphrase before leaving. Thus if the user
chooses encryption, they will always get an error before they can set the
passphrase in question.
This allows skipping the check, which should be fine for anaconda since there's
no way out custom partitioning without hitting the passphrase dialog.
Related: rhbz#1060255
---
blivet/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index e5157ab..067e07b 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -1464,13 +1464,17 @@ class Blivet(object):
not d.format.hasKey):
yield _("LUKS device %s has no encryption key") % (dev.name,)
- def sanityCheck(self):
+ def sanityCheck(self, skipKeys=False):
""" Run a series of tests to verify the storage configuration.
This function is called at the end of partitioning so that
we can make sure you don't have anything silly (like no /,
a really small /, etc). Returns (errors, warnings) where
each is a list of strings.
+
+ If skipKeys is set, the check that all LUKS devices have a key
+ will not be performed. Don't set this unless you have good
+ reason.
"""
warnings = []
errors = []
@@ -1646,7 +1650,8 @@ class Blivet(object):
if e:
errors.append(e)
- errors += self._verifyLUKSDevicesHaveKey()
+ if not skipKeys:
+ errors += self._verifyLUKSDevicesHaveKey()
return (errors, warnings)
--
1.8.3.1
10 years, 3 months
[master/rhel7-branch] Add correct kernel params if rootfs is btrfs on s390x. (#874622)
by Samantha N. Bueno
Without the appropriate kernel params, booting after installing with
btrfs as the partitioning scheme is not possible.
Resolves: rhbz#874622
---
pyanaconda/bootloader.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index eea75ab..778a655 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2043,9 +2043,9 @@ class ZIPL(BootLoader):
@property
def stage2_format_types(self):
if productName.startswith("Red Hat "):
- return ["xfs", "ext4", "ext3", "ext2"]
+ return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
else:
- return ["ext4", "ext3", "ext2", "xfs"]
+ return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
image_label_attr = "short_label"
preserve_args = ["cio_ignore"]
@@ -2072,6 +2072,8 @@ class ZIPL(BootLoader):
initrd_line = ""
args.add("root=%s" % image.device.fstabSpec)
args.update(self.boot_args)
+ if image.device.type == "btrfs subvolume":
+ args.update(["rootflags=subvol=%s" % image.device.name])
log.info("bootloader.py: used boot args: %s " % args)
stanza = ("[%(label)s]\n"
"\timage=%(boot_dir)s/%(kernel)s\n"
--
1.8.3.1
10 years, 3 months
[lorax/rhel7-branch] Remove floppy and scsi_debug from initrd (#1060691)
by Brian C. Lane
ppc64 can't PXE boot a initrd that is > 32M. This removes 2 drivers from
initrd creation to reduce the size.
---
src/pylorax/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 285448a..894e15b 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -292,7 +292,8 @@ class Lorax(BaseLoraxClass):
templatedir=templatedir)
logger.info("rebuilding initramfs images")
- dracut_args = ["--xz", "--install", "/.buildstamp"]
+ dracut_args = ["--xz", "--install", "/.buildstamp",
+ "--omit-drivers", "floppy scsi_debug"]
anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"]
treebuilder.rebuild_initrds(add_args=anaconda_args)
--
1.8.4.2
10 years, 3 months
[PATCH] Remove now-unused isys/devices.[ch].
by Chris Lumens
These fail cppcheck on ppc64 anyway.
---
pyanaconda/isys/Makefile.am | 2 +-
pyanaconda/isys/devices.c | 240 --------------------------------------------
pyanaconda/isys/devices.h | 42 --------
3 files changed, 1 insertion(+), 283 deletions(-)
delete mode 100644 pyanaconda/isys/devices.c
delete mode 100644 pyanaconda/isys/devices.h
diff --git a/pyanaconda/isys/Makefile.am b/pyanaconda/isys/Makefile.am
index f04429d..8a26aa7 100644
--- a/pyanaconda/isys/Makefile.am
+++ b/pyanaconda/isys/Makefile.am
@@ -19,7 +19,7 @@
pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME)
-ISYS_SRCS = devices.c isofs.c
+ISYS_SRCS = isofs.c
dist_noinst_HEADERS = $(srcdir)/*.h
diff --git a/pyanaconda/isys/devices.c b/pyanaconda/isys/devices.c
deleted file mode 100644
index 1f7a6c1..0000000
--- a/pyanaconda/isys/devices.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * devices.c - various hardware probing functionality
- *
- * Copyright (C) 2007 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * Author(s): Bill Nottingham <notting(a)redhat.com>
- */
-
-#include "config.h"
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <net/if_arp.h>
-
-#include "devices.h"
-
-/* for 'disks', to filter out weird stuff */
-#define MINIMUM_INTERESTING_SIZE 32*1024 /* 32MB */
-
-/* from genhd.h, kernel side */
-#define GENHD_FL_REMOVABLE 1
-#define GENHD_FL_DRIVERFS 2
-#define GENHD_FL_MEDIA_CHANGE_NOTIFY 4
-#define GENHD_FL_CD 8
-#define GENHD_FL_UP 16
-#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
-#define GENHD_FL_FAIL 64
-
-
-struct device **getDevices(enum deviceType type) {
- struct device **ret = NULL;
- struct device **tmpret;
- struct device *new;
- int numdevices = 0;
-
- if (type & (DEVICE_DISK | DEVICE_CDROM)) {
- DIR *dir;
- struct dirent *ent;
-
- dir = opendir("/sys/block");
-
- if (!dir) goto storagedone;
-
- while ((ent = readdir(dir))) {
- char path[64];
- char buf[64];
- int fd, caps, devtype;
-
- snprintf(path, 64, "/sys/block/%s/capability", ent->d_name);
- fd = open(path, O_RDONLY);
- if (fd == -1)
- continue;
- if (read(fd, buf, 63) <= 0) {
- close(fd);
- continue;
- }
-
- close(fd);
- errno = 0;
- caps = strtol(buf, NULL, 16);
-
- if ((errno == ERANGE && (caps == LONG_MIN || caps == LONG_MAX)) ||
- (errno != 0 && caps == 0)) {
- return NULL;
- }
-
- if (caps & GENHD_FL_CD)
- devtype = DEVICE_CDROM;
- else
- devtype = DEVICE_DISK;
- if (!(devtype & type))
- continue;
-
- if (devtype == DEVICE_DISK && !(caps & GENHD_FL_REMOVABLE)) {
- long long int size;
-
- snprintf(path, 64, "/sys/block/%s/size", ent->d_name);
- fd = open(path, O_RDONLY);
-
- if (fd == -1)
- continue;
- if (read(fd, buf, 63) <= 0) {
- close(fd);
- continue;
- }
-
- close(fd);
- errno = 0;
- size = strtoll(buf, NULL, 10);
-
- if ((errno == ERANGE && (size == LLONG_MIN ||
- size == LLONG_MAX)) ||
- (errno != 0 && size == 0)) {
- return NULL;
- }
-
- if (size < MINIMUM_INTERESTING_SIZE)
- continue;
- }
-
- new = calloc(1, sizeof(struct device));
- new->device = strdup(ent->d_name);
- /* FIXME */
- if (asprintf(&new->description, "Storage device %s",
- new->device) == -1) {
- fprintf(stderr, "%s: %d: %s\n", __func__, __LINE__,
- strerror(errno));
- fflush(stderr);
- abort();
- }
- new->type = devtype;
- if (caps & GENHD_FL_REMOVABLE) {
- new->priv.removable = 1;
- }
- tmpret = realloc(ret, (numdevices+2) * sizeof(struct device));
- if (NULL == tmpret)
- {
- free(ret);
- return NULL;
- }
- ret = tmpret;
- ret[numdevices] = new;
- ret[numdevices+1] = NULL;
- numdevices++;
- }
-
- closedir(dir);
- }
-storagedone:
-
- if (type & DEVICE_NETWORK) {
- DIR *dir;
- struct dirent *ent;
-
- dir = opendir("/sys/class/net");
-
- if (!dir) goto netdone;
-
- while ((ent = readdir(dir))) {
- char path[64];
- int fd, type;
- char buf[64];
-
- snprintf(path, 64, "/sys/class/net/%s/type", ent->d_name);
- fd = open(path, O_RDONLY);
- if (fd == -1)
- continue;
- if (read(fd, buf, 63) <= 0) {
- close(fd);
- continue;
- }
-
- close(fd);
- errno = 0;
- type = strtol(buf, NULL, 10);
-
- if ((errno == ERANGE && (type == LONG_MIN || type == LONG_MAX)) ||
- (errno != 0 && type == 0)) {
- return NULL;
- }
-
- /* S390 channel-to-channnel devices have type 256 */
- if ((type != ARPHRD_ETHER) &&
- !((type == ARPHRD_SLIP) && !strncmp(ent->d_name, "ctc", 3)))
- continue;
-
- new = calloc(1, sizeof(struct device));
- new->device = strdup(ent->d_name);
- /* FIXME */
- snprintf(path, 64, "/sys/class/net/%s/address", ent->d_name);
- fd = open(path, O_RDONLY);
- if (fd != -1) {
- memset(buf, '\0', 64);
- if (read(fd, buf, 63) > 0) {
- int i;
- for (i = (strlen(buf)-1); isspace(buf[i]); i--)
- buf[i] = '\0';
- new->priv.hwaddr = strdup(buf);
- }
- close(fd);
- }
-
- if (new->priv.hwaddr) {
- if (asprintf(&new->description, "Ethernet device %s - %s",
- new->device, new->priv.hwaddr) == -1) {
- fprintf(stderr, "%s: %d: %s\n", __func__, __LINE__,
- strerror(errno));
- fflush(stderr);
- abort();
- }
- } else {
- if (asprintf(&new->description, "Ethernet device %s",
- new->device) == -1) {
- fprintf(stderr, "%s: %d: %s\n", __func__, __LINE__,
- strerror(errno));
- fflush(stderr);
- abort();
- }
- }
-
- tmpret = realloc(ret, (numdevices+2) * sizeof(struct device));
- if (NULL == tmpret)
- {
- free(ret);
- return NULL;
- }
- ret = tmpret;
- ret[numdevices] = new;
- ret[numdevices+1] = NULL;
- numdevices++;
- }
-
- closedir(dir);
- }
-netdone:
- return ret;
-}
-
diff --git a/pyanaconda/isys/devices.h b/pyanaconda/isys/devices.h
deleted file mode 100644
index 9428a77..0000000
--- a/pyanaconda/isys/devices.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * devices.h
- *
- * Copyright (C) 2007 Red Hat, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DEVICES_H
-#define DEVICES_H
-
-enum deviceType {
- DEVICE_ANY = ~0,
- DEVICE_NETWORK = (1 << 0),
- DEVICE_DISK = (1 << 1),
- DEVICE_CDROM = (1 << 2)
-};
-
-struct device {
- char *device;
- char *description;
- enum deviceType type;
- union {
- char *hwaddr;
- int removable;
- } priv;
-};
-
-struct device **getDevices(enum deviceType type);
-
-#endif
--
1.8.3.1
10 years, 3 months
[PATCH] Don't remove libraries from bind-libs-lite
by David Shea
dhclient links to libirs-export and libisccfg-export now.
---
share/runtime-cleanup.tmpl | 2 --
1 file changed, 2 deletions(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index cade94c..3517899 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -135,8 +135,6 @@ removefrom audit /sbin/ausearch /sbin/autrace /usr/bin/*
removefrom audit-libs /etc/* /${libdir}/libauparse*
removefrom authconfig /usr/sbin/* /usr/share/*
removefrom bash /etc/* /usr/bin/bashbug* /usr/share/*
-removefrom bind-libs-lite /usr/${libdir}/libirs*
-removefrom bind-libs-lite /usr/${libdir}/libisccfg-export*
removefrom bind-utils /usr/bin/dig /usr/bin/host /usr/bin/nsupdate
removefrom bitmap-fangsongti-fonts /usr/share/fonts/*
removefrom ca-certificates /etc/pki/java/*
--
1.8.5.3
10 years, 3 months