On Friday 24 October 2014 16:00:15 Richard W.M. Jones wrote:
Don't carry around Augeas lenses. It is fragile, since if the
lens is
added to upstream Augeas but the version number has not changed, then
Augeas won't parse the target file at all. This specifically causes
password adjustments to fail in RHEL 7.1.
I disagree with this patch, in the current situation.
The two lenses we carry have not been part of any Augeas release (last
is 1.2.0, done months ago), thus this would break the password changing
and the user removal from /etc/shadow, and the LVM filtering.
What has broken in RHEL 7.1 is the local addition of the lenses, and
thus what's needed to fix it is the local disabling of our lenses. Patch
attached for it.
This patch could be okay for me (modulo change below) once Augeas >=
1.2.1 is released.
diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c
index 72fe6ac..d119f9e 100644
--- a/daemon/lvm-filter.c
+++ b/daemon/lvm-filter.c
@@ -133,18 +133,6 @@ set_filter (char *const *filters)
return -1;
}
- r = aug_transform (aug, "guestfs_lvm_conf", "/lvm/lvm.conf",
- 0 /* = included */);
- if (r == -1) {
- AUGEAS_ERROR ("aug_transform");
- return -1;
- }
-
- if (aug_load (aug) == -1) {
- AUGEAS_ERROR ("aug_load");
- return -1;
- }
-
/* Remove all the old filters ... */
r = aug_rm (aug, "/files/lvm/lvm.conf/devices/dict/filter/list/*");
if (r == -1) {
Note this part is needed, since within the local lvm config tree the
configuration file is /lvm/lvm.conf, thus the transform is needed (see
the change in the patch).
--
Pino Toscano