From 09471cbe8d9ecaca981bc4eda83d8002b635f87b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 24 Apr 2008 18:15:10 +0000 Subject: [PATCH 01/80] - fix some man page typos (#444008, ) --- events.5 | 2 +- upstart-initctl-man.patch | 20 ++++++++++++++++++++ upstart.spec | 7 ++++++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 upstart-initctl-man.patch diff --git a/events.5 b/events.5 index 2c32786..c804085 100644 --- a/events.5 +++ b/events.5 @@ -109,7 +109,7 @@ fork in the background and that its PID needs to be obtained. .TP .BI respawn -This sets the daemon, service, and respawn falgs for the job. +This sets the daemon, service, and respawn flags for the job. The respawn flag means that the process will be restarted when it ends. diff --git a/upstart-initctl-man.patch b/upstart-initctl-man.patch new file mode 100644 index 0000000..c2f446b --- /dev/null +++ b/upstart-initctl-man.patch @@ -0,0 +1,20 @@ +--- 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. + .\" diff --git a/upstart.spec b/upstart.spec index bcd2307..85123e6 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.9 -Release: 17%{?dist} +Release: 18%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -14,6 +14,7 @@ Patch2: upstart-tty-stack.patch Patch3: upstart-rpm.patch Patch4: upstart-fedora-buglist.patch Patch5: upstart-telinit-u.patch +Patch6: upstart-initctl-man.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gettext @@ -31,6 +32,7 @@ during shutdown and supervising them while the system is running. %patch3 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -96,6 +98,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Thu Apr 24 2008 Bill Nottingham - 0.3.9-18 +- fix some man page typos (#444008, ) + * Wed Apr 09 2008 Casey Dahlin - 0.3.9-17 - Added list of stock events to events(5) From 8141e4de0925af33aaa954647bcf2fbae64e26d0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 24 Apr 2008 20:35:12 +0000 Subject: [PATCH 02/80] more typos --- events.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events.5 b/events.5 index c804085..d6e30b9 100644 --- a/events.5 +++ b/events.5 @@ -146,7 +146,7 @@ Sets the time to wait between sending TERM and KILL signals to .TP .BI "normal exit " -When used with \fBespawn\fR any exit codes denoted in \fIstatus\fR will +When used with \fBrespawn\fR any exit codes denoted in \fIstatus\fR will prevent a respawn of the process. .TP From 9d9c4c10cce9317d82c57866b1dfdbef7b3a60c1 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 25 Apr 2008 21:22:26 +0000 Subject: [PATCH 03/80] move the obsoletes/provides for sysvinit here --- upstart.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/upstart.spec b/upstart.spec index 85123e6..94330f2 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.9 -Release: 18%{?dist} +Release: 19%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -16,7 +16,8 @@ Patch4: upstart-fedora-buglist.patch Patch5: upstart-telinit-u.patch Patch6: upstart-initctl-man.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 %description @@ -98,6 +99,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Fri Apr 25 2008 Bill Nottingham - 0.3.9-19 +- with the merge of event-compat-sysv, move the sysvinit obsoletes/provides here + * Thu Apr 24 2008 Bill Nottingham - 0.3.9-18 - fix some man page typos (#444008, ) From 7a90fcb8265e35a102968e40e382a12971ea23f4 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Tue, 22 Jul 2008 21:31:33 +0000 Subject: [PATCH 04/80] Upstream to 0.5.0 --- .cvsignore | 2 +- sources | 2 +- upstart.spec | 60 +++++++++++++++++++++++++--------------------------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/.cvsignore b/.cvsignore index 414db0d..95c68d1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.3.9.tar.bz2 +upstart-0.5.0.tar.bz2 diff --git a/sources b/sources index 51af2c3..cfa9fd0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -794208083d405ece123ad59a02f3e233 upstart-0.3.9.tar.bz2 +a1a362de2720926ad5ca215cb24f6203 upstart-0.5.0.tar.bz2 diff --git a/upstart.spec b/upstart.spec index 94330f2..c0a8c30 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart -Version: 0.3.9 -Release: 19%{?dist} +Version: 0.5.0 +Release: 0.0.7%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -8,16 +8,10 @@ License: GPLv2+ URL: http://upstart.ubuntu.com Source0: http://upstart.ubuntu.com/download/0.3/upstart-%{version}.tar.bz2 Source1: events.5 -Patch0: upstart-gcc43.patch -Patch1: upstart-force-on-shutdown-reboot.patch -Patch2: upstart-tty-stack.patch -Patch3: upstart-rpm.patch -Patch4: upstart-fedora-buglist.patch -Patch5: upstart-telinit-u.patch -Patch6: upstart-initctl-man.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 +Requires: dbus >= 1.2.1-4 BuildRequires: gettext %description @@ -27,13 +21,6 @@ during shutdown and supervising them while the system is running. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -%patch3 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -43,20 +30,11 @@ make %{?_smp_mflags} 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 -# 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 @@ -70,12 +48,11 @@ rm -rf %{buildroot} %doc README %doc TODO %doc HACKING -%{_sysconfdir}/event.d/ -%config(noreplace) %{_sysconfdir}/event.d/logd +%{_sysconfdir}/init/ +%{_sysconfdir}/dbus-1/system.d/Upstart.conf /sbin/halt /sbin/init /sbin/initctl -/sbin/logd /sbin/poweroff /sbin/reboot /sbin/runlevel @@ -88,7 +65,6 @@ rm -rf %{buildroot} %{_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 @@ -99,6 +75,28 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Tue Jul 22 2008 Casey Dahlin - 0.3.9-19 - with the merge of event-compat-sysv, move the sysvinit obsoletes/provides here From 2932274c33c6255c1ca749eb147eff28280ad011 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Wed, 23 Jul 2008 17:34:30 +0000 Subject: [PATCH 05/80] Better revision naming for builds from source control --- .cvsignore | 2 +- sources | 2 +- upstart.spec | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 95c68d1..b2c19d2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.5.0.tar.bz2 +upstart-0.5.0-20080723bzr_dbus_userspace_1045.tar.bz2 diff --git a/sources b/sources index cfa9fd0..7c898b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a1a362de2720926ad5ca215cb24f6203 upstart-0.5.0.tar.bz2 +7d3813c9632905d667750e78f51ca0dd upstart-0.5.0-20080723bzr_dbus_userspace_1045.tar.bz2 diff --git a/upstart.spec b/upstart.spec index c0a8c30..a1462b7 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,12 +1,20 @@ +%define build_str 20080723bzr_dbus_userspace_1045 +%if build_str +%define build_rel %{build_str}_ +%define build_pkg -%{build_str} +%else +%define build_rel %{nil} +%define build_pkg %{nil} +%endif + Name: upstart Version: 0.5.0 -Release: 0.0.7%{?dist} +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}.tar.bz2 +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 @@ -20,7 +28,7 @@ handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running. %prep -%setup -q +%setup -q -n upstart-%{version}%{build_pkg} %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -75,6 +83,10 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Wed Jul 23 2008 Casey Dahlin Date: Wed, 23 Jul 2008 17:44:09 +0000 Subject: [PATCH 06/80] when using bzr tarballs, prefix release with 0. so a 'final' version overrides without epochs or other ugliness --- upstart.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index a1462b7..597010d 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ %define build_str 20080723bzr_dbus_userspace_1045 %if build_str -%define build_rel %{build_str}_ +%define build_rel 0.%{build_str}_ %define build_pkg -%{build_str} %else %define build_rel %{nil} From 6b3d23eadd8609bd95d6adae68ef5395a71ed28c Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Wed, 30 Jul 2008 14:33:01 +0000 Subject: [PATCH 07/80] New upstream --- .cvsignore | 2 +- sources | 2 +- upstart.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index b2c19d2..541d092 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.5.0-20080723bzr_dbus_userspace_1045.tar.bz2 +upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 diff --git a/sources b/sources index 7c898b0..5a8837e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7d3813c9632905d667750e78f51ca0dd upstart-0.5.0-20080723bzr_dbus_userspace_1045.tar.bz2 +f0ce987b5bf30c509edc849a5daf435f upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 diff --git a/upstart.spec b/upstart.spec index 597010d..5219984 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,4 +1,4 @@ -%define build_str 20080723bzr_dbus_userspace_1045 +%define build_str 20080730bzr_dbus_userspace_1046 %if build_str %define build_rel 0.%{build_str}_ %define build_pkg -%{build_str} @@ -15,7 +15,7 @@ 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 +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 @@ -83,6 +83,10 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Wed Jul 30 2008 Casey Dahlin Date: Thu, 31 Jul 2008 21:46:07 +0000 Subject: [PATCH 08/80] New upstream heads --- sources | 2 +- upstart.spec | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 5a8837e..ac35b21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f0ce987b5bf30c509edc849a5daf435f upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 +ee5069ca14d660255af8e76f73b3e345 upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 diff --git a/upstart.spec b/upstart.spec index 5219984..a8958eb 100644 --- a/upstart.spec +++ b/upstart.spec @@ -9,7 +9,7 @@ Name: upstart Version: 0.5.0 -Release: %{build_rel}1%{?dist} +Release: %{build_rel}2%{?dist} Summary: An event-driven init system Group: System Environment/Base License: GPLv2+ @@ -27,6 +27,9 @@ 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} @@ -83,9 +86,11 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog -* Wed Jul 30 2008 Casey Dahlin Date: Tue, 12 Aug 2008 18:57:16 +0000 Subject: [PATCH 09/80] Upstream to 0.5.0 --- .cvsignore | 2 +- sources | 2 +- upstart.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 541d092..95c68d1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 +upstart-0.5.0.tar.bz2 diff --git a/sources b/sources index ac35b21..bda3422 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee5069ca14d660255af8e76f73b3e345 upstart-0.5.0-20080730bzr_dbus_userspace_1046.tar.bz2 +c040227c746d22f87c0cd20cd1ca865b upstart-0.5.0.tar.bz2 diff --git a/upstart.spec b/upstart.spec index a8958eb..8d23426 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,5 +1,6 @@ -%define build_str 20080730bzr_dbus_userspace_1046 -%if build_str +#%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 @@ -9,7 +10,7 @@ Name: upstart Version: 0.5.0 -Release: %{build_rel}2%{?dist} +Release: %{build_rel}1%{?dist} Summary: An event-driven init system Group: System Environment/Base License: GPLv2+ @@ -86,6 +87,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Tue Aug 12 2008 Casey Dahlin Date: Wed, 25 Feb 2009 23:19:08 +0000 Subject: [PATCH 10/80] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- upstart.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index 8d23426..add0d6d 100644 --- a/upstart.spec +++ b/upstart.spec @@ -10,7 +10,7 @@ Name: upstart Version: 0.5.0 -Release: %{build_rel}1%{?dist} +Release: %{build_rel}1%{?dist}.1 Summary: An event-driven init system Group: System Environment/Base License: GPLv2+ @@ -87,6 +87,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0.5.0-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Tue Aug 12 2008 Casey Dahlin Date: Sat, 7 Mar 2009 23:32:31 +0000 Subject: [PATCH 11/80] Kill off 0.5.0 and revert back to 0.3.9 --- .cvsignore | 2 +- sources | 2 +- upstart-save-state-across-reexec.patch | 442 +++++++++++++++++++++++++ upstart.spec | 101 +++--- 4 files changed, 486 insertions(+), 61 deletions(-) create mode 100644 upstart-save-state-across-reexec.patch diff --git a/.cvsignore b/.cvsignore index 95c68d1..414db0d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.5.0.tar.bz2 +upstart-0.3.9.tar.bz2 diff --git a/sources b/sources index bda3422..51af2c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c040227c746d22f87c0cd20cd1ca865b upstart-0.5.0.tar.bz2 +794208083d405ece123ad59a02f3e233 upstart-0.3.9.tar.bz2 diff --git a/upstart-save-state-across-reexec.patch b/upstart-save-state-across-reexec.patch new file mode 100644 index 0000000..af0edcd --- /dev/null +++ b/upstart-save-state-across-reexec.patch @@ -0,0 +1,442 @@ +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.am upstart-0.3.9/init/Makefile.am +--- upstart-0.3.9.orig/init/Makefile.am 2009-01-23 13:44:32.000000000 -0500 ++++ upstart-0.3.9/init/Makefile.am 2009-01-23 13:44:54.000000000 -0500 +@@ -23,7 +23,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/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 ++#endif /* HAVE_CONFIG_H */ ++ ++ ++#include ++#include ++#include ++#include ++#include ++#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_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 */ diff --git a/upstart.spec b/upstart.spec index add0d6d..ae0a484 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,26 +1,24 @@ -#%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}.1 +Version: 0.3.9 +Release: 22%{?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 +Source0: http://upstart.ubuntu.com/download/0.3/upstart-%{version}.tar.bz2 +Source1: events.5 +Patch0: upstart-gcc43.patch +Patch1: upstart-force-on-shutdown-reboot.patch +Patch2: upstart-tty-stack.patch +Patch3: upstart-rpm.patch +Patch4: upstart-fedora-buglist.patch +Patch5: upstart-telinit-u.patch +Patch6: upstart-initctl-man.patch +Patch7: upstart-save-state-across-reexec.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 -Requires: dbus >= 1.2.1-4 BuildRequires: gettext %description @@ -28,11 +26,16 @@ 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} +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 +%patch3 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -42,11 +45,20 @@ make %{?_smp_mflags} 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 +# 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 @@ -60,11 +72,12 @@ rm -rf %{buildroot} %doc README %doc TODO %doc HACKING -%{_sysconfdir}/init/ -%{_sysconfdir}/dbus-1/system.d/Upstart.conf +%{_sysconfdir}/event.d/ +%config(noreplace) %{_sysconfdir}/event.d/logd /sbin/halt /sbin/init /sbin/initctl +/sbin/logd /sbin/poweroff /sbin/reboot /sbin/runlevel @@ -77,6 +90,7 @@ rm -rf %{buildroot} %{_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 @@ -87,43 +101,12 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog -* Wed Feb 25 2009 Fedora Release Engineering - 0.5.0-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild +* Fri Jan 23 2009 Casey Dahlin - 0.3.9-22 +- Re-add 'telinit u' support along with patch to fix it (#450488). Patch due to + -* Tue Aug 12 2008 Casey Dahlin - 0.3.9-21 +- Remove 'telinit u' support as it is broken (#450488, ) * Fri Apr 25 2008 Bill Nottingham - 0.3.9-19 - with the merge of event-compat-sysv, move the sysvinit obsoletes/provides here From e292bb30222dbe38df8aca7e9547218e4185e00d Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Fri, 3 Apr 2009 23:32:49 +0000 Subject: [PATCH 12/80] Add Steve Grubb's audit events patch --- upstart-audit-events.patch | 245 +++++++++++++++++++++++++++++++++++++ upstart.spec | 5 +- 2 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 upstart-audit-events.patch diff --git a/upstart-audit-events.patch b/upstart-audit-events.patch new file mode 100644 index 0000000..09ceeae --- /dev/null +++ b/upstart-audit-events.patch @@ -0,0 +1,245 @@ +diff -urp upstart-0.3.9.orig/compat/sysv/Makefile.am upstart-0.3.9/compat/sysv/Makefile.am +--- upstart-0.3.9.orig/compat/sysv/Makefile.am 2008-11-03 12:29:30.000000000 -0500 ++++ upstart-0.3.9/compat/sysv/Makefile.am 2008-11-05 08:16:22.000000000 -0500 +@@ -28,15 +28,17 @@ endif + + 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) \ ++ @LIBAUDIT@ + + runlevel_SOURCES = runlevel.c + runlevel_LDFLAGS = -static +-runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL) ++runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL) @LIBAUDIT@ + + 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) \ ++ @LIBAUDIT@ + + telinit_SOURCES = telinit.c + telinit_LDFLAGS = -static +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 + #include + #include ++#ifdef HAVE_LIBAUDIT ++#include ++#endif + + #include + #include +@@ -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) ++{ ++#ifdef 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 + #include + #include ++#ifdef HAVE_LIBAUDIT ++#include ++#endif + + #include + #include +@@ -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) ++{ ++#ifdef 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 + #include + #include ++#ifdef HAVE_LIBAUDIT ++#include ++#endif + + #include + #include +@@ -452,6 +455,23 @@ runlevel_setter (NihOption *option, + return 0; + } + ++/** ++ * send_audit_event ++ * ++ * Send system shutdown audit event ++ **/ ++static void ++send_audit_event (void) ++{ ++#ifdef 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 -urp upstart-0.3.9.orig/config.h.in upstart-0.3.9/config.h.in +--- upstart-0.3.9.orig/config.h.in 2008-11-03 12:29:30.000000000 -0500 ++++ upstart-0.3.9/config.h.in 2008-11-05 08:16:22.000000000 -0500 +@@ -250,6 +250,9 @@ + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ + #undef NO_MINUS_C_MINUS_O + ++/* Define to 1 if you want audit support */ ++#undef HAVE_LIBAUDIT ++ + /* Name of package */ + #undef PACKAGE + +diff -urp upstart-0.3.9.orig/configure.ac upstart-0.3.9/configure.ac +--- upstart-0.3.9.orig/configure.ac 2008-11-03 12:29:30.000000000 -0500 ++++ upstart-0.3.9/configure.ac 2008-11-05 08:16:22.000000000 -0500 +@@ -38,6 +38,25 @@ AC_ARG_ENABLE(compat, + esac], [compat_sysv=none])dnl + AM_CONDITIONAL(COMPAT_SYSV, test "x$compat" = "xsysv")dnl + ++AC_ARG_WITH(libaudit, ++ [ --with-libaudit=[auto/yes/no] Add Linux audit support [default=auto]],, ++ with_libaudit=auto) ++ ++# Check for Linux auditing API ++# ++# libaudit detection ++if test x$with_libaudit = xno ; then ++ have_libaudit=no; ++else ++ # See if we have audit daemon library ++ AC_CHECK_LIB(audit, audit_log_user_message, ++ LIBAUDIT=-laudit, LIBAUDIT="") ++fi ++AC_SUBST(LIBAUDIT) ++AM_CONDITIONAL(HAVE_LIBAUDIT, test x$LIBAUDIT != x) ++if test x$LIBAUDIT != x ; then ++ AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support]) ++fi + + AC_CONFIG_FILES([ Makefile m4/Makefile po/Makefile.in intl/Makefile + nih/Makefile upstart/Makefile init/Makefile util/Makefile diff --git a/upstart.spec b/upstart.spec index ae0a484..7058095 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.9 -Release: 22%{?dist} +Release: 23%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -101,6 +101,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Fri Apr 3 2009 Casey Dahlin - 0.3.9-23 +- Add audit events patch from Steve Grubb (Bug #470661) + * Fri Jan 23 2009 Casey Dahlin - 0.3.9-22 - Re-add 'telinit u' support along with patch to fix it (#450488). Patch due to From 086b489ef74bedbf4fd1cc96fc963edd0ded2467 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 27 Apr 2009 20:07:46 +0000 Subject: [PATCH 13/80] sync with F-11 --- upstart-audit-events.patch | 98 +++++++------------------- upstart-fedora-buglist.patch | 12 ---- upstart-save-state-across-reexec.patch | 13 ---- upstart-tty-stack.patch | 12 ---- upstart.spec | 9 ++- 5 files changed, 33 insertions(+), 111 deletions(-) diff --git a/upstart-audit-events.patch b/upstart-audit-events.patch index 09ceeae..2329f8d 100644 --- a/upstart-audit-events.patch +++ b/upstart-audit-events.patch @@ -1,27 +1,3 @@ -diff -urp upstart-0.3.9.orig/compat/sysv/Makefile.am upstart-0.3.9/compat/sysv/Makefile.am ---- upstart-0.3.9.orig/compat/sysv/Makefile.am 2008-11-03 12:29:30.000000000 -0500 -+++ upstart-0.3.9/compat/sysv/Makefile.am 2008-11-05 08:16:22.000000000 -0500 -@@ -28,15 +28,17 @@ endif - - 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) \ -+ @LIBAUDIT@ - - runlevel_SOURCES = runlevel.c - runlevel_LDFLAGS = -static --runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL) -+runlevel_LDADD = ../../nih/libnih.la $(LTLIBINTL) @LIBAUDIT@ - - 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) \ -+ @LIBAUDIT@ - - telinit_SOURCES = telinit.c - telinit_LDFLAGS = -static 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 @@ -29,7 +5,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/reboot.c upstart-0.3.9/compat/sysv/rebo #include #include #include -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ +#include +#endif @@ -63,7 +39,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/reboot.c upstart-0.3.9/compat/sysv/rebo +static void +send_audit_event (void) +{ -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ + int fd = audit_open (); + if (fd < 0) + return; @@ -82,7 +58,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/runlevel.c upstart-0.3.9/compat/sysv/ru #include #include #include -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ +#include +#endif @@ -128,7 +104,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/runlevel.c upstart-0.3.9/compat/sysv/ru +static void +send_audit_event (int old, int level) +{ -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ + int fd = audit_open (); + + if (fd < 0) @@ -155,7 +131,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/shutdown.c upstart-0.3.9/compat/sysv/sh #include #include #include -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ +#include +#endif @@ -173,7 +149,7 @@ diff -urp upstart-0.3.9.orig/compat/sysv/shutdown.c upstart-0.3.9/compat/sysv/sh +static void +send_audit_event (void) +{ -+#ifdef HAVE_LIBAUDIT ++#if 1 /* HAVE_LIBAUDIT */ + int fd = audit_open (); + if (fd < 0) + return; @@ -201,45 +177,23 @@ diff -urp upstart-0.3.9.orig/compat/sysv/shutdown.c upstart-0.3.9/compat/sysv/sh unlink (ETC_NOLOGIN); nih_main_unlink_pidfile (); -diff -urp upstart-0.3.9.orig/config.h.in upstart-0.3.9/config.h.in ---- upstart-0.3.9.orig/config.h.in 2008-11-03 12:29:30.000000000 -0500 -+++ upstart-0.3.9/config.h.in 2008-11-05 08:16:22.000000000 -0500 -@@ -250,6 +250,9 @@ - /* Define to 1 if your C compiler doesn't accept -c and -o together. */ - #undef NO_MINUS_C_MINUS_O - -+/* Define to 1 if you want audit support */ -+#undef HAVE_LIBAUDIT -+ - /* Name of package */ - #undef PACKAGE - -diff -urp upstart-0.3.9.orig/configure.ac upstart-0.3.9/configure.ac ---- upstart-0.3.9.orig/configure.ac 2008-11-03 12:29:30.000000000 -0500 -+++ upstart-0.3.9/configure.ac 2008-11-05 08:16:22.000000000 -0500 -@@ -38,6 +38,25 @@ AC_ARG_ENABLE(compat, - esac], [compat_sysv=none])dnl - AM_CONDITIONAL(COMPAT_SYSV, test "x$compat" = "xsysv")dnl - -+AC_ARG_WITH(libaudit, -+ [ --with-libaudit=[auto/yes/no] Add Linux audit support [default=auto]],, -+ with_libaudit=auto) -+ -+# Check for Linux auditing API -+# -+# libaudit detection -+if test x$with_libaudit = xno ; then -+ have_libaudit=no; -+else -+ # See if we have audit daemon library -+ AC_CHECK_LIB(audit, audit_log_user_message, -+ LIBAUDIT=-laudit, LIBAUDIT="") -+fi -+AC_SUBST(LIBAUDIT) -+AM_CONDITIONAL(HAVE_LIBAUDIT, test x$LIBAUDIT != x) -+if test x$LIBAUDIT != x ; then -+ AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support]) -+fi - - AC_CONFIG_FILES([ Makefile m4/Makefile po/Makefile.in intl/Makefile - nih/Makefile upstart/Makefile init/Makefile util/Makefile +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) diff --git a/upstart-fedora-buglist.patch b/upstart-fedora-buglist.patch index 63aff3a..5a58bdd 100644 --- a/upstart-fedora-buglist.patch +++ b/upstart-fedora-buglist.patch @@ -19,15 +19,3 @@ diff -urN upstart-0.3.9/configure upstart-0.3.9-adj/configure _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]) diff --git a/upstart-save-state-across-reexec.patch b/upstart-save-state-across-reexec.patch index af0edcd..68001d1 100644 --- a/upstart-save-state-across-reexec.patch +++ b/upstart-save-state-across-reexec.patch @@ -51,19 +51,6 @@ diff -uNr upstart-0.3.9.orig/init/main.c upstart-0.3.9/init/main.c nih_error_raise_system (); err = nih_error_get (); -diff -uNr upstart-0.3.9.orig/init/Makefile.am upstart-0.3.9/init/Makefile.am ---- upstart-0.3.9.orig/init/Makefile.am 2009-01-23 13:44:32.000000000 -0500 -+++ upstart-0.3.9/init/Makefile.am 2009-01-23 13:44:54.000000000 -0500 -@@ -23,7 +23,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/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 diff --git a/upstart-tty-stack.patch b/upstart-tty-stack.patch index 6658c32..59ee2b5 100644 --- a/upstart-tty-stack.patch +++ b/upstart-tty-stack.patch @@ -1,15 +1,3 @@ -=== modified file 'init/Makefile.am' ---- init/Makefile.am 2007-10-11 21:00:43 +0000 -+++ init/Makefile.am 2008-02-29 21:38:58 +0000 -@@ -16,6 +16,7 @@ - - init_SOURCES = \ - main.c \ -+ tty.c tty.h\ - errors.h paths.h \ - process.c process.h \ - job.c job.h \ - === modified file 'init/Makefile.in' --- init/Makefile.in 2008-03-02 23:21:30 +0000 +++ init/Makefile.in 2008-02-29 21:39:16 +0000 diff --git a/upstart.spec b/upstart.spec index 7058095..a20e8e9 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.9 -Release: 23%{?dist} +Release: 24%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -16,10 +16,11 @@ Patch4: upstart-fedora-buglist.patch Patch5: upstart-telinit-u.patch Patch6: upstart-initctl-man.patch Patch7: upstart-save-state-across-reexec.patch +Patch8: 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 +BuildRequires: gettext audit-libs-devel %description Upstart is an event-based replacement for the /sbin/init daemon which @@ -36,6 +37,7 @@ during shutdown and supervising them while the system is running. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -101,6 +103,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Mon Apr 27 2009 Bill Nottingham - 0.3.9-24 +- Apply the audit patch correctly (#470661) + * Fri Apr 3 2009 Casey Dahlin - 0.3.9-23 - Add audit events patch from Steve Grubb (Bug #470661) From 864de8d07ab51d19aa8c8b41e42884802517242d Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 23 Jun 2009 15:45:05 +0000 Subject: [PATCH 14/80] Update to upstream 0.3.11 version --- .cvsignore | 2 +- sources | 2 +- upstart-fedora-buglist.patch | 15 +- upstart-initctl-man.patch | 9 - upstart-telinit-u.patch | 5 +- upstart-tty-stack.patch | 940 +++++------------------------------ upstart.spec | 31 +- 7 files changed, 152 insertions(+), 852 deletions(-) diff --git a/.cvsignore b/.cvsignore index 414db0d..a69330a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.3.9.tar.bz2 +upstart-0.3.11.tar.bz2 diff --git a/sources b/sources index 51af2c3..736f5d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -794208083d405ece123ad59a02f3e233 upstart-0.3.9.tar.bz2 +a9e475e1458c876add0441d9d4cfe9c0 upstart-0.3.11.tar.bz2 diff --git a/upstart-fedora-buglist.patch b/upstart-fedora-buglist.patch index 5a58bdd..a89c43b 100644 --- a/upstart-fedora-buglist.patch +++ b/upstart-fedora-buglist.patch @@ -1,16 +1,15 @@ -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 @@ +--- 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.9' - PACKAGE_STRING='upstart 0.3.9' + 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" - gt_needs= -@@ -1574,7 +1574,7 @@ + # 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. diff --git a/upstart-initctl-man.patch b/upstart-initctl-man.patch index c2f446b..097bbdc 100644 --- a/upstart-initctl-man.patch +++ b/upstart-initctl-man.patch @@ -1,14 +1,5 @@ --- 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 . diff --git a/upstart-telinit-u.patch b/upstart-telinit-u.patch index 85dcfb3..4e39757 100644 --- a/upstart-telinit-u.patch +++ b/upstart-telinit-u.patch @@ -1,10 +1,13 @@ 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 @@ +@@ -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, diff --git a/upstart-tty-stack.patch b/upstart-tty-stack.patch index 59ee2b5..271aff2 100644 --- a/upstart-tty-stack.patch +++ b/upstart-tty-stack.patch @@ -1,39 +1,6 @@ -=== modified file 'init/Makefile.in' ---- init/Makefile.in 2008-03-02 23:21:30 +0000 -+++ init/Makefile.in 2008-02-29 21:39:16 +0000 -@@ -70,9 +70,9 @@ - am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" - sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) - PROGRAMS = $(sbin_PROGRAMS) --am_init_OBJECTS = main.$(OBJEXT) process.$(OBJEXT) job.$(OBJEXT) \ -- event.$(OBJEXT) control.$(OBJEXT) notify.$(OBJEXT) \ -- cfgfile.$(OBJEXT) -+am_init_OBJECTS = main.$(OBJEXT) tty.$(OBJEXT) process.$(OBJEXT) \ -+ job.$(OBJEXT) event.$(OBJEXT) control.$(OBJEXT) \ -+ notify.$(OBJEXT) cfgfile.$(OBJEXT) - init_OBJECTS = $(am_init_OBJECTS) - am__DEPENDENCIES_1 = - init_DEPENDENCIES = ../upstart/libupstart.la ../nih/libnih.la \ -@@ -308,6 +308,7 @@ - - init_SOURCES = \ - main.c \ -+ tty.c tty.h\ - errors.h paths.h \ - process.c process.h \ - job.c job.h \ -@@ -468,6 +469,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_job.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_notify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_process.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - -=== modified file 'init/control.c' ---- init/control.c 2007-03-13 17:25:34 +0000 -+++ init/control.c 2008-03-01 08:00:46 +0000 +diff -up init/control.c.old init/control.c +--- init/control.c.old 2009-06-22 11:59:11.000000000 +0200 ++++ init/control.c 2009-06-22 11:59:26.000000000 +0200 @@ -43,6 +43,7 @@ #include @@ -42,7 +9,7 @@ #include "control.h" #include "notify.h" -@@ -57,6 +58,11 @@ +@@ -57,6 +58,11 @@ static int control_log_priority ( static int control_job_find (void *data, pid_t pid, UpstartMessageType type, const char *pattern); @@ -54,7 +21,7 @@ static int control_job_query (void *data, pid_t pid, UpstartMessageType type, const char *name, unsigned int id); -@@ -96,6 +102,10 @@ +@@ -96,6 +102,10 @@ NihIo *control_io = NULL; static UpstartMessage message_handlers[] = { { -1, UPSTART_VERSION_QUERY, (UpstartMessageHandler)control_version_query }, @@ -65,7 +32,7 @@ { -1, UPSTART_LOG_PRIORITY, (UpstartMessageHandler)control_log_priority }, { -1, UPSTART_JOB_FIND, -@@ -308,6 +318,66 @@ +@@ -308,6 +318,66 @@ control_send_instance (pid_t pid, nih_io_send_message (control_io, message); } @@ -132,10 +99,9 @@ /** * control_version_query: - -=== modified file 'init/main.c' ---- init/main.c 2007-03-13 19:13:19 +0000 -+++ init/main.c 2008-03-02 03:14:59 +0000 +diff -up init/main.c.old init/main.c +--- init/main.c.old 2009-06-22 13:42:44.000000000 +0200 ++++ init/main.c 2009-06-22 13:42:55.000000000 +0200 @@ -58,6 +58,7 @@ #include "control.h" #include "cfgfile.h" @@ -144,7 +110,7 @@ /* Prototypes for static functions */ -@@ -190,6 +191,8 @@ +@@ -190,6 +191,8 @@ main (int argc, if (! (restart || rescue)) reset_console (); @@ -153,10 +119,41 @@ /* Set the PATH environment variable */ setenv ("PATH", PATH, TRUE); - -=== modified file 'init/process.c' ---- init/process.c 2007-10-11 21:08:38 +0000 -+++ init/process.c 2008-03-02 21:22:05 +0000 +diff -up init/Makefile.in.old init/Makefile.in +--- init/Makefile.in.old 2009-06-22 11:56:34.000000000 +0200 ++++ init/Makefile.in 2009-06-22 11:56:53.000000000 +0200 +@@ -72,9 +72,9 @@ am__EXEEXT_1 = test_process$(EXEEXT) tes + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" + sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(sbin_PROGRAMS) +-am_init_OBJECTS = main.$(OBJEXT) process.$(OBJEXT) job.$(OBJEXT) \ +- event.$(OBJEXT) control.$(OBJEXT) notify.$(OBJEXT) \ +- cfgfile.$(OBJEXT) ++am_init_OBJECTS = main.$(OBJEXT) tty.$(OBJEXT) process.$(OBJEXT) \ ++ job.$(OBJEXT) event.$(OBJEXT) control.$(OBJEXT) \ ++ notify.$(OBJEXT) cfgfile.$(OBJEXT) + init_OBJECTS = $(am_init_OBJECTS) + am__DEPENDENCIES_1 = + init_DEPENDENCIES = ../upstart/libupstart.la ../nih/libnih.la \ +@@ -314,6 +314,7 @@ dist_man_MANS = \ + + init_SOURCES = \ + main.c \ ++ tty.c tty.h\ + errors.h paths.h \ + process.c process.h \ + job.c job.h \ +@@ -474,6 +475,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_job.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_notify.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_process.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Po@am__quote@ + + .c.o: + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +diff -up init/process.c.old init/process.c +--- init/process.c.old 2009-06-22 13:45:48.000000000 +0200 ++++ init/process.c 2009-06-22 13:45:48.000000000 +0200 @@ -51,6 +51,7 @@ #include "job.h" #include "process.h" @@ -165,7 +162,7 @@ /* Prototypes for static functions */ -@@ -385,10 +386,11 @@ +@@ -385,10 +386,11 @@ process_setup_console (Job *job, break; @@ -179,10 +176,9 @@ case CONSOLE_OWNER: /* As CONSOLE_OUTPUT but with ^C, etc. sent */ - -=== added file 'init/tty.c' ---- init/tty.c 1970-01-01 00:00:00 +0000 -+++ init/tty.c 2008-03-02 21:18:03 +0000 +diff -up init/tty.c.old init/tty.c +--- init/tty.c.old 2009-06-22 13:45:48.000000000 +0200 ++++ init/tty.c 2009-06-22 13:45:48.000000000 +0200 @@ -0,0 +1,97 @@ +/* upstart + * @@ -281,10 +277,9 @@ + return current_tty (); +} + - -=== added file 'init/tty.h' ---- init/tty.h 1970-01-01 00:00:00 +0000 -+++ init/tty.h 2008-03-02 03:09:57 +0000 +diff -up init/tty.h.old init/tty.h +--- init/tty.h.old 2009-06-22 13:45:48.000000000 +0200 ++++ init/tty.h 2009-06-22 13:45:48.000000000 +0200 @@ -0,0 +1,35 @@ +/* upstart + * @@ -321,20 +316,10 @@ +NIH_END_EXTERN + +#endif /* INIT_TTY_H */ - -=== modified file 'po/ca.po' ---- po/ca.po 2007-10-11 21:20:43 +0000 -+++ po/ca.po 2008-02-28 15:56:28 +0000 -@@ -8,7 +8,7 @@ - msgstr "" - "Project-Id-Version: upstart\n" - "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n" --"POT-Creation-Date: 2007-10-11 22:13+0100\n" -+"POT-Creation-Date: 2008-02-28 10:56-0500\n" - "PO-Revision-Date: 2006-09-18 16:07+0000\n" - "Last-Translator: Jordi Mallach \n" - "Language-Team: Catalan \n" -@@ -22,46 +22,46 @@ +diff -up po/ca.po.old po/ca.po +--- po/ca.po.old 2009-06-22 13:45:48.000000000 +0200 ++++ po/ca.po 2009-06-22 13:45:48.000000000 +0200 +@@ -22,46 +22,46 @@ msgstr "" msgid "display list of commands" msgstr "mostra aquesta ajuda i surt" @@ -390,7 +375,7 @@ #, c-format msgid "Commands:\n" msgstr "" -@@ -70,7 +70,7 @@ +@@ -70,7 +70,7 @@ msgstr "" msgid "Unhandled Error" msgstr "Error no gestionat" @@ -399,7 +384,7 @@ msgid "Error while reading from descriptor" msgstr "S'ha produït un error en llegir del descriptor" -@@ -101,60 +101,60 @@ +@@ -101,60 +101,60 @@ msgstr "mostra aquesta ajuda i surt" msgid "output version information and exit" msgstr "mostra la informació sobre la versió i surt" @@ -472,7 +457,7 @@ msgid "Unable to watch directory" msgstr "" -@@ -300,82 +300,92 @@ +@@ -305,82 +305,92 @@ msgstr "" msgid "Deleting %s job" msgstr "S'està tornant a exiecutar %s" @@ -581,16 +566,7 @@ #, c-format msgid "Control request to unsubscribe %d from events" msgstr "" -@@ -405,7 +415,7 @@ - msgid "%s state changed from %s to %s" - msgstr "" - --#: init/job.c:817 util/initctl.c:787 -+#: init/job.c:817 util/initctl.c:828 - #, c-format - msgid "%s respawning too fast, stopped" - msgstr "" -@@ -480,7 +490,7 @@ +@@ -485,7 +495,7 @@ msgid "" "actually run /sbin/telinit." msgstr "" @@ -599,227 +575,19 @@ #: compat/sysv/shutdown.c:322 compat/sysv/telinit.c:91 msgid "Need to be root" msgstr "Es necessita ser root" -@@ -552,175 +562,180 @@ - msgid "Failed to open console: %s" - msgstr "" - --#: util/initctl.c:396 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 -+#: util/initctl.c:403 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 - #, c-format - msgid "Unable to send message: %s" - msgstr "No es pot enviar el missatge: %s" - --#: util/initctl.c:447 -+#: util/initctl.c:454 - #, fuzzy, c-format - msgid "Unable to receive message: %s" - msgstr "No es pot enviar el missatge: %s" - --#: util/initctl.c:464 -+#: util/initctl.c:471 - #, fuzzy, c-format - msgid "Unable to handle message: %s" - msgstr "No es pot enviar el missatge: %s" - --#: util/initctl.c:534 -+#: util/initctl.c:541 - #, c-format - msgid "%s (instance)" - msgstr "" - --#: util/initctl.c:605 -+#: util/initctl.c:612 - #, fuzzy, c-format - msgid "%s, process %d" - msgstr "Procés %s actiu (%d)" - --#: util/initctl.c:607 -+#: util/initctl.c:614 - #, fuzzy, c-format - msgid "%s, (main) process %d" - msgstr "Procés %s actiu (%d)" - --#: util/initctl.c:620 -+#: util/initctl.c:627 - #, fuzzy, c-format - msgid "\t%s process %d" - msgstr "Procés %s actiu (%d)" - --#: util/initctl.c:731 -+#: util/initctl.c:772 - #, c-format - msgid "%s: goal changed" - msgstr "" - --#: util/initctl.c:793 -+#: util/initctl.c:834 - #, fuzzy, c-format - msgid "%s %s process killed by %s signal" - msgstr "El procés %s (%d) ha estat mort pel senyal %d" - --#: util/initctl.c:796 -+#: util/initctl.c:837 - #, fuzzy, c-format - msgid "%s %s process killed by signal %d" - msgstr "El procés %s (%d) ha estat mort pel senyal %d" - --#: util/initctl.c:801 -+#: util/initctl.c:842 - #, fuzzy, c-format - msgid "%s %s process terminated with status %d" - msgstr "El procés %s (%d) ha finalitzat amb l'estat %d" - --#: util/initctl.c:890 -+#: util/initctl.c:931 - #, c-format - msgid "No jobs matching `%s'" - msgstr "" - --#: util/initctl.c:894 -+#: util/initctl.c:935 - msgid "No jobs registered" - msgstr "" - --#: util/initctl.c:1226 -+#: util/initctl.c:1267 - #, c-format - msgid "Unknown job: %s" - msgstr "" - --#: util/initctl.c:1228 -+#: util/initctl.c:1269 - #, c-format - msgid "Unknown job: #%d" - msgstr "" - --#: util/initctl.c:1271 -+#: util/initctl.c:1312 - #, fuzzy, c-format - msgid "Invalid job: %s" - msgstr "%s: l'opció és invàlida: --%s\n" - --#: util/initctl.c:1314 -+#: util/initctl.c:1355 - #, c-format - msgid "Job not changed: %s" - msgstr "" - --#: util/initctl.c:1462 -+#: util/initctl.c:1503 - #, c-format - msgid "%s event failed" - msgstr "" - --#: util/initctl.c:1581 util/initctl.c:1618 util/initctl.c:1671 --#: util/initctl.c:1708 util/initctl.c:1761 -+#: util/initctl.c:1622 util/initctl.c:1659 util/initctl.c:1712 -+#: util/initctl.c:1749 util/initctl.c:1802 - #, fuzzy, c-format - msgid "%s: invalid job id: %s\n" - msgstr "%s: l'opció és invàlida: --%s\n" - --#: util/initctl.c:1603 util/initctl.c:1693 util/initctl.c:1749 -+#: util/initctl.c:1644 util/initctl.c:1734 util/initctl.c:1790 - #, c-format +@@ -657,6 +667,11 @@ msgstr "%s: l'opció és invàlida: --%s msgid "%s: missing job name\n" msgstr "" --#: util/initctl.c:1826 -+#: util/initctl.c:1864 util/initctl.c:1895 ++#: util/initctl.c:1889 +#, fuzzy, c-format +msgid "%s: missing device name\n" +msgstr "%s: manca un argument: %s\n" + -+#: util/initctl.c:1928 + #: util/initctl.c:1826 #, c-format msgid "%s: missing event name\n" - msgstr "" - --#: util/initctl.c:1930 -+#: util/initctl.c:2032 - #, fuzzy, c-format - msgid "%s: missing priority\n" - msgstr "%s: manca un argument: %s\n" - --#: util/initctl.c:1948 -+#: util/initctl.c:2050 - #, fuzzy, c-format - msgid "%s: invalid priority\n" - msgstr "%s: l'opció és invàlida: -%c\n" - --#: util/initctl.c:1967 -+#: util/initctl.c:2069 - msgid "destination process" - msgstr "" - --#: util/initctl.c:1980 util/initctl.c:1996 util/initctl.c:2012 -+#: util/initctl.c:2082 util/initctl.c:2098 util/initctl.c:2114 - msgid "arguments are job ids, instead of names" - msgstr "" - --#: util/initctl.c:1982 util/initctl.c:1998 util/initctl.c:2014 --#: util/initctl.c:2026 util/initctl.c:2054 -+#: util/initctl.c:2084 util/initctl.c:2100 util/initctl.c:2116 -+#: util/initctl.c:2128 util/initctl.c:2156 - msgid "show job ids, as well as names" - msgstr "" - --#: util/initctl.c:1984 -+#: util/initctl.c:2086 - msgid "do not wait for job to start before exiting" - msgstr "" - --#: util/initctl.c:2000 -+#: util/initctl.c:2102 - msgid "do not wait for job to stop before exiting" - msgstr "" - --#: util/initctl.c:2038 -+#: util/initctl.c:2140 - msgid "show job and event ids, as well as names" - msgstr "" - --#: util/initctl.c:2040 -+#: util/initctl.c:2142 - msgid "do not wait for event to finish before exiting" - msgstr "" - --#: util/initctl.c:2042 -+#: util/initctl.c:2144 - msgid "set environment variable in jobs changed by this event" - msgstr "" - --#: util/initctl.c:2066 -+#: util/initctl.c:2168 - msgid "show event ids, as well as names" - msgstr "" - --#: util/initctl.c:2096 -+#: util/initctl.c:2216 - msgid "Job" - msgstr "" - --#: util/initctl.c:2103 -+#: util/initctl.c:2223 - msgid "Event" - msgstr "" - --#: util/initctl.c:2111 util/initctl.c:2118 util/initctl.c:2125 -+#: util/initctl.c:2231 util/initctl.c:2238 util/initctl.c:2245 - msgid "JOB..." - msgstr "" - --#: util/initctl.c:2112 -+#: util/initctl.c:2232 - msgid "Start jobs." - msgstr "" - --#: util/initctl.c:2113 -+#: util/initctl.c:2233 - msgid "" - "JOB is one or more job names that are to be started.\n" - "\n" -@@ -728,11 +743,11 @@ +@@ -733,11 +748,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -833,7 +601,7 @@ msgid "" "JOB is one or more job names that are to be stopped.\n" "\n" -@@ -740,11 +755,11 @@ +@@ -745,11 +760,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -847,7 +615,7 @@ msgid "" "JOB is one or more job names that are to be queried.\n" "\n" -@@ -752,19 +767,19 @@ +@@ -757,19 +772,19 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -871,7 +639,7 @@ msgid "" "EVENT is the name of an event the init daemon should emit, which may have " "zero or more arguments specified by ARG. These may be matched in the job " -@@ -775,27 +790,35 @@ +@@ -780,27 +795,35 @@ msgid "" "taken from the environment or ignored if not present there." msgstr "" @@ -913,20 +681,10 @@ msgid "" "PRIORITY may be one of `debug' (messages useful for debugging upstart are " "logged, equivalent to --debug on kernel command-line); `info' (messages " - -=== modified file 'po/fr.po' ---- po/fr.po 2007-10-11 21:20:43 +0000 -+++ po/fr.po 2008-02-28 15:56:29 +0000 -@@ -8,7 +8,7 @@ - msgstr "" - "Project-Id-Version: upstart\n" - "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n" --"POT-Creation-Date: 2007-10-11 22:13+0100\n" -+"POT-Creation-Date: 2008-02-28 10:56-0500\n" - "PO-Revision-Date: 2006-10-03 23:30+0000\n" - "Last-Translator: Nicolas Velin \n" - "Language-Team: French \n" -@@ -22,46 +22,46 @@ +diff -up po/fr.po.old po/fr.po +--- po/fr.po.old 2009-06-22 13:45:48.000000000 +0200 ++++ po/fr.po 2009-06-22 13:45:48.000000000 +0200 +@@ -22,46 +22,46 @@ msgstr "" msgid "display list of commands" msgstr "afficher cette aide et quitter" @@ -982,7 +740,7 @@ #, c-format msgid "Commands:\n" msgstr "" -@@ -70,7 +70,7 @@ +@@ -70,7 +70,7 @@ msgstr "" msgid "Unhandled Error" msgstr "Erreur non traitée" @@ -991,7 +749,7 @@ #, fuzzy msgid "Error while reading from descriptor" msgstr "Erreur lors de la lecture du descripteur" -@@ -106,60 +106,60 @@ +@@ -106,60 +106,60 @@ msgstr "afficher cette aide et quitter" msgid "output version information and exit" msgstr "affichage de l'information de version et sortie" @@ -1064,7 +822,7 @@ #, fuzzy msgid "Unable to watch directory" msgstr "Impossible d'accepter la connexion : %s" -@@ -310,82 +310,92 @@ +@@ -315,82 +315,92 @@ msgstr "Impossible d'accepter la connexi msgid "Deleting %s job" msgstr "Ré-éxecution de %s" @@ -1173,16 +931,7 @@ #, fuzzy, c-format msgid "Control request to unsubscribe %d from events" msgstr "Demande de contrôle pour désinscrire %d des évènements" -@@ -415,7 +425,7 @@ - msgid "%s state changed from %s to %s" - msgstr "L'état de %s a été changé de %s à %s" - --#: init/job.c:817 util/initctl.c:787 -+#: init/job.c:817 util/initctl.c:828 - #, fuzzy, c-format - msgid "%s respawning too fast, stopped" - msgstr "Résurection de %s trop rapide, arret" -@@ -491,7 +501,7 @@ +@@ -496,7 +506,7 @@ msgid "" "actually run /sbin/telinit." msgstr "" @@ -1191,227 +940,19 @@ #: compat/sysv/shutdown.c:322 compat/sysv/telinit.c:91 #, fuzzy msgid "Need to be root" -@@ -567,175 +577,180 @@ - msgid "Failed to open console: %s" - msgstr "Echec lors de l'ouverture de la console : %s" - --#: util/initctl.c:396 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 -+#: util/initctl.c:403 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 - #, c-format - msgid "Unable to send message: %s" - msgstr "Impossible d'envoyer le message : %s" - --#: util/initctl.c:447 -+#: util/initctl.c:454 - #, fuzzy, c-format - msgid "Unable to receive message: %s" - msgstr "Impossible d'envoyer le message : %s" - --#: util/initctl.c:464 -+#: util/initctl.c:471 - #, fuzzy, c-format - msgid "Unable to handle message: %s" - msgstr "Impossible d'envoyer le message : %s" - --#: util/initctl.c:534 -+#: util/initctl.c:541 - #, c-format - msgid "%s (instance)" - msgstr "" - --#: util/initctl.c:605 -+#: util/initctl.c:612 - #, fuzzy, c-format - msgid "%s, process %d" - msgstr "processus %s (%d) actif" - --#: util/initctl.c:607 -+#: util/initctl.c:614 - #, fuzzy, c-format - msgid "%s, (main) process %d" - msgstr "processus %s (%d) actif" - --#: util/initctl.c:620 -+#: util/initctl.c:627 - #, fuzzy, c-format - msgid "\t%s process %d" - msgstr "processus %s (%d) actif" - --#: util/initctl.c:731 -+#: util/initctl.c:772 - #, fuzzy, c-format - msgid "%s: goal changed" - msgstr "L'état de %s a été changé de %s à %s" - --#: util/initctl.c:793 -+#: util/initctl.c:834 - #, fuzzy, c-format - msgid "%s %s process killed by %s signal" - msgstr "Le processus %s (%d) a été tué par le signal %d" - --#: util/initctl.c:796 -+#: util/initctl.c:837 - #, fuzzy, c-format - msgid "%s %s process killed by signal %d" - msgstr "Le processus %s (%d) a été tué par le signal %d" - --#: util/initctl.c:801 -+#: util/initctl.c:842 - #, fuzzy, c-format - msgid "%s %s process terminated with status %d" - msgstr "le processus %s (%d) s'est terminé en retournant %d" - --#: util/initctl.c:890 -+#: util/initctl.c:931 - #, c-format - msgid "No jobs matching `%s'" - msgstr "" - --#: util/initctl.c:894 -+#: util/initctl.c:935 - msgid "No jobs registered" - msgstr "" - --#: util/initctl.c:1226 -+#: util/initctl.c:1267 - #, fuzzy, c-format - msgid "Unknown job: %s" - msgstr "ignore la strophe inconnue" - --#: util/initctl.c:1228 -+#: util/initctl.c:1269 - #, c-format - msgid "Unknown job: #%d" - msgstr "" - --#: util/initctl.c:1271 -+#: util/initctl.c:1312 - #, fuzzy, c-format - msgid "Invalid job: %s" - msgstr "%s : option invalide : --%s\n" - --#: util/initctl.c:1314 -+#: util/initctl.c:1355 - #, c-format - msgid "Job not changed: %s" - msgstr "" - --#: util/initctl.c:1462 -+#: util/initctl.c:1503 - #, c-format - msgid "%s event failed" - msgstr "" - --#: util/initctl.c:1581 util/initctl.c:1618 util/initctl.c:1671 --#: util/initctl.c:1708 util/initctl.c:1761 -+#: util/initctl.c:1622 util/initctl.c:1659 util/initctl.c:1712 -+#: util/initctl.c:1749 util/initctl.c:1802 - #, fuzzy, c-format - msgid "%s: invalid job id: %s\n" - msgstr "%s : option invalide : --%s\n" - --#: util/initctl.c:1603 util/initctl.c:1693 util/initctl.c:1749 -+#: util/initctl.c:1644 util/initctl.c:1734 util/initctl.c:1790 - #, c-format +@@ -672,6 +682,11 @@ msgstr "%s : option invalide : --%s\n" msgid "%s: missing job name\n" msgstr "" --#: util/initctl.c:1826 -+#: util/initctl.c:1864 util/initctl.c:1895 ++#: util/initctl.c:1889 +#, fuzzy, c-format +msgid "%s: missing device name\n" -+msgstr "%s : argument manquant : %s\n" ++msgstr "%s: argument manquant : %s\n" + -+#: util/initctl.c:1928 + #: util/initctl.c:1826 #, c-format msgid "%s: missing event name\n" - msgstr "" - --#: util/initctl.c:1930 -+#: util/initctl.c:2032 - #, fuzzy, c-format - msgid "%s: missing priority\n" - msgstr "%s : argument manquant : %s\n" - --#: util/initctl.c:1948 -+#: util/initctl.c:2050 - #, fuzzy, c-format - msgid "%s: invalid priority\n" - msgstr "%s: option ivalide: -%c\n" - --#: util/initctl.c:1967 -+#: util/initctl.c:2069 - msgid "destination process" - msgstr "" - --#: util/initctl.c:1980 util/initctl.c:1996 util/initctl.c:2012 -+#: util/initctl.c:2082 util/initctl.c:2098 util/initctl.c:2114 - msgid "arguments are job ids, instead of names" - msgstr "" - --#: util/initctl.c:1982 util/initctl.c:1998 util/initctl.c:2014 --#: util/initctl.c:2026 util/initctl.c:2054 -+#: util/initctl.c:2084 util/initctl.c:2100 util/initctl.c:2116 -+#: util/initctl.c:2128 util/initctl.c:2156 - msgid "show job ids, as well as names" - msgstr "" - --#: util/initctl.c:1984 -+#: util/initctl.c:2086 - msgid "do not wait for job to start before exiting" - msgstr "" - --#: util/initctl.c:2000 -+#: util/initctl.c:2102 - msgid "do not wait for job to stop before exiting" - msgstr "" - --#: util/initctl.c:2038 -+#: util/initctl.c:2140 - msgid "show job and event ids, as well as names" - msgstr "" - --#: util/initctl.c:2040 -+#: util/initctl.c:2142 - msgid "do not wait for event to finish before exiting" - msgstr "" - --#: util/initctl.c:2042 -+#: util/initctl.c:2144 - msgid "set environment variable in jobs changed by this event" - msgstr "" - --#: util/initctl.c:2066 -+#: util/initctl.c:2168 - msgid "show event ids, as well as names" - msgstr "" - --#: util/initctl.c:2096 -+#: util/initctl.c:2216 - msgid "Job" - msgstr "" - --#: util/initctl.c:2103 -+#: util/initctl.c:2223 - msgid "Event" - msgstr "" - --#: util/initctl.c:2111 util/initctl.c:2118 util/initctl.c:2125 -+#: util/initctl.c:2231 util/initctl.c:2238 util/initctl.c:2245 - msgid "JOB..." - msgstr "" - --#: util/initctl.c:2112 -+#: util/initctl.c:2232 - msgid "Start jobs." - msgstr "" - --#: util/initctl.c:2113 -+#: util/initctl.c:2233 - msgid "" - "JOB is one or more job names that are to be started.\n" - "\n" -@@ -743,11 +758,11 @@ +@@ -748,11 +763,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -1425,7 +966,7 @@ msgid "" "JOB is one or more job names that are to be stopped.\n" "\n" -@@ -755,11 +770,11 @@ +@@ -760,11 +775,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -1439,7 +980,7 @@ msgid "" "JOB is one or more job names that are to be queried.\n" "\n" -@@ -767,19 +782,19 @@ +@@ -772,19 +787,19 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -1463,7 +1004,7 @@ msgid "" "EVENT is the name of an event the init daemon should emit, which may have " "zero or more arguments specified by ARG. These may be matched in the job " -@@ -790,27 +805,35 @@ +@@ -795,27 +810,35 @@ msgid "" "taken from the environment or ignored if not present there." msgstr "" @@ -1505,20 +1046,10 @@ msgid "" "PRIORITY may be one of `debug' (messages useful for debugging upstart are " "logged, equivalent to --debug on kernel command-line); `info' (messages " - -=== modified file 'po/sv.po' ---- po/sv.po 2007-10-11 21:20:43 +0000 -+++ po/sv.po 2008-02-28 15:56:29 +0000 -@@ -8,7 +8,7 @@ - msgstr "" - "Project-Id-Version: upstart\n" - "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n" --"POT-Creation-Date: 2007-10-11 22:13+0100\n" -+"POT-Creation-Date: 2008-02-28 10:56-0500\n" - "PO-Revision-Date: 2006-10-05 05:38+0000\n" - "Last-Translator: Daniel Nylander \n" - "Language-Team: Swedish \n" -@@ -21,46 +21,46 @@ +diff -up po/sv.po.old po/sv.po +--- po/sv.po.old 2009-06-22 13:45:48.000000000 +0200 ++++ po/sv.po 2009-06-22 13:45:48.000000000 +0200 +@@ -21,46 +21,46 @@ msgstr "" msgid "display list of commands" msgstr "" @@ -1574,7 +1105,7 @@ #, c-format msgid "Commands:\n" msgstr "" -@@ -69,7 +69,7 @@ +@@ -69,7 +69,7 @@ msgstr "" msgid "Unhandled Error" msgstr "" @@ -1583,7 +1114,7 @@ msgid "Error while reading from descriptor" msgstr "" -@@ -100,60 +100,60 @@ +@@ -100,60 +100,60 @@ msgstr "" msgid "output version information and exit" msgstr "" @@ -1617,15 +1148,13 @@ msgid "%s: illegal argument: %s\n" msgstr "" +-#: nih/option.c:862 +#: nih/option.c:858 -+msgid "Usage" -+msgstr "" -+ - #: nih/option.c:862 --msgid "Usage" --msgstr "" -- + msgid "Usage" + msgstr "" + -#: nih/option.c:866 ++#: nih/option.c:862 msgid "[OPTION]..." msgstr "" @@ -1658,7 +1187,7 @@ msgid "Unable to watch directory" msgstr "" -@@ -291,79 +291,87 @@ +@@ -295,79 +295,87 @@ msgstr "" msgid "Deleting %s job" msgstr "" @@ -1762,16 +1291,7 @@ #, c-format msgid "Control request to unsubscribe %d from events" msgstr "" -@@ -393,7 +401,7 @@ - msgid "%s state changed from %s to %s" - msgstr "" - --#: init/job.c:817 util/initctl.c:787 -+#: init/job.c:817 util/initctl.c:828 - #, c-format - msgid "%s respawning too fast, stopped" - msgstr "" -@@ -468,7 +476,7 @@ +@@ -472,7 +480,7 @@ msgid "" "actually run /sbin/telinit." msgstr "" @@ -1780,227 +1300,19 @@ #: compat/sysv/shutdown.c:322 compat/sysv/telinit.c:91 msgid "Need to be root" msgstr "" -@@ -538,175 +546,180 @@ - msgid "Failed to open console: %s" - msgstr "" - --#: util/initctl.c:396 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 -+#: util/initctl.c:403 compat/sysv/shutdown.c:513 compat/sysv/telinit.c:138 - #, c-format - msgid "Unable to send message: %s" - msgstr "" - --#: util/initctl.c:447 -+#: util/initctl.c:454 - #, c-format - msgid "Unable to receive message: %s" - msgstr "" - --#: util/initctl.c:464 -+#: util/initctl.c:471 - #, c-format - msgid "Unable to handle message: %s" - msgstr "" - --#: util/initctl.c:534 -+#: util/initctl.c:541 - #, c-format - msgid "%s (instance)" - msgstr "" - --#: util/initctl.c:605 -+#: util/initctl.c:612 - #, c-format - msgid "%s, process %d" - msgstr "" - --#: util/initctl.c:607 -+#: util/initctl.c:614 - #, c-format - msgid "%s, (main) process %d" - msgstr "" - --#: util/initctl.c:620 -+#: util/initctl.c:627 - #, c-format - msgid "\t%s process %d" - msgstr "" - --#: util/initctl.c:731 -+#: util/initctl.c:772 - #, c-format - msgid "%s: goal changed" - msgstr "" - --#: util/initctl.c:793 -+#: util/initctl.c:834 - #, c-format - msgid "%s %s process killed by %s signal" - msgstr "" - --#: util/initctl.c:796 -+#: util/initctl.c:837 - #, c-format - msgid "%s %s process killed by signal %d" - msgstr "" - --#: util/initctl.c:801 -+#: util/initctl.c:842 - #, c-format - msgid "%s %s process terminated with status %d" - msgstr "" - --#: util/initctl.c:890 -+#: util/initctl.c:931 - #, c-format - msgid "No jobs matching `%s'" - msgstr "" - --#: util/initctl.c:894 -+#: util/initctl.c:935 - msgid "No jobs registered" - msgstr "" - --#: util/initctl.c:1226 -+#: util/initctl.c:1267 - #, c-format - msgid "Unknown job: %s" - msgstr "" - --#: util/initctl.c:1228 -+#: util/initctl.c:1269 - #, c-format - msgid "Unknown job: #%d" - msgstr "" - --#: util/initctl.c:1271 -+#: util/initctl.c:1312 - #, c-format - msgid "Invalid job: %s" - msgstr "" - --#: util/initctl.c:1314 -+#: util/initctl.c:1355 - #, c-format - msgid "Job not changed: %s" - msgstr "" - --#: util/initctl.c:1462 -+#: util/initctl.c:1503 - #, c-format - msgid "%s event failed" - msgstr "" - --#: util/initctl.c:1581 util/initctl.c:1618 util/initctl.c:1671 --#: util/initctl.c:1708 util/initctl.c:1761 -+#: util/initctl.c:1622 util/initctl.c:1659 util/initctl.c:1712 -+#: util/initctl.c:1749 util/initctl.c:1802 - #, c-format - msgid "%s: invalid job id: %s\n" - msgstr "" - --#: util/initctl.c:1603 util/initctl.c:1693 util/initctl.c:1749 -+#: util/initctl.c:1644 util/initctl.c:1734 util/initctl.c:1790 - #, c-format +@@ -642,6 +650,11 @@ msgstr "" msgid "%s: missing job name\n" msgstr "" --#: util/initctl.c:1826 -+#: util/initctl.c:1864 util/initctl.c:1895 -+#, c-format ++#: util/initctl.c:1889 ++#, fuzzy, c-format +msgid "%s: missing device name\n" +msgstr "" + -+#: util/initctl.c:1928 + #: util/initctl.c:1826 #, c-format msgid "%s: missing event name\n" - msgstr "" - --#: util/initctl.c:1930 -+#: util/initctl.c:2032 - #, c-format - msgid "%s: missing priority\n" - msgstr "" - --#: util/initctl.c:1948 -+#: util/initctl.c:2050 - #, c-format - msgid "%s: invalid priority\n" - msgstr "" - --#: util/initctl.c:1967 -+#: util/initctl.c:2069 - msgid "destination process" - msgstr "" - --#: util/initctl.c:1980 util/initctl.c:1996 util/initctl.c:2012 -+#: util/initctl.c:2082 util/initctl.c:2098 util/initctl.c:2114 - msgid "arguments are job ids, instead of names" - msgstr "" - --#: util/initctl.c:1982 util/initctl.c:1998 util/initctl.c:2014 --#: util/initctl.c:2026 util/initctl.c:2054 -+#: util/initctl.c:2084 util/initctl.c:2100 util/initctl.c:2116 -+#: util/initctl.c:2128 util/initctl.c:2156 - msgid "show job ids, as well as names" - msgstr "" - --#: util/initctl.c:1984 -+#: util/initctl.c:2086 - msgid "do not wait for job to start before exiting" - msgstr "" - --#: util/initctl.c:2000 -+#: util/initctl.c:2102 - msgid "do not wait for job to stop before exiting" - msgstr "" - --#: util/initctl.c:2038 -+#: util/initctl.c:2140 - msgid "show job and event ids, as well as names" - msgstr "" - --#: util/initctl.c:2040 -+#: util/initctl.c:2142 - msgid "do not wait for event to finish before exiting" - msgstr "" - --#: util/initctl.c:2042 -+#: util/initctl.c:2144 - msgid "set environment variable in jobs changed by this event" - msgstr "" - --#: util/initctl.c:2066 -+#: util/initctl.c:2168 - msgid "show event ids, as well as names" - msgstr "" - --#: util/initctl.c:2096 -+#: util/initctl.c:2216 - msgid "Job" - msgstr "" - --#: util/initctl.c:2103 -+#: util/initctl.c:2223 - msgid "Event" - msgstr "" - --#: util/initctl.c:2111 util/initctl.c:2118 util/initctl.c:2125 -+#: util/initctl.c:2231 util/initctl.c:2238 util/initctl.c:2245 - msgid "JOB..." - msgstr "" - --#: util/initctl.c:2112 -+#: util/initctl.c:2232 - msgid "Start jobs." - msgstr "" - --#: util/initctl.c:2113 -+#: util/initctl.c:2233 - msgid "" - "JOB is one or more job names that are to be started.\n" - "\n" -@@ -714,11 +727,11 @@ +@@ -718,11 +731,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -2014,7 +1326,7 @@ msgid "" "JOB is one or more job names that are to be stopped.\n" "\n" -@@ -726,11 +739,11 @@ +@@ -730,11 +743,11 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -2028,7 +1340,7 @@ msgid "" "JOB is one or more job names that are to be queried.\n" "\n" -@@ -738,19 +751,19 @@ +@@ -742,19 +755,19 @@ msgid "" "uniquely identifying a particular instance of a job." msgstr "" @@ -2052,7 +1364,7 @@ msgid "" "EVENT is the name of an event the init daemon should emit, which may have " "zero or more arguments specified by ARG. These may be matched in the job " -@@ -761,27 +774,35 @@ +@@ -765,27 +778,35 @@ msgid "" "taken from the environment or ignored if not present there." msgstr "" @@ -2094,11 +1406,10 @@ msgid "" "PRIORITY may be one of `debug' (messages useful for debugging upstart are " "logged, equivalent to --debug on kernel command-line); `info' (messages " - -=== modified file 'upstart/message.c' ---- upstart/message.c 2007-03-16 17:18:00 +0000 -+++ upstart/message.c 2008-02-29 03:13:11 +0000 -@@ -261,6 +261,20 @@ +diff -up upstart/message.c.old upstart/message.c +--- upstart/message.c.old 2009-06-22 13:45:48.000000000 +0200 ++++ upstart/message.c 2009-06-22 13:45:48.000000000 +0200 +@@ -261,6 +261,20 @@ upstart_message_newv (const void break; case UPSTART_VERSION_QUERY: break; @@ -2119,7 +1430,7 @@ case UPSTART_LOG_PRIORITY: if (upstart_push_packv (message, "u", args_copy)) goto error; -@@ -550,6 +564,9 @@ +@@ -550,6 +564,9 @@ upstart_message_handle (const void * case UPSTART_VERSION_QUERY: ret = handler (data, cred.pid, type); break; @@ -2129,7 +1440,7 @@ case UPSTART_LOG_PRIORITY: { NihLogLevel priority; -@@ -559,6 +576,41 @@ +@@ -559,6 +576,41 @@ upstart_message_handle (const void * ret = handler (data, cred.pid, type, priority); break; } @@ -2171,11 +1482,10 @@ case UPSTART_VERSION: { char *version = NULL; - -=== modified file 'upstart/message.h' ---- upstart/message.h 2007-03-13 17:27:09 +0000 -+++ upstart/message.h 2008-02-28 04:52:36 +0000 -@@ -57,11 +57,20 @@ +diff -up upstart/message.h.old upstart/message.h +--- upstart/message.h.old 2009-06-22 13:45:48.000000000 +0200 ++++ upstart/message.h 2009-06-22 13:45:48.000000000 +0200 +@@ -57,11 +57,20 @@ typedef enum upstart_message_type { * UPSTART_VERSION message in reply. * * Clients may send UPSTART_LOG_PRIORITY, without any reply. @@ -2196,11 +1506,10 @@ /* Job requests and responses. * - -=== modified file 'util/initctl.c' ---- util/initctl.c 2007-03-13 18:08:31 +0000 -+++ util/initctl.c 2008-03-02 21:05:23 +0000 -@@ -99,6 +99,9 @@ +diff -up util/initctl.c.old util/initctl.c +--- util/initctl.c.old 2009-06-22 13:45:48.000000000 +0200 ++++ util/initctl.c 2009-06-22 13:45:48.000000000 +0200 +@@ -99,6 +99,9 @@ static void job_info_output (const JobI static char *output_name (unsigned int id, const char *name); /* Prototypes of response handler functions */ @@ -2210,7 +1519,7 @@ static int handle_version (void *data, pid_t pid, UpstartMessageType type, const char *version); -@@ -159,6 +162,8 @@ +@@ -159,6 +162,8 @@ static int handle_unknown_message (void /* Prototypes for option and command functions */ int env_option (NihOption *option, const char *arg); @@ -2219,7 +1528,7 @@ int start_action (NihCommand *command, char * const *args); int stop_action (NihCommand *command, char * const *args); int status_action (NihCommand *command, char * const *args); -@@ -296,6 +301,8 @@ +@@ -296,6 +301,8 @@ static UpstartMessage handlers[] = { { -1, UPSTART_VERSION, (UpstartMessageHandler)handle_version }, @@ -2228,7 +1537,7 @@ { -1, UPSTART_JOB, (UpstartMessageHandler)handle_job }, { -1, UPSTART_JOB_FINISHED, -@@ -687,6 +694,40 @@ +@@ -687,6 +694,40 @@ handle_version (void *data } /** @@ -2269,7 +1578,7 @@ * handle_job: * @data: data passed to handler, * @pid: origin of message, -@@ -1802,6 +1843,61 @@ +@@ -1802,6 +1843,61 @@ list_action (NihCommand *command, } /** @@ -2331,7 +1640,7 @@ * emit_action: * @command: NihCommand invoked, * @args: command-line arguments. -@@ -2079,6 +2175,24 @@ +@@ -2079,6 +2175,24 @@ NihOption version_options[] = { }; /** @@ -2356,7 +1665,7 @@ * log_priority_options: * * Command-line options accepted for the log-priority command. -@@ -2156,6 +2270,16 @@ +@@ -2156,6 +2270,16 @@ static NihCommand commands[] = { NULL, &event_commands, events_options, events_action }, @@ -2373,4 +1682,3 @@ { "version", NULL, N_("Request the version of the init daemon."), NULL, - diff --git a/upstart.spec b/upstart.spec index a20e8e9..fa8389c 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart -Version: 0.3.9 -Release: 24%{?dist} +Version: 0.3.11 +Release: 1%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -8,15 +8,13 @@ License: GPLv2+ URL: http://upstart.ubuntu.com Source0: http://upstart.ubuntu.com/download/0.3/upstart-%{version}.tar.bz2 Source1: events.5 -Patch0: upstart-gcc43.patch -Patch1: upstart-force-on-shutdown-reboot.patch -Patch2: upstart-tty-stack.patch -Patch3: upstart-rpm.patch -Patch4: upstart-fedora-buglist.patch -Patch5: upstart-telinit-u.patch -Patch6: upstart-initctl-man.patch -Patch7: upstart-save-state-across-reexec.patch -Patch8: upstart-audit-events.patch +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 @@ -30,14 +28,12 @@ during shutdown and supervising them while the system is running. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -%patch3 +%patch1 +%patch2 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 %build %configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} @@ -103,6 +99,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Mon Jun 22 2009 Petr Lautrbach - 0.3.11-1 +- Update to 0.3.11 + * Mon Apr 27 2009 Bill Nottingham - 0.3.9-24 - Apply the audit patch correctly (#470661) From 2cfb90aed6d569b612965174abe64ed0930598df Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 06:36:36 +0000 Subject: [PATCH 15/80] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- upstart.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index fa8389c..d27fb1f 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -99,6 +99,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 0.3.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Mon Jun 22 2009 Petr Lautrbach - 0.3.11-1 - Update to 0.3.11 From fc721af4806c2933e7066725304cda41cef6632e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Fri, 21 Aug 2009 11:20:09 +0000 Subject: [PATCH 16/80] - rebuilt with new audit --- upstart.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index d27fb1f..d6ccf30 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.11 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -99,6 +99,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Fri Aug 21 2009 Tomas Mraz - 0.3.11-3 +- rebuilt with new audit + * Sun Jul 26 2009 Fedora Release Engineering - 0.3.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From fd42fd68ee56bb7c5738b75932777bd5ef9cc992 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Sun, 15 Nov 2009 06:04:14 +0000 Subject: [PATCH 17/80] Rebuilt against new glibc --- upstart.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index d6ccf30..e9c3980 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,6 +1,6 @@ Name: upstart Version: 0.3.11 -Release: 3%{?dist} +Release: 4%{?dist} Summary: An event-driven init system Group: System Environment/Base @@ -99,6 +99,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Sat Nov 15 2009 Casey Dahlin - 0.3.11-4 +- rebuilt against new glibc + * Fri Aug 21 2009 Tomas Mraz - 0.3.11-3 - rebuilt with new audit From 22748796afb279dc9b97300cbe6d9381fa68a83b Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Sat, 21 Nov 2009 05:12:34 +0000 Subject: [PATCH 18/80] Upstart 0.6.3 --- .cvsignore | 2 +- sources | 2 +- upstart.spec | 49 +++++++++++++++++++++---------------------------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.cvsignore b/.cvsignore index a69330a..6c5c773 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -upstart-0.3.11.tar.bz2 +upstart-0.6.3.tar.bz2 diff --git a/sources b/sources index 736f5d8..dfeb0a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a9e475e1458c876add0441d9d4cfe9c0 upstart-0.3.11.tar.bz2 +ef9d2704426423f75d1e0c309ecfceb4 upstart-0.6.3.tar.bz2 diff --git a/upstart.spec b/upstart.spec index e9c3980..df2e931 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,24 +1,16 @@ Name: upstart -Version: 0.3.11 -Release: 4%{?dist} +Version: 0.6.3 +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 +BuildRequires: gettext audit-libs-devel dbus-devel expat-devel %description Upstart is an event-based replacement for the /sbin/init daemon which @@ -27,13 +19,6 @@ 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} @@ -43,9 +28,6 @@ make %{?_smp_mflags} 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.* @@ -70,12 +52,11 @@ rm -rf %{buildroot} %doc README %doc TODO %doc HACKING -%{_sysconfdir}/event.d/ -%config(noreplace) %{_sysconfdir}/event.d/logd +%{_sysconfdir}/init/ +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/Upstart.conf /sbin/halt /sbin/init /sbin/initctl -/sbin/logd /sbin/poweroff /sbin/reboot /sbin/runlevel @@ -83,12 +64,24 @@ rm -rf %{buildroot} /sbin/start /sbin/status /sbin/stop +/sbin/restart /sbin/telinit -%{_mandir}/man5/events.5.gz +%{_mandir}/man5/init.5.gz +%{_mandir}/man5/inittab.5.gz +%{_mandir}/man7/control-alt-delete.7.gz +%{_mandir}/man7/keyboard-request.7.gz +%{_mandir}/man7/power-status-changed.7.gz +%{_mandir}/man7/runlevel.7.gz +%{_mandir}/man7/started.7.gz +%{_mandir}/man7/starting.7.gz +%{_mandir}/man7/startup.7.gz +%{_mandir}/man7/stopped.7.gz +%{_mandir}/man7/stopping.7.gz +%{_mandir}/man7/upstart.7.gz +%{_mandir}/man8/restart.8.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 @@ -99,8 +92,8 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog -* Sat Nov 15 2009 Casey Dahlin - 0.3.11-4 -- rebuilt against new glibc +* Fri Nov 20 2009 Casey Dahlin - 0.6.3-1 +- Upgrade to 0.6.3 * Fri Aug 21 2009 Tomas Mraz - 0.3.11-3 - rebuilt with new audit From de32bced588249565f8d2972a9bb72cf82731db5 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Sun, 22 Nov 2009 17:56:43 +0000 Subject: [PATCH 19/80] Fix source URL --- upstart.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstart.spec b/upstart.spec index df2e931..df60a1c 100644 --- a/upstart.spec +++ b/upstart.spec @@ -6,7 +6,7 @@ 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 +Source0: http://upstart.ubuntu.com/download/0.6/upstart-%{version}.tar.bz2 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 From cfc670af7e460e8e0c3c621aac48b6a01fedb813 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 24 Nov 2009 19:47:21 +0000 Subject: [PATCH 20/80] Don't ship default jobs; they will conflict with the ones in initscripts. Also, run the test suite (why not?) --- upstart.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upstart.spec b/upstart.spec index df60a1c..dd080f1 100644 --- a/upstart.spec +++ b/upstart.spec @@ -38,9 +38,14 @@ 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 +# don't ship default jobs +rm -f %{buildroot}/%{_sysconfdir}/init/* %find_lang %{name} +%check +make check + %clean rm -rf %{buildroot} From 168a557bb584c0d5a47a6039613795bf6e9638f1 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 25 Nov 2009 14:58:31 +0000 Subject: [PATCH 21/80] build needs at least dbus 1.2.16, configure has not --enable-compat --- upstart.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upstart.spec b/upstart.spec index dd080f1..8aacc40 100644 --- a/upstart.spec +++ b/upstart.spec @@ -10,7 +10,8 @@ Source0: http://upstart.ubuntu.com/download/0.6/upstart-%{version}.tar.bz 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 dbus-devel expat-devel +BuildRequires: gettext, audit-libs-devel, expat-devel +BuildRequires: dbus-devel >= 1:1.2.16 %description Upstart is an event-based replacement for the /sbin/init daemon which @@ -21,7 +22,7 @@ during shutdown and supervising them while the system is running. %setup -q %build -%configure --enable-compat=sysv --sbindir=/sbin --libdir=/%{_lib} +%configure --sbindir=/sbin --libdir=/%{_lib} make %{?_smp_mflags} %install From 1a91ebffa92cc8579fddadf8fa194819b0eb9acd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:47 +0000 Subject: [PATCH 22/80] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d2ec21..b4ab50a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: upstart -# $Id$ +# $Id: Makefile,v 1.1 2008/02/07 02:32:39 kevin Exp $ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 2830b81be1395b435a00c73fccfd6073755037b8 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 27 Nov 2009 14:26:05 +0000 Subject: [PATCH 23/80] removed test which fail in koji --- .cvsignore | 1 + sources | 1 + upstart.spec | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 6c5c773..6d454e8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ upstart-0.6.3.tar.bz2 +upstart-remove-tests.patch diff --git a/sources b/sources index dfeb0a7..c2cd4e0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ ef9d2704426423f75d1e0c309ecfceb4 upstart-0.6.3.tar.bz2 +c99c8dd6a238ec43243ad8cf3aa51837 upstart-remove-tests.patch diff --git a/upstart.spec b/upstart.spec index 8aacc40..9cae926 100644 --- a/upstart.spec +++ b/upstart.spec @@ -1,12 +1,14 @@ Name: upstart Version: 0.6.3 -Release: 1%{?dist} +Release: 2%{?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.6/upstart-%{version}.tar.bz2 +# remove tests which fail in koji +Patch0: upstart-remove-tests.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 @@ -20,6 +22,7 @@ during shutdown and supervising them while the system is running. %prep %setup -q +%patch0 -p1 -b .tests %build %configure --sbindir=/sbin --libdir=/%{_lib} @@ -98,6 +101,9 @@ rm -rf %{buildroot} %{_mandir}/man8/telinit.8.gz %changelog +* Fri Nov 27 2009 Petr Lautrbach 0.6.3-2 +- Removed tests which fail in koji + * Fri Nov 20 2009 Casey Dahlin - 0.6.3-1 - Upgrade to 0.6.3 From 5f8b1c9674c48a03e1499d8ef1ac326a281f76d5 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 1 Dec 2009 11:53:24 +0000 Subject: [PATCH 24/80] upstart-remove-tests.patch moved to cvs from sources --- sources | 1 - upstart-remove-tests.patch | 203 +++++++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 upstart-remove-tests.patch diff --git a/sources b/sources index c2cd4e0..dfeb0a7 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ ef9d2704426423f75d1e0c309ecfceb4 upstart-0.6.3.tar.bz2 -c99c8dd6a238ec43243ad8cf3aa51837 upstart-remove-tests.patch diff --git a/upstart-remove-tests.patch b/upstart-remove-tests.patch new file mode 100644 index 0000000..cde4960 --- /dev/null +++ b/upstart-remove-tests.patch @@ -0,0 +1,203 @@ +diff --git a/nih-dbus/tests/test_dbus_connection.c b/nih-dbus/tests/test_dbus_connection.c +index 68074b2..498f4e5 100644 +--- a/nih-dbus/tests/test_dbus_connection.c ++++ b/nih-dbus/tests/test_dbus_connection.c +@@ -1521,7 +1521,6 @@ main (int argc, + nih_error_init (); + + test_connect (); +- test_bus (); + test_setup (); + test_server (); + +diff --git a/nih/tests/test_child.c b/nih/tests/test_child.c +index 4c8c760..5ec8501 100644 +--- a/nih/tests/test_child.c ++++ b/nih/tests/test_child.c +@@ -328,186 +328,6 @@ test_poll (void) + nih_free (watch); + + +- /* Check that a signal raised from a traced child causes the reaper +- * to be called with a traced event and the event in the status +- * field. It should not be removed from the list since the child +- * hasn't gone away. +- */ +- TEST_FEATURE ("with signal from traced child"); +- +- TEST_CHILD (pid) { +- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL)); +- +- raise (SIGSTOP); +- raise (SIGCHLD); +- pause (); +- exit (0); +- } +- +- waitid (P_PID, pid, &siginfo, WSTOPPED); +- +- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL, PTRACE_O_TRACESYSGOOD)); +- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT)); +- +- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT); +- +- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_TRAPPED, +- my_handler, &watch); +- +- TEST_FREE_TAG (watch); +- +- handler_called = 0; +- last_data = NULL; +- last_pid = 0; +- last_event = -1; +- last_status = 0; +- +- nih_child_poll (); +- +- TEST_TRUE (handler_called); +- TEST_EQ (last_pid, pid); +- TEST_EQ (last_event, NIH_CHILD_TRAPPED); +- TEST_EQ (last_status, SIGCHLD); +- TEST_NOT_FREE (watch); +- +- assert0 (ptrace (PTRACE_DETACH, pid, NULL, 0)); +- +- kill (pid, SIGTERM); +- waitid (P_PID, pid, &siginfo, WEXITED); +- nih_free (watch); +- +- +-#if HAVE_VALGRIND_VALGRIND_H +- /* These tests fail when running under valgrind. +- */ +- if (! RUNNING_ON_VALGRIND) { +-#endif +- /* Check that when a traced child forks it causes the reaper +- * to be called with a ptrace event and the fork event in the +- * status field. It should not be removed from the list since the +- * child hasn't gone away. +- */ +- TEST_FEATURE ("with fork by traced child"); +- +- TEST_CHILD (pid) { +- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL)); +- +- raise (SIGSTOP); +- +- child = fork (); +- assert (child >= 0); +- +- pause (); +- +- exit (0); +- } +- +- waitid (P_PID, pid, &siginfo, WSTOPPED); +- +- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL, +- PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEFORK)); +- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT)); +- +- /* Wait for ptrace to stop the parent (signalling the fork) */ +- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT); +- +- /* Will be able to get the child pid now, we have to do it here +- * because we want to wait on it to ensure the test is synchronous; +- * otherwise nih_child_poll() could actually eat the child event +- * before it returns -- normally we'd do this inside the handler, +- * so things would probably work (we iter the handlers for each +- * event, so you can add one). +- */ +- data = 0; +- assert0 (ptrace (PTRACE_GETEVENTMSG, pid, NULL, &data)); +- assert (data != 0); +- child = (pid_t)data; +- +- /* Wait for ptrace to stop the child, otherwise it might not be +- * ready for us to actually detach from. +- */ +- waitid (P_PID, child, &siginfo, WSTOPPED | WNOWAIT); +- +- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_PTRACE, +- my_handler, &watch); +- +- TEST_FREE_TAG (watch); +- +- handler_called = 0; +- last_data = NULL; +- last_pid = 0; +- last_event = -1; +- last_status = 0; +- +- nih_child_poll (); +- +- TEST_TRUE (handler_called); +- TEST_EQ (last_pid, pid); +- TEST_EQ (last_event, NIH_CHILD_PTRACE); +- TEST_EQ (last_status, PTRACE_EVENT_FORK); +- TEST_NOT_FREE (watch); +- +- assert0 (ptrace (PTRACE_DETACH, child, NULL, SIGCONT)); +- kill (child, SIGTERM); +- +- assert0 (ptrace (PTRACE_DETACH, pid, NULL, SIGCONT)); +- kill (pid, SIGTERM); +- waitid (P_PID, pid, &siginfo, WEXITED); +- nih_free (watch); +- +- +- /* Check that when a traced child execs it causes the reaper +- * to be called with a ptrace event and the exec event in the +- * status field. It should not be removed from the list since the +- * child hasn't gone away. +- */ +- TEST_FEATURE ("with exec by traced child"); +- +- TEST_CHILD (pid) { +- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL)); +- +- raise (SIGSTOP); +- +- execl ("/bin/true", "true", NULL); +- exit (255); +- } +- +- waitid (P_PID, pid, &siginfo, WSTOPPED); +- +- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL, +- PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC)); +- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT)); +- +- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT); +- +- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_PTRACE, +- my_handler, &watch); +- +- TEST_FREE_TAG (watch); +- +- handler_called = 0; +- last_data = NULL; +- last_pid = 0; +- last_event = -1; +- last_status = 0; +- +- nih_child_poll (); +- +- TEST_TRUE (handler_called); +- TEST_EQ (last_pid, pid); +- TEST_EQ (last_event, NIH_CHILD_PTRACE); +- TEST_EQ (last_status, PTRACE_EVENT_EXEC); +- TEST_NOT_FREE (watch); +- +- assert0 (ptrace (PTRACE_DETACH, pid, NULL, SIGCONT)); +- +- waitid (P_PID, pid, &siginfo, WEXITED); +- nih_free (watch); +-#if HAVE_VALGRIND_VALGRIND_H +- } +-#endif +- +- + /* Check that we can watch for events from any process, which + * shouldn't be freed when the child dies. + */ From ca1f12388b39448447cfe5dbdc538729cd958aec Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 3 Dec 2009 20:00:00 +0000 Subject: [PATCH 25/80] Make 'telinit u' a no-op until state saving is implemented. Remove some old dead patches. --- events.5 | 286 ---- upstart-fedora-buglist.patch | 20 - upstart-force-on-shutdown-reboot.patch | 56 - upstart-gcc43.patch | 11 - upstart-initctl-man.patch | 11 - upstart-rpm.patch | 23 - upstart-telinit-u.patch | 113 -- upstart-telinit.patch | 13 + upstart-tty-stack.patch | 1684 ------------------------ upstart.spec | 7 +- 10 files changed, 19 insertions(+), 2205 deletions(-) delete mode 100644 events.5 delete mode 100644 upstart-fedora-buglist.patch delete mode 100644 upstart-force-on-shutdown-reboot.patch delete mode 100644 upstart-gcc43.patch delete mode 100644 upstart-initctl-man.patch delete mode 100644 upstart-rpm.patch delete mode 100644 upstart-telinit-u.patch create mode 100644 upstart-telinit.patch delete mode 100644 upstart-tty-stack.patch diff --git a/events.5 b/events.5 deleted file mode 100644 index d6e30b9..0000000 --- a/events.5 +++ /dev/null @@ -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 " -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 " -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 " -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