Compare commits

..

68 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
14 changed files with 8 additions and 3009 deletions

8
.gitignore vendored
View file

@ -1 +1,7 @@
upstart-0.3.11.tar.bz2
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

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 @@
a9e475e1458c876add0441d9d4cfe9c0 upstart-0.3.11.tar.bz2

View file

@ -1,199 +0,0 @@
diff -urp upstart-0.3.9.orig/compat/sysv/reboot.c upstart-0.3.9/compat/sysv/reboot.c
--- upstart-0.3.9.orig/compat/sysv/reboot.c 2008-11-03 12:29:30.000000000 -0500
+++ upstart-0.3.9/compat/sysv/reboot.c 2008-11-05 08:16:22.000000000 -0500
@@ -37,6 +37,9 @@
#include <string.h>
#include <unistd.h>
#include <utmp.h>
+#if 1 /* HAVE_LIBAUDIT */
+#include <libaudit.h>
+#endif
#include <linux/if.h>
#include <linux/hdreg.h>
@@ -87,6 +90,7 @@ enum {
/* Prototypes for static functions */
static void down_drives (void);
static void down_interfaces (void);
+static void send_audit_event(void);
/**
@@ -277,6 +281,7 @@ main (int argc,
*/
reboot (RB_ENABLE_CAD);
kill (1, SIGTSTP);
+ send_audit_event ();
/* Sync the disks */
chdir ("/");
@@ -315,6 +320,23 @@ main (int argc,
return 0;
}
+/**
+ * send_audit_event
+ *
+ * Send system shutdown audit event
+ **/
+static void
+send_audit_event (void)
+{
+#if 1 /* HAVE_LIBAUDIT */
+ int fd = audit_open ();
+ if (fd < 0)
+ return;
+ audit_log_user_message (fd, AUDIT_SYSTEM_SHUTDOWN, "init",
+ NULL, NULL, NULL, 1);
+ close (fd);
+#endif
+}
/**
* down_drives:
diff -urp upstart-0.3.9.orig/compat/sysv/runlevel.c upstart-0.3.9/compat/sysv/runlevel.c
--- upstart-0.3.9.orig/compat/sysv/runlevel.c 2008-11-03 12:29:30.000000000 -0500
+++ upstart-0.3.9/compat/sysv/runlevel.c 2008-11-05 08:22:17.000000000 -0500
@@ -33,6 +33,9 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#if 1 /* HAVE_LIBAUDIT */
+#include <libaudit.h>
+#endif
#include <nih/macros.h>
#include <nih/alloc.h>
@@ -44,6 +47,7 @@
/* Prototypes for static functions */
static void store (short type, pid_t pid, const char *user);
+static void send_audit_event (int old, int level);
/**
@@ -109,6 +113,7 @@ main (int argc,
/* Store the reboot time? */
if (reboot) {
store (BOOT_TIME, 0, "reboot");
+ send_audit_event (0, 0);
exit (0);
}
@@ -143,6 +148,7 @@ main (int argc,
prev = cur;
if (! prev)
prev = 'N';
+ send_audit_event (prev, set[0]);
cur = set[0];
}
@@ -203,3 +209,35 @@ store (short type,
/* Write wtmp entry */
updwtmp (WTMP_FILE, &utmp);
}
+
+/**
+ * send_audit_event
+ * @old: current run level
+ * @level: new run level
+ *
+ * Send system runlevel change audit event. If level is 0, then
+ * we consider this to be a reboot event.
+ **/
+static void
+send_audit_event (int old, int level)
+{
+#if 1 /* HAVE_LIBAUDIT */
+ int fd = audit_open ();
+
+ if (fd < 0)
+ return;
+
+ if (level) {
+ char buf[64];
+
+ snprintf (buf, sizeof (buf),
+ "old-level=%c new-level=%c", old, level);
+ audit_log_user_message (fd, AUDIT_SYSTEM_RUNLEVEL, buf,
+ NULL, NULL, NULL, 1);
+ } else
+ audit_log_user_message (fd, AUDIT_SYSTEM_BOOT, "init",
+ NULL, NULL, NULL, 1);
+ close (fd);
+#endif
+}
+
diff -urp upstart-0.3.9.orig/compat/sysv/shutdown.c upstart-0.3.9/compat/sysv/shutdown.c
--- upstart-0.3.9.orig/compat/sysv/shutdown.c 2008-11-03 12:29:30.000000000 -0500
+++ upstart-0.3.9/compat/sysv/shutdown.c 2008-11-05 08:16:22.000000000 -0500
@@ -38,6 +38,9 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#if 1 /* HAVE_LIBAUDIT */
+#include <libaudit.h>
+#endif
#include <nih/macros.h>
#include <nih/alloc.h>
@@ -452,6 +455,23 @@ runlevel_setter (NihOption *option,
return 0;
}
+/**
+ * send_audit_event
+ *
+ * Send system shutdown audit event
+ **/
+static void
+send_audit_event (void)
+{
+#if 1 /* HAVE_LIBAUDIT */
+ int fd = audit_open ();
+ if (fd < 0)
+ return;
+ audit_log_user_message (fd, AUDIT_SYSTEM_SHUTDOWN, "init",
+ NULL, NULL, NULL, 1);
+ close (fd);
+#endif
+}
/**
* shutdown_now:
@@ -496,6 +516,7 @@ shutdown_now (void)
NIH_MUST (message = upstart_message_new (NULL, UPSTART_INIT_DAEMON,
UPSTART_EVENT_EMIT,
"runlevel", args, env));
+ send_audit_event ();
/* Send the message */
if (nih_io_message_send (message, sock) < 0) {
@@ -513,7 +534,6 @@ shutdown_now (void)
nih_fatal (_("Unable to send message: %s"), err->message);
exit (1);
}
-
unlink (ETC_NOLOGIN);
nih_main_unlink_pidfile ();
diff -up upstart-0.3.9/compat/sysv/Makefile.in.foo upstart-0.3.9/compat/sysv/Makefile.in
--- upstart-0.3.9/compat/sysv/Makefile.in.foo 2009-04-27 15:53:35.000000000 -0400
+++ upstart-0.3.9/compat/sysv/Makefile.in 2009-04-27 15:53:55.000000000 -0400
@@ -280,13 +280,13 @@ EXTRA_DIST = $(manpages)
@COMPAT_SYSV_TRUE@man_MANS = $(manpages)
reboot_SOURCES = reboot.c
reboot_LDFLAGS = -static
-reboot_LDADD = ../../upstart/libupstart.la ../../nih/libnih.la $(LTLIBINTL)
+reboot_LDADD = ../../upstart/libupstart.la ../../nih/libnih.la $(LTLIBINTL) -laudit
runlevel_SOURCES = runlevel.c
runlevel_LDFLAGS = -static
-runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL)
+runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL) -laudit
shutdown_SOURCES = shutdown.c
shutdown_LDFLAGS = -static
-shutdown_LDADD = ../../upstart/libupstart.la ../../nih/libnih.la $(LTLIBINTL)
+shutdown_LDADD = ../../upstart/libupstart.la ../../nih/libnih.la $(LTLIBINTL) -laudit
telinit_SOURCES = telinit.c
telinit_LDFLAGS = -static
telinit_LDADD = ../../upstart/libupstart.la ../../nih/libnih.la $(LTLIBINTL)

