summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kennedy <mkennedy@gentoo.org>2003-11-25 07:18:15 +0000
committerMatthew Kennedy <mkennedy@gentoo.org>2003-11-25 07:18:15 +0000
commita27f4b26fedf896da558894dc17418b598928211 (patch)
tree3f5818f3b0ea19dd26d313c78de98766b05d0062 /dev-lisp/common-lisp-controller/files
parentfirst clc to not require a inetd/xinetd (diff)
downloadhistorical-a27f4b26fedf896da558894dc17418b598928211.tar.gz
historical-a27f4b26fedf896da558894dc17418b598928211.tar.bz2
historical-a27f4b26fedf896da558894dc17418b598928211.zip
first clc to not require a inetd/xinetd
Diffstat (limited to 'dev-lisp/common-lisp-controller/files')
-rw-r--r--dev-lisp/common-lisp-controller/files/README.Gentoo18
-rw-r--r--dev-lisp/common-lisp-controller/files/clc-build-daemon21
-rw-r--r--dev-lisp/common-lisp-controller/files/clc-gentoo-3.76.patch.gzbin0 -> 8398 bytes
-rw-r--r--dev-lisp/common-lisp-controller/files/clc-send-command146
-rw-r--r--dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.76-r11
-rw-r--r--dev-lisp/common-lisp-controller/files/inetd.conf-snippet1
6 files changed, 187 insertions, 0 deletions
diff --git a/dev-lisp/common-lisp-controller/files/README.Gentoo b/dev-lisp/common-lisp-controller/files/README.Gentoo
new file mode 100644
index 000000000000..b9b62ec99415
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/README.Gentoo
@@ -0,0 +1,18 @@
+-*- Mode: outline -*-
+
+* IMPORTANT
+
+The Common Lisp Controller (CLC) in Gentoo GNU/Linux is a modified
+version of the original CLC sources from the Debian Project. Do not
+send bug reports to the Debian Project -- always send bug reports to
+http://bugs.gentoo.org.
+
+* NOTES
+
+If you are used to the CLC in Debian, please note that the Gentoo CLC
+does not require an Internet super-server such as inetd or xinetd in
+order to function. The original CLC implementation's clc-send-command
+has been replaced with a shell script which implements the same
+interface, but bypasses clc-build-daemon entirely.
+
+-- Matthew Kennedy <mkennedy@gentoo.org>
diff --git a/dev-lisp/common-lisp-controller/files/clc-build-daemon b/dev-lisp/common-lisp-controller/files/clc-build-daemon
new file mode 100644
index 000000000000..568d39c21eb1
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/clc-build-daemon
@@ -0,0 +1,21 @@
+# This is the configuration for the the common-lisp-controller build
+# daemon. You would normally copy this file to /etc/xinet.d, make
+# changes to taste and then restart or reload the xinetd daemon.
+
+service clc-build-daemon
+{
+ id = clc-build-daemon
+ type = UNLISTED
+ port = 8990
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = /usr/sbin/clc-build-daemon
+ server_args = clc-build-daemon
+ instances = 10
+ only_from = localhost
+ log_on_success = HOST PID
+ log_on_failure = HOST
+ disable = no
+}
diff --git a/dev-lisp/common-lisp-controller/files/clc-gentoo-3.76.patch.gz b/dev-lisp/common-lisp-controller/files/clc-gentoo-3.76.patch.gz
new file mode 100644
index 000000000000..024df16091d6
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/clc-gentoo-3.76.patch.gz
Binary files differ
diff --git a/dev-lisp/common-lisp-controller/files/clc-send-command b/dev-lisp/common-lisp-controller/files/clc-send-command
new file mode 100644
index 000000000000..0b2c5818385c
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/clc-send-command
@@ -0,0 +1,146 @@
+#!/bin/bash
+
+# {{{ Copyright
+
+# A shell version of the clc-send-command program.
+# Copyright (C) 2003 The Free Software Foundation
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+# Authors: Matthew Kennedy <mkennedy@gentoo.org>
+
+# }}}
+# {{{ Commentary...
+
+# Traditionally, the controller consisted of two programs:
+# clc-send-command and clc-build-daemon, The former invokes the later
+# via an Internet super-server such as inetd and xinetd.
+#
+# Why the contoller requires a Internet super-sever is beyond my
+# comprehension, hence this program.
+#
+# This program works exactly like the original clc-send-command
+# program, however it bypasses clc-build-daemon to call the controller
+# implementation scripts (/usr/lib/common-lisp/bin/*.sh) directly.
+
+# }}}
+# {{{ Utility functions
+
+function error {
+ echo "Error: $1"
+ exit 255
+}
+
+function warning {
+ echo "Warning: $1"
+ exit 0
+}
+
+function is_valid_impl {
+ local impl=$1
+ for i in /usr/lib/common-lisp/bin/*.sh; do
+ i=$(basename ${i} .sh)
+ if [ "x${i}" == "x${impl}" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+function is_valid_package {
+ local impl=$1 package=$2
+ test -d /usr/lib/common-lisp/${impl}/${package}
+}
+
+function su-maybe {
+ if [ "x`whoami`" == "xroot" ]; then
+ su - cl-builder -c "$@"
+ else
+ $@
+ fi
+}
+
+function remove_package {
+ local impl=$1 package=$2
+# su - cl-builder -c "/usr/lib/common-lisp/bin/${impl}.sh remove ${package}"
+ su-maybe "/usr/lib/common-lisp/bin/${impl}.sh remove ${package}"
+}
+
+function recompile_package {
+ local impl=$1 package=$2
+ su - cl-builder -c "/usr/lib/common-lisp/bin/${impl}.sh rebuild ${package}"
+}
+
+# }}}
+
+declare -a ARGS
+
+i=0; while [ ! -z "$1" ]; do
+ # collect the arguments we're interested in, discard all else
+ case $1 in
+ -d | --debug | -q | --quiet | -v | --verbose)
+ # ignore these for now
+ ;;
+ -? | --help | --usage)
+ cat <<EOF
+clc-send-command [OPTION...] recompile <package> <implementation>
+clc-send-command [OPTION...] remove <package> <implementation>
+EOF
+ exit 1
+ ;;
+ --verbose | -V)
+ # mimic the original clc-send-command program's output
+ echo 'version 1.0 for clc v3'
+ exit 1
+ ;;
+ *)
+ ARGS[$i]=$1 i=$[$i + 1]
+ ;;
+ esac
+ shift
+done
+
+if [ ${#ARGS[*]} -ne 3 ]; then
+ error 'Invalid number of arguments.'
+fi
+
+command=${ARGS[0]} package=${ARGS[1]} impl=${ARGS[2]}
+
+is_valid_impl ${impl} \
+ || error "Invalid implementaion: ${impl}"
+
+case ${command} in
+ remove)
+ is_valid_package ${impl} ${package} \
+ || warning "Package ${package} for implementation ${impl} does not exist or has not been compiled yet."
+ remove_package ${impl} ${package} \
+ || error "Cannot remove package: ${package} for implementation: ${impl}"
+ ;;
+ recompile)
+ recompile_package ${impl} ${package} \
+ || error "Cannot recompile package: ${package} for implementation: ${impl}"
+ ;;
+ *)
+ error "Unrecognized command: ${command}"
+ ;;
+esac
+
+exit 0
+
+# Local Variables: ***
+# mode: shell-script ***
+# indent-tabs-mode: nil ***
+# End: ***
diff --git a/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.76-r1 b/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.76-r1
new file mode 100644
index 000000000000..b7f4bd60c969
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.76-r1
@@ -0,0 +1 @@
+MD5 9e2498694527902f9c42364a7c27721c common-lisp-controller_3.76.tar.gz 1229601
diff --git a/dev-lisp/common-lisp-controller/files/inetd.conf-snippet b/dev-lisp/common-lisp-controller/files/inetd.conf-snippet
new file mode 100644
index 000000000000..ad2ee0ca581b
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/inetd.conf-snippet
@@ -0,0 +1 @@
+8990 stream tcp nowait.400 root /usr/sbin/clc-build-daemon clc-build-daemon \ No newline at end of file