Date: Fri, 14 Sep 2012 13:25:39 -0500 From: Mark Felder <feld@feld.me> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/171646: [PATCH] sysutils/xen-tools: update to 4.1.3 Message-ID: <E1TCaaB-0002OE-It@feld.me> Resent-Message-ID: <201209141830.q8EIUDpg033869@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171646 >Category: ports >Synopsis: [PATCH] sysutils/xen-tools: update to 4.1.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Sep 14 18:30:12 UTC 2012 >Closed-Date: >Last-Modified: >Originator: feld >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD mwi1.coffeenet.org 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #5 r239731: Mon Aug 27 09:53:18 CDT >Description: - Update to 4.1.3 Added scripts so users of XCP and XenServer can finally use all Xen functionality. This includes: * Live migration * Suspend/resume * Reporting of memory usage * Reporting of network interfaces and IPs * Memory ballooning * Graceful Shutdown/Reboot http://redports.org/buildarchive/20120914161905-12190/ Added file(s): - files/xe-daemon.in - files/xe_wrapper Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: suffix) >How-To-Repeat: >Fix: --- xen-tools-4.1.3.patch begins here --- diff -ruN --exclude=CVS ../xen-tools.orig/Makefile ./Makefile --- ../xen-tools.orig/Makefile 2012-09-01 14:42:34.000000000 -0500 +++ ./Makefile 2012-09-14 10:35:19.000000000 -0500 @@ -5,14 +5,23 @@ # $FreeBSD: ports/sysutils/xen-tools/Makefile,v 1.3 2012/09/01 19:42:34 swills Exp $ PORTNAME= xen-tools -PORTVERSION= 4.0.1 +PORTVERSION= 4.1.3 CATEGORIES= sysutils DISTNAME= xen-${PORTVERSION} MAINTAINER= feld@feld.me COMMENT= Xen tools within FreeBSD domU -MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/ +MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/:xensource \ + https://github.com/${GIT_ACCOUNT}/${GIT_PROJECT}/tarball/${GIT_VERSION}/:github +DISTFILES= xen-${PORTVERSION}.tar.gz:xensource \ + ${GIT_ACCOUNT}-${GIT_PROJECT}-${GIT_VERSION}.tar.gz:github + +FETCH_ARGS= -pRr +GIT_ACCOUNT= felderado +GIT_PROJECT= freebsd-xen-tools-scripts +GIT_VERSION= bfb06da +GITSRC= ${WRKDIR}/${GIT_ACCOUNT}-${GIT_PROJECT}-${GIT_VERSION}/src/ USE_GMAKE= yes USE_PYTHON= yes @@ -30,7 +39,11 @@ bin/xenstore-ls \ bin/xenstore-read \ bin/xenstore-rm \ - bin/xenstore-write + bin/xenstore-write \ + sbin/xe-daemon \ + sbin/xe-update-guest-attrs \ + sbin/xe_wrapper + do-build: cd ${WRKSRC}/tools && ${GMAKE} -C include cd ${WRKSRC}/tools/misc && ${GMAKE} xen-detect @@ -41,6 +54,9 @@ ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore-control ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/libxenstore.so.3.0 ${PREFIX}/lib + ${INSTALL_SCRIPT} ${GITSRC}/usr/local/sbin/xe-daemon ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${GITSRC}/usr/local/sbin/xe-update-guest-attrs ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${FILESDIR}/xe_wrapper ${PREFIX}/sbin post-install: ${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-chmod diff -ruN --exclude=CVS ../xen-tools.orig/distinfo ./distinfo --- ../xen-tools.orig/distinfo 2012-09-07 11:17:49.000000000 -0500 +++ ./distinfo 2012-09-14 10:18:37.000000000 -0500 @@ -1,2 +1,4 @@ -SHA256 (xen-4.0.1.tar.gz) = 6e6d1d29400db93cb8095e034138aa8748b1bd4cffb4d3fd07af4ba15c918873 -SIZE (xen-4.0.1.tar.gz) = 11909200 +SHA256 (xen-4.1.3.tar.gz) = 178ef186aca2490126aef69ceb41fc509baf89e0d582768cfa33b17fd145c0e4 +SIZE (xen-4.1.3.tar.gz) = 10382132 +SHA256 (felderado-freebsd-xen-tools-scripts-bfb06da.tar.gz) = 58b5c5bb51bccb6843506bbb9c8ce3381ff262e6b221577496468f48226ab038 +SIZE (felderado-freebsd-xen-tools-scripts-bfb06da.tar.gz) = 50775 diff -ruN --exclude=CVS ../xen-tools.orig/files/xe-daemon.in ./files/xe-daemon.in --- ../xen-tools.orig/files/xe-daemon.in 1969-12-31 18:00:00.000000000 -0600 +++ ./files/xe-daemon.in 2012-09-14 11:18:55.000000000 -0500 @@ -0,0 +1,28 @@ +#!/bin/sh + +# PROVIDE: xe_daemon +# REQUIRE: login +# KEYWORD: nojail shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# xe_daemon_enable (bool): Set to NO by default. +# Set it to YES to enable xe_daemon. +# + +. /etc/rc.subr + +name=xe_daemon +rcvar=xe_daemon_enable + +command="%%PREFIX%%/sbin/xe_wrapper" +command_interpreter="/bin/sh -T" +command_args="%%PREFIX%%/sbin/xe-daemon &" + +load_rc_config $name + +pidfile="/var/run/xe_wrapper.pid" +: ${xe_daemon_enable="NO"} + +run_rc_command "$1" diff -ruN --exclude=CVS ../xen-tools.orig/files/xe_wrapper ./files/xe_wrapper --- ../xen-tools.orig/files/xe_wrapper 1969-12-31 18:00:00.000000000 -0600 +++ ./files/xe_wrapper 2012-09-14 10:25:17.000000000 -0500 @@ -0,0 +1,91 @@ +#!/bin/sh -T +# +#- +# Copyright 2009 Thomas-Martin Seck. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: ports/net/socat/files/socat_wrapper,v 1.1 2012/04/14 19:05:45 ehaupt Exp $ +# +# socat_wrapper socat [options] +# +# A simple wrapper script for socat (or any other program that does not +# daemonize itself and logs to stdout). +# +# This wrapper tries to emulate part of the functionality usually supplied by +# software like daemontools or runit. It can be used by a FreeBSD port rc.d +# script to start a program that does not daemonize itself and logs to +# stdout/stderr. It redirects stdout and stderr to logger(1) via a fifo. +# +# Note: We need a shell that can offer us asynchronous trap handling in order +# to be able to abort the infinite loop from outside. FreeBSD's /bin/sh offers +# the "-T" switch for this purpose. +# +# TODO: send fd 2 output to never-never land to get rid of "Terminated" when we +# kill this script but provide a way for errx() to communicate with the outside +# world via stderr. +# + +errx() { + echo "${me}: $@" >&2 + exit 1 +} + +cleanup() { + rm -rf ${tmpdir} + rm -f ${pidfile} +} + +PATH=/bin:/sbin:/usr/bin:/usr/sbin + +me=${0##*/} +logger=/usr/bin/logger +daemon_log_facility=daemon.notice +self_log_facility=daemon.notice +pidfile=/var/run/${me}.pid +daemon_name=xe_daemon +daemon_program="$1" +shift + +test -x "${daemon_program}" || errx "cannot execute ${daemon_program}!" +test -x ${logger} || errx "cannot execute ${logger}!" +test -f ${pidfile} && errx "${pidfile} is already present -- is another instance of ${me} running?" +echo $$ >${pidfile} || errx "cannot write to ${pidfile}!" +tmpdir=`mktemp -d /tmp/${me}.XXXXXXXXXX` || errx "cannot generate tmpdir!" + +logfifo=${tmpdir}/fifo +mkfifo -m 0600 ${logfifo} || errx "cannot generate fifo!" + +while true; do + trap 'break' 1 2 3 6 9 15 + ${logger} -i -p ${daemon_log_facility} -t ${daemon_name} <${logfifo} & + log_pid=$! + "${daemon_program}" $@ >${logfifo} 2>&1 & + daemon_pid=$! + wait ${daemon_pid} + ${logger} -i -p ${self_log_facility} -t ${me} "${daemon_program} died -- restarting..." + sleep 2 +done + +kill -TERM ${daemon_pid} 2>/dev/null +wait +cleanup --- xen-tools-4.1.3.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1TCaaB-0002OE-It>