Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Silas Sewell
bd032eb767 * Sat Sep 04 2010 Silas Sewell <silas@sewell.ch> - 0.1.0-1
- Remove Tyrion client
- Obsolete node packages
- Add check section
2010-09-04 13:37:16 -04:00
Silas Sewell
404075a5e1 * Thu Jul 29 2010 Silas Sewell <silas@sewell.ch> - 0.0.1-1
- Initial build
2010-08-03 15:40:54 -04:00
6 changed files with 273 additions and 0 deletions

2
.gitignore vendored
View file

@ -0,0 +1,2 @@
tyrion-0.0.1.tar.bz2
/tyrion-0.1.0.tar.bz2

View file

@ -0,0 +1 @@
041b6566553dc6064195e984c4acdcd7 tyrion-0.1.0.tar.bz2

11
tyrion.acl Normal file
View file

@ -0,0 +1,11 @@
;[org.tyrion.service.bash]
;test.client@example.org = true
;[org.tyrion.service.perl]
;test.client@example.org = true
;[org.tyrion.service.python]
;test.client@example.org = true
;[org.tyrion.service.ruby]
;test.client@example.org = true

90
tyrion.init Normal file
View file

@ -0,0 +1,90 @@
#!/bin/sh
#
# tyrion- init file for starting Tyrion
#
# chkconfig: - 20 80
# description: Starts and stops the Tyrion daemon that handles all \
# service requests.
# Source function library.
. /etc/rc.d/init.d/functions
exec="/usr/sbin/tyrion"
config="/etc/tyrion/tyrion.conf"
logfile="/var/log/tyrion/stdout.log"
pidfile="/var/run/tyrion.pid"
[ -e /etc/sysconfig/tyrion ] && . /etc/sysconfig/tyrion
lockfile=/var/lock/subsys/tyrion
start() {
[ -x $exec ] || exit 5
echo -n $"Starting tyrion: "
daemon --user ${TYRION_USER-root} --pidfile $pidfile \
"$exec -c $config >> $logfile 2>&1 & echo \$! > $pidfile"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping tyrion: "
killproc -p $pidfile tyrion
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading tyrion: "
killproc -p $pidfile tyrion -HUP
retval=$?
echo
return $retval
}
rh_status() {
status -p $pidfile tyrion
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload}"
exit 2
esac
exit $?

9
tyrion.logrotate Normal file
View file

@ -0,0 +1,9 @@
/var/log/tyrion/*.log {
weekly
rotate 10
copytruncate
delaycompress
compress
notifempty
missingok
}

160
tyrion.spec Normal file
View file

@ -0,0 +1,160 @@
Name: tyrion
Version: 0.1.0
Release: 1%{?dist}
Summary: A daemon that allows for the asynchronous running of remote processes
Group: System Environment/Daemons
License: BSD
URL: http://www.tidg.org/tyrion
Source0: http://github.com/downloads/tidg/tyrion/tyrion-%{version}.tar.bz2
Source1: tyrion.logrotate
Source2: tyrion.init
Source3: tyrion.acl
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bc
BuildRequires: gtest-devel
BuildRequires: txmpp-devel
BuildRequires: scons
Requires: %{name}-libs = %{version}-%{release}
Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
Provides: tyrion-node = %{version}
Obsoletes: tyrion-node < 0.1.0
Provides: tyrion-libs = %{version}
Obsoletes: tyrion-libs < 0.1.0
%description
Tyrion is a lightweight daemon that allows for the asynchronous running of
remote processes. It provides basic access controls, process timeouts and a
communication protocol (XMPP) that integrates nicely into both corporate and
cloud environments.
%package service-perl
Summary: A Tyrion Perl service
Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: perl
%description service-perl
Tyrion is a lightweight daemon that allows for the asynchronous running of
remote processes.
The %{name}-service-perl package contains a service that allows for the
running of arbitrary Perl code.
%package service-python
Summary: A Tyrion Python service
Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: python
Provides: tyrion-node-service-python = %{version}
Obsoletes: tyrion-node-service-python < 0.1.0
%description service-python
Tyrion is a lightweight daemon that allows for the asynchronous running of
remote processes.
The %{name}-service-python package contains a service that allows for the
running of arbitrary Python code.
%package service-ruby
Summary: A Tyrion Ruby service
Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: ruby
Provides: tyrion-node-service-ruby = %{version}
Obsoletes: tyrion-node-service-ruby < 0.1.0
%description service-ruby
Tyrion is a lightweight daemon that allows for the asynchronous running of
remote processes.
The %{name}-service-ruby package contains a service that allows for the
running of arbitrary Ruby code.
%prep
%setup -q
%build
scons %{?_smp_mflags} --flags="%{optflags}"
%check
./test
%install
rm -rf %{buildroot}
scons %{?_smp_mflags} --flags="%{optflags}" --install \
--sbindir=%{buildroot}/%{_sbindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
cp -rp service %{buildroot}%{_datadir}/%{name}
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initddir}/%{name}
install -p -D -m 600 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/acl.conf
install -p -D -m 600 config/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -p -D -m 644 doc/%{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc CONTRIBUTORS LICENSE NOTICE README.md config/acl.conf config/tyrion.conf
%config(noreplace) %{_sysconfdir}/%{name}/acl.conf
%config(noreplace) %{_sysconfdir}/%{name}/tyrion.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{_datadir}/%{name}
%dir %{_localstatedir}/log/%{name}
%{_datadir}/%{name}/service/org.tyrion.service.bash
%{_initddir}/%{name}
%{_mandir}/man8/tyrion.8.*
%{_sbindir}/tyrion
%files service-perl
%defattr(-,root,root,-)
%{_datadir}/%{name}/service/org.tyrion.service.perl
%files service-python
%defattr(-,root,root,-)
%{_datadir}/%{name}/service/org.tyrion.service.python
%files service-ruby
%defattr(-,root,root,-)
%{_datadir}/%{name}/service/org.tyrion.service.ruby
%changelog
* Sat Sep 04 2010 Silas Sewell <silas@sewell.ch> - 0.1.0-1
- Remove Tyrion client
- Obsolete node packages
- Add check section
* Thu Aug 12 2010 Silas Sewell <silas@sewell.ch> - 0.0.1-2
- Don't gzip man pages
- Remove useless documentation from node-service subpackages
* Thu Jul 29 2010 Silas Sewell <silas@sewell.ch> - 0.0.1-1
- Initial build