View file

@ -1,20 +0,0 @@
--- upstart-0.3.11/configure 2009-06-19 20:03:59.000000000 +0200
+++ upstart-0.3.11-adj/configure 2009-06-22 14:51:40.000000000 +0200
@@ -749,7 +749,7 @@
PACKAGE_TARNAME='upstart'
PACKAGE_VERSION='0.3.11'
PACKAGE_STRING='upstart 0.3.11'
-PACKAGE_BUGREPORT='upstart-devel@lists.ubuntu.com'
+PACKAGE_BUGREPORT='fedora-devel-list@redhat.com'
ac_unique_file="init/main.c"
# Factoring default headers for most tests.
@@ -1655,7 +1655,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

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,11 +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
@@ -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,429 +0,0 @@
diff -uNr upstart-0.3.9.orig/init/main.c upstart-0.3.9/init/main.c
--- upstart-0.3.9.orig/init/main.c 2009-01-23 13:44:32.000000000 -0500
+++ upstart-0.3.9/init/main.c 2009-01-23 13:44:54.000000000 -0500
@@ -59,6 +59,7 @@
#include "cfgfile.h"
#include "paths.h"
#include "tty.h"
+#include "restore.h"
/* Prototypes for static functions */
@@ -278,6 +279,10 @@
exit (1);
}
+ /* Restore the state of previously active jobs, if re-exec'd by
+ * a previously running init. */
+
+ if (restart) restore_configuration(args);
/* Generate and run the startup event or read the state from the
* init daemon that exec'd us
@@ -534,6 +539,8 @@
NihError *err;
const char *loglevel;
sigset_t mask, oldmask;
+ char **args;
+ size_t len;
nih_assert (argv0 != NULL);
nih_assert (signal != NULL);
@@ -559,7 +566,20 @@
} else {
loglevel = NULL;
}
- execl (argv0, argv0, "--restart", loglevel, NULL);
+ args = nih_str_array_new(NULL);
+ len = 0;
+ if (args) args = nih_str_array_add(&args, NULL, &len, argv0);
+ if (args) args = nih_str_array_add(&args, NULL, &len, "--restart");
+ if (args && loglevel)
+ args = nih_str_array_add(&args, NULL, &len, loglevel);
+ if (args) save_current_configuration(&args, NULL, &len);
+ if (args) {
+ execv (argv0, args);
+ nih_free(args);
+ } else {
+ nih_warn (_("Unable to save list of currently running jobs"));
+ execl(argv0, argv0, "--restart", loglevel, NULL);
+ }
nih_error_raise_system ();
err = nih_error_get ();
diff -uNr upstart-0.3.9.orig/init/Makefile.in upstart-0.3.9/init/Makefile.in
--- upstart-0.3.9.orig/init/Makefile.in 2009-01-23 13:44:32.000000000 -0500
+++ upstart-0.3.9/init/Makefile.in 2009-01-23 13:44:54.000000000 -0500
@@ -72,7 +72,7 @@
PROGRAMS = $(sbin_PROGRAMS)
am_init_OBJECTS = main.$(OBJEXT) tty.$(OBJEXT) process.$(OBJEXT) \
job.$(OBJEXT) event.$(OBJEXT) control.$(OBJEXT) \
- notify.$(OBJEXT) cfgfile.$(OBJEXT)
+ notify.$(OBJEXT) cfgfile.$(OBJEXT) restore.$(OBJEXT)
init_OBJECTS = $(am_init_OBJECTS)
am__DEPENDENCIES_1 =
init_DEPENDENCIES = ../upstart/libupstart.la ../nih/libnih.la \
@@ -315,7 +315,8 @@
event.c event.h \
control.c control.h \
notify.c notify.h \
- cfgfile.c cfgfile.h
+ cfgfile.c cfgfile.h \
+ restore.c restore.h
init_LDFLAGS = -static
init_LDADD = \
diff -uNr upstart-0.3.9.orig/init/restore.c upstart-0.3.9/init/restore.c
--- upstart-0.3.9.orig/init/restore.c 1969-12-31 19:00:00.000000000 -0500
+++ upstart-0.3.9/init/restore.c 2009-01-23 13:44:54.000000000 -0500
@@ -0,0 +1,333 @@
+/* Modifications to upstart to allow passing of the state of currently
+ * running jobs when upstart re-execs itself.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+
+#include <sys/types.h>
+#include <string.h>
+#include <nih/string.h>
+#include <nih/logging.h>
+#include <nih/alloc.h>
+#include "job.h"
+#include "restore.h"
+
+
+/**
+ * store_pid:
+ * @proc: pointer to a JobProcess structure or NULL
+ * @args: array of arguments
+ * @parent: parent of @args
+ * @len: current length of @args
+ *
+ * Does nothing if @args is null.
+ * Pushes "X" onto @args if @args is non-null but @process is null.
+ * Otherwise: extracts the pid from @process, creates a hexadecimal string
+ * form of it, pushes a copy onto the array @args, then frees the original.
+ */
+
+void store_pid(JobProcess *proc, char ***args, const void *parent, size_t *len)
+{
+ char *pidstr;
+ if (! *args) return;
+ pidstr = (proc ? nih_sprintf(NULL, "%x", proc->pid) : "X");
+
+ if (! pidstr) {
+ nih_error("Unable to allocate storage to save process id");
+ *args = NULL;
+ return;
+ }
+ if (! nih_str_array_add(args, parent, len, pidstr)) {
+ nih_error("Unable to add process id to argument list");
+ *args = NULL;
+ }
+
+ if (proc) nih_free(pidstr);
+}
+
+/**
+ * unpack_pid:
+ * @pidstr: hexadecimal string created by pack_pid
+ * @err: pointer to flag to set if error occurs
+ *
+ * Returns the process id corresponding to the string passed in pidstr.
+ * If an error occurs, returns 0 and sets the flag pointed to by @err.
+ **/
+
+pid_t unpack_pid(char *pidstr, int *err) {
+ pid_t result = 0;
+ while (*pidstr) {
+ unsigned char c = *pidstr++;
+ result <<= 4;
+ if (c >= '0' && c <= '9') result += (c-'0');
+ else if (c >= 'a' && c <= 'f') result += 10 + (c-'a');
+ else {
+ *err = 1;
+ return 0;
+ }
+ }
+ return result;
+}
+
+/**
+ * retrieve_pid:
+ * @arg: pointer to array of arguments from which to read pid string
+ * @jobname: name of job whose pids are being retrieved
+ * @err: pointer to flag to set if error occurs
+ * @pid: pointer to location to hold the retrieved process id
+ * @present: pointer to a location to hold 1 if the process id was present
+ *
+ * Reads a process id or no-process-present indicator from the hexadecimal
+ * string pointed to by @arg, increments @arg to point to the next string in
+ * the array unless it already points to a null string, and stores into
+ * @present a value of 0 or 1 indicating whether or not a process id is
+ * present, and stores into @pid the unpacked process id (or zero if there
+ * is no process present or an error occurred). If an error occured, sets
+ * the flag pointed to by @err and printes an error message.
+ **/
+
+void retrieve_pid(char ***arg, char *jobname, int *err,
+ pid_t *pid, int *present)
+{
+ *pid = 0;
+ *present = 0;
+ char *str;
+ if (! arg || ! *arg || ! **arg) {
+ nih_error("Ran out of arguments when restoring job %s",
+ jobname);
+ *err = 1;
+ return;
+ }
+ str = **arg;
+ if (str) ++(*arg);
+ if (strcmp(str, "X")==0) return;
+ *present = 1;
+ *pid = unpack_pid(str, err);
+ if (*err) nih_error("Cannot parse pid %s for job %s", str, jobname);
+}
+
+/**
+ * restore_pid:
+ * @proc: pointer to a JobProcess structure, or NULL
+ * @pid: process id
+ * @present: integer which is 1 if process id is applicable
+ * @jobname: name of job whose process ids are being restored
+ *
+ * Checks that the non-null status of @proc matches the true/false
+ * status of @present. If there is a mismatch, prints an error message.
+ * If @present is true and @proc is non-null, stores the process id from
+ * @pid into the JobProcess structure pointed to by @proc.
+ */
+
+void restore_pid(JobProcess *proc, pid_t pid, int present, char *jobname)
+{
+ if (proc == NULL && ! present) return;
+ if (proc != NULL && present) {
+ proc->pid = pid;
+ return;
+ }
+ nih_error("Unable to restore process id for job %s", jobname);
+}
+
+/**
+ * save_current_configuration:
+ * @args: array of arguments to pass to new init
+ * @parent: parent of @args
+ * @len: current length of @args
+ *
+ * Pushes, onto the array @args, information about currently running
+ * jobs. Each job consists of seven arguments:
+ * (1) The job name
+ * (2) A 3-character state/goal string:
+ * First character for the goal: 0=goal JOB_STOP, 1=goal JOB_START
+ * Second character for the current state:
+ * W=JOB_WAITING,
+ * S=JOB_STARTING, A=JOB_PRE_START, B=JOB_SPAWNED, C=JOB_POST_START,
+ * R=JOB_RUNNING,
+ * T=JOB_STOPPING, X=JOB_PRE_STOP, Y=JOB_KILLED, Z=JOB_POST_STOP
+ * Third character: N=normal job, I=instance job
+ * (3) The associated PROCESS_MAIN process id
+ * (4) The associated PROCESS_PRE_START process id
+ * (5) The associated PROCESS_POST_START process id
+ * (6) The associated PROCESS_PRE_STOP process id
+ * (7) The associated PROCESS_POST_STOP process id
+ * Process ids are in hexadecimal using lower-case letters (0-9,a-f),
+ * or 0 if there is a JobProcess structure but no running process, or
+ * "X" if there is no JobProcess structure.
+ *
+ */
+
+void save_current_configuration(char ***args, const void *parent, size_t *len)
+{
+ NIH_HASH_FOREACH(jobs, iter) {
+ Job *job = (Job *) iter;
+ char goal_state[4];
+ JobProcess **pids;
+
+
+ if (job->replacement_for != NULL) continue;
+ if (job->state == JOB_DELETED) continue;
+ if (job->instance && ! job->instance_of) continue;
+
+ if (! nih_str_array_add(args, parent, len, job->name))
+ return;
+
+ if (job->goal == JOB_START) goal_state[0] = '1';
+ else goal_state[0] = '0';
+
+ switch (job->state)
+ {
+ case JOB_WAITING: goal_state[1] = 'W'; break;
+ case JOB_STARTING: goal_state[1] = 'S'; break;
+ case JOB_PRE_START: goal_state[1] = 'A'; break;
+ case JOB_SPAWNED: goal_state[1] = 'B'; break;
+ case JOB_POST_START: goal_state[1] = 'C'; break;
+ case JOB_RUNNING: goal_state[1] = 'R'; break;
+ case JOB_STOPPING: goal_state[1] = 'T'; break;
+ case JOB_PRE_STOP: goal_state[1] = 'X'; break;
+ case JOB_KILLED: goal_state[1] = 'Y'; break;
+ case JOB_POST_STOP: goal_state[1] = 'Z'; break;
+ default: goal_state[1] = '?';
+ }
+ if (job->instance_of) goal_state[2] = 'I';
+ else goal_state[2] = 'N';
+ goal_state[3] = 0;
+
+ if (! nih_str_array_add(args, parent, len, goal_state))
+ return;
+
+ pids = job->process;
+ store_pid(pids[PROCESS_MAIN], args, parent, len);
+ store_pid(pids[PROCESS_PRE_START], args, parent, len);
+ store_pid(pids[PROCESS_POST_START], args, parent, len);
+ store_pid(pids[PROCESS_PRE_STOP], args, parent, len);
+ store_pid(pids[PROCESS_POST_STOP], args, parent, len);
+ }
+}
+
+/**
+ * restore_job_state:
+ * @jobname: name of job whose state we are to restore
+ * @goal_state: the goal/state string generated by save_current_configuration
+ * @pids: array of five process ids
+ * @presents: array of five integers indicating which process ids are applicable
+ */
+
+void restore_job_state (char *jobname, char *goal_state,
+ pid_t *pids, int *presents)
+{
+ Job *job;
+ JobGoal goal = JOB_STOP;
+ JobState state = JOB_WAITING;
+ int is_instance = 0;
+ int is_invalid = 0;
+ JobProcess **procs;
+
+ if (jobname == NULL) {
+ nih_error("Missing name for restored job");
+ return;
+ }
+
+ if (goal_state == NULL) {
+ nih_error("Missing goal/state for restored job %s", jobname);
+ return;
+ }
+
+ if (strlen(goal_state) != 3) {
+ nih_error("Invalid length goal/state %s for restored job %s",
+ goal_state, jobname);
+ return;
+ }
+
+ switch (goal_state[0])
+ {
+ case '0': goal = JOB_STOP; break;
+ case '1': goal = JOB_START; break;
+ default: is_invalid = 1; break;
+ }
+
+ switch (goal_state[1])
+ {
+ case 'W': state = JOB_WAITING; break;
+ case 'S': state = JOB_STARTING; break;
+ case 'A': state = JOB_PRE_START; break;
+ case 'B': state = JOB_SPAWNED; break;
+ case 'C': state = JOB_POST_START; break;
+ case 'R': state = JOB_RUNNING; break;
+ case 'T': state = JOB_STOPPING; break;
+ case 'X': state = JOB_PRE_STOP; break;
+ case 'Y': state = JOB_KILLED; break;
+ case 'Z': state = JOB_POST_STOP; break;
+ default: is_invalid = 1;
+ }
+
+ switch (goal_state[2])
+ {
+ case 'N': break;
+ case 'I': is_instance = 1; break;
+ default: is_invalid = 1;
+ }
+
+ if (is_invalid) {
+ nih_error("Invalid goal/state %s for restored job %s",
+ goal_state, jobname);
+ return;
+ }
+ job = job_find_by_name(jobname);
+ if (! job) {
+ nih_error("Unknown job %s passed to re-exec", jobname);
+ return;
+ }
+ if (is_instance) {
+ if (! job->instance) {
+ nih_error("Can not restore job %s as instance job",
+ jobname);
+ return;
+ }
+ job = job_instance(job);
+ } else {
+ if (job->instance) {
+ nih_error("Can not restore job %s as non-instance job",
+ jobname);
+ return;
+ }
+ }
+ job->goal = goal;
+ job->state = state;
+ procs=job->process;
+ restore_pid(procs[PROCESS_MAIN], pids[0], presents[0], jobname);
+ restore_pid(procs[PROCESS_PRE_START], pids[1], presents[1], jobname);
+ restore_pid(procs[PROCESS_POST_START], pids[2], presents[2], jobname);
+ restore_pid(procs[PROCESS_PRE_STOP], pids[3], presents[3], jobname);
+ restore_pid(procs[PROCESS_POST_STOP], pids[4], presents[4], jobname);
+}
+
+/**
+ * restore_current_configuration:
+ * @args: non-option arguments that were passed to the new init
+ */
+
+void restore_configuration(char **args)
+{
+ if (! args) return;
+
+ char **arg = args;
+ while (arg && *arg) {
+ char *jobname = *(arg++);
+ char *goal_state = *arg;
+ pid_t pids[5];
+ int presents[5];
+ int is_invalid = 0;
+
+ if (*arg) ++arg;
+ for (int i = 0; i < 5; i++)
+ retrieve_pid(&arg, jobname, &is_invalid,
+ &pids[i], &presents[i]);
+
+ if (! is_invalid)
+ restore_job_state (jobname, goal_state, pids, presents);
+ }
+}
diff -uNr upstart-0.3.9.orig/init/restore.h upstart-0.3.9/init/restore.h
--- upstart-0.3.9.orig/init/restore.h 1969-12-31 19:00:00.000000000 -0500
+++ upstart-0.3.9/init/restore.h 2009-01-23 13:44:54.000000000 -0500
@@ -0,0 +1,13 @@
+#ifndef INIT_RESTORE_H
+#define INIT_RESTORE_H
+
+#include <nih/string.h>
+
+NIH_BEGIN_EXTERN
+
+void save_current_configuration(char ***args, const void *parent, size_t *len);
+void restore_configuration(char **args);
+
+NIH_END_EXTERN
+
+#endif /* INIT_RESTORE_H */

