From b1e7a38a3b350564c288e7ba1f50101f97cd95af Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jul 16 2013 13:18:01 +0000 Subject: import sysvinit-2.88-12.dsf.el7.src.rpm --- diff --git a/.sysvinit.metadata b/.sysvinit.metadata new file mode 100644 index 0000000..fba4037 --- /dev/null +++ b/.sysvinit.metadata @@ -0,0 +1 @@ +f2ca149df1314a91f3007cccd7a0aa47d990de26 SOURCES/sysvinit-2.88dsf.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/sysvinit-2.78-man.patch b/SOURCES/sysvinit-2.78-man.patch new file mode 100644 index 0000000..96d58e6 --- /dev/null +++ b/SOURCES/sysvinit-2.78-man.patch @@ -0,0 +1,34 @@ +--- sysvinit-2.86/man/last.1.manpatch 2006-08-10 15:40:01.000000000 -0400 ++++ sysvinit-2.86/man/last.1 2006-08-10 15:42:17.000000000 -0400 +@@ -60,6 +60,8 @@ + useful, e.g., to determine easily who was logged in at a particular + time -- specify that time with \fB\-t\fP and look for "still logged + in". ++.IP "\fB\-f\fP \fIfile\fP" ++Specifies a file to search other than \fB/var/log/wtmp\fP. + .IP \fB\-R\fP + Suppresses the display of the hostname field. + .IP \fB\-a\fP +--- sysvinit-2.86/man/init.8.manpatch 2004-07-29 07:21:31.000000000 -0400 ++++ sysvinit-2.86/man/init.8 2006-08-10 15:33:59.000000000 -0400 +@@ -64,7 +64,7 @@ + .PP + Runlevel \fBS\fP or \fBs\fP bring the system to single user mode + and do not require an \fB/etc/inittab\fP file. In single user mode, +-\fB/sbin/sulogin\fP is invoked on \fB/dev/console\fP. ++a root shell is opened on \fB/dev/console\fP. + .PP + When entering single user mode, \fBinit\fP initializes the consoles + \fBstty\fP settings to sane values. Clocal mode is set. Hardware +diff -up sysvinit-2.87dsf/man/sulogin.8.foo sysvinit-2.87dsf/man/sulogin.8 +--- sysvinit-2.87dsf/man/sulogin.8.foo 2009-07-27 12:54:31.000000000 -0400 ++++ sysvinit-2.87dsf/man/sulogin.8 2009-07-27 12:54:37.000000000 -0400 +@@ -9,7 +9,7 @@ sulogin \- Single-user login + [ \fITTY\fP ] + .SH DESCRIPTION + .I sulogin +-is invoked by \fBinit(8)\fP when the system goes into single user mode. ++can be invoked by \fBinit(8)\fP when the system goes into single user mode. + (This is done through an entry in \fIinittab(5)\fP.) + \fBInit\fP also + tries to execute \fIsulogin\fP when diff --git a/SOURCES/sysvinit-2.86-autofsck.patch b/SOURCES/sysvinit-2.86-autofsck.patch new file mode 100644 index 0000000..dbae72d --- /dev/null +++ b/SOURCES/sysvinit-2.86-autofsck.patch @@ -0,0 +1,10 @@ +--- sysvinit-2.86/src/shutdown.c.autofsck 2004-07-30 07:59:04.000000000 -0400 ++++ sysvinit-2.86/src/shutdown.c 2005-12-19 15:20:04.000000000 -0500 +@@ -324,6 +324,7 @@ + } + #endif + ++ unlink("/.autofsck"); + /* script failed or not present: do it ourself. */ + sleep(1); /* Give init the chance to collect zombies. */ + diff --git a/SOURCES/sysvinit-2.86-inittab.patch b/SOURCES/sysvinit-2.86-inittab.patch new file mode 100644 index 0000000..add993e --- /dev/null +++ b/SOURCES/sysvinit-2.86-inittab.patch @@ -0,0 +1,50 @@ +--- sysvinit-2.85/man/inittab.5.foo 2005-11-18 12:38:40.000000000 -0500 ++++ sysvinit-2.85/man/inittab.5 2005-11-18 12:40:50.000000000 -0500 +@@ -193,7 +193,7 @@ + id:2:initdefault: + + # Boot-time system configuration/initialization script. +-si::sysinit:/etc/init.d/rcS ++si::sysinit:/etc/rc.sysinit + + # What to do in single-user mode. + ~:S:wait:/sbin/sulogin +@@ -206,24 +206,24 @@ + # Runlevels 2-5 are multi-user. + # Runlevel 6 is reboot. + +-l0:0:wait:/etc/init.d/rc 0 +-l1:1:wait:/etc/init.d/rc 1 +-l2:2:wait:/etc/init.d/rc 2 +-l3:3:wait:/etc/init.d/rc 3 +-l4:4:wait:/etc/init.d/rc 4 +-l5:5:wait:/etc/init.d/rc 5 +-l6:6:wait:/etc/init.d/rc 6 ++l0:0:wait:/etc/rc 0 ++l1:1:wait:/etc/rc 1 ++l2:2:wait:/etc/rc 2 ++l3:3:wait:/etc/rc 3 ++l4:4:wait:/etc/rc 4 ++l5:5:wait:/etc/rc 5 ++l6:6:wait:/etc/rc 6 + + # What to do at the "3 finger salute". +-ca::ctrlaltdel:/sbin/shutdown -t1 -h now ++ca::ctrlaltdel:/sbin/shutdown -t3 -r now + + # Runlevel 2,3: getty on virtual consoles +-# Runlevel 3: getty on terminal (ttyS0) and modem (ttyS1) +-1:23:respawn:/sbin/getty tty1 VC linux +-2:23:respawn:/sbin/getty tty2 VC linux +-3:23:respawn:/sbin/getty tty3 VC linux +-4:23:respawn:/sbin/getty tty4 VC linux +-S0:3:respawn:/sbin/getty -L 9600 ttyS0 vt320 ++# Runlevel 3: mgetty on terminal (ttyS0) and modem (ttyS1) ++1:23:respawn:/sbin/mingetty tty1 ++2:23:respawn:/sbin/mingetty tty2 ++3:23:respawn:/sbin/mingetty tty3 ++4:23:respawn:/sbin/mingetty tty4 ++S0:3:respawn:/sbin/agetty ttyS0 9600 vt100-nav + S1:3:respawn:/sbin/mgetty -x0 -D ttyS1 + + .fi diff --git a/SOURCES/sysvinit-2.86-loginshell.patch b/SOURCES/sysvinit-2.86-loginshell.patch new file mode 100644 index 0000000..2ab5681 --- /dev/null +++ b/SOURCES/sysvinit-2.86-loginshell.patch @@ -0,0 +1,11 @@ +--- sysvinit-2.86/src/init.c.loginshell 2004-07-30 08:16:20.000000000 -0400 ++++ sysvinit-2.86/src/init.c 2005-12-19 15:41:29.000000000 -0500 +@@ -1153,7 +1153,7 @@ + for(old = newFamily; old; old = old->next) + if (strpbrk(old->rlevel, "S")) break; + if (old == NULL) +- snprintf(buf, sizeof(buf), "~~:S:wait:%s\n", SULOGIN); ++ snprintf(buf, sizeof(buf), "~~:S:wait:%s -l\n", SHELL); + else + continue; + } diff --git a/SOURCES/sysvinit-2.86-single.patch b/SOURCES/sysvinit-2.86-single.patch new file mode 100644 index 0000000..59014b4 --- /dev/null +++ b/SOURCES/sysvinit-2.86-single.patch @@ -0,0 +1,11 @@ +--- sysvinit-2.86/src/init.c.single 2005-12-21 12:21:04.000000000 -0500 ++++ sysvinit-2.86/src/init.c 2005-12-21 12:21:40.000000000 -0500 +@@ -1153,7 +1153,7 @@ + * See if we have a single user entry. + */ + for(old = newFamily; old; old = old->next) +- if (strpbrk(old->rlevel, "S")) break; ++ if (strpbrk(old->rlevel, "S") && !ISPOWER(old->action)) break; + if (old == NULL) + snprintf(buf, sizeof(buf), "~~:S:wait:%s -l\n", SHELL); + else diff --git a/SOURCES/sysvinit-2.88-ipv6.patch b/SOURCES/sysvinit-2.88-ipv6.patch new file mode 100644 index 0000000..c3c33a7 --- /dev/null +++ b/SOURCES/sysvinit-2.88-ipv6.patch @@ -0,0 +1,40 @@ +diff --git a/src/last.c b/src/last.c +index 5003c7c..02103e0 100644 +--- a/src/last.c ++++ b/src/last.c +@@ -318,30 +318,22 @@ int dns_lookup(char *result, int size, int useip, int32_t *a) + struct sockaddr_in6 sin6; + struct sockaddr *sa; + int salen, flags; +- unsigned int topnibble; +- unsigned int azero = 0, sitelocal = 0; + int mapped = 0; + + flags = useip ? NI_NUMERICHOST : 0; + + /* +- * IPv4 or IPv6 ? We use 2 heuristics: +- * 1. Current IPv6 range uses 2000-3fff or fec0-feff. +- * Outside of that is illegal and must be IPv4. +- * 2. If last 3 bytes are 0, must be IPv4 +- * 3. If IPv6 in IPv4, handle as IPv4 ++ * IPv4 or IPv6 ? ++ * 1. If last 3 4bytes are 0, must be IPv4 ++ * 2. If IPv6 in IPv4, handle as IPv4 ++ * 3. Anything else is IPv6 + * + * Ugly. + */ + if (a[0] == 0 && a[1] == 0 && a[2] == (int32_t)htonl (0xffff)) + mapped = 1; +- topnibble = ntohl((unsigned int)a[0]) >> 28; + +- azero = ntohl((unsigned int)a[0]) >> 16; +- sitelocal = (azero >= 0xfec0 && azero <= 0xfeff) ? 1 : 0; +- +- if (((topnibble < 2 || topnibble > 3) && (!sitelocal)) || mapped || +- (a[1] == 0 && a[2] == 0 && a[3] == 0)) { ++ if (mapped || (a[1] == 0 && a[2] == 0 && a[3] == 0)) { + /* IPv4 */ + sin.sin_family = AF_INET; + sin.sin_port = 0; diff --git a/SOURCES/sysvinit-2.88-newline.patch b/SOURCES/sysvinit-2.88-newline.patch new file mode 100644 index 0000000..8275823 --- /dev/null +++ b/SOURCES/sysvinit-2.88-newline.patch @@ -0,0 +1,28 @@ +diff --git a/src/killall5.c b/src/killall5.c +index e73885e..c0723b8 100644 +--- a/src/killall5.c ++++ b/src/killall5.c +@@ -475,6 +475,7 @@ int readproc(int do_stat) + char *s, *q; + unsigned long startcode, endcode; + int pid, f; ++ int i, c; + + /* Open the /proc directory. */ + if (chdir("/proc") == -1) { +@@ -512,8 +513,13 @@ int readproc(int do_stat) + + /* Read SID & statname from it. */ + if ((fp = fopen(path, "r")) != NULL) { +- buf[0] = 0; +- fgets(buf, sizeof(buf), fp); ++ for (i = 0; inext; ++ free(o); ++ } ++ for (p = olist; p; p = olist) { ++ olist = olist->next; ++ free(p); ++ } ++} ++ + /* + * Check if path is ia shadow off a NFS partition. + */ +@@ -452,6 +467,7 @@ int readproc(int do_stat) + DIR *dir; + FILE *fp; + PROC *p, *n; ++ OMIT *o, *m; + struct dirent *d; + struct stat st; + char path[PATH_MAX+1]; +@@ -624,6 +640,17 @@ int readproc(int do_stat) + p->next = plist; + plist = p; + p->pid = pid; ++ /* Could be smarter, but it's a small list. */ ++ m = omit; ++ for (o = omit; m; o = m) { ++ m = o->next; ++ if (o->pid == p->pid) { ++ n = (PROC*)xmalloc(sizeof(PROC)); ++ *n = *p; ++ n->next = olist; ++ olist = n; ++ } ++ } + } + closedir(dir); + +@@ -813,6 +840,26 @@ PIDQ_HEAD *pidof(char *prog) + return q; + } + ++int matches(PROC *o, PROC *p) ++{ ++ int ret = 0; ++ char *oargv1, *pargv1; ++ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) { ++ if (o->argv1 && p->argv1) { ++ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL) ++ oargv1 = strdup(o->argv1); ++ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL) ++ pargv1 = strdup(p->argv1); ++ if (! strcmp(oargv1, pargv1)) { ++ ret = 1; ++ } ++ free(oargv1); ++ free(pargv1); ++ } ++ } ++ return ret; ++} ++ + /* Give usage message and exit. */ + void usage(void) + { +@@ -845,6 +892,7 @@ void nsyslog(int pri, char *fmt, ...) + #define PIDOF_SINGLE 0x01 + #define PIDOF_OMIT 0x02 + #define PIDOF_NETFS 0x04 ++#define PIDOF_OMIT_OMIT_MATCHES 0x08 + + /* + * Pidof functionality. +@@ -861,6 +909,7 @@ int main_pidof(int argc, char **argv) + struct stat st; + char tmp[512]; + ++ olist = (PROC*)0; + omit = (OMIT*)0; + nlist = (NFS*)0; + opterr = 0; +@@ -868,7 +917,7 @@ int main_pidof(int argc, char **argv) + if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0)) + flags |= PIDOF_NETFS; + +- while ((opt = getopt(argc,argv,"hco:sxn")) != EOF) switch (opt) { ++ while ((opt = getopt(argc,argv,"hcmo:sxn")) != EOF) switch (opt) { + case '?': + nsyslog(LOG_ERR,"invalid options on command line!\n"); + closelog(); +@@ -907,6 +956,9 @@ int main_pidof(int argc, char **argv) + case 'x': + scripts_too++; + break; ++ case 'm': ++ flags |= PIDOF_OMIT_OMIT_MATCHES; ++ break; + case 'n': + flags |= PIDOF_NETFS; + break; +@@ -938,10 +990,13 @@ int main_pidof(int argc, char **argv) + pid_t spid = 0; + while ((p = get_next_from_pid_q(q))) { + if ((flags & PIDOF_OMIT) && omit) { +- OMIT * optr; +- for (optr = omit; optr; optr = optr->next) { ++ PROC * optr; ++ for (optr = olist; optr; optr = optr->next) { + if (optr->pid == p->pid) + break; ++ if (flags & PIDOF_OMIT_OMIT_MATCHES) ++ if (matches(optr, p)) ++ break; + } + + /* +@@ -977,6 +1032,7 @@ int main_pidof(int argc, char **argv) + if (!first) + printf("\n"); + ++ clear_omit(); + clear_mnt(); + + closelog(); diff --git a/SOURCES/sysvinit-2.88-quiet.patch b/SOURCES/sysvinit-2.88-quiet.patch new file mode 100644 index 0000000..f30bc53 --- /dev/null +++ b/SOURCES/sysvinit-2.88-quiet.patch @@ -0,0 +1,39 @@ +diff --git a/src/init.c b/src/init.c +index d2bd121..dc82e28 100644 +--- a/src/init.c ++++ b/src/init.c +@@ -135,6 +135,7 @@ struct utmp utproto; /* Only used for sizeof(utproto.ut_id) */ + char *console_dev; /* Console device. */ + int pipe_fd = -1; /* /dev/initctl */ + int did_boot = 0; /* Did we already do BOOT* stuff? */ ++int quiet = 0; /* Should we be relatively silent? */ + int main(int, char **); + + /* Used by re-exec part */ +@@ -1800,7 +1801,7 @@ int read_level(int arg) + initlog(L_SY, "Trying to re-exec init"); + return 'U'; + default: +- initlog(L_VB, "Switching to runlevel: %c", foo); ++ if (!quiet) initlog(L_VB, "Switching to runlevel: %c", foo); + } + + if (foo == 'Q') { +@@ -2598,7 +2599,7 @@ void init_main(void) + /* + * Say hello to the world + */ +- initlog(L_CO, bootmsg, "booting"); ++ if (!quiet) initlog(L_CO, bootmsg, "booting"); + + /* + * See if we have to start an emergency shell. +@@ -2859,6 +2860,8 @@ int main(int argc, char **argv) + else if (!strcmp(argv[f], "-z")) { + /* Ignore -z xxx */ + if (argv[f + 1]) f++; ++ } else if (!strcmp(argv[f], "quiet")) { ++ quiet = 1; + } else if (strchr("0123456789sS", argv[f][0]) + && strlen(argv[f]) == 1) + dfl_level = argv[f][0]; diff --git a/SOURCES/sysvinit-2.88-usrmove.patch b/SOURCES/sysvinit-2.88-usrmove.patch new file mode 100644 index 0000000..e6d1003 --- /dev/null +++ b/SOURCES/sysvinit-2.88-usrmove.patch @@ -0,0 +1,34 @@ +diff --git a/src/Makefile b/src/Makefile +index e2b8028..ad216b8 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -138,23 +138,23 @@ clobber: cleanobjs + distclean: clobber + + install: +- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/ ++ $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/usr/sbin/ + $(INSTALL_DIR) $(ROOT)/usr/bin/ + for i in $(BIN); do \ + $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \ + done + for i in $(SBIN); do \ +- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \ ++ $(INSTALL_EXEC) $$i $(ROOT)/usr/sbin/ ; \ + done + for i in $(USRBIN); do \ + $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \ + done + # $(INSTALL_DIR) $(ROOT)/etc/ + # $(INSTALL_EXEC) initscript.sample $(ROOT)/etc/ +- ln -sf halt $(ROOT)/sbin/reboot +- ln -sf halt $(ROOT)/sbin/poweroff +- ln -sf init $(ROOT)/sbin/telinit +- ln -sf /sbin/killall5 $(ROOT)/bin/pidof ++ ln -sf halt $(ROOT)/usr/sbin/reboot ++ ln -sf halt $(ROOT)/usr/sbin/poweroff ++ ln -sf init $(ROOT)/usr/sbin/telinit ++ ln -sf /usr/sbin/killall5 $(ROOT)/usr/sbin/pidof + if [ ! -f $(ROOT)/usr/bin/lastb ]; then \ + ln -sf last $(ROOT)/usr/bin/lastb; \ + fi diff --git a/SOURCES/sysvinit-2.88-wall-broadcast-message.patch b/SOURCES/sysvinit-2.88-wall-broadcast-message.patch new file mode 100644 index 0000000..389ce13 --- /dev/null +++ b/SOURCES/sysvinit-2.88-wall-broadcast-message.patch @@ -0,0 +1,35 @@ +diff --git a/src/dowall.c b/src/dowall.c +index 85645c0..1bf4cb9 100644 +--- a/src/dowall.c ++++ b/src/dowall.c +@@ -156,7 +156,7 @@ void wall(const char *text, int remote) + struct utmp *utmp; + time_t t; + char term[UT_LINESIZE+ strlen(_PATH_DEV) + 1]; +- char line[81]; ++ char message[401], line[411]; + char hostname[HOST_NAME_MAX+1]; + char *date, *p; + char *user, *tty; +@@ -189,15 +189,17 @@ void wall(const char *text, int remote) + *p = 0; + + if (remote) { +- snprintf(line, sizeof(line), +- "\007\r\nRemote broadcast message (%s):\r\n\r\n", ++ snprintf(message, sizeof(message), ++ "Remote broadcast message (%s):", + date); + } else { +- snprintf(line, sizeof(line), +- "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n", ++ snprintf(message, sizeof(message), ++ "Broadcast message from %s@%s %s(%s):", + user, hostname, tty, date); + } + ++ snprintf(line, sizeof(line), "\007\r\n%s\r\n\r\n", message); ++ + /* + * Fork to avoid us hanging in a write() + */ diff --git a/SOURCES/sysvinit-2.88-wall-maxlines.patch b/SOURCES/sysvinit-2.88-wall-maxlines.patch new file mode 100644 index 0000000..8331ee0 --- /dev/null +++ b/SOURCES/sysvinit-2.88-wall-maxlines.patch @@ -0,0 +1,13 @@ +diff --git a/src/wall.c b/src/wall.c +index 92ffbc1..9c68338 100644 +--- a/src/wall.c ++++ b/src/wall.c +@@ -94,7 +94,7 @@ int main(int argc, char **argv) + + i = 0; + for (p = buf; *p; p++) { +- if (*p == '\n' && i++ > MAXLINES) { ++ if (*p == '\n' && ++i >= MAXLINES) { + *++p = 0; + break; + } diff --git a/SPECS/sysvinit.spec b/SPECS/sysvinit.spec new file mode 100644 index 0000000..73a5911 --- /dev/null +++ b/SPECS/sysvinit.spec @@ -0,0 +1,625 @@ +Summary: Programs which control basic system processes +Name: sysvinit +Version: 2.88 +Release: 12.dsf%{?dist} +License: GPLv2+ +Group: System Environment/Base +Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-%{version}dsf.tar.bz2 +URL: http://savannah.nongnu.org/projects/sysvinit/ +Patch1: sysvinit-2.78-man.patch +Patch2: sysvinit-2.86-autofsck.patch +Patch3: sysvinit-2.86-loginshell.patch +Patch4: sysvinit-2.86-inittab.patch +Patch5: sysvinit-2.86-single.patch +Patch6: sysvinit-2.88-quiet.patch +Patch14: sysvinit-2.88-ipv6.patch +Patch15: sysvinit-2.88-omit.patch +Patch16: sysvinit-2.88-wall-maxlines.patch +Patch17: sysvinit-2.88-wall-broadcast-message.patch +Patch18: sysvinit-2.88-newline.patch +Patch19: sysvinit-2.88-usrmove.patch +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: pam >= 0.66-5 +Requires: filesystem >= 2.2.4-1 +Requires: libselinux >= 1.21.10-1 libsepol >= 1.3.5 +Requires: sysvinit-tools = %{version}-%{release} +Obsoletes: SysVinit < 2.86-17 +Provides: SysVinit = %{version}-%{release} +BuildRequires: libselinux-devel >= 1.21.10-1 libsepol-devel >= 1.3.5 + +%description +The sysvinit package contains a group of processes that control +the very basic functions of your system. sysvinit includes the init +program, the first program started by the Linux kernel when the +system boots. Init then controls the startup, running, and shutdown +of all other programs. + +%package tools +Summary: Tools used for process and utmp management. +Group: System Environment/Base +Provides: /sbin/pidof + +%description tools +The sysvinit-tools package contains various tools used for process +management. + +%prep +%setup -q -n sysvinit-%{version}dsf +# We use a shell, not sulogin. Other random man fixes go here (such as #192804) +%patch1 -p1 -b .manpatch +# Unlink /.autofsck on shutdown -f +%patch2 -p1 -b .autofsck +# Invoke single-user shell as a login shell (#105653) +%patch3 -p1 -b .loginshell +# Adjust examples in inittab(5) to more accurately reflect RH/Fedora +# usage (#173572) +%patch4 -p1 -b .inittabdocs +# Fix single user mode (#176348) +%patch5 -p1 -b .single +# Be less verbose when booted with 'quiet' +%patch6 -p1 -b .quiet +# Change accepted ipv6 addresses (#573346) +%patch14 -p1 -b .ipv6 +# Add option to pidof to exclude similar processes to omitted processes (#632321) +%patch15 -p1 -b .omit +# Fix counting MAXLINES in wall +%patch16 -p1 -b .maxlines +# Raise limit for broadcast message +%patch17 -p1 -b .broadcast +# Deal with disappearing files and binaries with a newline in their name (#853081) +%patch18 -p1 -b .newline +# Move pidof and killall5 +%patch19 -p1 -b .usrmove + +%build +%ifarch sparcv9 sparc64 s390 s390x +export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIE" +%else +export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie" +%endif +make %{?_smp_mflags} CC="%{__cc}" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now -lcrypt" -C src + +%install +rm -rf $RPM_BUILD_ROOT +for I in bin usr/{bin,include,sbin} %{_mandir}/man{1,3,5,8} etc var/run dev; do + mkdir -p $RPM_BUILD_ROOT/$I +done +make -C src ROOT=$RPM_BUILD_ROOT MANDIR=%{_mandir} STRIP=/bin/true \ + BIN_OWNER=`id -nu` BIN_GROUP=`id -ng` install + +rm -f $RPM_BUILD_ROOT/usr/sbin/bootlogd +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/bootlogd* +chmod 755 $RPM_BUILD_ROOT/usr/bin/utmpdump + +# Remove these files, as we use upstart as /sbin/init. +rm -f $RPM_BUILD_ROOT/usr/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} +rm -f $RPM_BUILD_ROOT/%{_includedir}/initreq.h +rm -f $RPM_BUILD_ROOT/%{_mandir}/man5/* +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/{halt,init,poweroff,reboot,runlevel,shutdown,telinit}* + +# /sbin/fstab-decode is part of initscripts +rm -f $RPM_BUILD_ROOT/usr/sbin/fstab-decode +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fstab-decode.8 + +# /bin/mountpoint is part of util-linux >= 2.20 +rm -f $RPM_BUILD_ROOT/bin/mountpoint +rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/mountpoint.* + +# sulogin and utmpdump are part of util-linux +rm -f $RPM_BUILD_ROOT/usr/sbin/sulogin +rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/sulogin.* +rm -f $RPM_BUILD_ROOT/usr/bin/utmpdump +rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/utmpdump.* + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files tools +%defattr(-,root,root) +%doc doc/Changelog COPYRIGHT +#/bin/mountpoint +%{_bindir}/last +%{_bindir}/lastb +%{_bindir}/mesg +#%{_bindir}/utmpdump +%attr(2555,root,tty) %{_bindir}/wall +%{_sbindir}/pidof +%{_sbindir}/killall5 +#/sbin/sulogin +%{_mandir}/man1/* +%{_mandir}/man8/killall5* +%{_mandir}/man8/pidof* +#%{_mandir}/man8/sulogin* + +%changelog +* Tue Jul 16 2013 Lukáš Nykrýn - 2.88-12.dsf +- Move pidof and killall5 to /usr/sbin + +* Fri Jun 21 2013 Lukáš Nykrýn - 2.88-11.dsf +- Deal with disappearing files and binaries with a newline in their name (#853081) + +* Fri Feb 15 2013 Fedora Release Engineering - 2.88-10.dsf +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Sep 13 2012 Petr Lautrbach 2.88-9.dsf +- rebuild with PIE and full RELRO enabled (#853183) + +* Wed Aug 01 2012 Petr Lautrbach 2.88-8.dsf +- disable utmpdump and sulogin, now available in util-linux + +* Sat Jul 21 2012 Fedora Release Engineering - 2.88-7.dsf +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.88-6.dsf +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 02 2011 Petr Lautrbach 2.88-5.dsf +- disable mountpoint(1) man page + +* Tue Aug 2 2011 Karel Zak 2.88-4.dsf +- disable mountpoint(1), now availabale in util-linux + +* Wed Feb 09 2011 Fedora Release Engineering - 2.88-3.dsf +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 07 2011 Petr Lautrbach 2.88-2.dsf +- Raise limit for broadcast message (#663032) + +* Thu Oct 21 2010 Petr Lautrbach 2.88-1.dsf +- Update to new upstream release 2.88dsf +- Fix counting MAXLINES in wall + +* Thu Sep 09 2010 Bill Nottingham 2.87-5.dsf +- Add -m option to pidof to omit processes that match existing omitted pids (#632321) + +* Tue Apr 06 2010 Petr Lautrbach 2.87-4.dsf +- Changed IPv4 vs IPv6 heuristic in last command (#573346) + +* Mon Mar 22 2010 Petr Lautrbach 2.87-3.dsf +- Add -w option to last command for wide output (#550333) + +* Mon Mar 08 2010 Petr Lautrbach 2.87-2.dsf +- fix using get_default_context_with_level (#568530) + +* Thu Sep 17 2009 Ville Skyttä - 2.87-1.dsf +- Avoid stripping binaries during build to fix -debuginfo. + +* Mon Jul 27 2009 Bill Nottingham - 2.87-0.dsf +- Update to new upstream release 2.87dsf +-- remove many upstreamed/obsolete patches + +* Sun Jul 26 2009 Fedora Release Engineering - 2.86-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2.86-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Dec 8 2008 Bill Nottingham - 2.86-26 +- document readlink() behavior in pidof (#201317) +- fix potential issue in utmpdmp (#473485) + +* Wed Oct 1 2008 Bill Nottingham - 2.86-25 +- rediff patches (#464940) +- remove change_console, it's no longer needed with plymouth + +* Tue Mar 11 2008 Bill Nottingham - 2.86-24 +- replace change_console with a script that does the proper upstart + machinations + +* Fri Mar 7 2008 Bill Nottingham - 2.86-23 +- move mountpoint to -tools subpackage +- don't build sysvinit package itself + +* Fri Feb 29 2008 Bill Nottingham - 2.86-22 +- don't kill pid 1 with killall5 + +* Fri Feb 15 2008 Bill Nottingham - 2.86-21 +- split off a -tools subpackage to avoid upstart conflicts (#431110) + +* Fri Feb 15 2008 Bill Nottingham - 2.86-20 +- don't abort if policy is already loaded (#431113) + +* Wed Oct 10 2007 Bill Nottingham - 2.86-18 +- rebuild for buildid + +* Fri Aug 3 2007 Bill Nottingham +- tweak license tag + +* Fri May 4 2007 Bill Nottingham - 2.86-17 +- rename to sysvinit to match upstream, do the usual + provides/obsoletes (#226475) + +* Mon Apr 16 2007 Bill Nottingham - 2.86-16 +- pidof: ignore '-c' when called as non-root (#230829) + +* Tue Feb 13 2007 Bill Nottingham - 2.86-15 +- spec cleanups; remove initunlvl part of %%post, as that hasn't + been supported for nearly 4 years + +* Fri Oct 13 2006 Bill Nottingham - 2.86-14 +- revert fix for #184340 (#210549, #209169) + +* Sun Oct 01 2006 Jesse Keating - 2.86-13 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Thu Sep 21 2006 Bill Nottingham - 2.86-12 +- set controlling tty for /etc/rc so that ctrl-c can be passed to hung + services (#184340) + +* Thu Aug 10 2006 Bill Nottingham - 2.86-11 +- fix warning on SELinux policy load failure (#185603) +- don't package /dev/initctl (#174652, #199939) +- allow some time for failed console opens to resolve themselves (#181546) +- add documentation of -f to last(1) (#192804) + +* Wed Aug 9 2006 Bill Nottingham - 2.86-9 +- preserve 'WAITING' across re-exec (#143289, others) +- actually apply quiet patch +- don't write garbage to utmp on x86-64 (#176494) + +* Tue Aug 8 2006 Bill Nottingham - 2.86-7 +- be slightly less verbose when booted with 'quiet' + +* Wed Jul 19 2006 Bill Nottingham - 2.86-6 +- fix IPv6 patch () + +* Tue Jul 18 2006 Bill Nottingham - 2.86-5 +- IPv6 support for last () + +* Wed Jul 12 2006 Jesse Keating - 2.86-4.1 +- rebuild + +* Wed May 10 2006 Bill Nottingham - 2.86-3 +- fix potential under-copy of proc title (#188160, ) + +* Fri Mar 17 2006 Bill Nottingham - 2.86-3 +- document that the kernel may sync even if reboot is called with -n (#180967) + +* Mon Feb 13 2006 Bill Nottingham - 2.86-2.2.2 +- and again... + +* Fri Feb 10 2006 Jesse Keating - 2.86-2.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 2.86-2.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Wed Dec 21 2005 Bill Nottingham - 2.86-2 +- fix single user mode (#176348) + +* Mon Dec 19 2005 Bill Nottingham - 2.86-1 +- update to upstream 2.86 +- adjust patches +- install initreq.h (#119039) +- allow halt/reboot to handle being called by login correctly (#104062, ) +- document pam_console usage for halt (#114970) + +* Fri Dec 16 2005 Jesse Keating +- rebuilt for new gcj + +* Mon Dec 5 2005 Dan Walsh - 2.85-43 +- Use log(L_VB for SELinux error + +* Fri Nov 18 2005 Bill Nottingham +- clean up examples in inittab(5) (#173572) + +* Sat Oct 14 2005 Dan Walsh - 2.85-42 +- Fix patch + +* Fri Oct 14 2005 Dan Walsh - 2.85-41 +- replace load_policy with selinux_init_load_policy +- add getseuserbyname to sulogin + +* Thu Jun 30 2005 Bill Nottingham - 2.85-40 +- pidof: fix the fix for #85796, which broke the fix for #138788 + +* Wed Apr 27 2005 Bill Nottingham - 2.85-39 +- invoke single-user shell as a login shell (#105653) + +* Mon Apr 25 2005 Bill Nottingham - 2.85-38 +- pidof: use readlink instead of stat to avoid NFS hangs (#138788, ) + +* Wed Feb 23 2005 Bill Nottingham - 2.85-37 +- add patch for SELinux user configs () +- disable readlink patch while it's being fixed + +* Mon Nov 15 2004 Bill Nottingham - 2.85-35 +- use readlink instead of stat to avoid NFS hangs (#138788, ) + +* Thu Oct 07 2004 Florian La Roche +- add patch from Steve Grubb to re-build as non-root, #131841 + +* Fri Sep 17 2004 Bill Nottingham 2.85-33 +- updated SELinux patch from Stephen Smalley + +* Wed Aug 11 2004 Dan Walsh 2.85-32 +- Read booleans file to setup booleans on reboot + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Wed Jun 8 2004 Dan Walsh 2.85-30 +- Remove MLS Support from selinux patch, new design allows this for free + +* Thu Jun 3 2004 Dan Walsh 2.85-29 +- Add MLS Support to selinux patch + +* Thu Jun 3 2004 Bill Nottingham 2.85-28 +- fix overrun of argv[0] (#125172, #124813, ) + +* Wed Jun 2 2004 Bill Nottingham 2.85-27 +- cleanup logic some + +* Thu May 27 2004 Dan Walsh 2.85-26 +- Use selinux_getenforcemode + +* Tue May 25 2004 Dan Walsh 2.85-25 +- Change to use /etc/sysconfig/selinux to find policy file. + +* Thu Apr 29 2004 Bill Nottingham 2.85-25 +- fix build warning on make install (#121977) +- umount the SELinux filesystem on disabling it + +* Fri Apr 23 2004 Dan Walsh 2.85-24 +- Add security-disable, for disabling SELinux entirely + +* Mon Apr 5 2004 Bill Nottingham 2.85-23 +- fix selinux=0 booting (#118826, #119037) + +* Tue Mar 23 2004 Bill Nottingham 2.85-22 +- move /selinux to filesystem +- print out warning if we're terminating because of enforcing + no policy +- handle non-selinux kernels better (#118826) + +* Thu Mar 18 2004 Bill Nottingham 2.85-21 +- fix parsing of /proc/cmdline + +* Tue Mar 16 2004 Bill Nottingham 2.85-20 +- handle /etc/sysconfig/selinux + +* Tue Mar 9 2004 Dan Walsh 2.85-19 +- Add SELinux support to sulogin + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Tue Feb 10 2004 Dan Walsh 2.85-17 +- Check for current policy and previous depending on how policy was written + +* Thu Feb 5 2004 Jonathan Blandford 2.85-15 +- rebuild w/o SELINUX for RHEL 3 U2 + +* Mon Dec 22 2003 Dan Walsh 2.85-15 +- Change pidof to not call getsid since it does not use it +- Eliminates SELinux access control. + +* Wed Dec 17 2003 Dan Walsh 2.85-14 +- set selinux-mnt so libraries will work. + +* Wed Dec 17 2003 Dan Walsh 2.85-13 +- Rollback + +* Wed Dec 17 2003 Dan Walsh 2.85-12 +- Fix protocol change via libselinux that broke sysinit. + +* Mon Dec 1 2003 Dan Walsh 2.85-11.sel +- Don't umount /selinux, this is required for selinux to work correctly. + +* Fri Oct 24 2003 Dan Walsh 2.85-10.sel +- Create /selinux mount point +- Don't exit on non selinux kernel boot. + +* Fri Oct 24 2003 Dan Walsh 2.85-9.sel +- close file descriptor + +* Tue Oct 21 2003 Dan Walsh 2.85-8.sel +- Remove constants that were added to libselinux + +* Tue Oct 21 2003 Dan Walsh 2.85-7.sel +- Fix error handling on enforcing kernels + +* Tue Oct 21 2003 Dan Walsh 2.85-7 +- Turn off selinux + +* Mon Oct 20 2003 Dan Walsh 2.85-6.sel +- add selinux processing + +* Mon Sep 22 2003 Bill Nottingham 2.85-5 +- add change_console, for changing console used by init + +* Wed Jun 25 2003 Bill Nottingham 2.85-4 +- block signals when calling syslog() (#97534, ) + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Fri May 23 2003 Bill Nottingham 2.85-2 +- clean up killall5 some + +* Thu May 22 2003 Florian La Roche +- update to 2.85, remove already applied patches + +* Mon Feb 10 2003 Bill Nottingham 2.84-13 +- fix s390x build +- fix silly warning (#83943) + +* Mon Feb 10 2003 Arjan van de Ven +- fix wait() handling wrt setting SIGCHLD to SIG_IGN in shutdown +- fix segfault in spawn() function in shutdown + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Thu Dec 05 2002 Elliot Lee 2.84-7 +- Pass __cc macro to build, to facilitate cross-compiling +- _smp_mflags + +* Mon Dec 2 2002 Bill Nottingham 2.84-6 +- rebuild on all arches +- change sulogin message to be slightly more correct (#65828) + +* Thu Jul 18 2002 Bill Nottingham +- don't strip binaries +- have wall not write to non-ttys (#65412) +- update usage for halt/reboot (#57753) +- allow '-t' argument to last for checking state at certain times (#56863) +- make 'pidof /foo/bar' not match /baz/bar (#53918) + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Thu Mar 12 2002 Bill Nottingham 2.84-2 +- add patch to log messages on shutdown/reboot + +* Fri Feb 22 2002 Bill Nottingham 2.84-1 +- update to 2.84 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Fri Nov 9 2001 Bernhard Rosenkraenzer 2.79-2 +- Fix pidof -o (#55954) +- Handle RPM_OPT_FLAGS +- s/Copyright/License/ + +* Mon Sep 17 2001 Bill Nottingham +- update to 2.79 + +* Tue Aug 28 2001 Bill Nottingham +- unlink /.autofsck on shutdown -f + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Thu Jun 21 2001 Bill Nottingham +- update 'no logout' patch +- fix setting of CREAD to work with 2.4.3+ kernels (#45284) + +* Tue Jun 12 2001 Bill Nottingham +- show users with no login pid but no logout record as gone (#42550, + ) +- fix sulogin to *always* work without a tty (#40934) + +* Tue Apr 3 2001 Bill Nottingham +- set umask 022 on startup +- manpage tweaks (#21628, #27173) + +* Mon Apr 2 2001 Bill Nottingham +- fix dangling symlink in %%doc (#34383) + +* Thu Mar 15 2001 Bill Nottingham +- don't run telinit u if we don't appear to be on the root fs + +* Fri Feb 16 2001 Bill Nottingham +- run telinit u on upgrade + +* Wed Jan 31 2001 Bill Nottingham +- document '-n' option to wall, make it root-only (#18672) +- don't open files in sulogin unless they're really ttys (#21862) + +* Tue Aug 8 2000 Bill Nottingham +- set SHLVL in sulogin so /etc/profile.d stuff isn't run by default + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Thu Jun 8 2000 Bill Nottingham +- fix the md5 code (#11534) +- rebuild for FHS & the like + +* Wed Apr 19 2000 Bill Nottingham +- ignore sigint in sulogin (#9803) +- touch file in root directory if powering off (#7318) + +* Tue Mar 7 2000 Jeff Johnson +- rebuild for sparc baud rates > 38400. + +* Thu Feb 24 2000 Bill Nottingham +- update to 2.78-final + +* Mon Feb 7 2000 Bill Nottingham +- handle compressed manpages + +* Mon Jan 31 2000 Cristian Gafton +- build to fix dependency problem + +* Tue Jan 10 2000 Bill Nottingham +- update to 2.78 + +* Mon Sep 06 1999 Jakub Jelinek +- on big endian machines use a kludge for broken pam md5 passwords + +* Fri Aug 27 1999 Bill Nottingham +- update to 2.77 + +* Tue Jul 06 1999 Bill Nottingham +- move pam_console stuff to usermode package + +* Fri Jul 02 1999 Cristian Gafton +- requires usermode to express the dependency on /usr/bin/consolehelper +(#2813) + +* Wed Jun 23 1999 Bill Nottingham +- make man page references to single-user mode consistent with RH usage + +* Sat Apr 17 1999 Jeff Johnson +- remove /etc/initlvl compatibility symlink from file list (#2236). + +* Fri Mar 26 1999 Michael Johnson +- pam.d files marked noreplace +- added poweroff as a console application + +* Mon Mar 22 1999 Michael Johnson +- marked config files as such in consolehelper part of filelist + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 8) + +* Fri Mar 19 1999 Michael Johnson +- consolehelper support + +* Wed Jan 06 1999 Cristian Gafton +- glibc 2.1 + +* Sun Aug 23 1998 Jeff Johnson +- poweroff symlink not included (problem #762) + +* Thu Jul 09 1998 Chris Evans +- Fix a securelevel releated security hole. Go on, try and break append + only files + securelevel now ;-) + +* Wed Jul 8 1998 Jeff Johnson +- remove /etc/nologin at end of shutdown. +- compile around missing SIGPWR on sparc + +* Thu May 07 1998 Prospector System +- translations modified for de, fr, tr + +* Wed Apr 08 1998 Cristian Gafton +- upgraded to 2.74 +- fixed the package source url... (yeah, it was wrong !) + +* Wed Oct 1 1997 Cristian Gafton +- fixed the MD5 check in sulogin (128 hash bits encoded with base64 gives + 22 bytes, not 24...). Fix in -md5.patch + +* Thu Sep 11 1997 Christian 'Dr. Disk' Hechelmann +- /etc/initrunlvl gets linked to /tmp/init-root/var/run/initrunlvl which is + just plain wrong.. +- /usr/bin/utmpdump was missing in the files section, although it was + explicitly patched into PROGS. +- added attr's to the files section. +- various small fixes. + +* Tue Jun 17 1997 Erik Troan +- updated to 2.71 +- built against glibc 2.0.4 + +* Fri Feb 07 1997 Michael K. Johnson +- Added sulogin.8 man page to file list.