rpms/conmux/devel conmux.build.patch, NONE, 1.1 conmux.conf, NONE, 1.1 conmux.init, NONE, 1.1 conmux.logrotate, NONE, 1.1 conmux.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Bill Peck (bpeck)
fedora-extras-commits at redhat.com
Fri Mar 23 19:54:10 UTC 2007
Author: bpeck
Update of /cvs/extras/rpms/conmux/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27278/devel
Modified Files:
.cvsignore sources
Added Files:
conmux.build.patch conmux.conf conmux.init conmux.logrotate
conmux.spec
Log Message:
auto-import conmux-0.0-5.493svn on branch devel from conmux-0.0-5.493svn.src.rpm
conmux.build.patch:
--- NEW FILE conmux.build.patch ---
diff -Nur conmux.orig/conmux conmux.new/conmux
--- conmux.orig/conmux 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/conmux 2007-02-26 16:41:38.000000000 -0500
@@ -30,7 +30,7 @@
use lib "/usr/local/conmux/lib";
use Conmux;
-our $P = 'conmux';
+our $P = 'conmuxd';
our $debug = 0;
$SIG{'CHLD'} = "IGNORE";
diff -Nur conmux.orig/Conmux.pm conmux.new/Conmux.pm
--- conmux.orig/Conmux.pm 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/Conmux.pm 2007-02-23 18:47:06.000000000 -0500
@@ -15,7 +15,7 @@
our $Config;
BEGIN {
- my $cf = '/usr/local/conmux/etc/config';
+ my $cf = '/etc/conmux/conmux.conf';
if (-f $cf) {
open(CFG, "<$cf") || die "Conmux: $cf: open failed - $!\n";
while(<CFG>) {
diff -Nur conmux.orig/console conmux.new/console
--- conmux.orig/console 2007-02-23 17:00:41.000000000 -0500
+++ conmux.new/console 2007-02-26 16:53:10.000000000 -0500
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# console <host>/<machine> -- interactive client interface
+# conmux <host>/<machine> -- interactive client interface
#
# The main interactive client interace to conmux. Allows direct
# interaction with the payload, as well as allowing break out
@@ -14,14 +14,14 @@
#
$| = 1;
-our $P = 'console';
+our $P = 'conmux';
use POSIX qw(errno_h BUFSIZ);
use IO::Socket;
use Getopt::Long qw(:config no_auto_abbrev);
-my $CONMUX = '/usr/local/conmux';
-my $CONMUX = $ENV{'CONMUX_ROOT'} if ($ENV{'CONMUX_ROOT'});
+#my $CONMUX = '/usr/local/conmux';
+#my $CONMUX = $ENV{'CONMUX_ROOT'} if ($ENV{'CONMUX_ROOT'});
# Find our internal libraries.
###my $lib = $0; $lib =~ s@/[^/]+$@@;
@@ -29,7 +29,7 @@
###require Conmux;
##use lib ".";
##use Conmux;
-use lib "/usr/local/conmux/lib";
+#use lib "/usr/local/conmux/lib";
use Conmux;
# Basic terminal handling.
diff -Nur conmux.orig/drivers/module.mk conmux.new/drivers/module.mk
--- conmux.orig/drivers/module.mk 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/drivers/module.mk 2007-02-24 17:48:51.000000000 -0500
@@ -7,9 +7,9 @@
reboot-rsa reboot-rsa2
install::
- @[ -d $(BASE)/lib/drivers ] || mkdir $(BASE)/lib/drivers
+ @[ -d $(BASE)/share/conmux/drivers ] || mkdir -p $(BASE)/share/conmux/drivers
for f in $(DRIVERS); do \
- rm -f $(BASE)/lib/drivers/$$f; \
- cp -p drivers/$$f $(BASE)/lib/drivers/$$f; \
- chmod 755 $(BASE)/lib/drivers/$$f; \
+ rm -f $(BASE)/share/conmux/drivers/$$f; \
+ cp -p drivers/$$f $(BASE)/share/conmux/drivers/$$f; \
+ chmod 755 $(BASE)/share/conmux/drivers/$$f; \
done
diff -Nur conmux.orig/helpers/module.mk conmux.new/helpers/module.mk
--- conmux.orig/helpers/module.mk 2007-02-20 11:42:50.000000000 -0500
+++ conmux.new/helpers/module.mk 2007-02-24 17:49:15.000000000 -0500
@@ -6,9 +6,9 @@
HELPERS:=autoboot-helper tickle-helper
install::
- @[ -d $(BASE)/lib/helpers ] || mkdir $(BASE)/lib/helpers
+ @[ -d $(BASE)/share/conmux/helpers ] || mkdir -p $(BASE)/share/conmux/helpers
for f in $(HELPERS); do \
- rm -f $(BASE)/lib/helpers/$$f; \
- cp -p helpers/$$f $(BASE)/lib/helpers/$$f; \
- chmod 755 $(BASE)/lib/helpers/$$f; \
+ rm -f $(BASE)/share/conmux/helpers/$$f; \
+ cp -p helpers/$$f $(BASE)/share/conmux/helpers/$$f; \
+ chmod 755 $(BASE)/share/conmux/helpers/$$f; \
done
diff -Nur conmux.orig/Makefile conmux.new/Makefile
--- conmux.orig/Makefile 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/Makefile 2007-03-14 20:20:48.000000000 -0400
@@ -2,12 +2,17 @@
# Author: Andy Whitcroft <andyw at uk.ibm.com>
#
# The Console Multiplexor is released under the GNU Public License V2
-BUILD=
-PREFIX=/usr/local/conmux
+BUILD=$(DESTDIR)
+PREFIX=/usr
BASE=$(BUILD)$(PREFIX)
-BINS=console conmux-attach
-LIBS=Conmux.pm
-SBIN=conmux-registry conmux start
+BINS=conmux-attach
+PERLLIBS=Conmux.pm
+PERLINC=$(shell eval "$(shell perl -V:installvendorlib)"; echo $$installvendorlib \
+ | sed -e 's/^\/usr\///')
+SHARE=
+SBIN=conmux-registry
+CONMUXD=conmux
+CONMUX=console
MODULES=helpers drivers
@@ -16,24 +21,35 @@
install::
@[ -d $(BASE) ] || mkdir -p $(BASE)
@[ -d $(BASE)/bin ] || mkdir $(BASE)/bin
- @[ -d $(BASE)/lib ] || mkdir $(BASE)/lib
+ @[ -d $(BASE)/share ] || mkdir $(BASE)/share
+ @[ -d $(BASE)/$(PERLINC) ] || mkdir -p $(BASE)/$(PERLINC)
@[ -d $(BASE)/sbin ] || mkdir $(BASE)/sbin
- @[ -d $(BASE)/log ] || mkdir $(BASE)/log
- @[ -d $(BASE)/etc ] || mkdir $(BASE)/etc
+ @[ -d $(BUILD)/var/log/conmux ] || mkdir -p $(BUILD)/var/log/conmux
+ @[ -d $(BUILD)/var/run/conmux ] || mkdir -p $(BUILD)/var/run/conmux
+ @[ -d $(BUILD)/etc/init.d ] || mkdir -p $(BUILD)/etc/init.d
+ @[ -d $(BUILD)/etc/sysconfig ] || mkdir -p $(BUILD)/etc/sysconfig
+ @[ -d $(BUILD)/etc/conmux ] || mkdir -p $(BUILD)/etc/conmux
for f in $(BINS); do \
rm -f $(BASE)/bin/$$f; \
cp -p $$f $(BASE)/bin/$$f; \
chmod 755 $(BASE)/bin/$$f; \
done
+ cp -p $(CONMUX) $(BASE)/bin/conmux
for f in $(SBIN); do \
rm -f $(BASE)/sbin/$$f; \
cp -p $$f $(BASE)/sbin/$$f; \
chmod 755 $(BASE)/sbin/$$f; \
done
- for f in $(LIBS); do \
- rm -f $(BASE)/lib/$$f; \
- cp -p $$f $(BASE)/lib/$$f; \
- chmod 644 $(BASE)/lib/$$f; \
+ cp -p $(CONMUXD) $(BASE)/sbin/conmuxd
+ for f in $(SHARE); do \
+ rm -f $(BASE)/share/conmux/$$f; \
+ cp -p $$f $(BASE)/share/conmux/$$f; \
+ chmod 644 $(BASE)/share/conmux/$$f; \
+ done
+ for f in $(PERLLIBS); do \
+ rm -f $(BASE)/$(PERLINC)/$$f; \
+ cp -p $$f $(BASE)/$(PERLINC)/$$f; \
+ chmod 644 $(BASE)/$(PERLINC)/$$f; \
done
release::
--- NEW FILE conmux.conf ---
# You can set registry to your default console server
registry=
--- NEW FILE conmux.init ---
#!/bin/sh
#
# start -- start up configured conmux servers on this host.
#
# (C) Copyright IBM Corp. 2004, 2005, 2006
# Author: Andy Whitcroft <andyw at uk.ibm.com>
#
# The Console Multiplexor is released under the GNU Public License V2
#
# chkconfig: - 95 5
# description: The Conmux daemon is used for console management.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
if [ -f ~/.gmm.conf ]; then
. ~/.gmm.conf
fi
DAEMON=conmuxd
PROG=/usr/sbin/$DAEMON
CONMUX=${CONMUX:-/usr/share/conmux}
PATH=$CONMUX/drivers:$CONMUX/helpers:$PATH
LOCK=/var/lock/subsys/conmux
CFGDIR=/etc/conmux
PIDDIR=/var/run/conmux
RETVAL="0"
[ -x "$PROG" ] || exit 0
cmd="$1"
existing=""
for i in $PIDDIR/*.pid
do
n=${i%.pid}
n=${n#$PIDDIR/}
if [ "$n" != "*" ]; then
existing="$existing $n"
fi
done
start_component() {
local component="$1"
local pidfile="$PIDDIR/$component.pid"
shift
# Determine whether it is already running ... if so leave it be.
if [ -f "$pidfile" ]; then
if kill -0 `cat "$pidfile"` 2>/dev/null; then
return 1
fi
fi
case "$component" in
registry) echo -n " starting $component..." ;;
*) echo -n " connecting to $component..." ;;
esac
"$@" >"/var/log/conmux/$component.log" 2>&1 &
if [ "$?" -eq 0 ]; then
echo "$!" >"$pidfile"
success; echo
return 0
else
failure; echo
return 1
fi
}
stop_component() {
local component="$1"
local pidfile="$PIDDIR/$component.pid"
case "$component" in
registry) echo -n " stopping $component..." ;;
*) echo -n " disconnecting $component..." ;;
esac
# Kill it and clear up
kill -HUP `cat "$pidfile"` 2>/dev/null
if [ "$?" -eq 0 ]; then
rm -f "$pidfile"
success; echo
return 0
else
failure; echo
return 1
fi
}
start_conmuxd(){
autoboot=""
[ -f $CFGDIR/registry ] || touch $CFGDIR/registry
start_component registry /usr/sbin/conmux-registry 63000 $CFGDIR/registry
if [ "$?" -eq 0 ]; then
sleep 1
fi
started="registry"
pause=0
for i in $CFGDIR/*.cf
do
n=${i%.cf}
n=${n#$CFGDIR/}
if [ "$n" != "*" ]; then
if [ -f "/var/run/conmux/$n.cf" ]; then
if ! cmp -s "$i" "/var/run/conmux/$n.cf"; then
stop_component $n
fi
fi
start_component $n $PROG $i
if [ "$?" -eq 0 ]; then
pause=1
fi
started="$started $n"
# Preserve the orginal configuration file.
cp "$i" "/var/run/conmux/$n.cf"
if grep -q TYPE:numaq "$i"; then
autoboot="$autoboot $n"
fi
for i in `grep FLAGS: "$i"`; do
case "$i" in
\#|FLAGS:) ;;
*) autoboot="$autoboot $n/$i" ;;
esac
done
fi
done
if [ "$pause" -eq 1 ]; then
sleep 1
fi
for nh in $autoboot
do
name="${nh%/*}"
helper="${nh#*/}"
mn="${name#abat-}"
start_component $name-$helper-helper /usr/bin/conmux-attach $mn $helper-helper
started="$started $name-$helper-helper"
done
return 0
}
case "$1" in
start)
echo "Starting ConMux Daemon: "
for i in $existing
do
case " $started " in
*\ $i\ *) ;;
*) stop_component "$i" ;;
esac
done
start_conmuxd
RETVAL=$?
echo -n "ConMux Daemon Started: "
[ $RETVAL -eq 0 ] && success && touch $LOCK
echo
;;
stop)
echo "Stopping ConMux Daemon: "
for i in $existing
do
case " $started " in
*\ $i\ *) ;;
*) stop_component "$i" ;;
esac
done
RETVAL=$?
echo -n "ConMux Daemon Stopped: "
[ $RETVAL -eq 0 ] && success && rm -f $LOCK
echo
;;
status)
if [ -e $PIDDIR/registry.pid ]; then
regpid=$(cat $PIDDIR/registry.pid)
ps -p $regpid >/dev/null 2>&1
RETVAL=$?
if [ "$RETVAL" -eq "0" ]; then
echo "Conmux registry (pid $regpid) is running.."
echo "Individual console connections: "
for n in $existing
do
mn="${n#abat-}"
case "$n" in
registry|*-helper)
;;
*)
status=`conmux -s $mn`
echo " $mn $status"
;;
esac
done
else
echo "Conmux is not running, but a stale pid file exists."
RETVAL=1
fi
else
echo "Conmux is not running."
RETVAL=1
fi
;;
restart|reload)
$0 status >/dev/null && $0 stop
$0 start
RETVAL=$?
echo
;;
condrestart)
[ ! -f $LOCK ] || $0 restart
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
;;
esac
exit $RETVAL
--- NEW FILE conmux.logrotate ---
##
# Conmux Logrotate Configuration
##
/var/log/conmux/* {
compress
missingok
nocopytruncate
nocreate
nodelaycompress
nomail
notifempty
olddir /var/log/conmux.old/
rotate 4
sharedscripts
size=5M
weekly
}
--- NEW FILE conmux.spec ---
%define prerelease 493svn
Name: conmux
Version: 0.0
Release: 5.%{prerelease}%{?dist}
Summary: ConMux - The Console Multiplexor
Group: Applications/System
License: GPL
URL: http://test.kernel.org/autotest/
Source0: http://people.redhat.com/bpeck/%{name}/%{name}-%{prerelease}.tar.gz
# svn checkout -r493 svn://test.kernel.org/autotest/trunk/conmux conmux
Source1: %{name}.conf
Source2: %{name}.logrotate
Source3: %{name}.init
Patch1: %{name}.build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl
Requires: %{name}-client = %{version}-%{release}
BuildArch: noarch
Requires: logrotate
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
%description
Conmux is a console management program designed to support a large
number of console devices and simultaneous users. It currently supports
IBM's blade and hmc servers.
Its features include:
- driver interface abstracts how to connect to the console
- helpers for dealing with autobooting
- can support additional commands for dealing with power management
- allows multiple clients to be connected to the same console
%package client
Group: Applications/System
Summary: Conmux client which will connect to a Conmux server
Obsoletes: conmux-common < %{version}-%{release}
Provides: conmux-common = %{version}-%{release}
%description client
Conmux client connects to a conmux server.
%prep
%setup -q -n conmux
%patch1 -p1
%build
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
# put in our own config and logrotate
install -pm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
install -pm 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
# make log directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.old
# these shouldn't be executable
chmod -x examples/*
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/chkconfig --add conmux
%preun
if [ "$1" = 0 ]; then
/sbin/service conmux stop >/dev/null 2>&1 || :
/sbin/chkconfig --del conmux
fi
%postun
if [ "$1" -ge 1 ]; then
/sbin/service conmux condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc COPYING README
%doc examples
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_sysconfdir}/init.d/%{name}
%dir %{_sysconfdir}/%{name}
%{_localstatedir}/log/%{name}
%{_localstatedir}/log/%{name}.old
%{_localstatedir}/run/%{name}
%{_bindir}/conmux-attach
%{_sbindir}/*
%{_datadir}/conmux/*
%files client
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%{_bindir}/conmux
%{perl_vendorlib}/Conmux.pm
%changelog
* Thu Mar 15 2007 Bill Peck <bpeck at redhat.com> 0.0-5.493svn
- fixed Obsoletes/Provides
- minor update to init.d/conmux
* Wed Mar 14 2007 Bill Peck <bpeck at redhat.com> 0.0-4.493svn
- added jarod's init script. Thanks!
* Mon Mar 12 2007 Bill Peck <bpeck at redhat.com> 0.0-3.493svn
- release really is 0.0 since there is no upstream release yet.
- merge client and common into one package.
* Mon Mar 05 2007 Bill Peck <bpeck at redhat.com> 0.1-2.493svn
- Removed .svn files from tarball.
- install logrotate and config files with -p
* Mon Mar 05 2007 Bill Peck <bpeck at redhat.com> 0-1.493svn
- changed from perl_sitelib to perl_vendorlib.
* Fri Mar 02 2007 Bill Peck <bpeck at redhat.com> 0-0.493svn
- Update to latest svn. drop upstream patch.
* Mon Feb 26 2007 Bill Peck <bpeck at redhat.com> 0-2.484svn
- Remove erroneous chmod on config file.
- rename conmux to conmuxd and rename console to conmux
* Fri Feb 23 2007 Bill Peck <bpeck at redhat.com> 0-1.484svn
- Initial build for Fedora Extras
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/conmux/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 23 Mar 2007 19:28:12 -0000 1.1
+++ .cvsignore 23 Mar 2007 19:53:37 -0000 1.2
@@ -0,0 +1 @@
+conmux-493svn.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/conmux/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 23 Mar 2007 19:28:12 -0000 1.1
+++ sources 23 Mar 2007 19:53:37 -0000 1.2
@@ -0,0 +1 @@
+1656c7fdde9b9b2eac1c93db170f2849 conmux-493svn.tar.gz
More information about the scm-commits
mailing list