9ae3a8
From b14a772332fe273f7c3430af03bcbb8ab5bcc3ae Mon Sep 17 00:00:00 2001
9ae3a8
From: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Date: Wed, 31 Jul 2013 14:03:27 +0200
9ae3a8
Subject: [PATCH 06/28] Makefile: create ".../var/run" when installing the POSIX guest agent
9ae3a8
9ae3a8
RH-Author: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Message-id: <1375279407-13573-7-git-send-email-lersek@redhat.com>
9ae3a8
Patchwork-id: 52864
9ae3a8
O-Subject: [RHEL-7 qemu-kvm PATCH 6/6] Makefile: create ".../var/run" when installing the POSIX guest agent
9ae3a8
Bugzilla: 964304
9ae3a8
RH-Acked-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
Otherwise the default local state directory of POSIX qga won't exist after
9ae3a8
installation with a non-standard ${prefix} or DESTDIR.
9ae3a8
9ae3a8
For now qga is the only user of ".../var" (= $qemu_localstatedir) too, so
9ae3a8
don't create that directory either unless we're installing the agent.
9ae3a8
9ae3a8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
9ae3a8
(cherry picked from commit f2e3978b5a72870b061d29948075dccc0a72db8e)
9ae3a8
---
9ae3a8
 Makefile |   10 +++++++++-
9ae3a8
 1 files changed, 9 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 Makefile |   10 +++++++++-
9ae3a8
 1 files changed, 9 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/Makefile b/Makefile
9ae3a8
index dbd96d1..dcd31c6 100644
9ae3a8
--- a/Makefile
9ae3a8
+++ b/Makefile
9ae3a8
@@ -321,13 +321,21 @@ endif
9ae3a8
 install-datadir:
9ae3a8
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
9ae3a8
 
9ae3a8
+install-localstatedir:
9ae3a8
+ifdef CONFIG_POSIX
9ae3a8
+ifneq (,$(findstring qemu-ga,$(TOOLS)))
9ae3a8
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
9ae3a8
+endif
9ae3a8
+endif
9ae3a8
+
9ae3a8
 install-confdir:
9ae3a8
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
9ae3a8
 
9ae3a8
 install-sysconfig: install-datadir install-confdir
9ae3a8
 	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
9ae3a8
 
9ae3a8
-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
9ae3a8
+install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
9ae3a8
+install-datadir install-localstatedir
9ae3a8
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
9ae3a8
 ifneq ($(TOOLS),)
9ae3a8
 	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8