Blob Blame History Raw
From b14a772332fe273f7c3430af03bcbb8ab5bcc3ae Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 31 Jul 2013 14:03:27 +0200
Subject: [PATCH 06/28] Makefile: create ".../var/run" when installing the POSIX guest agent

RH-Author: Laszlo Ersek <lersek@redhat.com>
Message-id: <1375279407-13573-7-git-send-email-lersek@redhat.com>
Patchwork-id: 52864
O-Subject: [RHEL-7 qemu-kvm PATCH 6/6] Makefile: create ".../var/run" when installing the POSIX guest agent
Bugzilla: 964304
RH-Acked-by: Michal Novotny <minovotn@redhat.com>
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Otherwise the default local state directory of POSIX qga won't exist after
installation with a non-standard ${prefix} or DESTDIR.

For now qga is the only user of ".../var" (= $qemu_localstatedir) too, so
don't create that directory either unless we're installing the agent.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit f2e3978b5a72870b061d29948075dccc0a72db8e)
---
 Makefile |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 Makefile |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index dbd96d1..dcd31c6 100644
--- a/Makefile
+++ b/Makefile
@@ -321,13 +321,21 @@ endif
 install-datadir:
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
 
+install-localstatedir:
+ifdef CONFIG_POSIX
+ifneq (,$(findstring qemu-ga,$(TOOLS)))
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
+endif
+endif
+
 install-confdir:
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
 
 install-sysconfig: install-datadir install-confdir
 	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
 
-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
+install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
+install-datadir install-localstatedir
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
 	$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
-- 
1.7.1