[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix vtpm build when doing 'make dist' (particularly when not root).



# HG changeset patch
# User shand@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID dd108e5ad24de2ccabc1fbf3a649d55754e5368c
# Parent  0db6e392c380d2748afc154f73da595274532b89
Fix vtpm build when doing 'make dist' (particularly when not root). 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r 0db6e392c380 -r dd108e5ad24d .hgignore
--- a/.hgignore Tue Aug 30 19:53:53 2005
+++ b/.hgignore Wed Aug 31 22:37:21 2005
@@ -141,6 +141,9 @@
 ^tools/vnet/vnet-module/\.tmp_versions/.*$
 ^tools/vnet/vnet-module/vnet_module\.mod\..*$
 ^tools/vnetd/vnetd$
+^tools/vtpm/vtpm*
+^tools/vtpm/tpm_emulator-*
+^tools/vtpm_manager/manager/vtpm_managerd
 ^tools/web-shutdown\.tap$
 ^tools/x2d2/minixend$
 ^tools/xcs/xcs$
diff -r 0db6e392c380 -r dd108e5ad24d tools/Makefile
--- a/tools/Makefile    Tue Aug 30 19:53:53 2005
+++ b/tools/Makefile    Wed Aug 31 22:37:21 2005
@@ -15,6 +15,8 @@
 SUBDIRS += vtpm_manager
 SUBDIRS += vtpm
 SUBDIRS += xenstat
+
+.PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
 
 # These don't cross-compile
 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
diff -r 0db6e392c380 -r dd108e5ad24d tools/vtpm/tpm_emulator.patch
--- a/tools/vtpm/tpm_emulator.patch     Tue Aug 30 19:53:53 2005
+++ b/tools/vtpm/tpm_emulator.patch     Wed Aug 31 22:37:21 2005
@@ -18,7 +18,7 @@
 diff -uprN orig/tpm_emulator-0.2/Makefile tpm_emulator-0.2/Makefile
 --- orig/tpm_emulator-0.2/Makefile     2005-08-17 10:58:36.000000000 -0700
 +++ tpm_emulator-0.2/Makefile  2005-08-17 10:55:52.000000000 -0700
-@@ -1,15 +1,18 @@
+@@ -1,15 +1,19 @@
  # Software-Based Trusted Platform Module (TPM) Emulator for Linux
  # Copyright (C) 2004 Mario Strasser <mast@xxxxxxx>
 +# Copyright (C) 2005 INTEL Corp.
@@ -26,6 +26,7 @@
  # $Id: Makefile 10 2005-04-26 20:59:50Z mast $
  
 +XEN_ROOT       := ../../..
++EUID           := $(shell id -u)
 +
  # kernel settings
  KERNEL_RELEASE := $(shell uname -r)
@@ -53,7 +54,7 @@
  
  EXTRA_CFLAGS   += -I$(src) -I$(src)/crypto -I$(src)/tpm 
  
-@@ -42,23 +43,16 @@ all:       $(src)/crypto/gmp.h $(src)/crypto/l
+@@ -42,23 +43,17 @@ all:       $(src)/crypto/gmp.h $(src)/crypto/l
        @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) modules
  
  install:
@@ -64,8 +65,9 @@
 -      depmod -a
 +      @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) INSTALL_MOD_PATH=$(DESTDIR) 
modules_install
 +      test -d $(DESTDIR)/var/tpm || mkdir $(DESTDIR)/var/tpm
-+      test -c /dev/tpm0 || mknod /dev/tpm0 c 10 224
-+      chmod 666 /dev/tpm0
++      test -d $(DESTDIR)/dev || mkdir $(DESTDIR)/dev
++      test -c $(DESTDIR)/dev/tpm0 || [ $(EUID) -ne 0 ] || mknod 
$(DESTDIR)/dev/tpm0 c 10 224
++      [ $(EUID) -ne 0 ] || chmod 666 $(DESTDIR)/dev/tpm0
  
  clean:
        @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) clean

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.