git.annexia.org
/
virt-p2v.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bumped version number.
[virt-p2v.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
c8eafaf
..
52bc080
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-23,52
+23,60
@@
# General configuration
PACKAGE := virt-p2v
# General configuration
PACKAGE := virt-p2v
-VERSION := 0.
7
+VERSION := 0.
9
# i386 images also work on x86-64, so best to stick with i386.
ARCH := i386
# i386 images also work on x86-64, so best to stick with i386.
ARCH := i386
+# Base repository.
+BASE := 8
+BASEURL := http://download.fedora.redhat.com/pub/fedora/linux/releases/$(BASE)/Everything/$(ARCH)/os/
+
LANG := en_US.UTF-8
KEYBOARD := us
TIMEZONE := US/Eastern
LANG := en_US.UTF-8
KEYBOARD := us
TIMEZONE := US/Eastern
-BASEREPO := http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/$(ARCH)/os/
-
# Select a suitable HTTP proxy.
# The default assumes a local squid proxy.
# Select a suitable HTTP proxy.
# The default assumes a local squid proxy.
-
#
export http_proxy := http://127.0.0.1:3128/
-
#
export ftp_proxy := http://127.0.0.1:3128/
+export http_proxy := http://127.0.0.1:3128/
+export ftp_proxy := http://127.0.0.1:3128/
LABEL := $(PACKAGE)-$(VERSION)
LABEL := $(PACKAGE)-$(VERSION)
+ISO := $(LABEL).iso
+
#----------------------------------------------------------------------
all:
@echo "make build Build the live CD ISO"
@echo "make boot [HDA=hda.img] [HDB=hdb.img] [ISO=livecd.iso]"
#----------------------------------------------------------------------
all:
@echo "make build Build the live CD ISO"
@echo "make boot [HDA=hda.img] [HDB=hdb.img] [ISO=livecd.iso]"
- @echo " Boot built/named ISO (uses qemu)"
+ @echo " Boot built/named ISO (uses qemu)"
+ @echo "make update Update an existing live CD ISO with new"
+ @echo " virt-p2v script, without doing full rebuild"
# Build live CD.
# Build live CD.
-build: checkroot livecd.ks
- rm -f $(
LABEL).iso
+build: checkroot
checkscript
livecd.ks
+ rm -f $(
ISO)
livecd-creator --config=livecd.ks --fslabel=$(LABEL)
ls -lhtr *.iso
livecd.ks: livecd.ks.in livecd-post.sh Makefile
rm -f $@
sed \
livecd-creator --config=livecd.ks --fslabel=$(LABEL)
ls -lhtr *.iso
livecd.ks: livecd.ks.in livecd-post.sh Makefile
rm -f $@
sed \
- -e 's|@BASEREPO@|$(BASEREPO)|g' \
+ -e 's|@ARCH@|$(ARCH)|g' \
+ -e 's|@BASE@|$(BASE)|g' \
+ -e 's|@BASEURL@|$(BASEURL)|g' \
-e 's|@LANG@|$(LANG)|g' \
-e 's|@KEYBOARD@|$(KEYBOARD)|g' \
-e 's|@TIMEZONE@|$(TIMEZONE)|g' \
< $< | cat - livecd-post.sh > $@
-e 's|@LANG@|$(LANG)|g' \
-e 's|@KEYBOARD@|$(KEYBOARD)|g' \
-e 's|@TIMEZONE@|$(TIMEZONE)|g' \
< $< | cat - livecd-post.sh > $@
-livecd-post.sh: livecd-post.sh.in virt-p2v.
sh
inittab lvm.conf Makefile
+livecd-post.sh: livecd-post.sh.in virt-p2v.
ml
inittab lvm.conf Makefile
rm -f $@
sed \
rm -f $@
sed \
- -e '/@VIRT-P2V.
SH@/ r virt-p2v.sh
' \
- -e '/@VIRT-P2V.
SH
@/ d' \
+ -e '/@VIRT-P2V.
ML@/ r virt-p2v.ml
' \
+ -e '/@VIRT-P2V.
ML
@/ d' \
-e '/@INITTAB@/ r inittab' \
-e '/@INITTAB@/ d' \
-e '/@LVM.CONF@/ r lvm.conf' \
-e '/@INITTAB@/ r inittab' \
-e '/@INITTAB@/ d' \
-e '/@LVM.CONF@/ r lvm.conf' \
@@
-78,7
+86,6
@@
livecd-post.sh: livecd-post.sh.in virt-p2v.sh inittab lvm.conf Makefile
# Run live CD under qemu.
QEMU := qemu
# Run live CD under qemu.
QEMU := qemu
-ISO := $(LABEL).iso
HDA :=
HDB :=
HDA :=
HDB :=
@@
-93,7
+100,13
@@
endif
boot:
$(QEMU) $(QEMU_ARGS)
boot:
$(QEMU) $(QEMU_ARGS)
-# Standard rules.
+# Update an existing ISO.
+
+update: checkroot
+ -./update-iso.ml delete $(ISO)
+ ./update-iso.ml add $(ISO) virt-p2v.ml
+
+# Check that we are root.
checkroot:
@if [ `id -u` -ne 0 ]; then \
checkroot:
@if [ `id -u` -ne 0 ]; then \
@@
-101,6
+114,13
@@
checkroot:
exit 1; \
fi
exit 1; \
fi
+# Check that the script compiles.
+
+checkscript:
+ ./virt-p2v.ml --test
+
+# Clean.
+
clean:
rm -f *~ core livecd.ks livecd-post.sh
clean:
rm -f *~ core livecd.ks livecd-post.sh
@@
-116,12
+136,7
@@
dist:
ls -l $(PACKAGE)-$(VERSION).tar.gz
check-manifest:
ls -l $(PACKAGE)-$(VERSION).tar.gz
check-manifest:
- @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
- do \
- b=`dirname $$d`/; \
- awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
- sed -e "s|^|$$b|" -e "s|^\./||"; \
- done | sort > .check-manifest; \
+ @hg manifest | sort > .check-manifest; \
sort MANIFEST > .orig-manifest; \
diff -u .orig-manifest .check-manifest; rv=$$?; \
rm -f .orig-manifest .check-manifest; \
sort MANIFEST > .orig-manifest; \
diff -u .orig-manifest .check-manifest; rv=$$?; \
rm -f .orig-manifest .check-manifest; \