From 1c505589c1cfe8246a29b9fb36bc47b77a4f8355 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 15 Mar 2011 19:47:26 +0100 Subject: [PATCH] Move xenstore-watch for VM from AppVM to common. Add to core-common.spec --- appvm/.gitignore | 1 - appvm/Makefile | 4 +--- common/.gitignore | 1 + common/Makefile | 4 +++- {appvm => common}/xenstore-watch.c | 0 rpm_spec/core-commonvm.spec | 12 +++++++++--- 6 files changed, 14 insertions(+), 8 deletions(-) rename {appvm => common}/xenstore-watch.c (100%) diff --git a/appvm/.gitignore b/appvm/.gitignore index 23680333..edd6d099 100644 --- a/appvm/.gitignore +++ b/appvm/.gitignore @@ -1,4 +1,3 @@ qubes_add_pendrive_script qubes_penctl qvm-open-in-dvm -xenstore-watch diff --git a/appvm/Makefile b/appvm/Makefile index 0ef375a7..858a665b 100644 --- a/appvm/Makefile +++ b/appvm/Makefile @@ -1,14 +1,12 @@ CC=gcc CFLAGS=-Wall -all: qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm xenstore-watch +all: qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm qubes_penctl: qubes_penctl.o $(CC) -o qubes_penctl qubes_penctl.o -lxenstore qubes_add_pendrive_script: qubes_add_pendrive_script.o $(CC) -o qubes_add_pendrive_script qubes_add_pendrive_script.o -lxenstore qvm-open-in-dvm: qvm-open-in-dvm.o $(CC) -o qvm-open-in-dvm qvm-open-in-dvm.o -lxenstore -xenstore-watch: xenstore-watch.o - $(CC) -o xenstore-watch xenstore-watch.o -lxenstore clean: rm -f qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm xenstore-watch *.o *~ diff --git a/common/.gitignore b/common/.gitignore index 03034a95..b87d6e19 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -1 +1,2 @@ meminfo-writer +xenstore-watch diff --git a/common/Makefile b/common/Makefile index 85888a90..4f8df460 100644 --- a/common/Makefile +++ b/common/Makefile @@ -1,7 +1,9 @@ CC=gcc CFLAGS=-Wall -g -O3 -all: meminfo-writer +all: meminfo-writer xenstore-watch meminfo-writer: meminfo-writer.o $(CC) -g -o meminfo-writer meminfo-writer.o -lxenstore +xenstore-watch: xenstore-watch.o + $(CC) -o xenstore-watch xenstore-watch.o -lxenstore clean: rm -f meminfo-writer *.o *~ diff --git a/appvm/xenstore-watch.c b/common/xenstore-watch.c similarity index 100% rename from appvm/xenstore-watch.c rename to common/xenstore-watch.c diff --git a/rpm_spec/core-commonvm.spec b/rpm_spec/core-commonvm.spec index 53eb1953..3a1c4051 100644 --- a/rpm_spec/core-commonvm.spec +++ b/rpm_spec/core-commonvm.spec @@ -39,6 +39,9 @@ Requires: fedora-release %description The Qubes core files for installation inside a Qubes VM. +%build +make + %pre if [ "$1" != 1 ] ; then @@ -62,10 +65,12 @@ mkdir -p $RPM_BUILD_ROOT/etc/sysconfig cp iptables $RPM_BUILD_ROOT/etc/sysconfig/ mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d cp ../appvm/qubes.repo $RPM_BUILD_ROOT/etc/yum.repos.d -mkdir -p $RPM_BUILD_ROOT/sbin -cp ../common/qubes_serial_login $RPM_BUILD_ROOT/sbin +mkdir -p $RPM_BUILD_ROOT/sbin +cp qubes_serial_login $RPM_BUILD_ROOT/sbin +mkdir -p $RPM_BUILD_ROOT/usr/bin +cp xenstore-watch $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/etc -cp ../common/serial.conf $RPM_BUILD_ROOT/var/lib/qubes/ +cp serial.conf $RPM_BUILD_ROOT/var/lib/qubes/ %triggerin -- initscripts cp /var/lib/qubes/serial.conf /etc/init/serial.conf @@ -165,3 +170,4 @@ rm -rf $RPM_BUILD_ROOT /var/lib/qubes /etc/yum.repos.d/qubes.repo /sbin/qubes_serial_login +/usr/bin/xenstore-watch