From b6f2e47fe61901f65ee6a542b04abe4b37305e87 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 18 Jan 2008 16:07:26 +0000
Subject: [PATCH] Fix the make dist rule

In revision 459 I added a bug in the make dist rule in the sense that
the archive will include *all* of test/data directory, including the
.svn directory if it exists.

This patch fixes that problem and adds a distcheck hook that tests for
such errors in the future (files/directories matching the .svn and .git
patterns).

It also fixes a typo in the NEWS file.

Reviewed-by: imsnah
---
 Makefile.am      | 7 +++++++
 NEWS             | 2 +-
 test/Makefile.am | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7365c8b36..6c5ca1fc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,13 @@ ganeti:
 pre-check: ganeti
 	$(MAKE) -C lib $@
 
+# a dist hook rule for catching revision control directories
+distcheck-hook:
+	if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \
+		echo "Found revision control files in final archive" 1>&2 ; \
+		exit 1; \
+	fi
+
 # custom rules
 depgraph: depgraph.png
 
diff --git a/NEWS b/NEWS
index f11cfe9f0..5b95bb4f2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 Version 1.2.1
-  - experimental HWM support, read the install document, section
+  - experimental HVM support, read the install document, section
     "Initializing the cluster"
   - allow for the PVM hypervisor per-instance kernel and initrd paths
   - add a new command β€˜gnt-cluster verify-disks’ which uses a new
diff --git a/test/Makefile.am b/test/Makefile.am
index 7f9196626..d2af6b35a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -11,5 +11,5 @@ check-am: do-pre-check
 do-pre-check:
 	$(MAKE) -C $(top_builddir) pre-check
 
-EXTRA_DIST = $(TESTS) mocks.py data
+EXTRA_DIST = $(TESTS) mocks.py $(wildcard data/*.txt)
 CLEANFILES = *.py[co]
-- 
GitLab