public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
@ 2016-07-15  5:35 Anthony G. Basile
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2016-07-15  5:35 UTC (permalink / raw
  To: gentoo-commits

commit:     db01d95a16c585987dc9f6e8e09faa580baba14e
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Sun Jul 10 19:39:36 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 05:38:05 2016 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=db01d95a

sys-apps/sysvinit: In tree version works

Gentoo-Bug: https://bugs.gentoo.org/580958

 sys-apps/sysvinit/Manifest                         |  12 --
 sys-apps/sysvinit/files/inittab-2.87               |  58 ---------
 sys-apps/sysvinit/files/reboot.sh                  |  11 --
 sys-apps/sysvinit/files/shutdown.sh                |  13 --
 sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch  | 142 ---------------------
 .../files/sysvinit-2.86-shutdown-single.patch      |  36 ------
 .../sysvinit/files/sysvinit-2.88-makefile.patch    |  60 ---------
 sys-apps/sysvinit/files/sysvinit-2.88-musl.patch   |  10 --
 .../sysvinit/files/sysvinit-2.88-selinux.patch     |  38 ------
 .../sysvinit/files/sysvinit-2.88-shutdown-h.patch  |  65 ----------
 sys-apps/sysvinit/metadata.xml                     |   8 --
 sys-apps/sysvinit/sysvinit-2.88-r999.ebuild        | 113 ----------------
 12 files changed, 566 deletions(-)

diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
deleted file mode 100644
index 8593b15..0000000
--- a/sys-apps/sysvinit/Manifest
+++ /dev/null
@@ -1,12 +0,0 @@
-AUX inittab-2.87 1789 SHA256 bc1ff4d63a0e4a878f6864f16b2f286c2d4c92c876f0b950f2b9c4bce7746b19 SHA512 cd7f7ea6d3c38753b809dc74c4a436ec90291cf720bcdfbc990b1c43a79ac644149491fbe515d2eda7a53a0c1ee2af272d3ea7630d5d4eab5837ac55627fb9bd WHIRLPOOL a00cc7b77008aaabb7108de0f6258ac81c2c18c4d5a93a1ba07743c4ceb7eccbd91d610ded9351ba36111bdad7d9c22f89bf8bef6e4fafcdbe60d4789c613114
-AUX reboot.sh 304 SHA256 967fa572014ac6dd69f5e7e24d5250abad9c20c644563b927b295778608cafef SHA512 d47cde84e3a3b98b2f24d09d58977e22ec3db23c5860624ce29a40815df1a7aa69d9da92fd13769e19b52291e48d24a930fe536ba16365ada0ad96a6e157b73c WHIRLPOOL 5fc4d2479eda414bbad53ffa9a22d1333b366d84657c816c9019d5050f84de551e8793712c2d4153189c22216afd1ba7dff7aed91544f7a2428fd65114968e42
-AUX shutdown.sh 385 SHA256 2cc84a5194a949f16a82c6215459f4bf6d8156e50d8d9130d310f085bb208d4c SHA512 cffa58c2b548e6aadeb05944cf7b88f93b4b40351766eaf24e0e3f258c03bb24c748311fcbb30c16efa3ed7b9cc0ccaa2be02099e1f37930f599d064da9e2054 WHIRLPOOL 42b63e21e12975c21c5aec479696b836e482b622b81ec7028139f7fea2f6a77d4bf98414ecd139ad5b1c5d698963a15ce5aedd06f7deb60193249f3dbc33c3d9
-AUX sysvinit-2.86-kexec.patch 3910 SHA256 a9d764afc05ae73c2153b024a3b9e3295ba913e14e9684ddf1fd94467e4bc823 SHA512 6ce3adf698554d15394edbe6dbfc62822859854d503b201c9f96bd81c2a8cd249ed44229a85dd8b97f454f9311abc5792e349f5cc512ff6d5570500d88044bee WHIRLPOOL aecabc2b97e80d401bba856a38ab92d66c038eb00fe58e56e7e87d6ecb4ef0ec8e07534430887eb3f204dfac20f2d94e6ea81e2d7597e3a937442f376f703887
-AUX sysvinit-2.86-shutdown-single.patch 1229 SHA256 78852ca410e7ee23bf69cb6e566cb90404d8c8b7bcc10b264f66c97e0359d431 SHA512 b1fa6225cdb0d5ed6d2d3128a9ad29dc76f14845c3fe57aa2edf234af456ae49f700b25ed4170a6337f662be224bd6ddfd424331483b0c482fd33cd045ddc575 WHIRLPOOL a770eec46053c67a047832742197b8d30d8b5e2e27cad0dc4f608cbccde0b5ece7e08102c51372cc0b33304e266e3b03156d12209db14fbe61800b312ad556aa
-AUX sysvinit-2.88-makefile.patch 1545 SHA256 34d6ee50be139ad08b620569df11ac6a4cdf3dae737733dda21a716c4064c194 SHA512 d19e260902f69dd19bfaa4f3e415a816388663a7f89b9d102b27f44c5f2d0654b64ab2e5689a20a3975ff0801e4fb96ef7b6737bfb4ba9466ec58c477de322aa WHIRLPOOL bba46046a59969ac2007c3c932bf07646a5ebece72a216990c185b8eeead724e88cd349219ae528060b9c71a5df97d1e3221691cdbb77e16c9522014c836a76d
-AUX sysvinit-2.88-musl.patch 240 SHA256 392bea0f822852e740280a04b5446d41954cb8627d9edf076d2532a79ab15478 SHA512 cac79c4bc874b987db53d5011fded8a0a038c794bfe884ac9caf901d6098aa9a611150e80f23712c404768e2a0c8fb6ff4c392a269165a0104cb1f18e79b0987 WHIRLPOOL 473f855e5054228612d36e752bd052fa47ae962d757d3a5c4d3f73dbb90becdb106f7a0c4e6c39470a210e53e051b3ba9dd5b3430e640d312a556ded30137654
-AUX sysvinit-2.88-selinux.patch 1041 SHA256 e987ab6e478e5b3987ae1c6e338cfc66ae356f704d0c3ea932f9e4335b4986f0 SHA512 46eeb3ab2dd25f314b9f60b2dc8a7da2aa2aafb978953a730ccc36456d240e317930e86df69ce2592cf45978f3307dfc2522b24ae1158e64ff17dfa6ed84dcb8 WHIRLPOOL 4fe319df09759addf9499367a6da47e8effe93ec0a4ba5b7e7b1d0c746b324a303cdc81eb360c81e529faf41260d69e2b4364d6695b390db9dba1e3d1693c872
-AUX sysvinit-2.88-shutdown-h.patch 1626 SHA256 642585158e6fbb185ed53804be2eeea85c037726ed19beb51a9ffb594e63ca0f SHA512 244ed7c2242f52674153ccfebb92c7a9bdc68a25f98aacbbf107ddfce11b195483e90150619fbeae3167136fcb54b878f8eb77e2dfe225d9f2eeb2c182e5e2fe WHIRLPOOL 6500d8be6313190e5ccf8ca0fe3d51ef879458f59e7ebe1849f666f3c20ffdea21d73f2951e978ac0bf7dce1f47be0113e129db784fdabb6f4407e4d78a3cb0d
-DIST sysvinit-2.88dsf.tar.bz2 105551 SHA256 60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519 SHA512 0bd8eeb124e84fdfa8e621b05f796804ee69a9076b65f5115826bfa814ac1d5d28d31a5c22ebe77c86a93b2288edf4891adc0afaecc4de656c4ecda8a83807bf WHIRLPOOL f4809e19ea2c72c733d3c09a4964d7a6e67b091d1f1d9ef276515b2f138148bfbf516034d3fb1009289f9520f2fbe9e29687f432bba06fb437ebd6e2b9ef570c
-EBUILD sysvinit-2.88-r999.ebuild 3321 SHA256 3c7a1b2e8ce3e743f107fcabc22313ec68222a034e1a0bb594a3aebbe406008b SHA512 74d6ce21c8a9821cf148946c8cf3ab579dea091b6a1c4b73807e6198d021958e240f287f45b454ae4ea9182627607e322054c1f8d2989e55fe4c9146bf4d3a1c WHIRLPOOL 59a41852e599a74d5c84fadd5dc05235c8aa09c1ca0c92572137c8b21a2fffde2f7284bb0cc0db1f8eb688eb85ef348d339cf373cd6c61946b46d04e268459ed
-MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8

diff --git a/sys-apps/sysvinit/files/inittab-2.87 b/sys-apps/sysvinit/files/inittab-2.87
deleted file mode 100644
index 1fcb8bb..0000000
--- a/sys-apps/sysvinit/files/inittab-2.87
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# /etc/inittab:  This file describes how the INIT process should set up
-#                the system in a certain run-level.
-#
-# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
-# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
-# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
-# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
-# Modified by:  Mike Frysinger, <vapier@gentoo.org>
-# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
-#
-# $Id$
-
-# Default runlevel.
-id:3:initdefault:
-
-# System initialization, mount local filesystems, etc.
-si::sysinit:/sbin/rc sysinit
-
-# Further system initialization, brings up the boot runlevel.
-rc::bootwait:/sbin/rc boot
-
-l0:0:wait:/sbin/rc shutdown 
-l0s:0:wait:/sbin/halt -dhp
-l1:1:wait:/sbin/rc single
-l2:2:wait:/sbin/rc nonetwork
-l3:3:wait:/sbin/rc default
-l4:4:wait:/sbin/rc default
-l5:5:wait:/sbin/rc default
-l6:6:wait:/sbin/rc reboot
-l6r:6:wait:/sbin/reboot -dk
-#z6:6:respawn:/sbin/sulogin
-
-# new-style single-user
-su0:S:wait:/sbin/rc single
-su1:S:wait:/sbin/sulogin
-
-# TERMINALS
-c1:12345:respawn:/sbin/agetty 38400 tty1 linux
-c2:2345:respawn:/sbin/agetty 38400 tty2 linux
-c3:2345:respawn:/sbin/agetty 38400 tty3 linux
-c4:2345:respawn:/sbin/agetty 38400 tty4 linux
-c5:2345:respawn:/sbin/agetty 38400 tty5 linux
-c6:2345:respawn:/sbin/agetty 38400 tty6 linux
-
-# SERIAL CONSOLES
-#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
-#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
-
-# What to do at the "Three Finger Salute".
-ca:12345:ctrlaltdel:/sbin/shutdown -r now
-
-# Used by /etc/init.d/xdm to control DM startup.
-# Read the comments in /etc/init.d/xdm for more
-# info. Do NOT remove, as this will start nothing
-# extra at boot if /etc/init.d/xdm is not added
-# to the "default" runlevel.
-x:a:once:/etc/X11/startDM.sh

diff --git a/sys-apps/sysvinit/files/reboot.sh b/sys-apps/sysvinit/files/reboot.sh
deleted file mode 100755
index 3e50f71..0000000
--- a/sys-apps/sysvinit/files/reboot.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-opts="-dpk"
-[ "${RC_DOWN_INTERFACE}" = "yes" ] && opts="${opts}i"
-
-/sbin/reboot "${opts}" 2>/dev/null
-
-# hmm, if the above failed, that's kind of odd ...
-# so let's force a reboot
-/sbin/reboot -f

diff --git a/sys-apps/sysvinit/files/shutdown.sh b/sys-apps/sysvinit/files/shutdown.sh
deleted file mode 100755
index 502ef52..0000000
--- a/sys-apps/sysvinit/files/shutdown.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-opts="-d"
-[ "${INIT_HALT}" != "HALT" ] && opts="${opts}p"
-[ "${RC_DOWN_INTERFACE}" = "yes" ] && opts="${opts}i"
-[ "${RC_DOWN_HARDDISK}" = "yes" ] && opts="${opts}h"
-
-/sbin/halt "${opts}"
-
-# hmm, if the above failed, that's kind of odd ...
-# so let's force a halt
-/sbin/halt -f

diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch b/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
deleted file mode 100644
index 4948806..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-halt: add a -k kexec flag
-
---- a/man/halt.8
-+++ b/man/halt.8
-@@ -40,6 +40,7 @@ halt, reboot, poweroff \- stop the system.
- .RB [ \-d ]
- .RB [ \-f ]
- .RB [ \-i ]
-+.RB [ \-k ]
- .br
- .B /sbin/poweroff
- .RB [ \-n ]
-@@ -83,6 +84,8 @@ Put all hard drives on the system in stand-by mode just before halt or power-off
- .IP \fB\-p\fP
- When halting the system, switch off the power. This is the default when halt is
- called as \fBpoweroff\fP.
-+.IP \fB\-k\fP
-+Try to reboot using \fBkexec\fP, if kernel supports it.
- .\"}}}
- .\"{{{  Diagnostics
- .SH DIAGNOSTICS
---- a/src/halt.c
-+++ b/src/halt.c
-@@ -8,7 +8,7 @@
-  *		execute an "shutdown -r". This is for compatibility with
-  *		sysvinit 2.4.
-  *
-- * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p]
-+ * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] [-k]
-  *		-n: don't sync before halting the system
-  *		-w: only write a wtmp reboot record and exit.
-  *		-d: don't write a wtmp record.
-@@ -16,6 +16,7 @@
-  *		-h: put harddisks in standby mode
-  *		-i: shut down all network interfaces.
-  *		-p: power down the system (if possible, otherwise halt).
-+ *		-k: reboot the system using kexec.
-  *
-  *		Reboot and halt are both this program. Reboot
-  *		is just a link to halt. Invoking the program
-@@ -74,8 +75,10 @@ extern void write_wtmp(char *user, char *id, int pid, int type, char *line);
-  */
- void usage(void)
- {
--	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n",
--		progname, strcmp(progname, "halt") ? "" : " [-p]");
-+	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s%s\n",
-+		progname,
-+		strcmp(progname, "halt") ? "" : " [-p]",
-+		strcmp(progname, "reboot") ? "" : " [-k]");
- 	fprintf(stderr, "\t-n: don't sync before halting the system\n");
- 	fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n");
- 	fprintf(stderr, "\t-d: don't write a wtmp record.\n");
-@@ -84,6 +87,8 @@ void usage(void)
- 	fprintf(stderr, "\t-i: shut down all network interfaces.\n");
- 	if (!strcmp(progname, "halt"))
- 		fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n");
-+	if (!strcmp(progname, "reboot"))
-+		fprintf(stderr, "\t-k: reboot the system using kexec.\n");
- 	exit(1);
- }
- 
-@@ -182,6 +187,7 @@ int main(int argc, char **argv)
- 	int do_ifdown = 0;
- 	int do_hddown = 0;
- 	int do_poweroff = 0;
-+	int do_kexec = 0;
- 	int c;
- 	char *tm = NULL;
- 
-@@ -201,7 +207,7 @@ int main(int argc, char **argv)
- 	/*
- 	 *	Get flags
- 	 */
--	while((c = getopt(argc, argv, ":ihdfnpwt:")) != EOF) {
-+	while((c = getopt(argc, argv, ":ihdfnpwkt:")) != EOF) {
- 		switch(c) {
- 			case 'n':
- 				do_sync = 0;
-@@ -225,6 +231,9 @@ int main(int argc, char **argv)
- 			case 'p':
- 				do_poweroff = 1;
- 				break;
-+			case 'k':
-+				do_kexec = 1;
-+				break;
- 			case 't':
- 				tm = optarg;
- 				break;
-@@ -242,10 +251,24 @@ int main(int argc, char **argv)
- 	(void)chdir("/");
- 
- 	if (!do_hard && !do_nothing) {
-+		c = get_runlevel();
-+
-+		/*
-+		 *	 We can't reboot using kexec through this path.
-+		 */
-+		if (c != '6' && do_reboot && do_kexec) {
-+			fprintf(stderr, "ERROR: using -k at this"
-+				" runlevel requires also -f\n"
-+				"  (You probably want instead to reboot"
-+				" normally and let your reboot\n"
-+				"   script, usually /etc/init.d/reboot,"
-+				" specify -k)\n");
-+			exit(1);
-+		}
-+
- 		/*
- 		 *	See if we are in runlevel 0 or 6.
- 		 */
--		c = get_runlevel();
- 		if (c != '0' && c != '6')
- 			do_shutdown(do_reboot ? "-r" : "-h", tm);
- 	}
-@@ -277,6 +300,15 @@ int main(int argc, char **argv)
- 	if (do_nothing) exit(0);
- 
- 	if (do_reboot) {
-+		/*
-+		 *	kexec or reboot
-+		 */
-+		if (do_kexec)
-+			init_reboot(BMAGIC_KEXEC);
-+
-+		/*
-+		 *	Fall through if failed
-+		 */
- 		init_reboot(BMAGIC_REBOOT);
- 	} else {
- 		/*
---- a/src/reboot.h
-+++ b/src/reboot.h
-@@ -47,5 +47,8 @@
- #  define BMAGIC_POWEROFF	BMAGIC_HALT
- #endif
- 
-+/* for kexec support */
-+#define BMAGIC_KEXEC  0x45584543
-+
- #define init_reboot(magic)	reboot(magic)
- 

diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
deleted file mode 100644
index b8e403f..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-This patch makes shutdown use the Single User runlevel by default so
-the gettys are shutdown too.
-
-Roy Marples <uberlord@gentoo.org>
-
---- a/man/shutdown.8
-+++ b/man/shutdown.8
-@@ -44,7 +44,7 @@ mail and news processing programs a chance to exit cleanly, etc.
- \fBshutdown\fP does its job by signalling the \fBinit\fP process, 
- asking it to change the runlevel.
- Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
--to reboot the system, and runlevel \fB1\fP is used to put to system into
-+to reboot the system, and runlevel \fBS\fP is used to put to system into
- a state where administrative tasks can be performed; this is the default
- if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
- To see which actions are taken on halt or reboot see the appropriate
---- a/src/shutdown.c
-+++ b/src/shutdown.c
-@@ -506,7 +506,7 @@ int main(int argc, char **argv)
- 		usage();
-   		exit(1);
- 	}
--	strcpy(down_level, "1");
-+	strcpy(down_level, "S");
- 	halttype = NULL;
- 
- 	/* Process the options. */
-@@ -685,6 +685,8 @@ int main(int argc, char **argv)
- 			strcpy(newstate, "for reboot");
- 			break;
- 		case '1':
-+		case 'S':
-+		case 's':
- 			strcpy(newstate, "to maintenance mode");
- 			break;
- 		default:

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch b/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
deleted file mode 100644
index 22f463c..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-http://savannah.nongnu.org/bugs/index.php?29758
-
-From 2b7d90f04cdd0e343f413c5c7672615926c02706 Mon Sep 17 00:00:00 2001
-From: wfink <wfink@456724a4-4300-0410-8514-c89748c515a2>
-Date: Tue, 4 May 2010 07:50:12 +0000
-Subject: [PATCH] Fix sysvinit bug #29758
-
-git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@87 456724a4-4300-0410-8514-c89748c515a2
-
-diff --git a/src/Makefile b/src/Makefile
-index e2b8028..19675c5 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -92,9 +92,9 @@ all:		$(BIN) $(SBIN) $(USRBIN)
- init:		LDLIBS += $(INITLIBS) $(STATIC)
- init:		init.o init_utmp.o
- 
--halt:		halt.o ifdown.o hddown.o utmp.o reboot.h
-+halt:		halt.o ifdown.o hddown.o utmp.o
- 
--last:		last.o oldutmp.h
-+last:		last.o
- 
- mesg:		mesg.o
- 
-@@ -109,7 +109,7 @@ sulogin:	sulogin.o
- 
- wall:		dowall.o wall.o
- 
--shutdown:	dowall.o shutdown.o utmp.o reboot.h
-+shutdown:	dowall.o shutdown.o utmp.o
- 
- bootlogd:	LDLIBS += -lutil
- bootlogd:	bootlogd.o
-@@ -118,14 +118,22 @@ sulogin.o:	CPPFLAGS += $(SELINUX_DEF)
- sulogin.o:	sulogin.c 
- 
- init.o:		CPPFLAGS += $(SELINUX_DEF)
--init.o:		init.c init.h set.h reboot.h initreq.h
-+init.o:		init.c init.h initreq.h paths.h reboot.h set.h
- 
--utmp.o:		utmp.c init.h
-+utmp.o:		
- 
- init_utmp.o:	CPPFLAGS += -DINIT_MAIN
--init_utmp.o:	utmp.c init.h
-+init_utmp.o:	utmp.c init.h initreq.h paths.h
- 		$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
- 
-+utmpdump.o:	utmpdump.c oldutmp.h
-+
-+shutdown.o:	shutdown.c paths.h reboot.h initreq.h init.h
-+
-+halt.o:		halt.c reboot.h
-+
-+last.o:		last.c oldutmp.h
-+
- cleanobjs:
- 		rm -f *.o *.bak
- 

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-musl.patch b/sys-apps/sysvinit/files/sysvinit-2.88-musl.patch
deleted file mode 100644
index 6011278..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.88-musl.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- sysvinit-2.88dsf.org/src/init.c
-+++ sysvinit-2.88dsf/src/init.c
-@@ -51,6 +51,7 @@
- #include <stdarg.h>
- #include <sys/syslog.h>
- #include <sys/time.h>
-+#include <sys/ttydefaults.h>
- 
- #ifdef WITH_SELINUX
- #  include <selinux/selinux.h>

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch b/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch
deleted file mode 100644
index 91b7435..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.88-selinux.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-http://svn.savannah.nongnu.org/viewvc?view=rev&root=sysvinit&revision=90
-https://bugs.gentoo.org/326697
-
---- sysvinit/trunk/src/init.c	2010/05/07 15:16:26	89
-+++ sysvinit/trunk/src/init.c	2010/05/17 09:44:34	90
-@@ -54,10 +54,6 @@
- 
- #ifdef WITH_SELINUX
- #  include <selinux/selinux.h>
--#  include <sys/mount.h>
--#  ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */
--#    define MNT_DETACH 2
--#  endif
- #endif
- 
- #ifdef __i386__
-@@ -2872,11 +2868,9 @@
- 
- #ifdef WITH_SELINUX
- 	if (getenv("SELINUX_INIT") == NULL) {
--	  const int rc = mount("proc", "/proc", "proc", 0, 0);
--	  if (is_selinux_enabled() > 0) {
--	    putenv("SELINUX_INIT=YES");
--	    if (rc == 0) umount2("/proc", MNT_DETACH);
-+         if (is_selinux_enabled() != 1) {
- 	    if (selinux_init_load_policy(&enforce) == 0) {
-+             putenv("SELINUX_INIT=YES");
- 	      execv(myname, argv);
- 	    } else {
- 	      if (enforce > 0) {
-@@ -2887,7 +2881,6 @@
- 	      }
- 	    }
- 	  }
--	  if (rc == 0) umount2("/proc", MNT_DETACH);
- 	}
- #endif  
- 	/* Start booting. */

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
deleted file mode 100644
index 716999c..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-other inits have moved to not requiring the -h flag when used with -H/-P.
-modify sysvinit to be the same since it really doesn't matter.
-
-https://bugs.gentoo.org/449354
-
-patch by Doug Goldstein
-
---- sysvinit-2.88dsf/man/shutdown.8
-+++ sysvinit-2.88dsf/man/shutdown.8
-@@ -66,16 +66,15 @@
- .\"}}}
- .\"{{{  -h
- .IP \fB\-h\fP
--Halt or power off after shutdown.
-+Equivalent to -P, unless -H is specified.
- .\"}}}
- .\"{{{  -P
- .IP \fB\-P\fP
--Halt action is to turn off the power.
-+Action is to power-off the machine.
- .\"}}}
- .\"{{{  -H
- .IP \fB\-H\fP
--Modifier to the -h flag.  Halt action is to halt or drop into boot
--monitor on systems that support it.  Must be used with the -h flag.
-+Action is to halt the machine.
- .\"}}}
- .\"{{{  -f
- .IP \fB\-f\fP
---- sysvinit-2.88dsf/src/shutdown.c
-+++ sysvinit-2.88dsf/src/shutdown.c
-@@ -514,9 +514,11 @@
-   		switch(c) {
- 			case 'H':
- 				halttype = "HALT";
-+				down_level[0] = '0';
- 				break;
- 			case 'P':
- 				halttype = "POWERDOWN";
-+				down_level[0] = '0';
- 				break;
- 			case 'a': /* Access control. */
- 				useacl = 1;
-@@ -532,6 +534,8 @@
-   				break;
-   			case 'h': /* Halt after shutdown */
- 				down_level[0] = '0';
-+				if (!halttype)
-+					halttype = "POWERDOWN";
-   				break;
-   			case 'f': /* Don't perform fsck after next boot */
-   				fastboot = 1;
-@@ -565,12 +569,6 @@
-   		}
- 	}
- 
--	if (NULL != halttype && down_level[0] != '0') {
--		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
--		usage();
--  		exit(1);
--	}
--
- 	/* Do we need to use the shutdown.allow file ? */
- 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
- 

diff --git a/sys-apps/sysvinit/metadata.xml b/sys-apps/sysvinit/metadata.xml
deleted file mode 100644
index 56c1244..0000000
--- a/sys-apps/sysvinit/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
-	<email>base-system@gentoo.org</email>
-	<name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>

diff --git a/sys-apps/sysvinit/sysvinit-2.88-r999.ebuild b/sys-apps/sysvinit/sysvinit-2.88-r999.ebuild
deleted file mode 100644
index 753b0bd..0000000
--- a/sys-apps/sysvinit/sysvinit-2.88-r999.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="/sbin/init - parent of all processes"
-HOMEPAGE="http://savannah.nongnu.org/projects/sysvinit"
-SRC_URI="mirror://nongnu/${PN}/${P}dsf.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
-IUSE="selinux ibm static kernel_FreeBSD"
-
-RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )"
-DEPEND="${RDEPEND}
-	virtual/os-headers"
-
-S=${WORKDIR}/${P}dsf
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-2.86-kexec.patch #80220
-	epatch "${FILESDIR}"/${PN}-2.86-shutdown-single.patch #158615
-	epatch "${FILESDIR}"/${P}-makefile.patch #319197
-	epatch "${FILESDIR}"/${P}-selinux.patch #326697
-	epatch "${FILESDIR}"/${P}-shutdown-h.patch #449354
-	epatch "${FILESDIR}"/${P}-musl.patch
-	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
-
-	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
-	sed -i -r \
-		-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
-		-e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
-		src/Makefile || die
-
-	# pidof has moved to >=procps-3.3.9
-	sed -i -r \
-		-e '/\/bin\/pidof/d' \
-		-e '/^MAN8/s:\<pidof.8\>::g' \
-		src/Makefile || die
-
-	# Mung inittab for specific architectures
-	cd "${WORKDIR}"
-	cp "${FILESDIR}"/inittab-2.87 inittab || die "cp inittab"
-	local insert=()
-	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
-	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
-	use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
-	use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
-	use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
-	if use ibm ; then
-		insert+=(
-			'#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
-			'#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
-		)
-	fi
-	(use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
-	if use kernel_FreeBSD ; then
-		sed -i \
-			-e 's/linux/cons25/g' \
-			-e 's/ttyS0/cuaa0/g' \
-			-e 's/ttyS1/cuaa1/g' \
-			inittab #121786
-	fi
-	if use x86 || use amd64 ; then
-		sed -i \
-			-e '/ttyS[01]/s:9600:115200:' \
-			inittab
-	fi
-	if [[ ${#insert[@]} -gt 0 ]] ; then
-		printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
-	fi
-}
-
-src_compile() {
-	local myconf
-
-	tc-export CC
-	append-lfs-flags
-	export DISTRO= #381311
-	use static && append-ldflags -static
-	use selinux && myconf=WITH_SELINUX=yes
-	emake -C src ${myconf} || die
-}
-
-src_install() {
-	emake -C src install ROOT="${D}"
-	dodoc README doc/*
-
-	insinto /etc
-	doins "${WORKDIR}"/inittab
-
-	# dead symlink
-	rm -f "${D}"/usr/bin/lastb
-
-	doinitd "${FILESDIR}"/{reboot,shutdown}.sh
-}
-
-pkg_postinst() {
-	# Reload init to fix unmounting problems of / on next reboot.
-	# This is really needed, as without the new version of init cause init
-	# not to quit properly on reboot, and causes a fsck of / on next reboot.
-	if [[ ${ROOT} == / ]] ; then
-		# Do not return an error if this fails
-		/sbin/telinit U &>/dev/null
-	fi
-
-	elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
-	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
@ 2018-11-25  1:31 Anthony G. Basile
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2018-11-25  1:31 UTC (permalink / raw
  To: gentoo-commits

commit:     285b520a169db96d841536f648189097e488e829
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 01:30:53 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Nov 25 01:30:53 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=285b520a

sys-apps/sysvinit: stack protector is broken on musl x86

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-apps/sysvinit/Manifest                         |   2 +
 sys-apps/sysvinit/files/bootlogd                   |  12 ++
 sys-apps/sysvinit/files/inittab-2.91               |  61 +++++++++
 sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch  | 142 +++++++++++++++++++++
 .../files/sysvinit-2.86-shutdown-single.patch      |  36 ++++++
 .../sysvinit/files/sysvinit-2.88-shutdown-h.patch  |  65 ++++++++++
 .../files/sysvinit-2.92_beta-shutdown-h.patch      |  81 ++++++++++++
 sys-apps/sysvinit/metadata.xml                     |  12 ++
 sys-apps/sysvinit/sysvinit-2.91-r1.ebuild          | 120 +++++++++++++++++
 sys-apps/sysvinit/sysvinit-2.92.ebuild             | 125 ++++++++++++++++++
 10 files changed, 656 insertions(+)

diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
new file mode 100644
index 0000000..59f5d29
--- /dev/null
+++ b/sys-apps/sysvinit/Manifest
@@ -0,0 +1,2 @@
+DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5
+DIST sysvinit-2.92.tar.xz 117560 BLAKE2B 300c9b7dffb5a07ece9b12682bf49816143215953527b69fe80c4f7f9b487de6c812213c9a851c5636de3989889b3179ace9a17b35c985729655a7c877b67170 SHA512 1395943540bc52d999de64c426c7f807d7688166591a8104e6c8cec2f45f13e0e3dd3d182b91194402c38172f412424a6c7d8c09662b3b5169ba6f928b5592a9

diff --git a/sys-apps/sysvinit/files/bootlogd b/sys-apps/sysvinit/files/bootlogd
new file mode 100755
index 0000000..3f3e363
--- /dev/null
+++ b/sys-apps/sysvinit/files/bootlogd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="bootlogd - record boot messages (sysvinit)"
+pidfile="/run/bootlogd"
+command="/sbin/bootlogd"
+command_args="-c -p ${pidfile}"
+
+depend() {
+	need localmount root
+}

diff --git a/sys-apps/sysvinit/files/inittab-2.91 b/sys-apps/sysvinit/files/inittab-2.91
new file mode 100644
index 0000000..f9ed8d1
--- /dev/null
+++ b/sys-apps/sysvinit/files/inittab-2.91
@@ -0,0 +1,61 @@
+#
+# /etc/inittab:  This file describes how the INIT process should set up
+#                the system in a certain run-level.
+#
+# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
+# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
+# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
+# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
+# Modified by:  Mike Frysinger, <vapier@gentoo.org>
+# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
+# Modified by:  William Hubbs, <williamh@gentoo.org>
+#
+
+# Default runlevel.
+id:3:initdefault:
+
+# System initialization, mount local filesystems, etc.
+si::sysinit:/sbin/openrc sysinit
+
+# Further system initialization, brings up the boot runlevel.
+rc::bootwait:/sbin/openrc boot
+
+l0u:0:wait:/sbin/telinit u
+l0:0:wait:/sbin/openrc shutdown
+l0s:0:wait:/sbin/halt -dhnp
+l1:1:wait:/sbin/openrc single
+l2:2:wait:/sbin/openrc nonetwork
+l3:3:wait:/sbin/openrc default
+l4:4:wait:/sbin/openrc default
+l5:5:wait:/sbin/openrc default
+l6u:6:wait:/sbin/telinit u
+l6:6:wait:/sbin/openrc reboot
+l6r:6:wait:/sbin/reboot -dkn
+#z6:6:respawn:/sbin/sulogin
+
+# new-style single-user
+su0:S:wait:/sbin/openrc single
+su1:S:wait:/sbin/sulogin
+
+# TERMINALS
+#x1:12345:respawn:/sbin/agetty 38400 console linux
+c1:12345:respawn:/sbin/agetty 38400 tty1 linux
+c2:2345:respawn:/sbin/agetty 38400 tty2 linux
+c3:2345:respawn:/sbin/agetty 38400 tty3 linux
+c4:2345:respawn:/sbin/agetty 38400 tty4 linux
+c5:2345:respawn:/sbin/agetty 38400 tty5 linux
+c6:2345:respawn:/sbin/agetty 38400 tty6 linux
+
+# SERIAL CONSOLES
+#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
+#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
+
+# What to do at the "Three Finger Salute".
+ca:12345:ctrlaltdel:/sbin/shutdown -r now
+
+# Used by /etc/init.d/xdm to control DM startup.
+# Read the comments in /etc/init.d/xdm for more
+# info. Do NOT remove, as this will start nothing
+# extra at boot if /etc/init.d/xdm is not added
+# to the "default" runlevel.
+x:a:once:/etc/X11/startDM.sh

diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch b/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
new file mode 100644
index 0000000..4948806
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch
@@ -0,0 +1,142 @@
+halt: add a -k kexec flag
+
+--- a/man/halt.8
++++ b/man/halt.8
+@@ -40,6 +40,7 @@ halt, reboot, poweroff \- stop the system.
+ .RB [ \-d ]
+ .RB [ \-f ]
+ .RB [ \-i ]
++.RB [ \-k ]
+ .br
+ .B /sbin/poweroff
+ .RB [ \-n ]
+@@ -83,6 +84,8 @@ Put all hard drives on the system in stand-by mode just before halt or power-off
+ .IP \fB\-p\fP
+ When halting the system, switch off the power. This is the default when halt is
+ called as \fBpoweroff\fP.
++.IP \fB\-k\fP
++Try to reboot using \fBkexec\fP, if kernel supports it.
+ .\"}}}
+ .\"{{{  Diagnostics
+ .SH DIAGNOSTICS
+--- a/src/halt.c
++++ b/src/halt.c
+@@ -8,7 +8,7 @@
+  *		execute an "shutdown -r". This is for compatibility with
+  *		sysvinit 2.4.
+  *
+- * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p]
++ * Usage:	halt [-n] [-w] [-d] [-f] [-h] [-i] [-p] [-k]
+  *		-n: don't sync before halting the system
+  *		-w: only write a wtmp reboot record and exit.
+  *		-d: don't write a wtmp record.
+@@ -16,6 +16,7 @@
+  *		-h: put harddisks in standby mode
+  *		-i: shut down all network interfaces.
+  *		-p: power down the system (if possible, otherwise halt).
++ *		-k: reboot the system using kexec.
+  *
+  *		Reboot and halt are both this program. Reboot
+  *		is just a link to halt. Invoking the program
+@@ -74,8 +75,10 @@ extern void write_wtmp(char *user, char *id, int pid, int type, char *line);
+  */
+ void usage(void)
+ {
+-	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n",
+-		progname, strcmp(progname, "halt") ? "" : " [-p]");
++	fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s%s\n",
++		progname,
++		strcmp(progname, "halt") ? "" : " [-p]",
++		strcmp(progname, "reboot") ? "" : " [-k]");
+ 	fprintf(stderr, "\t-n: don't sync before halting the system\n");
+ 	fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n");
+ 	fprintf(stderr, "\t-d: don't write a wtmp record.\n");
+@@ -84,6 +87,8 @@ void usage(void)
+ 	fprintf(stderr, "\t-i: shut down all network interfaces.\n");
+ 	if (!strcmp(progname, "halt"))
+ 		fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n");
++	if (!strcmp(progname, "reboot"))
++		fprintf(stderr, "\t-k: reboot the system using kexec.\n");
+ 	exit(1);
+ }
+ 
+@@ -182,6 +187,7 @@ int main(int argc, char **argv)
+ 	int do_ifdown = 0;
+ 	int do_hddown = 0;
+ 	int do_poweroff = 0;
++	int do_kexec = 0;
+ 	int c;
+ 	char *tm = NULL;
+ 
+@@ -201,7 +207,7 @@ int main(int argc, char **argv)
+ 	/*
+ 	 *	Get flags
+ 	 */
+-	while((c = getopt(argc, argv, ":ihdfnpwt:")) != EOF) {
++	while((c = getopt(argc, argv, ":ihdfnpwkt:")) != EOF) {
+ 		switch(c) {
+ 			case 'n':
+ 				do_sync = 0;
+@@ -225,6 +231,9 @@ int main(int argc, char **argv)
+ 			case 'p':
+ 				do_poweroff = 1;
+ 				break;
++			case 'k':
++				do_kexec = 1;
++				break;
+ 			case 't':
+ 				tm = optarg;
+ 				break;
+@@ -242,10 +251,24 @@ int main(int argc, char **argv)
+ 	(void)chdir("/");
+ 
+ 	if (!do_hard && !do_nothing) {
++		c = get_runlevel();
++
++		/*
++		 *	 We can't reboot using kexec through this path.
++		 */
++		if (c != '6' && do_reboot && do_kexec) {
++			fprintf(stderr, "ERROR: using -k at this"
++				" runlevel requires also -f\n"
++				"  (You probably want instead to reboot"
++				" normally and let your reboot\n"
++				"   script, usually /etc/init.d/reboot,"
++				" specify -k)\n");
++			exit(1);
++		}
++
+ 		/*
+ 		 *	See if we are in runlevel 0 or 6.
+ 		 */
+-		c = get_runlevel();
+ 		if (c != '0' && c != '6')
+ 			do_shutdown(do_reboot ? "-r" : "-h", tm);
+ 	}
+@@ -277,6 +300,15 @@ int main(int argc, char **argv)
+ 	if (do_nothing) exit(0);
+ 
+ 	if (do_reboot) {
++		/*
++		 *	kexec or reboot
++		 */
++		if (do_kexec)
++			init_reboot(BMAGIC_KEXEC);
++
++		/*
++		 *	Fall through if failed
++		 */
+ 		init_reboot(BMAGIC_REBOOT);
+ 	} else {
+ 		/*
+--- a/src/reboot.h
++++ b/src/reboot.h
+@@ -47,5 +47,8 @@
+ #  define BMAGIC_POWEROFF	BMAGIC_HALT
+ #endif
+ 
++/* for kexec support */
++#define BMAGIC_KEXEC  0x45584543
++
+ #define init_reboot(magic)	reboot(magic)
+ 

diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
new file mode 100644
index 0000000..b8e403f
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch
@@ -0,0 +1,36 @@
+This patch makes shutdown use the Single User runlevel by default so
+the gettys are shutdown too.
+
+Roy Marples <uberlord@gentoo.org>
+
+--- a/man/shutdown.8
++++ b/man/shutdown.8
+@@ -44,7 +44,7 @@ mail and news processing programs a chance to exit cleanly, etc.
+ \fBshutdown\fP does its job by signalling the \fBinit\fP process, 
+ asking it to change the runlevel.
+ Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
+-to reboot the system, and runlevel \fB1\fP is used to put to system into
++to reboot the system, and runlevel \fBS\fP is used to put to system into
+ a state where administrative tasks can be performed; this is the default
+ if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
+ To see which actions are taken on halt or reboot see the appropriate
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -506,7 +506,7 @@ int main(int argc, char **argv)
+ 		usage();
+   		exit(1);
+ 	}
+-	strcpy(down_level, "1");
++	strcpy(down_level, "S");
+ 	halttype = NULL;
+ 
+ 	/* Process the options. */
+@@ -685,6 +685,8 @@ int main(int argc, char **argv)
+ 			strcpy(newstate, "for reboot");
+ 			break;
+ 		case '1':
++		case 'S':
++		case 's':
+ 			strcpy(newstate, "to maintenance mode");
+ 			break;
+ 		default:

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
new file mode 100644
index 0000000..716999c
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
@@ -0,0 +1,65 @@
+other inits have moved to not requiring the -h flag when used with -H/-P.
+modify sysvinit to be the same since it really doesn't matter.
+
+https://bugs.gentoo.org/449354
+
+patch by Doug Goldstein
+
+--- sysvinit-2.88dsf/man/shutdown.8
++++ sysvinit-2.88dsf/man/shutdown.8
+@@ -66,16 +66,15 @@
+ .\"}}}
+ .\"{{{  -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{  -P
+ .IP \fB\-P\fP
+-Halt action is to turn off the power.
++Action is to power-off the machine.
+ .\"}}}
+ .\"{{{  -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag.  Halt action is to halt or drop into boot
+-monitor on systems that support it.  Must be used with the -h flag.
++Action is to halt the machine.
+ .\"}}}
+ .\"{{{  -f
+ .IP \fB\-f\fP
+--- sysvinit-2.88dsf/src/shutdown.c
++++ sysvinit-2.88dsf/src/shutdown.c
+@@ -514,9 +514,11 @@
+   		switch(c) {
+ 			case 'H':
+ 				halttype = "HALT";
++				down_level[0] = '0';
+ 				break;
+ 			case 'P':
+ 				halttype = "POWERDOWN";
++				down_level[0] = '0';
+ 				break;
+ 			case 'a': /* Access control. */
+ 				useacl = 1;
+@@ -532,6 +534,8 @@
+   				break;
+   			case 'h': /* Halt after shutdown */
+ 				down_level[0] = '0';
++				if (!halttype)
++					halttype = "POWERDOWN";
+   				break;
+   			case 'f': /* Don't perform fsck after next boot */
+   				fastboot = 1;
+@@ -565,12 +569,6 @@
+   		}
+ 	}
+ 
+-	if (NULL != halttype && down_level[0] != '0') {
+-		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+-		usage();
+-  		exit(1);
+-	}
+-
+ 	/* Do we need to use the shutdown.allow file ? */
+ 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
+ 

diff --git a/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
new file mode 100644
index 0000000..e53a920
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
@@ -0,0 +1,81 @@
+other inits have moved to not requiring the -h flag when used with -H/-P.
+modify sysvinit to be the same since it really doesn't matter.
+
+https://bugs.gentoo.org/449354
+
+patch by Doug Goldstein
+
+---
+ man/shutdown.8 |    8 +++-----
+ src/shutdown.c |   12 ++++--------
+ 2 files changed, 7 insertions(+), 13 deletions(-)
+
+--- sysvinit-2.92/man/shutdown.8
++++ sysvinit-2.92/man/shutdown.8
+@@ -66,17 +66,15 @@
+ .\"}}}
+ .\"{{{  -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{  -P
+ .IP \fB\-P\fP
+-Modifier to the -h flag. Halt action is to turn off the power. 
+-Must be used with the -h flag.
++Action is to turn off the power. 
+ .\"}}}
+ .\"{{{  -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag.  Halt action is to halt or drop into boot
+-monitor on systems that support it.  Must be used with the -h flag.
++Action is to halt or drop into boot monitor on systems that support it.
+ .\"}}}
+ .\"{{{  -f
+ .IP \fB\-f\fP
+--- sysvinit-2.92/src/shutdown.c
++++ sysvinit-2.92/src/shutdown.c
+@@ -135,9 +135,7 @@
+ 	"\t\t  -r:      reboot after shutdown.\n"
+ 	"\t\t  -h:      halt after shutdown.\n"
+ 	"\t\t  -P:      halt action is to turn off power.\n"
+-        "\t\t           can only be used along with -h flag.\n"
+ 	"\t\t  -H:      halt action is to just halt.\n"
+-        "\t\t           can only be used along with -h flag.\n"
+ 	"\t\t  -f:      do a 'fast' reboot (skip fsck).\n"
+ 	"\t\t  -F:      Force fsck on reboot.\n"
+ 	"\t\t  -n:      do not go through \"init\" but go down real fast.\n"
+@@ -546,9 +544,11 @@
+   		switch(c) {
+ 			case 'H':
+ 				halttype = "HALT";
++				down_level[0] = '0';
+ 				break;
+ 			case 'P':
+ 				halttype = "POWEROFF";
++				down_level[0] = '0';
+ 				break;
+ 			case 'a': /* Access control. */
+ 				useacl = 1;
+@@ -564,6 +564,8 @@
+   				break;
+   			case 'h': /* Halt after shutdown */
+ 				down_level[0] = '0';
++				if (!halttype)
++					halttype = "POWEROFF";
+   				break;
+   			case 'f': /* Don't perform fsck after next boot */
+   				fastboot = 1;
+@@ -603,12 +605,6 @@
+   		}
+ 	}
+ 
+-	if (NULL != halttype && down_level[0] != '0') {
+-		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+-		usage();
+-  		exit(1);
+-	}
+-
+ 	/* Do we need to use the shutdown.allow file ? */
+ 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
+ 

diff --git a/sys-apps/sysvinit/metadata.xml b/sys-apps/sysvinit/metadata.xml
new file mode 100644
index 0000000..53e0495
--- /dev/null
+++ b/sys-apps/sysvinit/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+	<email>williamh@gentoo.org</email>
+	<name>William Hubbs</name>
+</maintainer>
+<maintainer type="project">
+	<email>base-system@gentoo.org</email>
+	<name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>

diff --git a/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild b/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild
new file mode 100644
index 0000000..c16000d
--- /dev/null
+++ b/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="/sbin/init - parent of all processes"
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+IUSE="selinux ibm static kernel_FreeBSD"
+
+CDEPEND="
+	selinux? (
+		>=sys-libs/libselinux-1.28
+	)"
+DEPEND="${CDEPEND}
+	virtual/os-headers"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-shutdown )
+	!<sys-apps/openrc-0.13
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.86-kexec.patch" #80220
+	"${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
+	"${FILESDIR}/${PN}-2.88-shutdown-h.patch" #449354
+)
+
+src_prepare() {
+	default
+	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
+
+	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
+	sed -i -r \
+		-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
+		-e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
+		src/Makefile || die
+
+	# pidof has moved to >=procps-3.3.9
+	sed -i -r \
+		-e '/\/bin\/pidof/d' \
+		-e '/^MAN8/s:\<pidof.8\>::g' \
+		src/Makefile || die
+
+	# stack protector is broken no x86 musl
+	sed -i 's/-fstack-protector-strong//' src/Makefile || die
+
+	# Mung inittab for specific architectures
+	cd "${WORKDIR}" || die
+	cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
+	local insert=()
+	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
+	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
+	use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
+	use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
+	use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
+	if use ibm ; then
+		insert+=(
+			'#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
+			'#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
+		)
+	fi
+	(use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
+	if use kernel_FreeBSD ; then
+		sed -i \
+			-e 's/linux/cons25/g' \
+			-e 's/ttyS0/cuaa0/g' \
+			-e 's/ttyS1/cuaa1/g' \
+			inittab #121786
+	fi
+	if use x86 || use amd64 ; then
+		sed -i \
+			-e '/ttyS[01]/s:9600:115200:' \
+			inittab
+	fi
+	if [[ ${#insert[@]} -gt 0 ]] ; then
+		printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
+	fi
+}
+
+src_compile() {
+	tc-export CC
+	append-lfs-flags
+	export DISTRO= #381311
+	export VERSION="${PV}"
+	use static && append-ldflags -static
+	emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
+}
+
+src_install() {
+	emake -C src install ROOT="${D}"
+	dodoc README doc/*
+
+	insinto /etc
+	doins "${WORKDIR}"/inittab
+
+	# dead symlink
+	rm "${ED%/}"/usr/bin/lastb || die
+}
+
+pkg_postinst() {
+	# Reload init to fix unmounting problems of / on next reboot.
+	# This is really needed, as without the new version of init cause init
+	# not to quit properly on reboot, and causes a fsck of / on next reboot.
+	if [[ ${ROOT} == / ]] ; then
+		if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
+			ln -s /dev/initctl /run/initctl
+		fi
+		# Do not return an error if this fails
+		/sbin/telinit U &>/dev/null
+	fi
+
+	elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
+	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
+}

diff --git a/sys-apps/sysvinit/sysvinit-2.92.ebuild b/sys-apps/sysvinit/sysvinit-2.92.ebuild
new file mode 100644
index 0000000..87aed4d
--- /dev/null
+++ b/sys-apps/sysvinit/sysvinit-2.92.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="/sbin/init - parent of all processes"
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
+SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *beta* ]] || \
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+IUSE="selinux ibm static kernel_FreeBSD"
+
+CDEPEND="
+	selinux? (
+		>=sys-libs/libselinux-1.28
+	)"
+DEPEND="${CDEPEND}
+	virtual/os-headers"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-shutdown )
+	!<sys-apps/openrc-0.13
+"
+
+S="${WORKDIR}/${P/_*}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.86-kexec.patch" #80220
+	"${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
+	"${FILESDIR}/${PN}-2.92_beta-shutdown-h.patch" #449354
+)
+
+src_prepare() {
+	default
+	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
+
+	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
+	sed -i -r \
+		-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
+		-e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
+		src/Makefile || die
+
+	# pidof has moved to >=procps-3.3.9
+	sed -i -r \
+		-e '/\/bin\/pidof/d' \
+		-e '/^MAN8/s:\<pidof.8\>::g' \
+		src/Makefile || die
+
+	# stack protector is broken no x86 musl
+	sed -i 's/-fstack-protector-strong//' src/Makefile || die
+
+	# Mung inittab for specific architectures
+	cd "${WORKDIR}" || die
+	cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
+	local insert=()
+	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
+	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
+	use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
+	use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
+	use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
+	if use ibm ; then
+		insert+=(
+			'#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
+			'#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
+		)
+	fi
+	(use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
+	if use kernel_FreeBSD ; then
+		sed -i \
+			-e 's/linux/cons25/g' \
+			-e 's/ttyS0/cuaa0/g' \
+			-e 's/ttyS1/cuaa1/g' \
+			inittab #121786
+	fi
+	if use x86 || use amd64 ; then
+		sed -i \
+			-e '/ttyS[01]/s:9600:115200:' \
+			inittab
+	fi
+	if [[ ${#insert[@]} -gt 0 ]] ; then
+		printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
+	fi
+}
+
+src_compile() {
+	tc-export CC
+	append-lfs-flags
+	export DISTRO= #381311
+	export VERSION="${PV}"
+	use static && append-ldflags -static
+	emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
+}
+
+src_install() {
+	emake -C src install ROOT="${D}"
+	dodoc README doc/*
+
+	insinto /etc
+	doins "${WORKDIR}"/inittab
+
+	# dead symlink
+	rm "${ED%/}"/usr/bin/lastb || die
+
+	doinitd "${FILESDIR}"/bootlogd
+}
+
+pkg_postinst() {
+	# Reload init to fix unmounting problems of / on next reboot.
+	# This is really needed, as without the new version of init cause init
+	# not to quit properly on reboot, and causes a fsck of / on next reboot.
+	if [[ ${ROOT} == / ]] ; then
+		if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
+			ln -s /dev/initctl /run/initctl
+		fi
+		# Do not return an error if this fails
+		/sbin/telinit U &>/dev/null
+	fi
+
+	elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
+	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
@ 2019-03-10 16:02 Anthony G. Basile
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2019-03-10 16:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1cd5d4b625d39070e7cd45e57cf6a755b338b57b
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 10 16:01:51 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Mar 10 16:01:51 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=1cd5d4b6

sys-apps/sysvinit: remove older versions

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-apps/sysvinit/Manifest                         |   2 -
 sys-apps/sysvinit/files/bootlogd.initd             |   8 ++
 .../sysvinit/files/sysvinit-2.88-shutdown-h.patch  |  65 -----------
 .../files/sysvinit-2.94_beta-shutdown-single.patch |  39 +++++++
 sys-apps/sysvinit/sysvinit-2.91-r1.ebuild          | 120 --------------------
 sys-apps/sysvinit/sysvinit-2.92.ebuild             | 125 ---------------------
 6 files changed, 47 insertions(+), 312 deletions(-)

diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
index d2cce31..8599133 100644
--- a/sys-apps/sysvinit/Manifest
+++ b/sys-apps/sysvinit/Manifest
@@ -1,4 +1,2 @@
-DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5
-DIST sysvinit-2.92.tar.xz 117560 BLAKE2B 300c9b7dffb5a07ece9b12682bf49816143215953527b69fe80c4f7f9b487de6c812213c9a851c5636de3989889b3179ace9a17b35c985729655a7c877b67170 SHA512 1395943540bc52d999de64c426c7f807d7688166591a8104e6c8cec2f45f13e0e3dd3d182b91194402c38172f412424a6c7d8c09662b3b5169ba6f928b5592a9
 DIST sysvinit-2.93.tar.xz 117580 BLAKE2B 2e771b00dbdc73e76df9e78659aaa5e5fcbfda36290a1b5aa20a5a6fe3540c4616f2a235a668de30d33c620e2d2516da303537eda47b83b29b0844ad7aa77df4 SHA512 c80d07a674253d15ec6382cfaf792f47486e2e84ab9c913d3c9e03b590cf211177a3a14e168f4d1c9c2e97737221f7ac70a75633d90502837a6d29bdc4c48d72
 DIST sysvinit-2.94.tar.xz 120900 BLAKE2B e45a95246325e93ef49f11573924216937e238761cb9f5979ae2b272838fb3280b1d12c9553992271f7926dc7c7bc18e352a8019a70f54c592971fe043453804 SHA512 8d3b7b777f7c37cf5eaf73d4cdfad8ac54c6115577052bd7ddf3588da8fb7d16b812ffaade0ce300c2c6b7d2acd6e7778130544befc171eab174ee8766b3ec50

diff --git a/sys-apps/sysvinit/files/bootlogd.initd b/sys-apps/sysvinit/files/bootlogd.initd
new file mode 100644
index 0000000..11b3ab7
--- /dev/null
+++ b/sys-apps/sysvinit/files/bootlogd.initd
@@ -0,0 +1,8 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="bootlogd - record boot messages (sysvinit)"
+pidfile="/run/bootlogd"
+command="/sbin/bootlogd"
+command_args="-p ${pidfile}"

diff --git a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
deleted file mode 100644
index 716999c..0000000
--- a/sys-apps/sysvinit/files/sysvinit-2.88-shutdown-h.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-other inits have moved to not requiring the -h flag when used with -H/-P.
-modify sysvinit to be the same since it really doesn't matter.
-
-https://bugs.gentoo.org/449354
-
-patch by Doug Goldstein
-
---- sysvinit-2.88dsf/man/shutdown.8
-+++ sysvinit-2.88dsf/man/shutdown.8
-@@ -66,16 +66,15 @@
- .\"}}}
- .\"{{{  -h
- .IP \fB\-h\fP
--Halt or power off after shutdown.
-+Equivalent to -P, unless -H is specified.
- .\"}}}
- .\"{{{  -P
- .IP \fB\-P\fP
--Halt action is to turn off the power.
-+Action is to power-off the machine.
- .\"}}}
- .\"{{{  -H
- .IP \fB\-H\fP
--Modifier to the -h flag.  Halt action is to halt or drop into boot
--monitor on systems that support it.  Must be used with the -h flag.
-+Action is to halt the machine.
- .\"}}}
- .\"{{{  -f
- .IP \fB\-f\fP
---- sysvinit-2.88dsf/src/shutdown.c
-+++ sysvinit-2.88dsf/src/shutdown.c
-@@ -514,9 +514,11 @@
-   		switch(c) {
- 			case 'H':
- 				halttype = "HALT";
-+				down_level[0] = '0';
- 				break;
- 			case 'P':
- 				halttype = "POWERDOWN";
-+				down_level[0] = '0';
- 				break;
- 			case 'a': /* Access control. */
- 				useacl = 1;
-@@ -532,6 +534,8 @@
-   				break;
-   			case 'h': /* Halt after shutdown */
- 				down_level[0] = '0';
-+				if (!halttype)
-+					halttype = "POWERDOWN";
-   				break;
-   			case 'f': /* Don't perform fsck after next boot */
-   				fastboot = 1;
-@@ -565,12 +569,6 @@
-   		}
- 	}
- 
--	if (NULL != halttype && down_level[0] != '0') {
--		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
--		usage();
--  		exit(1);
--	}
--
- 	/* Do we need to use the shutdown.allow file ? */
- 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
- 

diff --git a/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch
new file mode 100644
index 0000000..9aa8522
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch
@@ -0,0 +1,39 @@
+This patch makes shutdown use the Single User runlevel by default so
+the gettys are shutdown too.
+
+Roy Marples <uberlord@gentoo.org>
+
+Forward-ported from v2.86 to v2.94_beta
+Lars Wendler <polynomial-c@gentoo.org>
+
+--- sysvinit-2.94/man/shutdown.8
++++ sysvinit-2.94/man/shutdown.8
+@@ -44,7 +44,7 @@
+ \fBshutdown\fP does its job by signalling the \fBinit\fP process, 
+ asking it to change the runlevel.
+ Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
+-to reboot the system, and runlevel \fB1\fP is used to put to system into
++to reboot the system, and runlevel \fBS\fP is used to put to system into
+ a state where administrative tasks can be performed; this is the default
+ if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
+ To see which actions are taken on halt or reboot see the appropriate
+--- sysvinit-2.94/src/shutdown.c
++++ sysvinit-2.94/src/shutdown.c
+@@ -547,7 +547,7 @@
+ 		usage();
+   		exit(1);
+ 	}
+-	strcpy(down_level, "1");
++	strcpy(down_level, "S");
+ 	halttype = NULL;
+         memset(when, '\0', WHEN_SIZE);
+ 
+@@ -734,6 +734,8 @@
+ 			strncpy(newstate, "for reboot", STATELEN);
+ 			break;
+ 		case '1':
++		case 'S':
++		case 's':
+ 			strncpy(newstate, "to maintenance mode", STATELEN);
+ 			break;
+ 		default:

diff --git a/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild b/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild
deleted file mode 100644
index 5230328..0000000
--- a/sys-apps/sysvinit/sysvinit-2.91-r1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs flag-o-matic
-
-DESCRIPTION="/sbin/init - parent of all processes"
-HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
-SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="x86"
-IUSE="selinux ibm static kernel_FreeBSD"
-
-CDEPEND="
-	selinux? (
-		>=sys-libs/libselinux-1.28
-	)"
-DEPEND="${CDEPEND}
-	virtual/os-headers"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-shutdown )
-	!<sys-apps/openrc-0.13
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.86-kexec.patch" #80220
-	"${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
-	"${FILESDIR}/${PN}-2.88-shutdown-h.patch" #449354
-)
-
-src_prepare() {
-	default
-	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
-
-	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
-	sed -i -r \
-		-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
-		-e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
-		src/Makefile || die
-
-	# pidof has moved to >=procps-3.3.9
-	sed -i -r \
-		-e '/\/bin\/pidof/d' \
-		-e '/^MAN8/s:\<pidof.8\>::g' \
-		src/Makefile || die
-
-	# stack protector is broken no x86 musl
-	sed -i 's/-fstack-protector-strong//' src/Makefile || die
-
-	# Mung inittab for specific architectures
-	cd "${WORKDIR}" || die
-	cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
-	local insert=()
-	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
-	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
-	use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
-	use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
-	use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
-	if use ibm ; then
-		insert+=(
-			'#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
-			'#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
-		)
-	fi
-	(use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
-	if use kernel_FreeBSD ; then
-		sed -i \
-			-e 's/linux/cons25/g' \
-			-e 's/ttyS0/cuaa0/g' \
-			-e 's/ttyS1/cuaa1/g' \
-			inittab #121786
-	fi
-	if use x86 || use amd64 ; then
-		sed -i \
-			-e '/ttyS[01]/s:9600:115200:' \
-			inittab
-	fi
-	if [[ ${#insert[@]} -gt 0 ]] ; then
-		printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
-	fi
-}
-
-src_compile() {
-	tc-export CC
-	append-lfs-flags
-	export DISTRO= #381311
-	export VERSION="${PV}"
-	use static && append-ldflags -static
-	emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
-}
-
-src_install() {
-	emake -C src install ROOT="${D}"
-	dodoc README doc/*
-
-	insinto /etc
-	doins "${WORKDIR}"/inittab
-
-	# dead symlink
-	rm "${ED%/}"/usr/bin/lastb || die
-}
-
-pkg_postinst() {
-	# Reload init to fix unmounting problems of / on next reboot.
-	# This is really needed, as without the new version of init cause init
-	# not to quit properly on reboot, and causes a fsck of / on next reboot.
-	if [[ ${ROOT} == / ]] ; then
-		if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
-			ln -s /dev/initctl /run/initctl
-		fi
-		# Do not return an error if this fails
-		/sbin/telinit U &>/dev/null
-	fi
-
-	elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
-	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
-}

diff --git a/sys-apps/sysvinit/sysvinit-2.92.ebuild b/sys-apps/sysvinit/sysvinit-2.92.ebuild
deleted file mode 100644
index 87aed4d..0000000
--- a/sys-apps/sysvinit/sysvinit-2.92.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs flag-o-matic
-
-DESCRIPTION="/sbin/init - parent of all processes"
-HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
-SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-[[ "${PV}" == *beta* ]] || \
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
-IUSE="selinux ibm static kernel_FreeBSD"
-
-CDEPEND="
-	selinux? (
-		>=sys-libs/libselinux-1.28
-	)"
-DEPEND="${CDEPEND}
-	virtual/os-headers"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-shutdown )
-	!<sys-apps/openrc-0.13
-"
-
-S="${WORKDIR}/${P/_*}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.86-kexec.patch" #80220
-	"${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
-	"${FILESDIR}/${PN}-2.92_beta-shutdown-h.patch" #449354
-)
-
-src_prepare() {
-	default
-	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
-
-	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
-	sed -i -r \
-		-e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
-		-e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
-		src/Makefile || die
-
-	# pidof has moved to >=procps-3.3.9
-	sed -i -r \
-		-e '/\/bin\/pidof/d' \
-		-e '/^MAN8/s:\<pidof.8\>::g' \
-		src/Makefile || die
-
-	# stack protector is broken no x86 musl
-	sed -i 's/-fstack-protector-strong//' src/Makefile || die
-
-	# Mung inittab for specific architectures
-	cd "${WORKDIR}" || die
-	cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
-	local insert=()
-	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
-	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
-	use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
-	use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
-	use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
-	if use ibm ; then
-		insert+=(
-			'#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
-			'#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
-		)
-	fi
-	(use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
-	if use kernel_FreeBSD ; then
-		sed -i \
-			-e 's/linux/cons25/g' \
-			-e 's/ttyS0/cuaa0/g' \
-			-e 's/ttyS1/cuaa1/g' \
-			inittab #121786
-	fi
-	if use x86 || use amd64 ; then
-		sed -i \
-			-e '/ttyS[01]/s:9600:115200:' \
-			inittab
-	fi
-	if [[ ${#insert[@]} -gt 0 ]] ; then
-		printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
-	fi
-}
-
-src_compile() {
-	tc-export CC
-	append-lfs-flags
-	export DISTRO= #381311
-	export VERSION="${PV}"
-	use static && append-ldflags -static
-	emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
-}
-
-src_install() {
-	emake -C src install ROOT="${D}"
-	dodoc README doc/*
-
-	insinto /etc
-	doins "${WORKDIR}"/inittab
-
-	# dead symlink
-	rm "${ED%/}"/usr/bin/lastb || die
-
-	doinitd "${FILESDIR}"/bootlogd
-}
-
-pkg_postinst() {
-	# Reload init to fix unmounting problems of / on next reboot.
-	# This is really needed, as without the new version of init cause init
-	# not to quit properly on reboot, and causes a fsck of / on next reboot.
-	if [[ ${ROOT} == / ]] ; then
-		if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
-			ln -s /dev/initctl /run/initctl
-		fi
-		# Do not return an error if this fails
-		/sbin/telinit U &>/dev/null
-	fi
-
-	elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
-	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
@ 2020-12-07 14:13 Jory Pratt
  0 siblings, 0 replies; 4+ messages in thread
From: Jory Pratt @ 2020-12-07 14:13 UTC (permalink / raw
  To: gentoo-commits

commit:     98afa7174f1cabd3f8e81c173aa90a1040e11a26
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Fri Dec  4 19:26:48 2020 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Dec  7 14:12:07 2020 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=98afa717

sys-apps/sysvinit: add new stable 2.97 for x86

Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 sys-apps/sysvinit/Manifest                         |  2 +-
 sys-apps/sysvinit/files/halt.sh                    |  6 ++
 sys-apps/sysvinit/files/inittab-2.95               | 61 +++++++++++++++
 .../files/sysvinit-2.95_beta-shutdown-h.patch      | 87 ++++++++++++++++++++++
 .../{sysvinit-2.94.ebuild => sysvinit-2.97.ebuild} | 45 +++++++----
 5 files changed, 187 insertions(+), 14 deletions(-)

diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
index 8599133..5a1c9f3 100644
--- a/sys-apps/sysvinit/Manifest
+++ b/sys-apps/sysvinit/Manifest
@@ -1,2 +1,2 @@
 DIST sysvinit-2.93.tar.xz 117580 BLAKE2B 2e771b00dbdc73e76df9e78659aaa5e5fcbfda36290a1b5aa20a5a6fe3540c4616f2a235a668de30d33c620e2d2516da303537eda47b83b29b0844ad7aa77df4 SHA512 c80d07a674253d15ec6382cfaf792f47486e2e84ab9c913d3c9e03b590cf211177a3a14e168f4d1c9c2e97737221f7ac70a75633d90502837a6d29bdc4c48d72
-DIST sysvinit-2.94.tar.xz 120900 BLAKE2B e45a95246325e93ef49f11573924216937e238761cb9f5979ae2b272838fb3280b1d12c9553992271f7926dc7c7bc18e352a8019a70f54c592971fe043453804 SHA512 8d3b7b777f7c37cf5eaf73d4cdfad8ac54c6115577052bd7ddf3588da8fb7d16b812ffaade0ce300c2c6b7d2acd6e7778130544befc171eab174ee8766b3ec50
+DIST sysvinit-2.97.tar.xz 126848 BLAKE2B dd2612de531a89f1fdbfaeb8b5975aeba9541a6b570587a881bdb11406991c1a9b254d1802725298eb13362d625d3859b520ee964782a0fe43d3f038a28b49e6 SHA512 89950080a120b62bdd297f3a59898dd11e10c7438cf18774bad16c65ce5fb2e190726e601c6f263def32cff59867c0984edcd99d527eb80297901085afbb2e90

diff --git a/sys-apps/sysvinit/files/halt.sh b/sys-apps/sysvinit/files/halt.sh
new file mode 100644
index 0000000..ff68c42
--- /dev/null
+++ b/sys-apps/sysvinit/files/halt.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ "${INIT_HALT}" = HALT ]; then
+	exec /sbin/halt -dhn
+else
+	exec /sbin/poweroff -dhn
+fi

diff --git a/sys-apps/sysvinit/files/inittab-2.95 b/sys-apps/sysvinit/files/inittab-2.95
new file mode 100644
index 0000000..03f226a
--- /dev/null
+++ b/sys-apps/sysvinit/files/inittab-2.95
@@ -0,0 +1,61 @@
+#
+# /etc/inittab:  This file describes how the INIT process should set up
+#                the system in a certain run-level.
+#
+# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
+# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
+# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
+# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
+# Modified by:  Mike Frysinger, <vapier@gentoo.org>
+# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
+# Modified by:  William Hubbs, <williamh@gentoo.org>
+#
+
+# Default runlevel.
+id:3:initdefault:
+
+# System initialization, mount local filesystems, etc.
+si::sysinit:/sbin/openrc sysinit
+
+# Further system initialization, brings up the boot runlevel.
+rc::bootwait:/sbin/openrc boot
+
+l0u:0:wait:/sbin/telinit u
+l0:0:wait:/sbin/openrc shutdown
+l0s:0:wait:/sbin/halt.sh
+l1:1:wait:/sbin/openrc single
+l2:2:wait:/sbin/openrc nonetwork
+l3:3:wait:/sbin/openrc default
+l4:4:wait:/sbin/openrc default
+l5:5:wait:/sbin/openrc default
+l6u:6:wait:/sbin/telinit u
+l6:6:wait:/sbin/openrc reboot
+l6r:6:wait:/sbin/reboot -dkn
+#z6:6:respawn:/sbin/sulogin
+
+# new-style single-user
+su0:S:wait:/sbin/openrc single
+su1:S:wait:/sbin/sulogin
+
+# TERMINALS
+#x1:12345:respawn:/sbin/agetty 38400 console linux
+c1:12345:respawn:/sbin/agetty 38400 tty1 linux
+c2:2345:respawn:/sbin/agetty 38400 tty2 linux
+c3:2345:respawn:/sbin/agetty 38400 tty3 linux
+c4:2345:respawn:/sbin/agetty 38400 tty4 linux
+c5:2345:respawn:/sbin/agetty 38400 tty5 linux
+c6:2345:respawn:/sbin/agetty 38400 tty6 linux
+
+# SERIAL CONSOLES
+#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
+#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
+
+# What to do at the "Three Finger Salute".
+ca:12345:ctrlaltdel:/sbin/shutdown -r now
+
+# Used by /etc/init.d/xdm to control DM startup.
+# Read the comments in /etc/init.d/xdm for more
+# info. Do NOT remove, as this will start nothing
+# extra at boot if /etc/init.d/xdm is not added
+# to the "default" runlevel.
+x:a:once:/etc/X11/startDM.sh

diff --git a/sys-apps/sysvinit/files/sysvinit-2.95_beta-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.95_beta-shutdown-h.patch
new file mode 100644
index 0000000..f24e102
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.95_beta-shutdown-h.patch
@@ -0,0 +1,87 @@
+other inits have moved to not requiring the -h flag when used with -H/-P.
+modify sysvinit to be the same since it really doesn't matter.
+
+https://bugs.gentoo.org/449354
+
+patch by Doug Goldstein
+
+---
+ man/shutdown.8 |   11 ++++-------
+ src/shutdown.c |   12 ++++--------
+ 2 files changed, 8 insertions(+), 15 deletions(-)
+
+--- sysvinit-2.95/man/shutdown.8
++++ sysvinit-2.95/man/shutdown.8
+@@ -66,22 +66,19 @@
+ .\"}}}
+ .\"{{{  -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown. Usually used with the -P or -H flags,
+-depending on whether we want to poweroff or simply stop the operating system.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{  -P
+ .IP \fB\-P\fP
+-Modifier to the -h flag. Halt action is to turn off the power. 
+-Must be used with the -h flag.
++Halt action is to turn off the power. 
+ .\"}}}
+ .\"{{{  -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag.  Halt action is to halt or drop into boot
+-monitor on systems that support it.  Must be used with the -h flag.
++Action is to halt or drop into boot monitor on systems that support it.
+ Halting is often used to run through the shutdown process and leave
+ output on the screen for debugging purposes. Or when the user wants the OS to
+ stop, but leave the power on. To power off at the end of the shutdown sequence
+-use the -P modifier instead.
++use the -P option instead.
+ .\"}}}
+ .\"{{{  -f
+ .IP \fB\-f\fP
+--- sysvinit-2.95/src/shutdown.c
++++ sysvinit-2.95/src/shutdown.c
+@@ -144,9 +144,7 @@
+ 	"\t\t  -r:      reboot after shutdown.\n"
+ 	"\t\t  -h:      halt after shutdown.\n"
+ 	"\t\t  -P:      halt action is to turn off power.\n"
+-        "\t\t           can only be used along with -h flag.\n"
+ 	"\t\t  -H:      halt action is to just halt.\n"
+-        "\t\t           can only be used along with -h flag.\n"
+ 	"\t\t  -f:      do a 'fast' reboot (skip fsck).\n"
+ 	"\t\t  -F:      Force fsck on reboot.\n"
+ 	"\t\t  -n:      do not go through \"init\" but go down real fast.\n"
+@@ -556,9 +554,11 @@
+   		switch(c) {
+ 			case 'H':
+ 				halttype = "HALT";
++				down_level[0] = '0';
+ 				break;
+ 			case 'P':
+ 				halttype = "POWEROFF";
++				down_level[0] = '0';
+ 				break;
+ 			case 'a': /* Access control. */
+ 				useacl = 1;
+@@ -574,6 +574,8 @@
+   				break;
+   			case 'h': /* Halt after shutdown */
+ 				down_level[0] = '0';
++				if (!halttype)
++					halttype = "POWEROFF";
+   				break;
+   			case 'f': /* Don't perform fsck after next boot */
+   				fastboot = 1;
+@@ -613,12 +615,6 @@
+   		}
+ 	}
+ 
+-	if (NULL != halttype && down_level[0] != '0') {
+-		fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+-		usage();
+-  		exit(1);
+-	}
+-
+ 	/* Do we need to use the shutdown.allow file ? */
+ 	if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
+ 

diff --git a/sys-apps/sysvinit/sysvinit-2.94.ebuild b/sys-apps/sysvinit/sysvinit-2.97.ebuild
similarity index 78%
rename from sys-apps/sysvinit/sysvinit-2.94.ebuild
rename to sys-apps/sysvinit/sysvinit-2.97.ebuild
index b168492..e7338ae 100644
--- a/sys-apps/sysvinit/sysvinit-2.94.ebuild
+++ b/sys-apps/sysvinit/sysvinit-2.97.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit toolchain-funcs flag-o-matic
 
@@ -12,8 +12,8 @@ SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz"
 LICENSE="GPL-2"
 SLOT="0"
 [[ "${PV}" == *beta* ]] || \
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
-IUSE="selinux ibm static"
+KEYWORDS="x86"
+IUSE="selinux ibm static kernel_FreeBSD"
 
 CDEPEND="
 	selinux? (
@@ -31,12 +31,16 @@ S="${WORKDIR}/${P/_*}"
 PATCHES=(
 	"${FILESDIR}/${PN}-2.86-kexec.patch" #80220
 	"${FILESDIR}/${PN}-2.94_beta-shutdown-single.patch" #158615
-	"${FILESDIR}/${PN}-2.92_beta-shutdown-h.patch" #449354
+	"${FILESDIR}/${PN}-2.95_beta-shutdown-h.patch" #449354
 )
 
 src_prepare() {
 	default
-	sed -i '/^CPPFLAGS =$/d' src/Makefile || die
+
+	sed -i \
+		-e '/^CPPFLAGS =$/d' \
+		-e '/^override CFLAGS +=/s/ -fstack-protector-strong//' \
+		src/Makefile || die
 
 	# last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
 	sed -i -r \
@@ -49,10 +53,11 @@ src_prepare() {
 		-e '/\/bin\/pidof/d' \
 		-e '/^MAN8/s:\<pidof.8\>::g' \
 		src/Makefile || die
-
+		
 	# stack protector is broken on x86 musl
 	sed -i 's/-fstack-protector-strong//' src/Makefile || die
 
+
 	# logsave is already in e2fsprogs
 	sed -i -r \
 		-e '/^(USR)?S?BIN/s:\<logsave\>::g' \
@@ -61,7 +66,7 @@ src_prepare() {
 
 	# Mung inittab for specific architectures
 	cd "${WORKDIR}" || die
-	cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
+	cp "${FILESDIR}"/inittab-2.95 inittab || die "cp inittab"
 	local insert=()
 	use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
 	use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
@@ -75,6 +80,13 @@ src_prepare() {
 		)
 	fi
 	(use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab
+	if use kernel_FreeBSD ; then
+		sed -i \
+			-e 's/linux/cons25/g' \
+			-e 's/ttyS0/cuaa0/g' \
+			-e 's/ttyS1/cuaa1/g' \
+			inittab #121786
+	fi
 	if use x86 || use amd64 ; then
 		sed -i \
 			-e '/ttyS[01]/s:9600:115200:' \
@@ -102,18 +114,25 @@ src_install() {
 	doins "${WORKDIR}"/inittab
 
 	# dead symlink
-	rm "${ED%/}"/usr/bin/lastb || die
+	rm "${ED}"/usr/bin/lastb || die
 
 	newinitd "${FILESDIR}"/bootlogd.initd bootlogd
+	into /
+	dosbin "${FILESDIR}"/halt.sh
+
+	keepdir /etc/inittab.d
+
+	find "${ED}" -type d -empty -delete || die
 }
 
 pkg_postinst() {
 	# Reload init to fix unmounting problems of / on next reboot.
 	# This is really needed, as without the new version of init cause init
 	# not to quit properly on reboot, and causes a fsck of / on next reboot.
-	if [[ ${ROOT} == / ]] ; then
-		if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
-			ln -s /dev/initctl /run/initctl
+	if [[ -z ${ROOT} ]] ; then
+		if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then
+			ln -s /dev/initctl /run/initctl \
+				|| ewarn "Failed to set /run/initctl symlink!"
 		fi
 		# Do not return an error if this fails
 		/sbin/telinit U &>/dev/null
@@ -123,7 +142,7 @@ pkg_postinst() {
 	elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
 
 	# Required for new bootlogd service
-	if [[ ! -e "${EROOT%/}/var/log/boot" ]] ; then
-		touch "${EROOT%/}/var/log/boot"
+	if [[ ! -e "${EROOT}/var/log/boot" ]] ; then
+		touch "${EROOT}/var/log/boot"
 	fi
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-07 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15  5:35 [gentoo-commits] proj/musl:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2018-11-25  1:31 Anthony G. Basile
2019-03-10 16:02 Anthony G. Basile
2020-12-07 14:13 Jory Pratt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox