aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2012-10-10 09:34:04 +0800
committerswills <swills@FreeBSD.org>2012-10-10 09:34:04 +0800
commit02fc04e401604334a13ef9a8415f298faef3ca4a (patch)
treef14ebc5b819c2f455bbce0bfb98d8d9a06457787 /sysutils
parentd15dc3157a019ab938ab315e983769329dbd6bd6 (diff)
downloadfreebsd-ports-graphics-02fc04e401604334a13ef9a8415f298faef3ca4a.tar.gz
freebsd-ports-graphics-02fc04e401604334a13ef9a8415f298faef3ca4a.tar.zst
freebsd-ports-graphics-02fc04e401604334a13ef9a8415f298faef3ca4a.zip
- Prepare for splitting out guest scripts into another port
PR: ports/172466 Submitted by: Mark Felder <feld@feld.me> (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xen-tools/Makefile23
-rw-r--r--sysutils/xen-tools/distinfo2
-rw-r--r--sysutils/xen-tools/files/xe-daemon.in29
-rw-r--r--sysutils/xen-tools/files/xe_wrapper91
4 files changed, 4 insertions, 141 deletions
diff --git a/sysutils/xen-tools/Makefile b/sysutils/xen-tools/Makefile
index 57dea7d1aed..eb02f14a0a0 100644
--- a/sysutils/xen-tools/Makefile
+++ b/sysutils/xen-tools/Makefile
@@ -6,27 +6,18 @@
PORTNAME= xen-tools
PORTVERSION= 4.1.3
-PORTREVISION= 2
+PORTREVISION= 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}/: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/
+MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/
+DISTFILES= xen-${PORTVERSION}.tar.gz
USE_GMAKE= yes
USE_PYTHON= yes
-USE_RC_SUBR= xe-daemon
ONLY_FOR_ARCHS= amd64 i386 ia64
ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64, i386, or ia64"
@@ -41,10 +32,7 @@ PLIST_FILES= lib/libxenstore.so.3.0 \
bin/xenstore-ls \
bin/xenstore-read \
bin/xenstore-rm \
- bin/xenstore-write \
- sbin/xe-daemon \
- sbin/xe-update-guest-attrs \
- sbin/xe_wrapper
+ bin/xenstore-write
do-build:
cd ${WRKSRC}/tools && ${GMAKE} -C include
@@ -56,9 +44,6 @@ do-install:
${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 --git a/sysutils/xen-tools/distinfo b/sysutils/xen-tools/distinfo
index 76202528fcc..21d10c1ef9e 100644
--- a/sysutils/xen-tools/distinfo
+++ b/sysutils/xen-tools/distinfo
@@ -1,4 +1,2 @@
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 --git a/sysutils/xen-tools/files/xe-daemon.in b/sysutils/xen-tools/files/xe-daemon.in
deleted file mode 100644
index 980ecc256b5..00000000000
--- a/sysutils/xen-tools/files/xe-daemon.in
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-#
-# 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
-
-load_rc_config $name
-
-: ${xe_daemon_enable="NO"}
-
-command="%%PREFIX%%/sbin/xe_wrapper"
-command_interpreter="/bin/sh -T"
-command_args='%%PREFIX%%/sbin/xe-daemon &'
-pidfile="/var/run/xe_wrapper.pid"
-
-run_rc_command "$1"
diff --git a/sysutils/xen-tools/files/xe_wrapper b/sysutils/xen-tools/files/xe_wrapper
deleted file mode 100644
index 266e6d85c0e..00000000000
--- a/sysutils/xen-tools/files/xe_wrapper
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/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$
-#
-# 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