Permalink
Browse files

Add to git

  • Loading branch information...
0 parents commit 8405c3eb871dd94a4f648174f3dc3e5df95799bc @imeyer committed Jan 23, 2011
Showing with 130 additions and 0 deletions.
  1. +13 −0 runit-2.1.1-etc-service.patch
  2. +12 −0 runit-2.1.1-runsvdir-path-cleanup.patch
  3. +105 −0 runit.spec
@@ -0,0 +1,13 @@
+Index: src/sv.c
+===================================================================
+--- src/sv.c.orig 2008-06-15 22:53:26.000000000 +0200
++++ src/sv.c 2008-11-26 13:58:17.469015843 +0100
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/service/";
++char *varservice ="/etc/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
@@ -0,0 +1,12 @@
+diff -ur admin/runit-2.1.1/etc/2 admin.new/runit-2.1.1/etc/2
+--- etc/2.orig 2009-10-04 15:44:02.000000000 -0500
++++ etc/2 2011-01-20 13:41:30.000000000 -0500
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
++PATH=:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
+
+ exec env - PATH=$PATH \
+-runsvdir -P /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
++runsvdir -P /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
@@ -0,0 +1,105 @@
+#
+# spec file for package runit (Version 2.1.1)
+#
+# Copyright (c) 2010 Ian Meyer <ianmmeyer@gmail.com>
+
+Name: runit
+Version: 2.1.1
+Release: 2
+
+Group: System/Base
+License: BSD
+
+# Override _sbindir being /usr/sbin
+%define _sbindir /sbin
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+Url: http://smarden.org/runit/
+Source: http://smarden.org/runit/runit-%{version}.tar.gz
+Patch: runit-2.1.1-etc-service.patch
+Patch1: runit-2.1.1-runsvdir-path-cleanup.patch
+
+Obsoletes: runit <= %{version}-%{release}
+Provides: runit = %{version}-%{release}
+
+Summary: A UNIX init scheme with service supervision
+
+%description
+runit is a cross-platform Unix init scheme with service supervision; a
+replacement for sysvinit and other init schemes. It runs on GNU/Linux, *BSD,
+Mac OS X, and Solaris, and can easily be adapted to other Unix operating
+systems. runit implements a simple three-stage concept. Stage 1 performs the
+system's one-time initialization tasks. Stage 2 starts the system's uptime
+services (via the runsvdir program). Stage 3 handles the tasks necessary to
+shutdown and halt or reboot.
+
+Authors:
+---------
+ Gerrit Pape <pape@smarden.org>
+
+%prep
+%setup -n admin/%{name}-%{version}
+%patch
+%patch1
+
+%build
+sh package/compile
+
+%install
+for i in $(< package/commands) ; do
+ %{__install} -D -m 0755 command/$i %{buildroot}%{_sbindir}/$i
+done
+for i in man/*8 ; do
+ %{__install} -D -m 0755 $i %{buildroot}%{_mandir}/man8/${i##man/}
+done
+%{__install} -d -m 0755 %{buildroot}{/etc/service}
+%{__install} -D -m 0750 etc/2 %{buildroot}%{_sbindir}/runsvdir-start
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%post
+if [ $1 = 1 ];
+then
+ grep -q 'RI:123456:respawn:/sbin/runsvdir-start' /etc/inittab
+ if [ $? -eq 1 ]
+ then
+ echo -n "Installing /sbin/runsvdir-start into /etc/inittab.."
+ echo "RI:123456:respawn:/sbin/runsvdir-start" >> /etc/inittab
+ echo " success."
+ # Reload init
+ telinit q
+ fi
+fi
+
+%postun
+if [ $1 = 0 ];
+then
+ echo " #################################################"
+ echo " # Remove /sbin/runsvdir-start from /etc/inittab #"
+ echo " # if you really want to remove runit #"
+ echo " #################################################"
+fi
+
+%files
+%defattr(-,root,root,-)
+%{_sbindir}/chpst
+%{_sbindir}/runit
+%{_sbindir}/runit-init
+%{_sbindir}/runsv
+%{_sbindir}/runsvchdir
+%{_sbindir}/runsvdir
+%{_sbindir}/sv
+%{_sbindir}/svlogd
+%{_sbindir}/utmpset
+%{_sbindir}/runsvdir-start
+%{_mandir}/man8/*.8*
+%doc doc/* etc/
+%doc package/CHANGES package/COPYING package/README package/THANKS package/TODO
+%dir /etc/service
+%{_sbindir}/rc%{name}
+
+%changelog
+* Sun Jan 23 2011 ianmmeyer@gmail.com
+- Make compatible with Redhat based systems

0 comments on commit 8405c3e

Please sign in to comment.