diff options
author | hannken <hannken@pkgsrc.org> | 2008-03-03 16:45:27 +0000 |
---|---|---|
committer | hannken <hannken@pkgsrc.org> | 2008-03-03 16:45:27 +0000 |
commit | fdecb4866574c1b7d30637a6248d8b7c8b78fa6c (patch) | |
tree | a098682aa82ed4d0a01a48182447ff417e493a0b /sysutils/xentools3 | |
parent | c1b459ae35deb1376b8a2ee5afd8573f69ff1977 (diff) | |
download | pkgsrc-fdecb4866574c1b7d30637a6248d8b7c8b78fa6c.tar.gz |
Enable the build of pygrub.
Ok: Manuel Bouyer <bouyer@netbsd.org>
Diffstat (limited to 'sysutils/xentools3')
-rw-r--r-- | sysutils/xentools3/Makefile | 4 | ||||
-rw-r--r-- | sysutils/xentools3/PLIST | 28 | ||||
-rw-r--r-- | sysutils/xentools3/distinfo | 20 | ||||
-rw-r--r-- | sysutils/xentools3/files/xend.sh | 3 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-aa | 20 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-cj | 20 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-cy | 13 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-cz | 15 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-da | 36 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-db | 16 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dc | 31 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dd | 37 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-de | 13 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-df | 31 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dg | 41 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dh | 22 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-di | 58 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dj | 46 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dk | 13 | ||||
-rw-r--r-- | sysutils/xentools3/patches/patch-dl | 40 |
20 files changed, 482 insertions, 25 deletions
diff --git a/sysutils/xentools3/Makefile b/sysutils/xentools3/Makefile index ef264b1a63d..679f53f4893 100644 --- a/sysutils/xentools3/Makefile +++ b/sysutils/xentools3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2008/02/17 16:29:03 bouyer Exp $ +# $NetBSD: Makefile,v 1.8 2008/03/03 16:45:27 hannken Exp $ # VERSION= 3.1.3 @@ -104,6 +104,7 @@ SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" SUBST_CLASSES+= prefix SUBST_STAGE.prefix= pre-configure SUBST_FILES.prefix= python/xen/util/auxbin.py +SUBST_FILES.prefix+= python/xen/xend/osdep.py SUBST_FILES.prefix+= misc/xen-python-path SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g" @@ -194,6 +195,7 @@ post-install: .include "../../textproc/py-xml/buildlink3.mk" #.include "../../devel/zlib/buildlink3.mk" #.include "../../www/curl/buildlink3.mk" +.include "../../devel/py-curses/buildlink3.mk" .include "../../devel/ncurses/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/xentools3/PLIST b/sysutils/xentools3/PLIST index b40312ecabd..b66144c29ac 100644 --- a/sysutils/xentools3/PLIST +++ b/sysutils/xentools3/PLIST @@ -1,4 +1,5 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ +@comment $NetBSD: PLIST,v 1.2 2008/03/03 16:45:27 hannken Exp $ +bin/pygrub bin/readnotes bin/xc_restore bin/xc_save @@ -14,10 +15,21 @@ bin/xenstore-read bin/xenstore-rm bin/xenstore-write bin/xen-detect +include/fsimage.h +include/fsimage_plugin.h +include/fsimage_grub.h include/xenctrl.h include/xenguest.h include/xs.h include/xs_lib.h +lib/fs/ext2fs/fsimage.so +lib/fs/fat/fsimage.so +lib/fs/iso9660/fsimage.so +lib/fs/reiserfs/fsimage.so +lib/fs/ufs/fsimage.so +lib/libfsimage.so +lib/libfsimage.so.1.0 +lib/libfsimage.so.1.0.0 lib/libxenctrl.a lib/libxenctrl.so lib/libxenctrl.so.3.0 @@ -34,6 +46,13 @@ man/man1/xentop.1 man/man1/xm.1 man/man5/xend-config.sxp.5 man/man5/xmdomain.cfg.5 +${PYSITELIB}/fsimage.so +${PYSITELIB}/grub/GrubConf.py +${PYSITELIB}/grub/GrubConf.pyc +${PYSITELIB}/grub/LiloConf.py +${PYSITELIB}/grub/LiloConf.pyc +${PYSITELIB}/grub/__init__.py +${PYSITELIB}/grub/__init__.pyc ${PYSITELIB}/xen/__init__.py ${PYSITELIB}/xen/__init__.pyc ${PYSITELIB}/xen/lowlevel/__init__.py @@ -352,8 +371,15 @@ share/examples/xen/xmexample1 share/examples/xen/xmexample2 share/examples/xen/xmexample3 share/xen/create.dtd +@dirrm lib/fs/ext2fs +@dirrm lib/fs/fat +@dirrm lib/fs/iso9660 +@dirrm lib/fs/reiserfs +@dirrm lib/fs/ufs +@dirrm lib/fs @dirrm share/xen @dirrm share/examples/xen +@dirrm ${PYSITELIB}/grub @dirrm ${PYSITELIB}/xen/xm/tests @dirrm ${PYSITELIB}/xen/xm @dirrm ${PYSITELIB}/xen/xend/xenstore/tests diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo index 63904492836..6fa27072851 100644 --- a/sysutils/xentools3/distinfo +++ b/sysutils/xentools3/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.5 2008/02/17 16:29:03 bouyer Exp $ +$NetBSD: distinfo,v 1.6 2008/03/03 16:45:27 hannken Exp $ SHA1 (xen-3.1.3-src.tgz) = 87b370df928feda599bbc7076e7a4589f67355c8 RMD160 (xen-3.1.3-src.tgz) = b26b71e0422db7aece60aa4dd9f9c8d34affd0c7 Size (xen-3.1.3-src.tgz) = 6891760 bytes -SHA1 (patch-aa) = 86a6c9c2a43da76a5746835e13646b24e6992070 +SHA1 (patch-aa) = dca8b8de73b9bdbb17f8245224575eb881cdf00d SHA1 (patch-ab) = dcafc8b6c4cd1e4dfc6f4ec806fd8076b3104b86 SHA1 (patch-ac) = 4eb0f474d4e3a685788c1ce92c0b407dc3d7a855 SHA1 (patch-ad) = ec36d712925ddf06aac7d6393ad818a51c4363f3 @@ -31,7 +31,7 @@ SHA1 (patch-cd) = 8fc057e9dc98e356ba46cdf183a8891c59c005b8 SHA1 (patch-cf) = 05c5e86d33d31a2216c2751a2bf684c8d5d06746 SHA1 (patch-cg) = 36073c7327f187702203108b3e7596178aac3327 SHA1 (patch-ch) = ebe2aedf1ecd1dce66f4a8a25ef5e83ee1d4c60d -SHA1 (patch-cj) = 166e2190a31bba842da1111310ba7b1ad35a5d81 +SHA1 (patch-cj) = 5227c180e9ec2cf7146ade6f250f6bdff8f2bda1 SHA1 (patch-ck) = 3783d9b4b9344670bae2f35e2ac7f11e2ec9ce7b SHA1 (patch-cm) = 802d395f1dc391a827487bbc9fcfe2bbd6af07de SHA1 (patch-cn) = 40ae04194cca94b112133e962d4cf7487412925a @@ -45,3 +45,17 @@ SHA1 (patch-cu) = 90b4a39a037c6f2aeb694e1df8e7a7165b51cdbc SHA1 (patch-cv) = 1fea2a1cd139e2e46655622ad5f02b37e1501e0b SHA1 (patch-cw) = 7fad0847bb87beddb9330d067132d1f7fc784222 SHA1 (patch-cx) = eed56d9e4535f19a6fc2474765d85135fce15e63 +SHA1 (patch-cy) = d8f7b3c7c1fcacb273fed2799b287de8f11a1399 +SHA1 (patch-cz) = c40c44d85a6662231328ef3ae86367b63f066632 +SHA1 (patch-da) = 97c888dce1c0ccc61d3750e2e3eefcb44f2eb4c6 +SHA1 (patch-db) = 5f4262ce891d5109dab2418664eb05f58a8aa535 +SHA1 (patch-dc) = 10875cd9267ea5d86b1402ca7f493c67cb57a739 +SHA1 (patch-dd) = 66446a6d8293aa52da11dbd28455ae856c184d16 +SHA1 (patch-de) = 7cf7fb63984833e8c6110dbbb4de82a6d5e91d32 +SHA1 (patch-df) = e1d10ddb899d24d727d60ca49f5b382566d65d2c +SHA1 (patch-dg) = 298bbd22362ab880fea378935a99aef6f4613f27 +SHA1 (patch-dh) = 33716556ab6e878dde1f9b5771b7ce231a3805f9 +SHA1 (patch-di) = 9d6a5acde713e0b7471adbea2d55e55b3ac77881 +SHA1 (patch-dj) = 354ee3ceb1b5ba9b02091de916c328e5a062cb87 +SHA1 (patch-dk) = 5685f52835885635eacd305945653f817bbe8a2a +SHA1 (patch-dl) = 480b515da8773e4d3cfc305d74f833f16bb12750 diff --git a/sysutils/xentools3/files/xend.sh b/sysutils/xentools3/files/xend.sh index 24ee4b2b869..045182c4601 100644 --- a/sysutils/xentools3/files/xend.sh +++ b/sysutils/xentools3/files/xend.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: xend.sh,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ +# $NetBSD: xend.sh,v 1.2 2008/03/03 16:45:27 hannken Exp $ # # PROVIDE: xend # REQUIRE: disks network @@ -22,6 +22,7 @@ xen_precmd() exit 1 fi mkdir -p /var/run/xend || exit 1 + mkdir -p /var/run/xend/boot || exit 1 mkdir -p /var/run/xenstored || exit 1 } diff --git a/sysutils/xentools3/patches/patch-aa b/sysutils/xentools3/patches/patch-aa index f02fc3b55d3..100be84339b 100644 --- a/sysutils/xentools3/patches/patch-aa +++ b/sysutils/xentools3/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ +$NetBSD: patch-aa,v 1.2 2008/03/03 16:45:27 hannken Exp $ ---- Makefile.orig 2007-05-18 16:45:21.000000000 +0200 -+++ Makefile 2007-05-27 13:32:39.000000000 +0200 -@@ -5,27 +5,18 @@ +--- Makefile.orig 2008-01-31 11:06:54.000000000 +0100 ++++ Makefile 2008-02-29 16:58:47.000000000 +0100 +@@ -5,19 +5,12 @@ SUBDIRS-y := SUBDIRS-y += libxc SUBDIRS-y += xenstore SUBDIRS-y += misc @@ -19,18 +19,10 @@ $NetBSD: patch-aa,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ SUBDIRS-y += xenstat -SUBDIRS-y += libaio -SUBDIRS-y += blktap --SUBDIRS-y += libfsimage + SUBDIRS-y += libfsimage SUBDIRS-$(XENFB_TOOLS) += xenfb SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen - - # These don't cross-compile - ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) - SUBDIRS-$(PYTHON_TOOLS) += python --SUBDIRS-$(PYTHON_TOOLS) += pygrub - endif - - .PHONY: all -@@ -33,34 +24,27 @@ +@@ -33,34 +26,27 @@ all: check @set -e; for subdir in $(SUBDIRS-y); do \ $(MAKE) -C $$subdir $@; \ done diff --git a/sysutils/xentools3/patches/patch-cj b/sysutils/xentools3/patches/patch-cj index 1380b4af831..67783f9cad0 100644 --- a/sysutils/xentools3/patches/patch-cj +++ b/sysutils/xentools3/patches/patch-cj @@ -1,8 +1,8 @@ -$NetBSD: patch-cj,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $ +$NetBSD: patch-cj,v 1.2 2008/03/03 16:45:27 hannken Exp $ ---- python/xen/xend/osdep.py.orig 2007-04-25 22:22:18.000000000 +0200 -+++ python/xen/xend/osdep.py 2007-04-25 22:23:03.000000000 +0200 -@@ -22,9 +22,11 @@ +--- python/xen/xend/osdep.py.orig 2008-01-31 11:06:54.000000000 +0100 ++++ python/xen/xend/osdep.py 2008-03-02 13:38:39.000000000 +0100 +@@ -22,15 +22,18 @@ import os _scripts_dir = { "Linux": "/etc/xen/scripts", "SunOS": "/usr/lib/xen/scripts", @@ -14,10 +14,20 @@ $NetBSD: patch-cj,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $ "Linux": True, "SunOS": False, } -@@ -32,5 +34,5 @@ + + _pygrub_path = { +- "SunOS": "/usr/lib/xen/bin/pygrub" ++ "SunOS": "/usr/lib/xen/bin/pygrub", ++ "NetBSD": "@PREFIX@/bin/pygrub", + } + + _netback_type = { +@@ -93,7 +96,7 @@ _balloon_stat = { def _get(var, default=None): return var.get(os.uname()[0], default) -scripts_dir = _get(_scripts_dir, "/etc/xen/scripts") +scripts_dir = _get(_scripts_dir, "@XENDCONFDIR@/scripts") xend_autorestart = _get(_xend_autorestart) + pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub") + netback_type = _get(_netback_type, "netfront") diff --git a/sysutils/xentools3/patches/patch-cy b/sysutils/xentools3/patches/patch-cy new file mode 100644 index 00000000000..52bfe9d4898 --- /dev/null +++ b/sysutils/xentools3/patches/patch-cy @@ -0,0 +1,13 @@ +$NetBSD: patch-cy,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/Makefile.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/Makefile 2008-03-01 11:52:28.000000000 +0000 +@@ -2,7 +2,7 @@ XEN_ROOT = ../.. + include $(XEN_ROOT)/tools/Rules.mk + + SUBDIRS-y = common ufs reiserfs iso9660 fat +-SUBDIRS-y += $(shell ./check-libext2fs) ++SUBDIRS-y += $(shell ${SHELL} check-libext2fs) + + .PHONY: all + all install clean: diff --git a/sysutils/xentools3/patches/patch-cz b/sysutils/xentools3/patches/patch-cz new file mode 100644 index 00000000000..18a02e74b51 --- /dev/null +++ b/sysutils/xentools3/patches/patch-cz @@ -0,0 +1,15 @@ +$NetBSD: patch-cz,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/Rules.mk.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/Rules.mk 2008-03-01 11:52:28.000000000 +0000 +@@ -20,8 +20,8 @@ fs-all: $(FSLIB) + + .PHONY: fs-install + fs-install: fs-all +- $(INSTALL_DIR) $(DESTDIR)/usr/$(FSDIR) +- $(INSTALL_PROG) $(FSLIB) $(DESTDIR)/usr/$(FSDIR) ++ $(BSD_INSTALL_LIB_DIR) $(PREFIX)/lib/fs/$(FS) ++ $(BSD_INSTALL_LIB) $(FSLIB) $(PREFIX)/lib/fs/$(FS) + + $(FSLIB): $(PIC_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) diff --git a/sysutils/xentools3/patches/patch-da b/sysutils/xentools3/patches/patch-da new file mode 100644 index 00000000000..ad136c42c0a --- /dev/null +++ b/sysutils/xentools3/patches/patch-da @@ -0,0 +1,36 @@ +$NetBSD: patch-da,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/common/Makefile.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/common/Makefile 2008-03-01 11:52:28.000000000 +0000 +@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk + MAJOR = 1.0 + MINOR = 0 + +-CFLAGS += -Werror -Wp,-MD,.$(@F).d ++CFLAGS += -Werror -Wp,-MD,.$(@F).d -DFSIMAGE_FSDIR=\"$(PREFIX)/lib/fs\" + DEPS = .*.d + + LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS +@@ -22,14 +22,14 @@ all: $(LIB) + + .PHONY: install + install: all +- [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR) +- [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include +- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) +- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so.$(MAJOR) +- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so +- $(INSTALL_DATA) fsimage.h $(DESTDIR)/usr/include +- $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)/usr/include +- $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)/usr/include ++ $(BSD_INSTALL_LIB_DIR) $(PREFIX)/lib ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/include ++ $(BSD_INSTALL_LIB) libfsimage.so.$(MAJOR).$(MINOR) $(PREFIX)/lib ++ ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(PREFIX)/lib/libfsimage.so.$(MAJOR) ++ ln -sf libfsimage.so.$(MAJOR) $(PREFIX)/lib/libfsimage.so ++ $(BSD_INSTALL_DATA) fsimage.h $(PREFIX)/include ++ $(BSD_INSTALL_DATA) fsimage_plugin.h $(PREFIX)/include ++ $(BSD_INSTALL_DATA) fsimage_grub.h $(PREFIX)/include + + clean distclean: + rm -f $(PIC_OBJS) $(LIB) diff --git a/sysutils/xentools3/patches/patch-db b/sysutils/xentools3/patches/patch-db new file mode 100644 index 00000000000..5842968f60c --- /dev/null +++ b/sysutils/xentools3/patches/patch-db @@ -0,0 +1,16 @@ +$NetBSD: patch-db,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/common/fsimage_plugin.c.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/common/fsimage_plugin.c 2008-03-01 11:52:28.000000000 +0000 +@@ -131,7 +131,10 @@ static int load_plugins(void) + int err; + int ret = -1; + +-#ifdef __sun__ ++#if defined(FSIMAGE_FSDIR) ++ if (fsdir == NULL) ++ fsdir = FSIMAGE_FSDIR; ++#elif defined(__sun__) + if (fsdir == NULL) + fsdir = "/usr/lib/fs"; + diff --git a/sysutils/xentools3/patches/patch-dc b/sysutils/xentools3/patches/patch-dc new file mode 100644 index 00000000000..8500461439a --- /dev/null +++ b/sysutils/xentools3/patches/patch-dc @@ -0,0 +1,31 @@ +$NetBSD: patch-dc,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/ext2fs/fsys_ext2fs.c.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/ext2fs/fsys_ext2fs.c 2008-03-01 11:52:28.000000000 +0000 +@@ -594,7 +594,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna + + /* Find out how long our remaining name is. */ + len = 0; +- while (dirname[len] && !isspace (dirname[len])) ++ while (dirname[len] && !isspace ((uint8_t)dirname[len])) + len++; + + /* Get the symlink size. */ +@@ -651,7 +651,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna + } + + /* if end of filename, INODE points to the file's inode */ +- if (!*dirname || isspace (*dirname)) ++ if (!*dirname || isspace ((uint8_t)*dirname)) + { + if (!S_ISREG (INODE->i_mode)) + { +@@ -678,7 +678,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna + } + + /* skip to next slash or end of filename (space) */ +- for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; ++ for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/'; + rest++); + + /* look through this directory and find the next filename component */ diff --git a/sysutils/xentools3/patches/patch-dd b/sysutils/xentools3/patches/patch-dd new file mode 100644 index 00000000000..8676d05bfcc --- /dev/null +++ b/sysutils/xentools3/patches/patch-dd @@ -0,0 +1,37 @@ +$NetBSD: patch-dd,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/fat/fsys_fat.c.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/fat/fsys_fat.c 2008-03-01 11:52:29.000000000 +0000 +@@ -301,7 +301,7 @@ fat_dir (fsi_file_t *ffi, char *dirname) + /* if we have a real file (and we're not just printing possibilities), + then this is where we want to exit */ + +- if (!*dirname || isspace (*dirname)) ++ if (!*dirname || isspace ((uint8_t)*dirname)) + { + if (attrib & FAT_ATTRIB_DIR) + { +@@ -325,7 +325,7 @@ fat_dir (fsi_file_t *ffi, char *dirname) + /* Directories don't have a file size */ + filemax = INT_MAX; + +- for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++); ++ for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/'; rest++); + + *rest = 0; + +@@ -426,12 +426,12 @@ fat_dir (fsi_file_t *ffi, char *dirname) + { + int i, j, c; + +- for (i = 0; i < 8 && (c = filename[i] = tolower (dir_buf[i])) ++ for (i = 0; i < 8 && (c = filename[i] = tolower ((uint8_t)dir_buf[i])) + && !isspace (c); i++); + + filename[i++] = '.'; + +- for (j = 0; j < 3 && (c = filename[i + j] = tolower (dir_buf[8 + j])) ++ for (j = 0; j < 3 && (c = filename[i + j] = tolower ((uint8_t)dir_buf[8 + j])) + && !isspace (c); j++); + + if (j == 0) diff --git a/sysutils/xentools3/patches/patch-de b/sysutils/xentools3/patches/patch-de new file mode 100644 index 00000000000..2fd60b61c5d --- /dev/null +++ b/sysutils/xentools3/patches/patch-de @@ -0,0 +1,13 @@ +$NetBSD: patch-de,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/iso9660/fsys_iso9660.c.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/iso9660/fsys_iso9660.c 2008-03-01 11:52:29.000000000 +0000 +@@ -164,7 +164,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn + /* pathlen = strcspn(dirname, "/\n\t "); */ + for (pathlen = 0 ; + dirname[pathlen] +- && !isspace(dirname[pathlen]) && dirname[pathlen] != '/' ; ++ && !isspace((uint8_t)dirname[pathlen]) && dirname[pathlen] != '/' ; + pathlen++) + ; + diff --git a/sysutils/xentools3/patches/patch-df b/sysutils/xentools3/patches/patch-df new file mode 100644 index 00000000000..a43815f906e --- /dev/null +++ b/sysutils/xentools3/patches/patch-df @@ -0,0 +1,31 @@ +$NetBSD: patch-df,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/reiserfs/fsys_reiserfs.c.orig 2008-01-31 10:06:54.000000000 +0000 ++++ libfsimage/reiserfs/fsys_reiserfs.c 2008-03-01 11:52:29.000000000 +0000 +@@ -1029,7 +1029,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir + + /* Find out how long our remaining name is. */ + len = 0; +- while (dirname[len] && !isspace (dirname[len])) ++ while (dirname[len] && !isspace ((uint8_t)dirname[len])) + len++; + + if (filemax + len > sizeof (linkbuf) - 1) +@@ -1078,7 +1078,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir + /* if we have a real file (and we're not just printing possibilities), + then this is where we want to exit */ + +- if (! *dirname || isspace (*dirname)) ++ if (! *dirname || isspace ((uint8_t)*dirname)) + { + if (! S_ISREG (mode)) + { +@@ -1109,7 +1109,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir + errnum = ERR_BAD_FILETYPE; + return 0; + } +- for (rest = dirname; (ch = *rest) && ! isspace (ch) && ch != '/'; rest++); ++ for (rest = dirname; (ch = *rest) && ! isspace ((uint8_t)ch) && ch != '/'; rest++); + *rest = 0; + + # ifndef STAGE1_5 diff --git a/sysutils/xentools3/patches/patch-dg b/sysutils/xentools3/patches/patch-dg new file mode 100644 index 00000000000..18b00a23bc0 --- /dev/null +++ b/sysutils/xentools3/patches/patch-dg @@ -0,0 +1,41 @@ +$NetBSD: patch-dg,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/ufs/fsys_ufs.c.orig 2008-01-31 11:06:54.000000000 +0100 ++++ libfsimage/ufs/fsys_ufs.c 2008-03-02 18:14:30.000000000 +0100 +@@ -32,8 +32,9 @@ + #define SUPERBLOCK ((struct fs *)(FSYS_BUF + 0x2000)) + #define INODE ((struct icommon *)(FSYS_BUF + 0x1000)) + #define DIRENT (FSYS_BUF + 0x4000) ++#define MAXBSIZE ((FSYS_BUFLEN - 0x4000) / 2) + #define INDIRBLK1 ((grub_daddr32_t *)(FSYS_BUF + 0x4000)) /* 2+ indir blk */ +-#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x6000)) /* 1st indirect blk */ ++#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x4000 + MAXBSIZE)) /* 1st indirect blk */ + + #define indirblk0 (*fsig_int1(ffi)) + #define indirblk1 (*fsig_int2(ffi)) +@@ -48,7 +49,8 @@ ufs_mount(fsi_file_t *ffi, const char *o + { + if (/*! IS_PC_SLICE_TYPE_SOLARIS(current_slice) || */ + !devread(ffi, UFS_SBLOCK, 0, UFS_SBSIZE, (char *)SUPERBLOCK) || +- SUPERBLOCK->fs_magic != UFS_MAGIC) ++ SUPERBLOCK->fs_magic != UFS_MAGIC || ++ MAXBSIZE < SUPERBLOCK->fs_bsize) + return 0; + + return 1; +@@ -72,13 +74,13 @@ ufs_dir(fsi_file_t *ffi, char *dirname) + while (*dirname == '/') + dirname++; + +- while (inode && *dirname && !isspace(*dirname)) { ++ while (inode && *dirname && !isspace((uint8_t)*dirname)) { + if (!openi(ffi, inode)) + return 0; + + /* parse for next path component */ + fname = dirname; +- while (*dirname && !isspace(*dirname) && *dirname != '/') ++ while (*dirname && !isspace((uint8_t)*dirname) && *dirname != '/') + dirname++; + ch = *dirname; + *dirname = 0; /* ensure null termination */ diff --git a/sysutils/xentools3/patches/patch-dh b/sysutils/xentools3/patches/patch-dh new file mode 100644 index 00000000000..63c3f5df74e --- /dev/null +++ b/sysutils/xentools3/patches/patch-dh @@ -0,0 +1,22 @@ +$NetBSD: patch-dh,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- pygrub/Makefile.orig 2008-01-31 10:06:54.000000000 +0000 ++++ pygrub/Makefile 2008-03-01 12:03:11.000000000 +0000 +@@ -10,14 +10,12 @@ build: + + .PHONY: install + ifndef XEN_PYTHON_NATIVE_INSTALL +-install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()") ++install: LIBPATH=$(shell PYTHONPATH=../py{}thon/xen/util python -c "import auxbin; print auxbin.libpath()") + install: all +- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python" +- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot ++ python setup.py install + else + install: all +- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" +- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot ++ python setup.py install + endif + + .PHONY: clean diff --git a/sysutils/xentools3/patches/patch-di b/sysutils/xentools3/patches/patch-di new file mode 100644 index 00000000000..94169727500 --- /dev/null +++ b/sysutils/xentools3/patches/patch-di @@ -0,0 +1,58 @@ +$NetBSD: patch-di,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/common/fsimage_grub.c.orig 2008-01-31 11:06:54.000000000 +0100 ++++ libfsimage/common/fsimage_grub.c 2008-03-01 18:59:27.000000000 +0100 +@@ -204,6 +204,45 @@ int + fsig_devread(fsi_file_t *ffi, unsigned int sector, unsigned int offset, + unsigned int bufsize, char *buf) + { ++#ifdef __NetBSD__ ++ off_t off; ++ ssize_t ret; ++ int n, r; ++ char tmp[512]; ++ ++ off = ffi->ff_fsi->f_off + ((off_t)sector * 512) + offset; ++ ++ /* ++ * On NetBSD reads from a raw disk must be sector-aligned. ++ * Split the read into up to three parts to meet this requirement. ++ */ ++ ++ if ((n = (off & 511)) > 0) { ++ if ((r = 512 - n) > bufsize) ++ r = bufsize; ++ if ((ret = pread(ffi->ff_fsi->f_fd, tmp, 512, off - n)) < n + r) ++ return (0); ++ bcopy(tmp + n, buf, r); ++ buf += r; ++ bufsize -= r; ++ off += r; ++ } ++ ++ if ((n = (bufsize & ~511)) > 0) { ++ if ((ret = pread(ffi->ff_fsi->f_fd, buf, n, off)) < n) ++ return (0); ++ buf += n; ++ bufsize -= n; ++ off += n; ++ } ++ if (bufsize > 0) { ++ if ((ret = pread(ffi->ff_fsi->f_fd, tmp, 512, off)) < bufsize) ++ return (0); ++ bcopy(tmp, buf, bufsize); ++ } ++ ++ return (1); ++#else /* __NetBSD__ */ + uint64_t off = ffi->ff_fsi->f_off + ((uint64_t)sector * 512) + offset; + ssize_t bytes_read = 0; + +@@ -220,6 +259,7 @@ fsig_devread(fsi_file_t *ffi, unsigned i + } + + return (1); ++#endif /* __NetBSD__ */ + } + + int diff --git a/sysutils/xentools3/patches/patch-dj b/sysutils/xentools3/patches/patch-dj new file mode 100644 index 00000000000..f6a5e02ba4d --- /dev/null +++ b/sysutils/xentools3/patches/patch-dj @@ -0,0 +1,46 @@ +$NetBSD: patch-dj,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- python/xen/xend/XendBootloader.py.orig 2008-01-31 11:06:54.000000000 +0100 ++++ python/xen/xend/XendBootloader.py 2008-03-02 13:37:58.000000000 +0100 +@@ -12,7 +12,7 @@ + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # + +-import os, select, errno, stat, signal ++import os, select, errno, stat, signal, tty + import random + import shlex + from xen.xend import sxp +@@ -43,6 +43,9 @@ def bootloader(blexec, disk, dom, quiet + log.error(msg) + raise VmError(msg) + ++ if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'): ++ disk = disk.replace("/dev/", "/dev/r") ++ + mkdir.parents("/var/run/xend/boot/", stat.S_IRWXU) + + while True: +@@ -63,12 +66,8 @@ def bootloader(blexec, disk, dom, quiet + # where we copy characters between the two master fds, as well as + # listening on the bootloader's fifo for the results. + +- # Termios runes for very raw access to the pty master fds. +- attr = [ 0, 0, termios.CS8 | termios.CREAD | termios.CLOCAL, +- 0, 0, 0, [0] * 32 ] +- + (m1, s1) = pty.openpty() +- termios.tcsetattr(m1, termios.TCSANOW, attr) ++ tty.setraw(m1); + fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY); + os.close(s1) + slavename = ptsname.ptsname(m1) +@@ -109,7 +108,7 @@ def bootloader(blexec, disk, dom, quiet + # record that this domain is bootloading + dom.bootloader_pid = child + +- termios.tcsetattr(m2, termios.TCSANOW, attr) ++ tty.setraw(m2); + fcntl.fcntl(m2, fcntl.F_SETFL, os.O_NDELAY); + while True: + try: diff --git a/sysutils/xentools3/patches/patch-dk b/sysutils/xentools3/patches/patch-dk new file mode 100644 index 00000000000..127c8cb03db --- /dev/null +++ b/sysutils/xentools3/patches/patch-dk @@ -0,0 +1,13 @@ +$NetBSD: patch-dk,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- libfsimage/common/fsimage_grub.h.orig 2008-01-31 11:06:54.000000000 +0100 ++++ libfsimage/common/fsimage_grub.h 2008-03-02 18:10:43.000000000 +0100 +@@ -44,7 +44,7 @@ typedef struct fsig_plugin_ops { + } fsig_plugin_ops_t; + + #define STAGE1_5 +-#define FSYS_BUFLEN 0x8000 ++#define FSYS_BUFLEN 0x40000 + #define SECTOR_BITS 9 + #define SECTOR_SIZE 0x200 + diff --git a/sysutils/xentools3/patches/patch-dl b/sysutils/xentools3/patches/patch-dl new file mode 100644 index 00000000000..afd2d47e799 --- /dev/null +++ b/sysutils/xentools3/patches/patch-dl @@ -0,0 +1,40 @@ +$NetBSD: patch-dl,v 1.1 2008/03/03 16:45:27 hannken Exp $ + +--- pygrub/src/pygrub.orig 2008-03-02 18:25:22.000000000 +0100 ++++ pygrub/src/pygrub 2008-03-03 12:15:22.000000000 +0100 +@@ -240,10 +240,10 @@ class Grub: + if y > self.start_image + maxy: + break + if y == self.selected_image: +- attr = curses.A_REVERSE +- else: +- attr = 0 +- self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.ljust(70), attr) ++ self.entry_win.attron(curses.A_REVERSE) ++ self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.ljust(70)) ++ if y == self.selected_image: ++ self.entry_win.attroff(curses.A_REVERSE) + self.entry_win.refresh() + + def edit_entry(self, origimg): +@@ -269,16 +269,17 @@ class Grub: + self.entry_win.box() + for idx in range(1, len(img.lines)): + # current line should be highlighted +- attr = 0 + if idx == curline: +- attr = curses.A_REVERSE ++ self.entry_win.attron(curses.A_REVERSE) + + # trim the line + l = img.lines[idx].ljust(70) + if len(l) > 70: + l = l[:69] + ">" + +- self.entry_win.addstr(idx, 2, l, attr) ++ self.entry_win.addstr(idx, 2, l) ++ if idx == curline: ++ self.entry_win.attroff(curses.A_REVERSE) + self.entry_win.refresh() + + c = self.screen.getch() |