Blame SOURCES/0081-RHEL-8-Disable-alternate-Augeas-lenses.patch

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