View file

@ -1,113 +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,9 +113,11 @@
NULL, UPSTART_INIT_DAEMON,
UPSTART_EVENT_EMIT, "runlevel", args, NULL));
break;
- case 'u':
- kill (UPSTART_INIT_DAEMON, SIGTERM);
- exit (0);
+ 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,175 +0,0 @@
Name: upstart
Version: 0.3.11
Release: 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}.tar.bz2
Source1: events.5
Patch0: upstart-force-on-shutdown-reboot.patch
Patch1: upstart-tty-stack.patch
Patch2: upstart-fedora-buglist.patch
Patch3: upstart-telinit-u.patch
Patch4: upstart-initctl-man.patch
Patch5: upstart-save-state-across-reexec.patch
Patch6: upstart-audit-events.patch
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
BuildRequires: gettext audit-libs-devel
%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.
%prep
%setup -q
%patch0 -p1
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
%configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib}
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/%{_mandir}/man5
install -m 644 %{SOURCE1} %{buildroot}/%{_mandir}/man5/events.5
# libupstart and libnih aren't shipped
rm -f %{buildroot}/%{_lib}/libupstart.*
rm -f %{buildroot}/%{_lib}/libnih.*
rm -f %{buildroot}/%{_includedir}/libnih.h
rm -f %{buildroot}/%{_includedir}/libupstart.h
rm -rf %{buildroot}/%{_includedir}/nih
rm -rf %{buildroot}/%{_includedir}/upstart
rm -rf %{buildroot}/%{_datadir}/aclocal/compiler.m4
rm -rf %{buildroot}/%{_datadir}/aclocal/linker.m4
rm -rf %{buildroot}/%{_datadir}/aclocal/misc.m4
%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}/event.d/
%config(noreplace) %{_sysconfdir}/event.d/logd
/sbin/halt
/sbin/init
/sbin/initctl
/sbin/logd
/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/logd.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
* Wed Jul 22 2009 Petr Lautrbach <plautrba@redhat.com> - 0.3.11-1
- Update to 0.3.11
* Mon Apr 27 2009 Bill Nottingham <notting@redhat.com> - 0.3.9-24
- Apply the audit patch correctly (#470661)
* Fri Apr 3 2009 Casey Dahlin <cdahlin@redhat.com> - 0.3.9-23
- Add audit events patch from Steve Grubb <sgrubb@redhat.com> (Bug #470661)
* Fri Jan 23 2009 Casey Dahlin <cdahlin@redhat.com> - 0.3.9-22
- Re-add 'telinit u' support along with patch to fix it (#450488). Patch due to
<pspencer@fields.utoronto.ca>
* Mon Jan 12 2009 Bill Nottingham <notting@redhat.com> - 0.3.9-21
- Remove 'telinit u' support as it is broken (#450488, <cjdahlin@ncsu.edu>)
* 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