[packages/SysVinit] - up to 2.94; drop man page patch (due to commit b52bdf05f58dd34f3f13ee592a11826b878b4ee2 which drop

arekm arekm at pld-linux.org
Thu Feb 28 11:16:01 CET 2019


commit e1cc0c5575798126057a32108fe949bacfdd0428
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Feb 28 11:15:53 2019 +0100

    - up to 2.94; drop man page patch (due to commit b52bdf05f58dd34f3f13ee592a11826b878b4ee2 which dropped utmpx/wtmpx usage)

 SysVinit.spec            |  14 +--
 sysvinit-alt-fixes.patch |  19 +---
 sysvinit-halt.patch      |   2 +-
 sysvinit-lastlog.patch   |  12 +--
 sysvinit-man.patch       | 225 -----------------------------------------------
 sysvinit-wtmp.patch      |   7 +-
 6 files changed, 21 insertions(+), 258 deletions(-)
---
diff --git a/SysVinit.spec b/SysVinit.spec
index b6597e8..7209898 100644
--- a/SysVinit.spec
+++ b/SysVinit.spec
@@ -12,12 +12,12 @@ Summary(ru.UTF-8):	Программы, управляющие базовыми 
 Summary(tr.UTF-8):	System V başlatma programı
 Summary(uk.UTF-8):	Програми, що керують базовими системними процесами
 Name:		SysVinit
-Version:	2.90
-Release:	0.1
+Version:	2.94
+Release:	1
 License:	GPL v2+
 Group:		Base
 Source0:	http://download.savannah.gnu.org/releases/sysvinit/sysvinit-%{version}.tar.xz
-# Source0-md5:	7b6a16bde3da494b6aac7283b79c81de
+# Source0-md5:	885ae742d51dbae8d16f535455c0240a
 Source1:	sysvinit.logrotate
 Source2:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/sysvinit-non-english-man-pages.tar.bz2
 # Source2-md5:	9ae8a63a4685368fae19707f95475cca
@@ -25,7 +25,7 @@ Source3:	crypttab.5
 Patch0:		sysvinit-paths.patch
 Patch1:		sysvinit-bequiet.patch
 Patch2:		sysvinit-wtmp.patch
-Patch3:		sysvinit-man.patch
+
 Patch4:		sysvinit-halt.patch
 Patch5:		sysvinit-autofsck.patch
 
@@ -130,7 +130,7 @@ Ten pakiet zawiera różne narzędzia do zarządzania procesami.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
+
 %patch4 -p1
 %patch5 -p1
 
@@ -234,6 +234,7 @@ fi
 %attr(755,root,root) %{_sbindir}/bootlogd
 %attr(755,root,root) %{_sbindir}/halt
 %attr(755,root,root) %{_sbindir}/init
+%attr(755,root,root) %{_sbindir}/logsave
 %attr(755,root,root) %{_sbindir}/poweroff
 %attr(755,root,root) %{_sbindir}/reboot
 %attr(755,root,root) %{_sbindir}/runlevel
@@ -253,6 +254,7 @@ fi
 %{_mandir}/man8/bootlogd.8*
 %{_mandir}/man8/halt.8*
 %{_mandir}/man8/init.8*
+%{_mandir}/man8/logsave.8*
 %{_mandir}/man8/poweroff.8
 %{_mandir}/man8/reboot.8
 %{_mandir}/man8/runlevel.8*
@@ -325,9 +327,11 @@ fi
 %attr(755,root,root) %{_sbindir}/killall5
 %attr(755,root,root) %{_sbindir}/lastlog
 %attr(755,root,root) %{_sbindir}/pidof
+%attr(2755,root,tty) %{_bindir}/readbootlog
 %attr(2755,root,tty) %{_bindir}/wall
 %attr(640,root,root) %ghost /var/log/faillog
 %attr(664,root,utmp) %ghost /var/log/lastlog
+%{_mandir}/man1/readbootlog.1*
 %{_mandir}/man1/wall.1*
 %{_mandir}/man8/killall5.8*
 %{_mandir}/man8/lastlog.8*
diff --git a/sysvinit-alt-fixes.patch b/sysvinit-alt-fixes.patch
index 2df12ee..5087e96 100644
--- a/sysvinit-alt-fixes.patch
+++ b/sysvinit-alt-fixes.patch
@@ -1,14 +1,5 @@
 --- sysvinit-2.88dsf/src/init.c.wiget	2011-12-03 23:39:16.988206898 +0100
 +++ sysvinit-2.88dsf/src/init.c	2011-12-03 23:47:53.761427001 +0100
-@@ -880,7 +880,7 @@ char **init_buildenv(int child)
- 	n += NR_EXTRA_ENV;
- 	if (child)
- 		n += 8;
--	e = calloc(n, sizeof(char *));
-+	e = imalloc(n * sizeof(char *));
- 
- 	for (n = 0; environ[n]; n++)
- 		e[n] = istrdup(environ[n]);
 @@ -911,6 +911,9 @@ void init_freeenv(char **e)
  {
  	int		n;
@@ -44,12 +35,4 @@
  
  	/*
  	 *	We shouldn't be here, something failed. 
-@@ -2729,7 +2737,7 @@ int telinit(char *progname, int argc, ch
- 		if (!strchr("0123456789SsQqAaBbCcUu", argv[optind][0]))
- 			usage(progname);
- 		request.cmd = INIT_CMD_RUNLVL;
--		request.runlevel  = env ? 0 : argv[optind][0];
-+		request.runlevel  = argv[optind][0];
- 		request.sleeptime = sltime;
- 	}
- 
+
diff --git a/sysvinit-halt.patch b/sysvinit-halt.patch
index 7d53317..7c6146b 100644
--- a/sysvinit-halt.patch
+++ b/sysvinit-halt.patch
@@ -16,7 +16,7 @@
 +			close(open(file, O_CREAT|O_RDWR, 0644));
 +			free(file);
 +				
- 			do_shutdown(do_reboot ? "-r" : "-h", tm);
+ 			do_shutdown(do_reboot ? "-r" : "-h", do_poweroff, tm);
 +		}
  	}
  
diff --git a/sysvinit-lastlog.patch b/sysvinit-lastlog.patch
index d09beb8..95c4b23 100644
--- a/sysvinit-lastlog.patch
+++ b/sysvinit-lastlog.patch
@@ -4,15 +4,15 @@
  
  # For some known distributions we do not build all programs, otherwise we do.
  BIN	=
--SBIN	= init halt shutdown runlevel killall5 fstab-decode
-+SBIN	= init halt shutdown runlevel killall5 fstab-decode lastlog
- USRBIN	= last mesg
+-SBIN	= init halt shutdown runlevel killall5 fstab-decode logsave
++SBIN	= init halt shutdown runlevel killall5 fstab-decode logsave lastlog
+ USRBIN	= last mesg readbootlog
  
- MAN1	= last.1 lastb.1 mesg.1
+ MAN1	= last.1 lastb.1 mesg.1 readbootlog.1
  MAN5	= initscript.5 inittab.5 initctl.5
  MAN8	= halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8
--MAN8	+= shutdown.8 telinit.8 fstab-decode.8
-+MAN8	+= shutdown.8 telinit.8 fstab-decode.8 lastlog.8
+-MAN8	+= shutdown.8 telinit.8 fstab-decode.8 logsave.8
++MAN8	+= shutdown.8 telinit.8 fstab-decode.8 logsave.8 lastlog.8
  
  ifeq ($(DISTRO),)
  SBIN	+= sulogin bootlogd
diff --git a/sysvinit-man.patch b/sysvinit-man.patch
deleted file mode 100644
index db40c9c..0000000
--- a/sysvinit-man.patch
+++ /dev/null
@@ -1,225 +0,0 @@
---- sysvinit-2.88dsf/man/halt.8.wiget	2009-09-10 10:28:49.000000000 +0200
-+++ sysvinit-2.88dsf/man/halt.8	2011-12-03 22:54:42.947155231 +0100
-@@ -52,7 +52,7 @@ halt, reboot, poweroff \- stop the syste
- .\"{{{  Description
- .SH DESCRIPTION
- \fBHalt\fP notes that the system is being brought down in the file
--\fI/var/log/wtmp\fP, and then either tells the kernel to halt, reboot or
-+\fI/var/log/wtmpx\fP, and then either tells the kernel to halt, reboot or
- power-off the system.
- .PP
- If \fBhalt\fP or \fBreboot\fP is called when the system is
-@@ -70,10 +70,10 @@ and 6, that is when the systems shutdown
- Don't sync before reboot or halt. Note that the kernel and storage
- drivers may still sync.
- .IP \fB\-w\fP
--Don't actually reboot or halt but only write the wtmp record
--(in the \fI/var/log/wtmp\fP file).
-+Don't actually reboot or halt but only write the wtmpx record
-+(in the \fI/var/log/wtmpx\fP file).
- .IP \fB\-d\fP
--Don't write the wtmp record. The \fB\-n\fP flag implies \fB\-d\fP.
-+Don't write the wtmpx record. The \fB\-n\fP flag implies \fB\-d\fP.
- .IP \fB\-f\fP
- Force halt or reboot, don't call \fBshutdown\fP(8).
- .IP \fB\-i\fP
-@@ -94,7 +94,7 @@ Under older \fBsysvinit\fP releases , \f
- never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP
- invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This
- means that if \fBhalt\fP or \fBreboot\fP cannot find out the current
--runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized
-+runlevel (for example, when \fI/var/run/utmpx\fP hasn't been initialized
- correctly) \fBshutdown\fP will be called, which might not be what you want.
- Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP.
- .PP
---- sysvinit-2.88dsf/man/initscript.5.wiget	2009-09-10 10:28:49.000000000 +0200
-+++ sysvinit-2.88dsf/man/initscript.5	2011-12-03 22:52:27.399373671 +0100
-@@ -19,15 +19,15 @@
- .SH NAME
- initscript \- script that executes inittab commands.
- .SH SYNOPSIS
--/bin/sh /etc/initscript id runlevels action process
-+/bin/sh /etc/rc.d/rc.init id runlevels action process
- .SH DESCRIPTION
--When the shell script \fI/etc/initscript\fP is present, \fBinit\fP
-+When the shell script \fI/etc/rc.d/rc.init\fP is present, \fBinit\fP
- will use it to execute the commands from \fIinittab\fP.
- This script can be used to set things like \fBulimit\fP and
- \fBumask\fP default values for every process.
- .SH EXAMPLES
- This is a sample initscript, which might be installed on your
--system as \fI/etc/initscript.sample\fP.
-+system as \fI/usr/share/doc/SysVinit-2.88/initscript.sample.gz\fP.
- .RS
- .sp
- .nf
-@@ -37,7 +37,7 @@ system as \fI/etc/initscript.sample\fP.
- # initscript   Executed by init(8) for every program it
- #              wants to spawn like this:
- #
--#              /bin/sh /etc/initscript <id> <level> <action> <process>
-+# /bin/sh /etc/rc.d/rc.init <id> <level> <action> <process>
- #
- 
-   # Set umask to safe level, and enable core dumps.
-@@ -65,7 +65,7 @@ with this can make your system un(re)boo
- .RE
- .SH FILES
- /etc/inittab,
--/etc/initscript.
-+/etc/rc.d/rc.init
- .SH AUTHOR
- Miquel van Smoorenburg ,<miquels at cistron.nl>
- .SH "SEE ALSO"
---- sysvinit-2.88dsf/man/last.1.wiget	2010-02-19 16:51:36.000000000 +0100
-+++ sysvinit-2.88dsf/man/last.1	2011-12-03 22:54:06.585311434 +0100
-@@ -47,7 +47,7 @@ last, lastb \- show listing of last logg
- .\"{{{  Description
- .SH DESCRIPTION
- .B Last
--searches back through the file \fB/var/log/wtmp\fP (or the file
-+searches back through the file \fB/var/log/wtmpx\fP (or the file
- designated by the \fB\-f\fP flag) and displays a list of all
- users logged in (and out) since that file was created.  Names of users
- and tty's can be given, in which case \fBlast\fP will show only those entries
-@@ -64,12 +64,12 @@ Thus \fBlast reboot\fP will show a log o
- was created.
- .PP
- \fBLastb\fP is the same as \fBlast\fP, except that by default it shows a log
--of the file \fB/var/log/btmp\fP, which contains all the bad login attempts.
-+of the file \fB/var/log/btmpx\fP, which contains all the bad login attempts.
- .\"}}}
- .\"{{{  Options
- .SH OPTIONS
- .IP "\fB\-f\fP \fIfile\fP"
--Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP.
-+Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmpx\fP.
- .IP \fB\-\fP\fInum\fP
- This is a count telling \fBlast\fP how many lines to show.
- .IP "\fB\-n\fP \fInum\fP"
-@@ -101,16 +101,16 @@ Display full user and domain names in th
- Display the system shutdown entries and run level changes.
- .\"}}}
- .SH NOTES
--The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only
-+The files \fIwtmpx\fP and \fIbtmpx\fP might not be found. The system only
- logs information in these files if they are present. This is a local
- configuration issue. If you want the files to be used, they can be
- created with a simple \fBtouch\fP(1) command (for example, 
--\fItouch /var/log/wtmp\fP).
-+\fItouch /var/log/wtmpx\fP).
- .\"{{{  Files
- .SH FILES
--/var/log/wtmp
-+/var/log/wtmpx
- .br
--/var/log/btmp
-+/var/log/btmpx
- .\"}}}
- .\"{{{  Author
- .SH AUTHOR
---- sysvinit-2.88dsf/man/shutdown.8.wiget	2010-03-23 15:37:01.000000000 +0100
-+++ sysvinit-2.88dsf/man/shutdown.8	2011-12-03 22:52:27.399373671 +0100
-@@ -155,7 +155,7 @@ one of the virtual consoles. If \fBshutd
- argument (add this to the invocation of shutdown in /etc/inittab),
- it checks to see if the file \fI/etc/shutdown.allow\fP is present.
- It then compares the login names in that file with the list of people
--that are logged in on a virtual console (from \fI/var/run/utmp\fP). Only
-+that are logged in on a virtual console (from \fI/var/run/utmpx\fP). Only
- if one of those authorized users \fBor root\fP is logged in, it will
- proceed. Otherwise it will write the message
- .sp 1
---- sysvinit-2.88dsf/man/init.8.wiget	2009-09-10 10:28:49.000000000 +0200
-+++ sysvinit-2.88dsf/man/init.8	2011-12-03 22:52:27.399373671 +0100
-@@ -96,11 +96,11 @@ mounted before users can log in.  Then a
- are processed.
- .PP
- When starting a new process, \fBinit\fP first checks whether the file
--\fI/etc/initscript\fP exists. If it does, it uses this script to
-+\fI/etc/rc.d/rc.init\fP exists. If it does, it uses this script to
- start the process.
- .PP
- Each time a child terminates, \fBinit\fP records the fact and the reason
--it died in \fB/var/run/utmp\fP and \fB/var/log/wtmp\fP,
-+it died in \fB/var/run/utmpx\fP and \fB/var/log/wtmpx\fP,
- provided that these files exist.
- .SH CHANGING RUNLEVELS
- After it has spawned all of the processes specified, \fBinit\fP waits
-@@ -269,10 +269,10 @@ file in the directory \fI/etc/init.d\fP
- .SH FILES
- .nf
- /etc/inittab
--/etc/initscript
-+/etc/rc.d/rc.init
- /dev/console
--/var/run/utmp
--/var/log/wtmp
-+/var/run/utmpx
-+/var/log/wtmpx
- /dev/initctl
- .fi
- .\"}}}
-@@ -309,5 +309,5 @@ page by Michael Haardt (u31b3hs at pool.inf
- .BR kill (1),
- .BR inittab (5),
- .BR initscript (5),
--.BR utmp (5)
-+.BR utmpx (5)
- .\"}}}
---- sysvinit-2.88dsf/man/inittab.5.wiget	2009-09-10 10:28:49.000000000 +0200
-+++ sysvinit-2.88dsf/man/inittab.5	2011-12-03 22:52:27.399373671 +0100
-@@ -64,8 +64,8 @@ describes which action should be taken.
- specifies the process to be executed.  If the process field starts with
- a `+' character, 
- .B init 
--will not do utmp and wtmp accounting for that process.  This is needed for 
--gettys that insist on doing their own utmp/wtmp housekeeping.  This is also 
-+will not do utmpx and wtmp accounting for that process.  This is needed for 
-+gettys that insist on doing their own utmpx/wtmpx housekeeping.  This is also 
- a historic bug.
- .\"}}}
- .PP
---- sysvinit-2.88dsf/man/runlevel.8.wiget	2009-09-10 10:28:49.000000000 +0200
-+++ sysvinit-2.88dsf/man/runlevel.8	2011-12-03 22:52:27.399373671 +0100
-@@ -20,20 +20,20 @@
- runlevel -- find the previous and current system runlevel.
- .SH SYNOPSIS
- .B runlevel 
--.RI [ utmp ]
-+.RI [ utmpx ]
- .SH DESCRIPTION
- .B Runlevel
- reads the system
--.I utmp
-+.I utmpx
- file (typically 
--.IR /var/run/utmp )
-+.IR /var/run/utmpx )
- to locate the runlevel record, and then
- prints the previous and current system runlevel on its standard output, 
- separated by a single space. If there is no previous system
- runlevel, the letter \fBN\fP will be printed instead.
- .PP
- If no
--.I utmp
-+.I utmpx
- file exists, or if no runlevel record can be found,
- .B runlevel
- prints the word \fBunknown\fP and exits with an error.
-@@ -45,12 +45,12 @@ However, in newer versions of \fBinit\fP
- is also available in the environment variables \fBRUNLEVEL\fP and
- \fBPREVLEVEL\fP.
- .SH OPTIONS
--.\"{{{ utmp
--.IP \fIutmp\fP 
--The name of the \fIutmp\fP file to read.
-+.\"{{{ utmpx
-+.IP \fIutmpx\fP 
-+The name of the \fIutmpx\fP file to read.
- .\"}}}
- .SH SEE ALSO
- .BR init (8),
--.BR utmp (5)
-+.BR utmpx (5)
- .SH AUTHOR
- Miquel van Smoorenburg, miquels at cistron.nl
diff --git a/sysvinit-wtmp.patch b/sysvinit-wtmp.patch
index fc74ed9..fa496e7 100644
--- a/sysvinit-wtmp.patch
+++ b/sysvinit-wtmp.patch
@@ -26,7 +26,7 @@
  #ifndef SHUTDOWN_TIME
  #  define SHUTDOWN_TIME 254
  #endif
-@@ -247,27 +266,6 @@ int uread(FILE *fp, struct utmp *u, int
+@@ -270,28 +270,6 @@ int uread(FILE *fp, struct utmp *u, int
  #endif
  
  /*
@@ -36,10 +36,11 @@
 -#define BTMP_FILE getbtmp()
 -char *getbtmp()
 -{
--	static char btmp[128];
+-	static char btmp[PATH_MAX + 5];  /* max path + btmp + null terminator */
 -	char *p;
 -
--	strcpy(btmp, WTMP_FILE);
+-        memset(btmp, '\0', PATH_MAX + 5);
+-	strncpy(btmp, WTMP_FILE, PATH_MAX);
 -	if ((p = strrchr(btmp, '/')) == NULL)
 -		p = btmp;
 -	else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/SysVinit.git/commitdiff/e1cc0c5575798126057a32108fe949bacfdd0428



More information about the pld-cvs-commit mailing list