Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=215215119b677aaef5fafa4ce62049e486417595
commit 215215119b677aaef5fafa4ce62049e486417595 Author: James Buren <[email protected]> Date: Wed Jun 6 22:41:41 2012 -0500 xen-3.0.4-1-x86_64 * remove package (was nobuild) diff --git a/source/xapps-extra/xen/FrugalBuild b/source/xapps-extra/xen/FrugalBuild deleted file mode 100644 index b6232d2..0000000 --- a/source/xapps-extra/xen/FrugalBuild +++ /dev/null @@ -1,88 +0,0 @@ -# Compiling Time: 0.65 SBU -# Maintainer: AlexExtreme <[email protected]> - -pkgname=xen -pkgver=3.0.4 -pkgrel=1 -pkgdesc="Xen virtual machine and hypervisor" -url="http://www.xen.org/" -rodepends=('bridge-utils') -depends=('python' 'e2fsprogs' 'zlib' 'sdl' 'libvncserver' 'dev86' 'gtk+2' 'tightvnc' 'urlgrabber') -#makedepends=('tetex' 'espgs' 'transfig' 'kernel-xen0-source') -makedepends=('kernel-xen0-source') -groups=('xapps-extra') -archs=('i686' 'x86_64') -backup=(etc/xen/xend-config.sxp) -up2date="Flasttar $url/products/xen_source.html" -srcurl="http://ftp.frugalware.org/pub/other/sources/xen" -source=(http://bits.xensource.com/oss-xen/release/$pkgver-1/src.tgz/$pkgname-${pkgver}_1-src.tgz - rc.xend \ - README.Frugalware - serial-split.patch \ - xen-warnings.diff \ - xen-no-dummy-nfs-ip.diff \ - xen-xm-top-needs-root.diff \ - xen-tightvnc-args.diff \ - xen-max-free-mem.diff \ - xen-ioapic-ack-default.diff \ - xen-console.diff \ - block-losetup-retry.diff \ - block-sync.diff \ - xen-enable-hvm-debug.diff \ - xen-config-allow-http.diff) -sha1sums=('7ca5af70996215229e143c7563e69b3719284a95' \ - 'eb6b4ced01969af8d04980b32c48db5c2e2bd888' \ - 'f0859a7c379e82ef80e9bfd9b346dd12208cf6d1' \ - '088e3133a3d3e90b36a984fc3ee5e8f680ff5313' \ - 'df87e6d304133a9ad9aff1d53c772aa6c3f0f3f7' \ - '6a0cb7f131aaa3989ab811a22a93d9afa1a0db98' \ - '520e1442f65489673c8c64c44213461579884af1' \ - 'a34561d471c3f56bada87f07a6be43485dc2b567' \ - '01ee3d777fb1e3b6bb0be66c3a60f98154a61423' \ - '41dbd2b8755db8984c9452ef9da39cf5b19cab16' \ - 'e2c0fa703e0633e08f291414f53ab57f8c114c8d' \ - '8d3ac2e2772a4ae97e429abb4e7b5b0f3cd39572' \ - '458bb19aba98116bb620c9b7af473e66f9410d14' \ - 'e9e7ebb3e1066539029a2ac1390421039553df0d' \ - '966317ac1471319c140f4a5c0e7393f8ceceffdc') -unset MAKEFLAGS -unset LDFLAGS - -options=('nobuild') - -build() -{ - Fcd $pkgname-${pkgver}_1-src - - Fpatchall - - # I love hacks - xenkernrel=`pacman-g2 -Qi kernel-xen0-source | grep Version | sed 's/.*: //' | sed 's/.*-//'` - xenkernver=`pacman-g2 -Qi kernel-xen0-source | grep Version | sed 's/.*: //' | sed 's/-.*//'` - xenkerndir="linux-${xenkernver}-xen0-fw${xenkernrel}" - ln -s /usr/src/${xenkerndir}/include kerninc - - # Umm, hack. Just to make it build ;) I'll make it actually *work* sometime soon :P - if [ "$CARCH" == "x86_64" ]; then - mkdir tools/libxc/gnu || Fdie - cp /usr/include/gnu/stubs-64.h tools/libxc/gnu/stubs-32.h || Fdie - fi - - make DESTDIR=$Fdestdir install-xen || Fdie - make DESTDIR=$Fdestdir install-tools || Fdie - make DESTDIR=$Fdestdir install-docs || Fdie - make -C tools/pygrub install DESTDIR=$Fdestdir || Fdie - - if [ "$CARCH" == "x86_64" ]; then - cp -R $Fdestdir/usr/lib64/* $Fdestdir/usr/lib/ || Fdie - Frm /usr/lib64 - fi - - Frcd xend - Fmkdir /etc/rc.d/rc.messages - Fdoc README.Frugalware - - Frm /etc/init.d -} - -# optimization OK diff --git a/source/xapps-extra/xen/README.Frugalware b/source/xapps-extra/xen/README.Frugalware deleted file mode 100644 index e431e3e..0000000 --- a/source/xapps-extra/xen/README.Frugalware +++ /dev/null @@ -1,3 +0,0 @@ -WARNING: Xen is unstable software, meaning that it should not be used on your -main PC, it may destroy your data. As an example, I destroyed my file system -during testing. diff --git a/source/xapps-extra/xen/block-losetup-retry.diff b/source/xapps-extra/xen/block-losetup-retry.diff deleted file mode 100644 index 4246c17..0000000 --- a/source/xapps-extra/xen/block-losetup-retry.diff +++ /dev/null @@ -1,25 +0,0 @@ -Index: xen-unstable/tools/examples/block -=================================================================== ---- xen-unstable.orig/tools/examples/block -+++ xen-unstable/tools/examples/block -@@ -391,8 +391,18 @@ mount it read-write in a guest domain." - - file) - node=$(xenstore_read "$XENBUS_PATH/node") -- losetup -d "$node" -- exit 0 -+ -+ #In case the loopback is temporarily blocked, retry the losetup -d. -+ for i in 1 2 3 4 5 -+ do -+ if losetup -d "$node" -+ then -+ exit 0 -+ fi -+ sleep 1 -+ done -+ log err "losetup -d $node failed." -+ exit 1 - ;; - - "") diff --git a/source/xapps-extra/xen/block-sync.diff b/source/xapps-extra/xen/block-sync.diff deleted file mode 100644 index 8ac5939..0000000 --- a/source/xapps-extra/xen/block-sync.diff +++ /dev/null @@ -1,42 +0,0 @@ -Index: xen-unstable/tools/examples/block -=================================================================== ---- xen-unstable.orig/tools/examples/block -+++ xen-unstable/tools/examples/block -@@ -42,6 +42,20 @@ canonicalise_mode() - fi - } - -+## -+# sync_flags mode -+# -+sync_flags() -+{ -+ local mode="$1" -+ if expr index "$mode" 'S' >/dev/null -+ then -+ echo "-y" -+ else -+ echo "" -+ fi -+} -+ - - ## - # check_sharing device mode -@@ -262,6 +276,7 @@ case "$command" in - # Canonicalise the file, for sharing check comparison, and the mode - # for ease of use here. - file=$(readlink -f "$p") || fatal "$p does not exist." -+ sync=$(sync_flags "$mode") - mode=$(canonicalise_mode "$mode") - - claim_lock "block" -@@ -367,7 +382,7 @@ mount it read-write in a guest domain." - fatal 'Failed to find an unused loop device' - fi - -- do_or_die losetup "$loopdev" "$file" -+ do_or_die losetup $sync "$loopdev" "$file" - xenstore_write "$XENBUS_PATH/node" "$loopdev" - write_dev "$loopdev" - release_lock "block" diff --git a/source/xapps-extra/xen/messages/xend.en b/source/xapps-extra/xen/messages/xend.en deleted file mode 100644 index f299f6b..0000000 --- a/source/xapps-extra/xen/messages/xend.en +++ /dev/null @@ -1,4 +0,0 @@ -restartxend="Restarting Xen daemon..." -startxend="Starting Xen daemon..." -stopxend="Stopping Xen daemon..." - diff --git a/source/xapps-extra/xen/messages/xend.hu b/source/xapps-extra/xen/messages/xend.hu deleted file mode 100644 index 565ec8e..0000000 --- a/source/xapps-extra/xen/messages/xend.hu +++ /dev/null @@ -1,3 +0,0 @@ -restartxend="A Xen démon újraindítása..." -startxend="A Xen démon indítása..." -stopxend="A Xen démon leállítása..." diff --git a/source/xapps-extra/xen/rc.xend b/source/xapps-extra/xen/rc.xend deleted file mode 100644 index 1e84ba4..0000000 --- a/source/xapps-extra/xen/rc.xend +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2006 Alex Smith -# rc.xend for Fruglware -# Distributed under the GPL license - -. /etc/rc.d/rc.functions - -# chkconfig: 2345 98 01 -# description: Starts and stops the Xen control daemon. - -if ! [ -e /proc/xen/privcmd ]; then - exit 0 -fi - -# Wait for Xend to be up -function await_daemons_up -{ - i=1 - rets=10 - xend status - while [ $? -ne 0 -a $i -lt $rets ]; do - sleep 1 - echo -n . - i=$(($i + 1)) - xend status - done -} - -if [ "$1" == "stop" ]; then - stop "$stopxend" - xend stop - ok $? -elif [ "$1" == "restart" ]; then - start "$restartxend" - xend restart - ok $? - await_daemons_up -else - start "$startxend" - xend start - ok $? - await_daemons_up -fi diff --git a/source/xapps-extra/xen/serial-split.patch b/source/xapps-extra/xen/serial-split.patch deleted file mode 100644 index 6b32f49..0000000 --- a/source/xapps-extra/xen/serial-split.patch +++ /dev/null @@ -1,452 +0,0 @@ -Index: xen-3.0-testing/tools/misc/serial-split/Makefile -=================================================================== ---- /dev/null -+++ xen-3.0-testing/tools/misc/serial-split/Makefile -@@ -0,0 +1,20 @@ -+CC ?= gcc -+CFLAGS ?= -Wall -Os -+CFILES = $(wildcard *.c) -+OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) -+TARGET = serial-split -+ -+all: $(TARGET) -+ -+install: all -+ install -d $(DESTDIR)/usr/bin -+ install -s $(TARGET) $(DESTDIR)/usr/bin/ -+ -+clean: -+ rm *.o $(TARGET) *~ -+ -+$(TARGET): $(OBJS) -+ $(CC) $(CFLAGS) -o $@ $^ -+ -+%.o: %.c Makefile -+ $(CC) $(CFLAGS) -c -o $@ $< -Index: xen-3.0-testing/tools/misc/serial-split/serial-split.c -=================================================================== ---- /dev/null -+++ xen-3.0-testing/tools/misc/serial-split/serial-split.c -@@ -0,0 +1,422 @@ -+/* -+ * serial-split.c -+ * pdb / console splitter -+ * -+ * Copyright 2005 Charles Coffing <[email protected]> -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+/* -+ * Typical setup: -+ * -+ * Development box Xen box -+ * ...-----+ +-----... -+ * +---------+ | | -+ * | gdb | | | -+ * | |\ high | | -+ * +---------+ \ | | -+ * \+-----------+ | serial | +------------------+ -+ * | splitter |------------| Xen | -+ * /+-----------+ | | | - pdb (com1H)| -+ * +---------+ / | | | - printk (com1) | -+ * | console |/ low | | +------------------+ -+ * | viewer | | | -+ * +---------+ | | -+ * ...-----+ +-----... -+ */ -+ -+ -+#include <assert.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <unistd.h> -+#include <fcntl.h> -+#include <termios.h> -+#include <sys/signal.h> -+#include <sys/time.h> -+#include <sys/types.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <sys/ioctl.h> -+#include <netinet/in.h> -+ -+const unsigned int DefaultLowPort = 12010; -+const unsigned int DefaultBaud = 115200; -+const char DefaultSerialDevice[] = "/dev/ttyS0"; -+ -+#define DEBUG 0 -+#define MAX(a,b) ((a)<(b)?(b):(a)) -+ -+ -+static int cook_baud(int baud) -+{ -+ int cooked_baud = 0; -+ switch (baud) -+ { -+ case 50: cooked_baud = B50; break; -+ case 75: cooked_baud = B75; break; -+ case 110: cooked_baud = B110; break; -+ case 134: cooked_baud = B134; break; -+ case 150: cooked_baud = B150; break; -+ case 200: cooked_baud = B200; break; -+ case 300: cooked_baud = B300; break; -+ case 600: cooked_baud = B600; break; -+ case 1200: cooked_baud = B1200; break; -+ case 1800: cooked_baud = B1800; break; -+ case 2400: cooked_baud = B2400; break; -+ case 4800: cooked_baud = B4800; break; -+ case 9600: cooked_baud = B9600; break; -+ case 19200: cooked_baud = B19200; break; -+ case 38400: cooked_baud = B38400; break; -+ case 57600: cooked_baud = B57600; break; -+ case 115200: cooked_baud = B115200; break; -+ } -+ return cooked_baud; -+} -+ -+ -+static int start_listener(unsigned short port) -+{ -+ int fd; -+ struct sockaddr_in sin; -+ int on = 1; -+ -+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) -+ { -+ perror("socket"); -+ goto out1; -+ } -+ -+ setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof (on)); -+ -+ memset(&sin, 0, sizeof(sin)); -+ sin.sin_family = AF_INET; -+ sin.sin_port = htons (port); -+ sin.sin_addr.s_addr = INADDR_ANY; -+ if (bind(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) -+ { -+ perror("bind"); -+ goto out2; -+ } -+ -+ if (listen(fd, 1) < 0) -+ { -+ perror("listen"); -+ goto out2; -+ } -+ -+ fprintf(stderr, "Listening on port %d\n", port); -+ -+ return fd; -+ -+out2: -+ close(fd); -+out1: -+ return -1; -+} -+ -+ -+static int accept_conn(int fd) -+{ -+ int on = 1; -+ int new_fd; -+ struct sockaddr_in from; -+ socklen_t fromlen = sizeof(from); -+ -+ new_fd = accept(fd, (struct sockaddr *)&from, &fromlen); -+ if (new_fd < 0) -+ perror("accept"); -+ ioctl(new_fd, FIONBIO, &on); -+ -+ fprintf(stderr, "Accepted connection on %d\n", new_fd); -+ -+ return new_fd; -+} -+ -+ -+static void close_conn(int * fd) -+{ -+ shutdown(*fd, 2); -+ close(*fd); -+ *fd = -1; -+} -+ -+ -+static int receive_data(int * fd, char * buf, ssize_t max_bytes, int * poll) -+{ -+ ssize_t bytes; -+ if ((bytes = read(*fd, buf, max_bytes)) < 0) -+ { -+ perror("read"); -+ *poll = 1; -+ return 0; -+ } -+ else if (bytes == 0) -+ { -+ close_conn(fd); -+ *poll = 0; -+ return 0; -+ } -+ else -+ { -+ if (bytes == max_bytes) -+ *poll = 1; -+ else -+ *poll = 0; -+#if DEBUG -+ { -+ ssize_t i; -+ fprintf(stderr, "Received %d bytes on %d:\n", bytes, *fd); -+ for (i = 0; i < bytes; ++ i) -+ { -+ if ((i & 0xf) == 0) -+ printf(" "); -+ printf("%02x", buf[i] & 0xff); -+ if (((i+1) & 0xf) == 0 || i + 1 == bytes) -+ printf("\n"); -+ else -+ printf(" "); -+ } -+ } -+#endif -+ return bytes; -+ } -+} -+ -+ -+static void set_high_bit(char * buf, size_t bytes) -+{ -+ size_t i; -+ for(i = 0; i < bytes; ++ i) -+ buf[i] |= 0x80; -+} -+ -+ -+static void clear_high_bit(char * buf, size_t bytes) -+{ -+ size_t i; -+ for(i = 0; i < bytes; ++ i) -+ buf[i] &= 0x7f; -+} -+ -+ -+static int open_serial(char const * serial_dev, int baud) -+{ -+ struct termios newsertio; -+ int serial_fd; -+ memset(&newsertio, 0, sizeof(newsertio)); -+ -+ if ((serial_fd = open(serial_dev, O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0) -+ { -+ perror(serial_dev); -+ return -1; -+ } -+ -+ newsertio.c_cflag = baud | CS8 | CLOCAL | CREAD; -+ newsertio.c_iflag = IGNBRK | IGNPAR; /* raw input */ -+ newsertio.c_oflag = 0; /* raw output */ -+ newsertio.c_lflag = 0; /* no echo, no signals */ -+ newsertio.c_cc[VMIN] = 1; -+ newsertio.c_cc[VTIME] = 0; -+ tcflush(serial_fd, TCIFLUSH); -+ tcsetattr(serial_fd, TCSANOW, &newsertio); -+ -+ fprintf(stderr, "Listening on %s\n", serial_dev); -+ -+ return serial_fd; -+} -+ -+ -+static void main_loop(int serial_fd, int low_listener, int high_listener) -+{ -+ fd_set rdfds; -+ int low_poll = 0, high_poll = 0, serial_poll = 0; -+ int low_fd = -1, high_fd = -1; -+ -+ while(1) -+ { -+ char buf[1024]; -+ ssize_t bytes; -+ int max; -+ -+ FD_ZERO(&rdfds); -+ FD_SET(low_fd < 0 ? low_listener : low_fd, &rdfds); -+ FD_SET(high_fd < 0 ? high_listener : high_fd, &rdfds); -+ FD_SET(serial_fd, &rdfds); -+ -+ max = MAX(low_fd, low_listener); -+ max = MAX(max, high_fd); -+ max = MAX(max, high_listener); -+ max = MAX(max, serial_fd); -+ -+ if (select(max + 1, &rdfds, NULL, NULL, NULL) < 0) -+ { -+ perror("select"); -+ continue; -+ } -+ -+ if (FD_ISSET(low_listener, &rdfds)) -+ { -+ assert(low_fd < 0); -+ low_fd = accept_conn(low_listener); -+ } -+ -+ if (FD_ISSET(high_listener, &rdfds)) -+ { -+ assert(high_fd < 0); -+ high_fd = accept_conn(high_listener); -+ } -+ -+ if (low_poll || (low_fd >= 0 && FD_ISSET(low_fd, &rdfds))) -+ { -+ if ((bytes = receive_data(&low_fd, &buf[0], sizeof(buf), -+ &low_poll)) > 0) -+ { -+ clear_high_bit(&buf[0], bytes); -+ if (write(serial_fd, &buf[0], bytes) < 0) -+ perror("write"); -+ } -+ } -+ -+ if (high_poll || (high_fd >= 0 && FD_ISSET(high_fd, &rdfds))) -+ { -+ if ((bytes = receive_data(&high_fd, &buf[0], sizeof(buf), -+ &high_poll)) > 0) -+ { -+ set_high_bit(&buf[0], bytes); -+ if (write(serial_fd, &buf[0], bytes) < 0) -+ perror("write"); -+ } -+ } -+ -+ if (serial_poll || FD_ISSET(serial_fd, &rdfds)) -+ { -+ if ((bytes = receive_data(&serial_fd, &buf[0], sizeof(buf), -+ &serial_poll)) > 0) -+ { -+ ssize_t i; -+ for (i = 0; i < bytes; ++ i) -+ { -+ if (buf[i] & 0x80) -+ { -+ if (high_fd >= 0) -+ { -+ buf[i] &= 0x7f; -+ if ((write(high_fd, &buf[i], 1)) < 0) -+ { -+ perror("write"); -+ close_conn(&high_fd); -+ high_poll = 0; -+ } -+ } -+ } -+ else -+ { -+ if (low_fd >= 0) -+ { -+ if ((write(low_fd, &buf[i], 1)) < 0) -+ { -+ perror("write"); -+ close_conn(&low_fd); -+ low_poll = 0; -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+} -+ -+ -+static void usage() -+{ -+ printf( -+"Description:\n" -+" Splits the serial port between two TCP ports. Bytes read from the\n" -+" serial port will be delivered to one of the two TCP ports (high or\n" -+" low) depending on whether the high bit is set. Bytes written to the\n" -+" TCP ports will be forwarded to the serial port; the high bit will be\n" -+" set or cleared to denote the source.\n" -+"Usage:\n" -+" serial-split [-d<serial-device>] [-b<baud>]\n" -+" [-l<low-port>] [-h<high-port>]\n" -+"Parameters:\n" -+" -d<serial-device> Defaults to %s.\n" -+" -b<baud> Baud rate of the serial port. Defaults to %d.\n" -+" Also assumes 8N1.\n" -+" -l<low-port> Low TCP port. Defaults to %d, or one less than\n" -+" the high port.\n" -+" -h<high-port> High TCP port. Defaults to %d, or one more than\n" -+" the low port.\n", -+DefaultSerialDevice, DefaultBaud, DefaultLowPort, DefaultLowPort + 1); -+ -+ exit(1); -+} -+ -+ -+int main(int argc, char **argv) -+{ -+ int cooked_baud = cook_baud(DefaultBaud); -+ char const * serial_dev = DefaultSerialDevice; -+ int low_port = -1, high_port = -1; -+ int serial_fd, low_listener, high_listener; -+ -+ while ( --argc != 0 ) -+ { -+ char *p = argv[argc]; -+ if ( *(p++) != '-' ) -+ usage(); -+ switch (*(p++)) -+ { -+ case 'b': -+ if ( (cooked_baud = cook_baud(atoi(p))) == 0 ) -+ { -+ fprintf(stderr, "Bad baud rate\n"); -+ exit(1); -+ } -+ break; -+ case 'd': -+ serial_dev = p; -+ break; -+ case 'l': -+ if ((low_port = atoi(p)) <= 0) -+ usage(); -+ break; -+ case 'h': -+ if ((high_port = atoi(p)) <= 0) -+ usage(); -+ break; -+ default: -+ usage(); -+ } -+ } -+ -+ if (low_port == -1 && high_port == -1) -+ low_port = DefaultLowPort; -+ if (low_port == -1) -+ low_port = high_port - 1; -+ if (high_port == -1) -+ high_port = low_port + 1; -+ -+ if ((serial_fd = open_serial(serial_dev, cooked_baud)) < 0 || -+ (low_listener = start_listener(low_port)) < 0 || -+ (high_listener = start_listener(high_port)) < 0) -+ exit(1); -+ -+ main_loop(serial_fd, low_listener, high_listener); -+ -+ return 0; -+} -+ diff --git a/source/xapps-extra/xen/xen-config-allow-http.diff b/source/xapps-extra/xen/xen-config-allow-http.diff deleted file mode 100644 index af69d7f..0000000 --- a/source/xapps-extra/xen/xen-config-allow-http.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- xen-unstable.hg/tools/examples/xend-config.sxp.http 2006-04-25 21:57:10.000000000 -0400 -+++ xen-unstable.hg/tools/examples/xend-config.sxp 2006-04-25 21:57:35.000000000 -0400 -@@ -14,7 +14,7 @@ - #(logfile /var/log/xend.log) - #(loglevel DEBUG) - --#(xend-http-server no) -+(xend-http-server yes) - #(xend-unix-server no) - #(xend-tcp-xmlrpc-server no) - #(xend-unix-xmlrpc-server yes) -@@ -35,7 +35,7 @@ - # Specifying 'localhost' prevents remote connections. - # Specifying the empty string '' (the default) allows all connections. - #(xend-address '') --#(xend-address localhost) -+(xend-address localhost) - - # Address xend should listen on for relocation-socket connections, if - # xend-relocation-server is set. diff --git a/source/xapps-extra/xen/xen-console.diff b/source/xapps-extra/xen/xen-console.diff deleted file mode 100644 index 8833625..0000000 --- a/source/xapps-extra/xen/xen-console.diff +++ /dev/null @@ -1,63 +0,0 @@ -Subject: video mode detection (161541) - -Charles, attached the promised patch for replacing xen-console.diff. Jan - -Index: xen-unstable/xen/drivers/video/vga.c -=================================================================== ---- xen-unstable.orig/xen/drivers/video/vga.c -+++ xen-unstable/xen/drivers/video/vga.c -@@ -573,6 +573,30 @@ string_param("vga", opt_vga); - #define ATTRIBUTE 7 - #define VIDEO_SIZE (COLUMNS * LINES * 2) - -+static int gfx_vga(void) -+{ -+ unsigned char idx, data; -+ -+ idx = inb(0x3ce); -+ outb(0x06, 0x3ce); -+ data = inb(0x3cf); -+ outb(idx, 0x3ce); -+ -+ if ( data & 0x01 ) -+ return 1; -+ -+ /* Unfortunately many cards don't reflect their mode in the GDC -+ * miscellaneous register, bit 0 (and even fewer reflect it in the -+ * ATC mode control register, bit 0). Therefore we further check -+ * horizontal display width against our original setting. */ -+ idx = inb(0x3d4); -+ outb(0x01, 0x3d4); -+ data = inb(0x3d5); -+ outb(idx, 0x3d4); -+ -+ return data != COLUMNS - 1; -+} -+ - void vga_init(void) - { - char *p; -@@ -656,14 +680,21 @@ static void put_newline(void) - - void vga_putchar(int c) - { -+ static int vga_in_gfx = -1; -+ - if ( !vgacon_enabled ) - return; - -+ if ( vga_in_gfx < 0 ) -+ vga_in_gfx = gfx_vga(); -+ - if ( c == '\n' ) - { -- put_newline(); -+ if ( vga_in_gfx <= 0 ) -+ put_newline(); -+ vga_in_gfx = -1; - } -- else -+ else if ( vga_in_gfx <= 0 ) - { - if ( xpos >= COLUMNS ) - put_newline(); diff --git a/source/xapps-extra/xen/xen-enable-hvm-debug.diff b/source/xapps-extra/xen/xen-enable-hvm-debug.diff deleted file mode 100644 index 889c4e5..0000000 --- a/source/xapps-extra/xen/xen-enable-hvm-debug.diff +++ /dev/null @@ -1,110 +0,0 @@ -Index: xen-unstable/tools/firmware/vmxassist/vm86.c -=================================================================== ---- xen-unstable.orig/tools/firmware/vmxassist/vm86.c -+++ xen-unstable/tools/firmware/vmxassist/vm86.c -@@ -38,7 +38,7 @@ unsigned prev_eip = 0; - enum vm86_mode mode; - - #ifdef DEBUG --int traceset = 0; -+int traceset = 0xffffffff; - - char *states[] = { - "<VM86_REAL>", -@@ -72,6 +72,35 @@ address(struct regs *regs, unsigned seg, - return addr; - } - -+void -+panic_eip(struct regs *regs, char *fmt, ...) -+{ -+ va_list ap; -+ va_start(ap, fmt); -+ vprintf(fmt, ap); -+ printf("\n"); -+ va_end(ap); -+#ifdef DEBUG -+ if (regs->eflags & EFLAGS_VM) { -+ unsigned int range = 20; -+ unsigned int eip = address(regs, regs->cs, regs->eip); -+ unsigned int start = (eip < range) ? 0 : eip - range; -+ unsigned int stop = (eip > 0x100000 - range) ? 0x100000 : eip + range; -+ int size = (stop - start); -+ unsigned int i; -+ unsigned char data[size]; -+ -+ printf("Dumping %x..%x eip=%x\n", start, stop, eip); -+ for (i = start; i < stop; ++i) -+ data[i-start] = *(unsigned char *) i; -+ hexdump(data, size); -+ } -+#else -+ regs = regs; -+#endif -+ halt(); -+} -+ - #ifdef DEBUG - void - trace(struct regs *regs, int adjust, char *fmt, ...) -@@ -1037,7 +1066,7 @@ emulate(struct regs *regs) - /* detect the case where we are not making progress */ - if (nemul == 0 && prev_eip == regs->eip) { - flteip = address(regs, MASK16(regs->cs), regs->eip); -- panic("Unknown opcode at %04x:%04x=0x%x", -+ panic_eip(regs, "Unknown opcode at %04x:%04x=0x%x", - MASK16(regs->cs), regs->eip, flteip); - } else - prev_eip = regs->eip; -@@ -1061,7 +1090,7 @@ trap(int trapno, int errno, struct regs - if (regs->eflags & EFLAGS_VM) { - /* emulate any 8086 instructions */ - if (mode != VM86_REAL_TO_PROTECTED) -- panic("not in real-to-protected mode"); -+ panic_eip(regs, "not in real-to-protected mode"); - emulate(regs); - return; - } -@@ -1071,7 +1100,7 @@ trap(int trapno, int errno, struct regs - if (regs->eflags & EFLAGS_VM) { - /* emulate any 8086 instructions */ - if (mode == VM86_PROTECTED) -- panic("unexpected protected mode"); -+ panic_eip(regs, "unexpected protected mode"); - emulate(regs); - return; - } -Index: xen-unstable/tools/firmware/rombios/rombios.c -=================================================================== ---- xen-unstable.orig/tools/firmware/rombios/rombios.c -+++ xen-unstable/tools/firmware/rombios/rombios.c -@@ -129,18 +129,18 @@ - // - // BCC Bug: find a generic way to handle the bug of #asm after an "if" (fixed in 0.16.7) - --#define DEBUG_ROMBIOS 0 -+#define DEBUG_ROMBIOS 1 - --#define DEBUG_ATA 0 --#define DEBUG_INT13_HD 0 --#define DEBUG_INT13_CD 0 --#define DEBUG_INT13_ET 0 --#define DEBUG_INT13_FL 0 --#define DEBUG_INT15 0 --#define DEBUG_INT16 0 --#define DEBUG_INT1A 0 --#define DEBUG_INT74 0 --#define DEBUG_APM 0 -+#define DEBUG_ATA 1 -+#define DEBUG_INT13_HD 1 -+#define DEBUG_INT13_CD 1 -+#define DEBUG_INT13_ET 1 -+#define DEBUG_INT13_FL 1 -+#define DEBUG_INT15 1 -+#define DEBUG_INT16 1 -+#define DEBUG_INT1A 1 -+#define DEBUG_INT74 1 -+#define DEBUG_APM 1 - - #define BX_CPU 3 - #define BX_USE_PS2_MOUSE 1 diff --git a/source/xapps-extra/xen/xen-ioapic-ack-default.diff b/source/xapps-extra/xen/xen-ioapic-ack-default.diff deleted file mode 100644 index 9b6cad3..0000000 --- a/source/xapps-extra/xen/xen-ioapic-ack-default.diff +++ /dev/null @@ -1,25 +0,0 @@ -Change default IO-APIC ack mode for single IO-APIC systems to old-style. Jan - - -Index: xen-unstable/xen/arch/x86/io_apic.c -=================================================================== ---- xen-unstable.orig/xen/arch/x86/io_apic.c -+++ xen-unstable/xen/arch/x86/io_apic.c -@@ -1342,7 +1342,7 @@ static unsigned int startup_level_ioapic - return 0; /* don't check for pending */ - } - --int ioapic_ack_new = 1; -+int ioapic_ack_new = -1; - static void setup_ioapic_ack(char *s) - { - if ( !strcmp(s, "old") ) -@@ -1779,6 +1779,8 @@ void __init setup_IO_APIC(void) - else - io_apic_irqs = ~PIC_IRQS; - -+ if (ioapic_ack_new < 0) -+ ioapic_ack_new = (nr_ioapics > 1); - printk("ENABLING IO-APIC IRQs\n"); - printk(" -> Using %s ACK method\n", ioapic_ack_new ? "new" : "old"); - diff --git a/source/xapps-extra/xen/xen-max-free-mem.diff b/source/xapps-extra/xen/xen-max-free-mem.diff deleted file mode 100644 index 232c56f..0000000 --- a/source/xapps-extra/xen/xen-max-free-mem.diff +++ /dev/null @@ -1,134 +0,0 @@ -Index: xen-3.0.3-testing/tools/python/xen/xend/XendNode.py -=================================================================== ---- xen-3.0.3-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-3.0.3-testing/tools/python/xen/xend/XendNode.py -@@ -59,9 +59,34 @@ class XendNode: - info['cores_per_socket'] * - info['threads_per_core']) - info['cpu_mhz'] = info['cpu_khz'] / 1000 -- # physinfo is in KiB -- info['total_memory'] = info['total_memory'] / 1024 -- info['free_memory'] = info['free_memory'] / 1024 -+ import XendRoot -+ configured_floor = XendRoot.instance().get_dom0_min_mem() * 1024 -+ from xen.xend import balloon -+ try: -+ kernel_floor = balloon.get_dom0_min_target() -+ except: -+ kernel_floor = 0 -+ dom0_min_mem = max(configured_floor, kernel_floor) -+ dom0_mem = balloon.get_dom0_current_alloc() -+ extra_mem = 0 -+ if dom0_min_mem > 0 and dom0_mem > dom0_min_mem: -+ extra_mem = dom0_mem - dom0_min_mem -+ info['free_memory'] = info['free_memory'] + info['scrub_memory'] -+ info['max_free_memory'] = info['free_memory'] + extra_mem -+ -+ # Convert KiB to MiB, rounding down to be conservative -+ info['total_memory'] = info['total_memory'] / 1024 -+ info['free_memory'] = info['free_memory'] / 1024 -+ info['max_free_memory'] = info['max_free_memory'] / 1024 -+ -+ # FIXME: These are hard-coded to be the inverse of the getXenMemory -+ # functions in image.py. Find a cleaner way. -+ info['max_para_memory'] = info['max_free_memory'] - 4 -+ if info['max_para_memory'] < 0: -+ info['max_para_memory'] = 0 -+ info['max_hvm_memory'] = int((info['max_free_memory']-12) * (1-2.4/1024)) -+ if info['max_hvm_memory'] < 0: -+ info['max_hvm_memory'] = 0 - - ITEM_ORDER = ['nr_cpus', - 'nr_nodes', -@@ -72,6 +97,9 @@ class XendNode: - 'hw_caps', - 'total_memory', - 'free_memory', -+ 'max_free_memory', -+ 'max_para_memory', -+ 'max_hvm_memory', - ] - - return [[k, info[k]] for k in ITEM_ORDER] -Index: xen-3.0.3-testing/tools/python/xen/xend/balloon.py -=================================================================== ---- xen-3.0.3-testing.orig/tools/python/xen/xend/balloon.py -+++ xen-3.0.3-testing/tools/python/xen/xend/balloon.py -@@ -43,6 +43,8 @@ SLEEP_TIME_GROWTH = 0.1 - # label actually shown in the PROC_XEN_BALLOON file. - labels = { 'current' : 'Current allocation', - 'target' : 'Requested target', -+ 'min-target' : 'Minimum target', -+ 'max-target' : 'Maximum target', - 'low-balloon' : 'Low-mem balloon', - 'high-balloon' : 'High-mem balloon', - 'limit' : 'Xen hard limit' } -@@ -81,6 +83,23 @@ def get_dom0_target_alloc(): - raise VmError('Failed to query target memory allocation of dom0.') - return kb - -+def get_dom0_min_target(): -+ """Returns the minimum amount of memory (in KiB) that dom0 will accept.""" -+ -+ kb = _get_proc_balloon(labels['min-target']) -+ if kb == None: -+ raise VmError('Failed to query minimum target memory allocation of dom0.') -+ return kb -+ -+def get_dom0_max_target(): -+ """Returns the maximum amount of memory (in KiB) that is potentially -+ visible to dom0.""" -+ -+ kb = _get_proc_balloon(labels['max-target']) -+ if kb == None: -+ raise VmError('Failed to query maximum target memory allocation of dom0.') -+ return kb -+ - def free(need_mem): - """Balloon out memory from the privileged domain so that there is the - specified required amount (in KiB) free. -Index: xen-3.0.3-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.0.3-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.0.3-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1005,6 +1005,27 @@ class XendDomainInfo: - - ## public: - -+ def capAndSetMemoryTarget(self, target): -+ """Potentially lowers the requested target to the largest possible -+ value (i.e., caps it), and then sets the memory target of this domain -+ to that value. -+ @param target in MiB. -+ """ -+ max_target = 0 -+ if self.domid == 0: -+ try: -+ from balloon import get_dom0_max_target -+ max_target = get_dom0_max_target() / 1024 -+ except: -+ # It's nice to cap the max at sane values, but harmless to set -+ # them high. Carry on. -+ pass -+ if max_target and target > max_target: -+ log.debug("Requested memory target %d MiB; maximum reasonable is %d MiB.", -+ target, max_target) -+ target = max_target -+ self.setMemoryTarget(target) -+ - def setMemoryTarget(self, target): - """Set the memory target of this domain. - @param target In MiB. -Index: xen-3.0.3-testing/tools/python/xen/xend/server/SrvDomain.py -=================================================================== ---- xen-3.0.3-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-3.0.3-testing/tools/python/xen/xend/server/SrvDomain.py -@@ -147,7 +147,7 @@ class SrvDomain(SrvDir): - - - def op_mem_target_set(self, _, req): -- return self.call(self.dom.setMemoryTarget, -+ return self.call(self.dom.capAndSetMemoryTarget, - [['target', 'int']], - req) - diff --git a/source/xapps-extra/xen/xen-no-dummy-nfs-ip.diff b/source/xapps-extra/xen/xen-no-dummy-nfs-ip.diff deleted file mode 100644 index cd61d00..0000000 --- a/source/xapps-extra/xen/xen-no-dummy-nfs-ip.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: xen-unstable/tools/python/xen/xm/create.py -=================================================================== ---- xen-unstable.orig/tools/python/xen/xm/create.py -+++ xen-unstable/tools/python/xen/xm/create.py -@@ -808,9 +808,8 @@ def preprocess_access_control(vals): - - def preprocess_ip(vals): - if vals.ip or vals.dhcp != 'off': -- dummy_nfs_server = '1.2.3.4' - ip = (vals.ip -- + ':' + (vals.nfs_server or dummy_nfs_server) -+ + ':' + (vals.nfs_server or '') - + ':' + vals.gateway - + ':' + vals.netmask - + ':' + vals.hostname diff --git a/source/xapps-extra/xen/xen-tightvnc-args.diff b/source/xapps-extra/xen/xen-tightvnc-args.diff deleted file mode 100644 index 5a9231a..0000000 --- a/source/xapps-extra/xen/xen-tightvnc-args.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: xen-unstable/tools/python/xen/xm/create.py -=================================================================== ---- xen-unstable.orig/tools/python/xen/xm/create.py -+++ xen-unstable/tools/python/xen/xm/create.py -@@ -902,8 +902,7 @@ def spawn_vnc(display): - returns the port that the vncviewer is listening on and sets the global - vncpid. On failure, returns 0. Note that vncviewer is daemonized. - """ -- vncargs = (["vncviewer", "-log", "*:stdout:0", -- "-listen", "%d" % (VNC_BASE_PORT + display) ]) -+ vncargs = (["vncviewer", "-listen", "%d" % (display) ]) - global vncpid - vncpid = daemonize("vncviewer", vncargs) - if vncpid == 0: diff --git a/source/xapps-extra/xen/xen-warnings.diff b/source/xapps-extra/xen/xen-warnings.diff deleted file mode 100644 index a93c734..0000000 --- a/source/xapps-extra/xen/xen-warnings.diff +++ /dev/null @@ -1,51 +0,0 @@ -Index: xen-3.0.3-testing/xen/tools/symbols.c -=================================================================== ---- xen-3.0.3-testing.orig/xen/tools/symbols.c -+++ xen-3.0.3-testing/xen/tools/symbols.c -@@ -120,7 +120,8 @@ read_symbol(FILE *in, struct sym_entry * - if (rc != 3) { - if (rc != EOF) { - /* skip line */ -- fgets(str, 500, in); -+ if (fgets(str, sizeof(str), in) == NULL) -+ ; /* don't care */ - } - return -1; - } -Index: xen-3.0.3-testing/tools/misc/miniterm/miniterm.c -=================================================================== ---- xen-3.0.3-testing.orig/tools/misc/miniterm/miniterm.c -+++ xen-3.0.3-testing/tools/misc/miniterm/miniterm.c -@@ -157,7 +157,7 @@ int main(int argc, char **argv) - case 0: - close(1); /* stdout not needed */ - for ( c = (char)getchar(); c != ENDMINITERM; c = (char)getchar() ) -- write(fd,&c,1); -+ if (write(fd,&c,1)) ; - tcsetattr(fd,TCSANOW,&oldsertio); - tcsetattr(0,TCSANOW,&oldstdtio); - close(fd); -@@ -169,19 +169,19 @@ int main(int argc, char **argv) - close(fd); - exit(-1); - default: -- write(1, start_str, strlen(start_str)); -+ if (write(1, start_str, strlen(start_str))) ; - close(0); /* stdin not needed */ - sa.sa_handler = child_handler; - sa.sa_flags = 0; - sigaction(SIGCHLD,&sa,NULL); /* handle dying child */ - while ( !stop ) - { -- read(fd,&c,1); /* modem */ -+ if (read(fd,&c,1)) ; /* modem */ - c = (char)c; -- write(1,&c,1); /* stdout */ -+ if (write(1,&c,1)) ; /* stdout */ - } - wait(NULL); /* wait for child to die or it will become a zombie */ -- write(1, end_str, strlen(end_str)); -+ if (write(1, end_str, strlen(end_str))) ; - break; - } - diff --git a/source/xapps-extra/xen/xen-xm-top-needs-root.diff b/source/xapps-extra/xen/xen-xm-top-needs-root.diff deleted file mode 100644 index 86a5a58..0000000 --- a/source/xapps-extra/xen/xen-xm-top-needs-root.diff +++ /dev/null @@ -1,18 +0,0 @@ -From: Charles Coffing <[email protected]> -Upstream: no - -Index: xen-unstable/tools/python/xen/xm/main.py -=================================================================== ---- xen-unstable.orig/tools/python/xen/xm/main.py -+++ xen-unstable/tools/python/xen/xm/main.py -@@ -1018,6 +1018,10 @@ def xm_sysrq(args): - def xm_top(args): - arg_check(args, "top", 0) - -+ # A hack to get a clear error message if ran as non-root -+ if os.geteuid() != 0: -+ raise IOError() -+ - os.execvp('xentop', ['xentop']) - - def xm_dmesg(args): diff --git a/source/xapps-extra/xen/xen.install b/source/xapps-extra/xen/xen.install deleted file mode 100644 index 468e645..0000000 --- a/source/xapps-extra/xen/xen.install +++ /dev/null @@ -1,23 +0,0 @@ -post_install() -{ - if [ -e /usr/sbin/chkconfig ] && [ -x /usr/sbin/chkconfig ]; then - /usr/sbin/chkconfig --add rc.xend - fi -} - -post_upgrade() -{ - post_install $1 -} - -pre_remove() -{ - if [ -e /usr/sbin/chkconfig ] && [ -x /usr/sbin/chkconfig ]; then - /usr/sbin/chkconfig --del rc.xend - fi -} - -op=$1 -shift - -$op $*
_______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
