|
|
6b9fda |
From 45879864c06bc7e293302d1025a6cdc92af654ca Mon Sep 17 00:00:00 2001
|
|
|
d0ea73 |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
d0ea73 |
Date: Fri, 24 Oct 2014 16:33:50 +0100
|
|
|
d0ea73 |
Subject: [PATCH] RHEL 8: Disable alternate Augeas lenses.
|
|
|
d0ea73 |
|
|
|
d0ea73 |
These are included in the RHEL augeas package, and therefore not
|
|
|
d0ea73 |
required.
|
|
|
d0ea73 |
|
|
|
d0ea73 |
See:
|
|
|
d0ea73 |
https://www.redhat.com/archives/libguestfs/2014-October/msg00220.html
|
|
|
d0ea73 |
---
|
|
|
d0ea73 |
appliance/Makefile.am | 1 -
|
|
|
d0ea73 |
daemon/augeas.c | 5 ++++-
|
|
|
d0ea73 |
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
d0ea73 |
|
|
|
d0ea73 |
diff --git a/appliance/Makefile.am b/appliance/Makefile.am
|
|
|
d0ea73 |
index 6cba8d158..16714b197 100644
|
|
|
d0ea73 |
--- a/appliance/Makefile.am
|
|
|
d0ea73 |
+++ b/appliance/Makefile.am
|
|
|
d0ea73 |
@@ -91,7 +91,6 @@ supermin.d/daemon.tar.gz: ../daemon/guestfsd guestfs_shadow.aug
|
|
|
d0ea73 |
rm -rf tmp-d
|
|
|
d0ea73 |
mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc tmp-d/usr/share/guestfs
|
|
|
d0ea73 |
ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd
|
|
|
d0ea73 |
- ln $(srcdir)/guestfs_shadow.aug tmp-d/usr/share/guestfs/guestfs_shadow.aug
|
|
|
d0ea73 |
( cd tmp-d && tar zcf - * ) > $@-t
|
|
|
d0ea73 |
rm -r tmp-d
|
|
|
d0ea73 |
mv $@-t $@
|
|
|
d0ea73 |
diff --git a/daemon/augeas.c b/daemon/augeas.c
|
|
|
d0ea73 |
index 453251337..5bbfffa2d 100644
|
|
|
d0ea73 |
--- a/daemon/augeas.c
|
|
|
d0ea73 |
+++ b/daemon/augeas.c
|
|
|
d0ea73 |
@@ -134,7 +134,7 @@ do_aug_init (const char *root, int flags)
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
|
|
|
d0ea73 |
/* Pass AUG_NO_ERR_CLOSE so we can display detailed errors. */
|
|
|
d0ea73 |
- aug = aug_init (buf, "/usr/share/guestfs/", flags | AUG_NO_ERR_CLOSE);
|
|
|
d0ea73 |
+ aug = aug_init (buf, NULL, flags | AUG_NO_ERR_CLOSE);
|
|
|
d0ea73 |
|
|
|
d0ea73 |
if (!aug) {
|
|
|
d0ea73 |
reply_with_error ("augeas initialization failed");
|
|
|
d0ea73 |
@@ -148,6 +148,8 @@ do_aug_init (const char *root, int flags)
|
|
|
d0ea73 |
return -1;
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
|
|
|
d0ea73 |
+ /* We already have the needed lenses in RHEL 8 */
|
|
|
d0ea73 |
+#if 0
|
|
|
d0ea73 |
if (!augeas_is_version (1, 2, 1)) {
|
|
|
d0ea73 |
int r = aug_transform (aug, "guestfs_shadow", "/etc/shadow",
|
|
|
d0ea73 |
0 /* = included */);
|
|
|
d0ea73 |
@@ -166,6 +168,7 @@ do_aug_init (const char *root, int flags)
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
+#endif
|
|
|
d0ea73 |
|
|
|
d0ea73 |
return 0;
|
|
|
d0ea73 |
}
|
|
|
d0ea73 |
--
|
|
|
6b9fda |
2.21.0
|
|
|
d0ea73 |
|