Compare commits

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

71 commits

Author SHA1 Message Date
Bill Nottingham
5bbe08aad9 Retire upstart - dead upstream 2012-08-06 13:27:57 -04:00
Dennis Gilmore
1b0e47b488 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 21:00:11 -05:00
Dennis Gilmore
9349eae9b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-14 01:37:11 -06:00
Petr Lautrbach
eb0ab72cba upstart-1.2-4.fc16 2011-05-26 12:27:22 +02:00
Petr Lautrbach
47b279bc28 remove Obsoletes: upstart-sysvinit and clean spec file 2011-05-26 12:27:01 +02:00
Petr Lautrbach
8c1aa5b5b1 /etc/init.conf, upstart-1.2-3.fc16 2011-05-13 10:54:08 +02:00
Petr Lautrbach
bb1d48a85d upstart-1.2-2.fc16 2011-05-05 12:17:22 +02:00
Petr Lautrbach
8b333c447e move binaries to /lib/upstart, add /lib/upstart to default PATH, handle /run in tmpfiles.d 2011-05-05 12:17:01 +02:00
Petr Lautrbach
96c0c95752 use only spaces in spec file 2011-03-23 09:53:40 +01:00
Petr Lautrbach
96848ab1f5 upstart-1.2-1.fc16 2011-03-23 09:38:13 +01:00
Petr Lautrbach
7538863f6a upstart-1.1-1.fc16, enable .override files 2011-03-21 09:45:59 +01:00
Petr Lautrbach
6daa74388e remove /lib/upstart/init experiment 2011-03-17 18:35:53 +01:00
Petr Lautrbach
310c5468af upstart-1.0-2.fc16 2011-03-15 16:15:10 +01:00
Petr Lautrbach
4bbee5dbc7 move jobs to /lib/upstart/init and make symlinks in /etc/init 2011-03-15 16:14:49 +01:00
Petr Lautrbach
2944a23185 upstart-1.0-1.fc16 2011-03-04 14:55:59 +01:00
Dennis Gilmore
c36c4032a3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 18:33:35 -06:00
Petr Lautrbach
1891e83e67 upstart-0.6.7.tar.gz 2010-12-17 19:32:31 +01:00
Petr Lautrbach
039741aedd upstart-0.6.7 2010-12-17 18:56:45 +01:00
Petr Lautrbach
89d1ab7597 upstart-utmp.patch rebased for 0.6.7 2010-12-17 18:56:17 +01:00
Petr Lautrbach
360fa1af70 Stop tty and serial also on runlevel 's' - upstart-0.6.6-4.fc15 2010-12-06 22:11:25 +01:00
Petr Lautrbach
a26acc5633 upstart-0.6.6-3.fc15 2010-11-29 15:02:12 +01:00
Petr Lautrbach
3edc9e7156 create missing files and directories according to /etc/tmpfiles.d/ 2010-11-29 15:01:42 +01:00
Bill Nottingham
077e54a5e5 Require /etc/rc.d/rc.sysinit to pull in new initscripts-legacy package when necessary. 2010-11-16 22:23:12 -05:00
Petr Lautrbach
03b0903bf7 upstart-0.6.6-1.fc15 2010-10-29 14:52:51 +02:00
Petr Lautrbach
25454a5bc6 rename initjobs.tar.gz to initjobs-%{initscripts}.tar.gz 2010-10-29 14:38:00 +02:00
Petr Lautrbach
07d626226c use autoreconf for upstart-audit-events.patch 2010-10-29 14:36:54 +02:00
Petr Lautrbach
6df30f1d93 upstart-0.6.5-14.fc15 2010-10-26 17:36:34 +02:00
Petr Lautrbach
6ea36c7574 send close fd command to shell first (#646894) 2010-10-26 17:35:41 +02:00
Petr Lautrbach
f420835c3e Rename init(8) to upstart(7) (#644249) 2010-10-19 12:14:51 +02:00
Petr Lautrbach
98a4f2d7fa upstart-0.6.5-12.fc15 2010-10-14 16:23:06 +02:00
Petr Lautrbach
60860f3981 disable -sysvinit due the conflicts with systemd (#635323) 2010-10-14 16:22:47 +02:00
Jesse Keating
85706b32e8 - Rebuilt for gcc bug 634757 2010-09-29 15:25:09 -07:00
Bill Nottingham
b9ae6c686d Fix build 2010-09-24 13:19:37 -04:00
Bill Nottingham
dd3667fd15 Add in basic boot jobs. (#637099) 2010-09-24 13:13:09 -04:00
Petr Lautrbach
adfc4f92f0 upstart-0.6.5-9.fc15 2010-09-21 13:20:41 +02:00
Petr Lautrbach
6c8f335774 upstart-shutdown-exitcode.patch - exit shutdown with nonzero exitcode when fails shutdown 2010-09-21 13:20:19 +02:00
Petr Lautrbach
013ebf0ed2 upstart-utmp.patch - set DEAD_PROCESS for died process with pid in utmp table 2010-09-21 13:06:26 +02:00
Bill Nottingham
2348e3ee26 Bump release. 2010-09-17 10:33:39 -04:00
Fedora Release Engineering
a5f64464a1 dist-git conversion 2010-07-29 14:46:22 +00:00
Casey Dahlin
7aec19654f Fix broken upgrades from package split 2010-07-24 01:50:59 +00:00
Lennart Poettering
369b9c245d Split off -sysvinit to make Upstart parallel installable with systemd 2010-07-24 00:44:03 +00:00
Bill Nottingham
4b54411e24 Add a conflict on older versions of initscripts. (#596835) 2010-05-27 15:55:38 +00:00
Bill Nottingham
13dcb2a8d8 Re-add SIGTERM handler. This allows 'kill -TERM 1' on shutdown to work,
avoiding busy inodes when we update glibc/gcc/etc. (#576662)
2010-05-04 20:27:16 +00:00
Casey Dahlin
29b380cda1 Reload init after install 2010-04-06 20:34:49 +00:00
59d2e48f65 run make check only with --with check to avoid test fails in koji 2010-02-24 13:11:34 +00:00
27df622c49 already included in upstream source 2010-02-23 08:36:43 +00:00
Casey Dahlin
95bf015b0d more specificity about which libnih we want 2010-02-19 21:04:58 +00:00
Casey Dahlin
6eb4550aff New source to go along with 0.6.5 spec 2010-02-19 21:03:26 +00:00
fb3df4161b upgrade to upstart-0.6.5 removed obsolete patches 2010-02-17 15:30:54 +00:00
491dadb43e move init-system-dbus.conf from sources to cvs clean .cvsignore 2010-02-17 14:56:39 +00:00
61e0051716 add SIGUSR1 handler and init-system-dbus.conf Resolves: #559660 2010-01-29 14:42:17 +00:00
Dennis Gilmore
6eb48a02f8 add patch from upstream for sparc alignment fixes 2010-01-17 21:22:11 +00:00
a5e8049cdf License changed to GPLv2 and LGPLv2+ 2010-01-11 20:44:57 +00:00
7be10ac811 Removed another tests failing in koji 2009-12-17 11:55:59 +00:00
fb5c0a0097 audit events patch rebased for 0.6 (#470661) 2009-12-17 09:56:57 +00:00
Bill Nottingham
ca1f12388b Make 'telinit u' a no-op until state saving is implemented.
Remove some old dead patches.
2009-12-03 20:00:00 +00:00
5f8b1c9674 upstart-remove-tests.patch moved to cvs from sources 2009-12-01 11:53:24 +00:00
2830b81be1 removed test which fail in koji 2009-11-27 14:26:05 +00:00
Bill Nottingham
1a91ebffa9 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:52:47 +00:00
168a557bb5 build needs at least dbus 1.2.16, configure has not --enable-compat 2009-11-25 14:58:31 +00:00
Bill Nottingham
cfc670af7e Don't ship default jobs; they will conflict with the ones in initscripts.
Also, run the test suite (why not?)
2009-11-24 19:47:21 +00:00
Casey Dahlin
de32bced58 Fix source URL 2009-11-22 17:56:43 +00:00
Casey Dahlin
22748796af Upstart 0.6.3 2009-11-21 05:12:34 +00:00
Casey Dahlin
fd42fd68ee Rebuilt against new glibc 2009-11-15 06:04:14 +00:00
Tomáš Mráz
fc721af480 - rebuilt with new audit 2009-08-21 11:20:09 +00:00
Jesse Keating
2cfb90aed6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 06:36:36 +00:00
864de8d07a Update to upstream 0.3.11 version 2009-06-23 15:45:05 +00:00
Bill Nottingham
086b489ef7 sync with F-11 2009-04-27 20:07:46 +00:00
Casey Dahlin
e292bb3022 Add Steve Grubb's audit events patch 2009-04-03 23:32:49 +00:00
Casey Dahlin
1dc3ffd213 Kill off 0.5.0 and revert back to 0.3.9 2009-03-07 23:32:31 +00:00
Jesse Keating
cd5dba7b72 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 23:19:08 +00:00
14 changed files with 8 additions and 3132 deletions

View file

@ -1 +0,0 @@
upstart-0.5.0.tar.bz2

7
.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
upstart-0.6.6.tar.gz
/initjobs-20101206.tar.gz
/upstart-0.6.7.tar.gz
/upstart-1.0.tar.gz
/upstart-1.1.tar.gz
/upstart-1.2.tar.gz
/initjobs-20110502.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: upstart
# $Id$
NAME := upstart
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

1
dead.package Normal file
View file

@ -0,0 +1 @@
This package was retired on 2012-08-06 due to no active maintainers for the package.

286
events.5
View file

@ -1,286 +0,0 @@
.TH events 5 "April 2008" "Upstart"
.\"
.SH NAME
events \- format of event files used by the upstart init system
.\"
.SH DESCRIPTION
upstart works on the basis of \fBevent\fP files that describe jobs
that should be managed. This includes the particulars about what binary
or shell script code should executed while the job is running, and
which events can cause the job to be started or stopped.
Event files are stored in the \fI/etc/event.d\fP directory.
.\"
.SH SYNTAX
Event files can contain the following stanzaz.
.TP
.BI "exec <command> <arguments>"
When the event is started by \fBinit\fR, execute the following arguments.
Example: exec /bin/dbus-daemon --system
.TP
.BI "script ..."
Like \fBexec\fR but instead of executing a single program, execute
the following shell code. \fBscript\fR sections are closed with a
\fBend script\fR marker.
Example:
.nf
script
rm -f /var/run/sshd.pid
sshd
end script
.ni
Only one of \fBexec\fR and \fBscript\fR can be used at a time. If both
are bspecifed, \fBexec\fR takes priority.
.TP
.BI pre-start
Execute the command/script before actually starting the process.
\fBpre-start\fR can be invoked as \fBpre-start exec\fR or \fBpre-start script\fR
in the same way that a start action can be handled by either
\fBexec\fR or \fBscript\fR.
.TP
.BI post-start
Execute the command/script after starting the process.
The format is similar to \fBpre-start\fR.
.TP
.BI pre-stop
Execute the command/script before stopping the process.
The format is similar to \fBpre-start\fR.
.TP
.BI post-stop
Execute the command/script after stopping the process.
The format is similar to \fBpre-start\fR.
.TP
.BI "start on <event>"
Describes on what condition to start this job. Without this
section, the job can only be manually started with the
\fBinitctl(8)\fR command.
Examples:
.nf
start on startup
This starts immediately after boot.
start on stopped rc3
This starts when the 'rc3' event has stopped.
.ni
Events are matched via globbing. So a stanza of the form
.nf
start on runlevel [2345]
.ni
would match any of runlevels 2, 3, 4, or 5.
.TP
.BI "stop on <event>"
Describes on what condition to stop this job. Without this
section, the job can only be manually stopped with the
\fBinitctl\fR command.
Examples:
.nf
stop on runlevel 0
This stops the job when runlevel 0 is entered.
stop on stopping dbus ok
This stops the job when the 'dbus' job is stopped.
.ni
Events are matched via globbing. So a stanza of the form
.nf
stop on runlevel [!5]
.ni
would match any runlevel other than 5.
.TP
.BI daemon
Sets the daemon flag for the job. This means that the job will
fork in the background and that its PID needs to be obtained.
.TP
.BI respawn
This sets the daemon, service, and respawn flags for the job.
The respawn flag means that the process will be restarted when
it ends.
.TP
.BI "respawn limit [count [timeout]]"
This configures respawn limits. Respawn limits only apply
if the \fBrespawn\fR flag is set for the job; setting a limit
does not automatically set respawning capability. If the
process is respawned more than \fIcount\fR times within an
interval of \fItimeout\fR seconds, the job will be stopped
automatically, andn ot restarted. The limit defaults to 10
times within 5 seconds.
Example: respawn limit 10 120
This sets the limit for respawn to ten times within two
minutes, the historical behavior for System V init.
.TP
.BI service
\fBservice\fR means that the job has reached its goal when running.
\fBservice\fR is implied by the \fBrespawn\fR flag.
.TP
.BI instance
\fBinstance\fR means that the job starts new instances every time
it is started, even if there is another instance running. It
is the converse of \fBdaemon\fR.
.TP
.BI "kill timeout <time>"
Sets the time to wait between sending TERM and KILL signals to
\fItime\fR seconds.
.TP
.BI "normal exit <status>"
When used with \fBrespawn\fR any exit codes denoted in \fIstatus\fR will
prevent a respawn of the process.
.TP
.BI "console {logged|output|owner|none}"
Describes what to do with the job's output. Valid values are:
.I logged
Redirect to logger. (the default setting)
.I output
Direct to the current stdout
.I owner
The process becomes the owner of the console, allowing it to
receive signals from the keyboard
.I none
Output is redirected to /dev/null
.TP
.BI "env <name>=<value>"
Sets an environment variable for the job.
Example: env LD_LIBRARY_PATH=/opt/app/lib
.TP
.BI "umask <umask>"
Sets the umask of the job to \fIumask\fR.
Example: umask 0755
.TP
.BI "nice <value>"
Sets the nice level of the job to \fIvalue\fR.
Example: nice 5
.TP
.BI "chroot <path>"
Changes the job's root directory to \fIpath\fR.
Example: chroot /var/empty
.TP
.BI "chdir <path>"
Changes the working directory of the job to \fIpath\fR.
Example: chdir /var/tmp
.TP
.BI "limit {as|core|cpu|data|fsize|memlock|msgqueue|nice|nofile|nproc|rss|rtprio|sigpending|stack} {unlimited|<value>}"
Changes the limit of the process to whatever is specfied.
Examples:
.nf
limit nproc 10
limit core unlimited
.ni
.TP
.BI "description <text>"
Describes the job. Not currently used by any \fBinit(8)\fR tools.
Example: descripton "This is a test job."
.TP
.BI "author <text>"
Author of the job. Not currently used by any \fBinit(8)\fR tools.
Example: author "Obi-wan Kennedy <bidy@whitehouse.gov>"
.TP
.BI "version <version>"
Version of the job. Not currently used by any \fBinit(8)\fR tools.
Example: version "0.0.0.0.1 test"
.TP
.BI "emits <signals>"
Describes signals emitted by the job. Not currently used by
any \fBinit(8)\fR tools. For more information on signals, see the
\fBinitctl(8)\fR man page and the \fBemit\fR option.
Example: emits spam egg ham
.\"
.SH EVENTS
A wide array of events can be emitted by the system (see
\fBinitctl(8)\fR) but the following events are generated by
upstart itself, or are usually seen on a typical install.
.TP
.BI "stalled"
No jobs are running and no events are pending.
.TP
.BI "control-alt-delete"
Control-Alt-Delete has been pressed.
.TP
.BI "kbdrequest"
A kbdrequest event has occurred.
.TP
.BI "power-status-changed"
Init received SIGPWR.
.TP
.BI "starting <job>"
The given job is being started.
.TP
.BI "started <job>"
The given job has successfully been started.
.TP
.BI "stopping <job>"
The given job is being stopped.
.TP
.BI "stopped <job>"
The given job has been stopped successfully.
.TP
.BI "startup"
Emitted when the system boots.
.TP
.BI "runlevel <runlevel>"
Init has been asked to move to the given runlevel.
.\"
.SH FILES
.I /etc/event.d
The directory where event files are stored.
.\"
.SH SEE ALSO
.BR initctl (8)
.BR telinit (8)
.BR init (8)
.BR http://upstart.ubuntu.com/getting-started.html

View file

@ -1 +0,0 @@
c040227c746d22f87c0cd20cd1ca865b upstart-0.5.0.tar.bz2

View file

@ -1,33 +0,0 @@
diff -urN upstart-0.3.9/configure upstart-0.3.9-adj/configure
--- upstart-0.3.9/configure 2007-10-11 17:12:41.000000000 -0400
+++ upstart-0.3.9-adj/configure 2008-04-03 11:22:20.000000000 -0400
@@ -732,7 +732,7 @@
PACKAGE_TARNAME='upstart'
PACKAGE_VERSION='0.3.9'
PACKAGE_STRING='upstart 0.3.9'
-PACKAGE_BUGREPORT='upstart-devel@lists.ubuntu.com'
+PACKAGE_BUGREPORT='fedora-devel-list@redhat.com'
ac_unique_file="init/main.c"
gt_needs=
@@ -1574,7 +1574,7 @@
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <upstart-devel@lists.ubuntu.com>.
+Report bugs to <fedora-devel-list@redhat.com>.
_ACEOF
ac_status=$?
fi
diff -urN upstart-0.3.9/configure.ac upstart-0.3.9-adj/configure.ac
--- upstart-0.3.9/configure.ac 2007-10-11 17:11:27.000000000 -0400
+++ upstart-0.3.9-adj/configure.ac 2008-04-03 11:22:20.000000000 -0400
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
-AC_INIT([upstart], [0.3.9], [upstart-devel@lists.ubuntu.com])
+AC_INIT([upstart], [0.3.9], [fedora-devel-list@redhat.com])
AC_COPYRIGHT([[Copyright © 2007 Canonical Ltd.]])
AC_CONFIG_SRCDIR([init/main.c])
AC_CONFIG_MACRO_DIR([m4])

View file

@ -1,56 +0,0 @@
diff -up upstart-0.3.9/compat/sysv/reboot.c.foo upstart-0.3.9/compat/sysv/reboot.c
--- upstart-0.3.9/compat/sysv/reboot.c.foo 2008-02-15 16:52:30.000000000 -0500
+++ upstart-0.3.9/compat/sysv/reboot.c 2008-02-15 17:47:37.000000000 -0500
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <utmp.h>
#include <linux/if.h>
#include <linux/hdreg.h>
@@ -158,12 +159,31 @@ static NihOption options[] = {
NIH_OPTION_LAST
};
+static char get_runlevel(void)
+{
+ struct utmp utmp, *lvl;
+ char *rl, runlevel = 0;
+
+ if ((rl = getenv("RUNLEVEL")) != NULL)
+ return *rl;
+
+ memset(&utmp, 0, sizeof(utmp));
+ utmp.ut_type = RUN_LVL;
+ setutent();
+ lvl = getutid(&utmp);
+ if (lvl)
+ runlevel = lvl->ut_pid % 256;
+ endutent();
+ return runlevel;
+}
+
int
main (int argc,
char *argv[])
{
char **args;
+ char level;
int mode;
nih_main_init (argv[0]);
@@ -211,6 +231,12 @@ main (int argc,
if (exit_only)
exit (0);
+
+ level = get_runlevel();
+ if (level) {
+ if (level == '0' || level == '6')
+ force = TRUE;
+ }
/* Normally we just exec shutdown, which notifies everyone and
* signals init.

View file

@ -1,11 +0,0 @@
diff -up upstart-0.3.9/upstart/wire.c.foo upstart-0.3.9/upstart/wire.c
--- upstart-0.3.9/upstart/wire.c.foo 2008-02-01 13:35:33.000000000 -0500
+++ upstart-0.3.9/upstart/wire.c 2008-02-01 13:35:33.000000000 -0500
@@ -28,6 +28,7 @@
#include <stdarg.h>
#include <string.h>
+#include <limits.h>
#include <nih/macros.h>
#include <nih/alloc.h>

View file

@ -1,20 +0,0 @@
--- upstart-0.3.9/util/man/initctl.8-orig 2008-04-09 16:52:23.000000000 -0400
+++ upstart-0.3.9/util/man/initctl.8 2008-04-24 01:42:57.000000000 -0400
@@ -4,7 +4,7 @@
initctl \- init daemon control utility
.\"
.SH SYNOPSIS
-\fBinitctl\fR [\fIOPTION\fR]... \fICOMMAND\fR [\fIOPTION\fR]... \fIARG...\fR
+\fBinitctl\fR [\fIOPTION\fR]... \fICOMMAND\fR [\fIOPTION\fR]... \fIARG\fR...
.\"
.SH DESCRIPTION
.B initctl
@@ -14,7 +14,7 @@
.IR COMMAND .
Normally it is invoked directly with the command specified as the first
-non-option argument, however symbolic or hard links may be used so that
+non-option argument; however, symbolic or hard links may be used so that
it is invoked as the name of a command, in which case it behaves
accordingly.
.\"

View file

@ -1,23 +0,0 @@
=== modified file 'nih/file.c'
--- nih/file.c 2007-06-03 12:32:56 +0000
+++ nih/file.c 2008-03-17 02:47:17 +0000
@@ -375,6 +375,18 @@
if (ptr && (! strncmp (ptr, ".dpkg-", 6)))
return TRUE;
+ /* Matches rpm temp files */
+ if (ptr && (! strncmp (ptr, ".rpmsave",9)))
+ return TRUE;
+ if (ptr && (! strncmp (ptr, ".rpmorig",9)))
+ return TRUE;
+ if (ptr && (! strncmp (ptr, ".rpmnew",8)))
+ return TRUE;
+
+ /* More rpm temp file matching */
+ ptr = strrchr (path, ';');
+ if (ptr && strspn (ptr + 1, "abcdefABCDEF0123456789") == 8 && !ptr[9])
+ return TRUE;
return FALSE;
}

View file

@ -1,110 +0,0 @@
diff -urN upstart-0.3.9-old/compat/sysv/telinit.c upstart-0.3.9/compat/sysv/telinit.c
--- upstart-0.3.9-old/compat/sysv/telinit.c 2008-04-09 00:52:06.000000000 -0400
+++ upstart-0.3.9/compat/sysv/telinit.c 2008-04-09 01:02:39.000000000 -0400
@@ -113,6 +113,11 @@
NULL, UPSTART_INIT_DAEMON,
UPSTART_EVENT_EMIT, "runlevel", args, NULL));
break;
+ case 'u':
+ NIH_MUST (message = upstart_message_new (
+ NULL, UPSTART_INIT_DAEMON,
+ UPSTART_RESTART, NULL));
+ break;
default:
/* Ignore other arguments */
exit (0);
diff -urN upstart-0.3.9-old/init/control.c upstart-0.3.9/init/control.c
--- upstart-0.3.9-old/init/control.c 2008-04-09 00:52:06.000000000 -0400
+++ upstart-0.3.9/init/control.c 2008-04-09 01:01:41.000000000 -0400
@@ -29,6 +29,7 @@
#include <errno.h>
#include <unistd.h>
+#include <signal.h>
#include <fnmatch.h>
#include <nih/macros.h>
@@ -52,6 +53,8 @@
static void control_error_handler (void *data, NihIo *io);
static int control_version_query (void *data, pid_t pid,
UpstartMessageType type);
+static int control_restart (void *data, pid_t pid,
+ UpstartMessageType type);
static int control_log_priority (void *data, pid_t pid,
UpstartMessageType type,
NihLogLevel priority);
@@ -102,6 +105,8 @@
static UpstartMessage message_handlers[] = {
{ -1, UPSTART_VERSION_QUERY,
(UpstartMessageHandler)control_version_query },
+ { -1, UPSTART_RESTART,
+ (UpstartMessageHandler)control_restart },
{ -1, UPSTART_PUSH_TTY,
(UpstartMessageHandler)control_push_tty },
{ -1, UPSTART_POP_TTY,
@@ -319,6 +324,32 @@
}
/**
+ * control_restart:
+ * @data: data pointer,
+ * @pid: origin process id,
+ * @type: message type received.
+ *
+ * This function is called when another process on the system asks us to
+ * re-execute
+ *
+ * Returns: zero on success, negative value on raised error.
+ **/
+static int
+control_restart (void *data,
+ pid_t pid,
+ UpstartMessageType type)
+{
+ nih_assert (pid > 0);
+ nih_assert (type == UPSTART_RESTART);
+
+ nih_info (_("Control request to restart daemon"));
+
+ kill(getpid(), SIGTERM);
+
+ return 0;
+}
+
+/**
* control_push_tty:
* @data: data pointer,
* @pid: origin process id,
diff -urN upstart-0.3.9-old/upstart/message.c upstart-0.3.9/upstart/message.c
--- upstart-0.3.9-old/upstart/message.c 2008-04-09 00:52:06.000000000 -0400
+++ upstart-0.3.9/upstart/message.c 2008-04-09 00:55:03.000000000 -0400
@@ -259,6 +259,8 @@
switch (type) {
case UPSTART_NO_OP:
break;
+ case UPSTART_RESTART:
+ break;
case UPSTART_VERSION_QUERY:
break;
case UPSTART_POP_TTY:
@@ -564,6 +566,9 @@
case UPSTART_VERSION_QUERY:
ret = handler (data, cred.pid, type);
break;
+ case UPSTART_RESTART:
+ ret = handler (data, cred.pid, type);
+ break;
case UPSTART_POP_TTY:
ret = handler (data, cred.pid, type);
break;
diff -urN upstart-0.3.9-old/upstart/message.h upstart-0.3.9/upstart/message.h
--- upstart-0.3.9-old/upstart/message.h 2008-04-09 00:52:06.000000000 -0400
+++ upstart-0.3.9/upstart/message.h 2008-04-09 00:55:58.000000000 -0400
@@ -67,6 +67,7 @@
UPSTART_NO_OP = 0x0000,
UPSTART_VERSION_QUERY = 0x0001,
UPSTART_LOG_PRIORITY = 0x0002,
+ UPSTART_RESTART = 0x0005,
UPSTART_VERSION = 0x0010,
UPSTART_PUSH_TTY = 0x0011,
UPSTART_POP_TTY = 0x0012,

File diff suppressed because it is too large Load diff

View file

@ -1,182 +0,0 @@
#%define build_str 20080730bzr_dbus_userspace_1046
%define build_str 0
%if %build_str
%define build_rel 0.%{build_str}_
%define build_pkg -%{build_str}
%else
%define build_rel %{nil}
%define build_pkg %{nil}
%endif
Name: upstart
Version: 0.5.0
Release: %{build_rel}1%{?dist}
Summary: An event-driven init system
Group: System Environment/Base
License: GPLv2+
URL: http://upstart.ubuntu.com
Source0: http://upstart.ubuntu.com/download/0.3/upstart-%{version}%{build_pkg}.tar.bz2
Source1: events.5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24
Provides: SysVinit = 2.86-24, sysvinit = 2.86-24
Requires: dbus >= 1.2.1-4
BuildRequires: gettext
%description
Upstart is an event-based replacement for the /sbin/init daemon which
handles starting of tasks and services during boot, stopping them
during shutdown and supervising them while the system is running.
%post
kill -TERM 1
%prep
%setup -q -n upstart-%{version}%{build_pkg}
%build
%configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib}
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/%{_sysconfdir}/init/jobs.d/
mkdir -p %{buildroot}/%{_mandir}/man5
install -m 644 %{SOURCE1} %{buildroot}/%{_mandir}/man5/events.5
%find_lang %{name}
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS
%doc COPYING
%doc NEWS
%doc README
%doc TODO
%doc HACKING
%{_sysconfdir}/init/
%{_sysconfdir}/dbus-1/system.d/Upstart.conf
/sbin/halt
/sbin/init
/sbin/initctl
/sbin/poweroff
/sbin/reboot
/sbin/runlevel
/sbin/shutdown
/sbin/start
/sbin/status
/sbin/stop
/sbin/telinit
%{_mandir}/man5/events.5.gz
%{_mandir}/man8/halt.8.gz
%{_mandir}/man8/init.8.gz
%{_mandir}/man8/initctl.8.gz
%{_mandir}/man8/poweroff.8.gz
%{_mandir}/man8/reboot.8.gz
%{_mandir}/man8/runlevel.8.gz
%{_mandir}/man8/shutdown.8.gz
%{_mandir}/man8/start.8.gz
%{_mandir}/man8/status.8.gz
%{_mandir}/man8/stop.8.gz
%{_mandir}/man8/telinit.8.gz
%changelog
* Tue Aug 12 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0
- New upstream release
* Thu Jul 31 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-20080730bzr_dbus_userspace_1046_2
- Rebase to upstream
- To retrieve source:
bzr clone lp:upstart/0.5 -r 1046
bzr branch lp:~cjdahlin/libnih/event-loop-async-fix -r 596
* Wed Jul 23 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-20080723bzr_dbus_userspace_1045_1
- More reflective tarball name
- Retrieve source with `bzr clone lp:~cjdahlin/upstart/trunk -r 1045`
* Tue Jul 22 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.7
- Fix bug in environment substitution
* Tue Jul 22 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.6
- Fix reboot issue
* Mon Jul 21 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.5
- Propagate runlevel calculation glitch fix to /sbin/shutdown
* Fri Jul 18 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.4
- Fix runlevel calculation glitch
- Remove some loose comments from spec
* Wed Jul 16 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.3
- Bump dbus timeout to INT_MAX
* Wed Jul 16 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.2
- Fix mishandling of multiline scripts
* Wed Jul 16 2008 Casey Dahlin <cdahlin@redhat.com - 0.5.0-0.0.1
- Upstream to lp:upstart/dbus-userspace
* Fri Apr 25 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-19
- with the merge of event-compat-sysv, move the sysvinit obsoletes/provides here
* Thu Apr 24 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-18
- fix some man page typos (#444008, <archimerged@gmail.com>)
* Wed Apr 09 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-17
- Added list of stock events to events(5)
* Tue Apr 08 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-16
- Add telinit u support
* Fri Apr 04 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-15
- Add a events(5) manpage that describes event syntax
* Thu Apr 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-14
- Change bug report email address to fedora-devel-list@redhat.com
* Thu Mar 14 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-13
- Ignore rpm temporary files of the foo;<somehex> format
- Make ignores of .rpm{new,orig,save} match only at the end of the name
* Wed Mar 13 2008 Bill Nottingham <notting@redhat.com> - 0.3.9-12
- forgot about rpmorig too (ugh)
* Wed Mar 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-11
- Make logd a noreplace
* Wed Mar 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-10
- Add patch to ignore .rpm{new,save} files
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-9
- Remove automake dependency, build Makefile.in changes into patch
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-8
- Run automake after patching
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-7
- Added BuildRequires: automake
* Sun Mar 03 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-6
- Added patch to allow runtime tty changes
* Fri Feb 15 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-5
- Added patch to imply --force on runlevels 0 and 6
* Wed Feb 06 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-4
- Patched for GCC 4.3
* Thu Jan 31 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-3
- Added AUTHORS, COPYING, etc.
- Made config --libdir option relative
* Mon Jan 21 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-2
- Remove libnih and libupstart
* Sun Jan 13 2008 Casey Dahlin <cjdahlin@ncsu.edu> - 0.3.9-1
- Initial packaging