ia64/xen-unstable

changeset 6576:dd108e5ad24d

Fix vtpm build when doing 'make dist' (particularly when not root).

Signed-off-by: Steven Hand <steven@xensource.com>
author shand@ubuntu.eng.hq.xensource.com
date Wed Aug 31 14:37:21 2005 -0800 (2005-08-31)
parents 0db6e392c380
children f0dc15fd3c1b
files .hgignore tools/Makefile tools/vtpm/tpm_emulator.patch
line diff
     1.1 --- a/.hgignore	Tue Aug 30 11:53:53 2005 -0800
     1.2 +++ b/.hgignore	Wed Aug 31 14:37:21 2005 -0800
     1.3 @@ -141,6 +141,9 @@
     1.4  ^tools/vnet/vnet-module/\.tmp_versions/.*$
     1.5  ^tools/vnet/vnet-module/vnet_module\.mod\..*$
     1.6  ^tools/vnetd/vnetd$
     1.7 +^tools/vtpm/vtpm*
     1.8 +^tools/vtpm/tpm_emulator-*
     1.9 +^tools/vtpm_manager/manager/vtpm_managerd
    1.10  ^tools/web-shutdown\.tap$
    1.11  ^tools/x2d2/minixend$
    1.12  ^tools/xcs/xcs$
     2.1 --- a/tools/Makefile	Tue Aug 30 11:53:53 2005 -0800
     2.2 +++ b/tools/Makefile	Wed Aug 31 14:37:21 2005 -0800
     2.3 @@ -16,6 +16,8 @@ SUBDIRS += vtpm_manager
     2.4  SUBDIRS += vtpm
     2.5  SUBDIRS += xenstat
     2.6  
     2.7 +.PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
     2.8 +
     2.9  # These don't cross-compile
    2.10  ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
    2.11  SUBDIRS += python
     3.1 --- a/tools/vtpm/tpm_emulator.patch	Tue Aug 30 11:53:53 2005 -0800
     3.2 +++ b/tools/vtpm/tpm_emulator.patch	Wed Aug 31 14:37:21 2005 -0800
     3.3 @@ -18,7 +18,7 @@ diff -uprN orig/tpm_emulator-0.2/ChangeL
     3.4  diff -uprN orig/tpm_emulator-0.2/Makefile tpm_emulator-0.2/Makefile
     3.5  --- orig/tpm_emulator-0.2/Makefile	2005-08-17 10:58:36.000000000 -0700
     3.6  +++ tpm_emulator-0.2/Makefile	2005-08-17 10:55:52.000000000 -0700
     3.7 -@@ -1,15 +1,18 @@
     3.8 +@@ -1,15 +1,19 @@
     3.9   # Software-Based Trusted Platform Module (TPM) Emulator for Linux
    3.10   # Copyright (C) 2004 Mario Strasser <mast@gmx.net>
    3.11  +# Copyright (C) 2005 INTEL Corp.
    3.12 @@ -26,6 +26,7 @@ diff -uprN orig/tpm_emulator-0.2/Makefil
    3.13   # $Id: Makefile 10 2005-04-26 20:59:50Z mast $
    3.14   
    3.15  +XEN_ROOT       := ../../..
    3.16 ++EUID           := $(shell id -u)
    3.17  +
    3.18   # kernel settings
    3.19   KERNEL_RELEASE := $(shell uname -r)
    3.20 @@ -53,7 +54,7 @@ diff -uprN orig/tpm_emulator-0.2/Makefil
    3.21   
    3.22   EXTRA_CFLAGS   += -I$(src) -I$(src)/crypto -I$(src)/tpm 
    3.23   
    3.24 -@@ -42,23 +43,16 @@ all:	$(src)/crypto/gmp.h $(src)/crypto/l
    3.25 +@@ -42,23 +43,17 @@ all:	$(src)/crypto/gmp.h $(src)/crypto/l
    3.26   	@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) modules
    3.27   
    3.28   install:
    3.29 @@ -64,8 +65,9 @@ diff -uprN orig/tpm_emulator-0.2/Makefil
    3.30  -	depmod -a
    3.31  +	@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) INSTALL_MOD_PATH=$(DESTDIR) modules_install
    3.32  +	test -d $(DESTDIR)/var/tpm || mkdir $(DESTDIR)/var/tpm
    3.33 -+	test -c /dev/tpm0 || mknod /dev/tpm0 c 10 224
    3.34 -+	chmod 666 /dev/tpm0
    3.35 ++	test -d $(DESTDIR)/dev || mkdir $(DESTDIR)/dev
    3.36 ++	test -c $(DESTDIR)/dev/tpm0 || [ $(EUID) -ne 0 ] || mknod $(DESTDIR)/dev/tpm0 c 10 224
    3.37 ++	[ $(EUID) -ne 0 ] || chmod 666 $(DESTDIR)/dev/tpm0
    3.38   
    3.39   clean:
    3.40   	@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) clean