yeahuh / rpms / qemu-kvm

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