summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-06-06 06:59:47 +0000
committerMike Frysinger <vapier@gentoo.org>2010-06-06 06:59:47 +0000
commit8c65308d2e47ab3c6dd8845367d22ead0fbb039d (patch)
tree8cd9ab8b98578509de20f0485bcc30cb0d371588 /sys-apps/sysvinit
parentVersion bump for prawn 0.8.4. (diff)
downloadhistorical-8c65308d2e47ab3c6dd8845367d22ead0fbb039d.tar.gz
historical-8c65308d2e47ab3c6dd8845367d22ead0fbb039d.tar.bz2
historical-8c65308d2e47ab3c6dd8845367d22ead0fbb039d.zip
Version bump #319197 by Daniel Pielmeier.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/sysvinit')
-rw-r--r--sys-apps/sysvinit/ChangeLog10
-rw-r--r--sys-apps/sysvinit/Manifest17
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-kexec.patch142
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch36
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch60
-rw-r--r--sys-apps/sysvinit/sysvinit-2.88.ebuild79
6 files changed, 342 insertions, 2 deletions
diff --git a/sys-apps/sysvinit/ChangeLog b/sys-apps/sysvinit/ChangeLog
index 99a783a55fdb..32c4a3599a78 100644
--- a/sys-apps/sysvinit/ChangeLog
+++ b/sys-apps/sysvinit/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/sysvinit
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.80 2010/05/10 17:13:05 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.81 2010/06/06 06:59:47 vapier Exp $
+
+*sysvinit-2.88 (06 Jun 2010)
+
+ 06 Jun 2010; Mike Frysinger <vapier@gentoo.org>
+ +files/sysvinit-2.86-kexec.patch,
+ +files/sysvinit-2.86-shutdown-single.patch, +sysvinit-2.88.ebuild,
+ +files/sysvinit-2.88-makefile.patch:
+ Version bump #319197 by Daniel Pielmeier.
10 May 2010; William Hubbs <williamh@gentoo.org> -files/2.86-gentoo.patch,
-sysvinit-2.86-r10.ebuild, -files/inittab-2.86-r12,
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
index 89823dddffd3..a24bd1566a73 100644
--- a/sys-apps/sysvinit/Manifest
+++ b/sys-apps/sysvinit/Manifest
@@ -1,8 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX inittab-2.87 1890 RMD160 ee4dcba9b3c3541905950f1cd5deb74163aab784 SHA1 03af334e70d50511b2de5d25278d3f1673d2e8ee SHA256 fff7016910c9e2aa29e2c4ed76f371723196e3122a4f9f744274f4993ea1a733
AUX reboot.sh 304 RMD160 bbc92c46217361abfa9ca6842e206e818959886b SHA1 2515f89492a9d225abfdd9f99fb674a8dbb66629 SHA256 967fa572014ac6dd69f5e7e24d5250abad9c20c644563b927b295778608cafef
AUX shutdown.sh 385 RMD160 5038d76195793b9996429f216fe9d4cd597b7725 SHA1 074471c08e01bfaa32bff4e6745795cf35794bef SHA256 2cc84a5194a949f16a82c6215459f4bf6d8156e50d8d9130d310f085bb208d4c
+AUX sysvinit-2.86-kexec.patch 3910 RMD160 dc113de4c2a4240d16af5cb741624efa4fa980fe SHA1 018889bb0fb0897911c6a19ad024ffff80d1337f SHA256 a9d764afc05ae73c2153b024a3b9e3295ba913e14e9684ddf1fd94467e4bc823
+AUX sysvinit-2.86-shutdown-single.patch 1229 RMD160 b00c49ca89d017f4b0ee10ff3dc2e22764552cd8 SHA1 23a48ee12e633c2d49f3601d573de6fb0c9e16aa SHA256 78852ca410e7ee23bf69cb6e566cb90404d8c8b7bcc10b264f66c97e0359d431
+AUX sysvinit-2.88-makefile.patch 1545 RMD160 daf0061c96858c35f4daba3c291666d912c7ab4d SHA1 4037f8558fe934813b0d96033c06d7a240adee9b SHA256 34d6ee50be139ad08b620569df11ac6a4cdf3dae737733dda21a716c4064c194
DIST sysvinit-2.87-patches-2.tar.bz2 7129 RMD160 8b4cd971100b3cfdd81f27d836f1e45daac71fdf SHA1 cea5e3b5006165c15665457d33e6ea84e0ef7eb3 SHA256 724208540773ffa5d632285244bb61ea47fa347e6c0354c4faf31f407cfbe995
+DIST sysvinit-2.88dsf.tar.bz2 105551 RMD160 8109e9b90caff544be4a3b37c808baf16914d0bd SHA1 f2ca149df1314a91f3007cccd7a0aa47d990de26 SHA256 60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519
DIST sysvinit_2.87dsf.orig.tar.gz 106102 RMD160 69d4bc75ee55a23f650f7bfc7beb5b0433f4df35 SHA1 1939658db6fbb178ea20d4eb6300e668a6636ae3 SHA256 41b7c77942ec22916b36394d623de40c5cc5b058a6994af5ddeec08b284c4765
EBUILD sysvinit-2.87-r3.ebuild 2729 RMD160 0a496b1915f2dd4d6bb952e2fc9f8727b1034945 SHA1 fe0eac47289dd45385fba3c5df60cef9167bebd7 SHA256 0d24f5177bc5bc4add0dd817070258e3c0af0f46312a3d7156718c3eca3c00eb
-MISC ChangeLog 12113 RMD160 1cb3494e5b78f6b9beb0977be49b5571aae5f392 SHA1 3b91d649e18c09486419d3f071babd8f09cf0391 SHA256 aca1b77af3dfc3e114b0b6ece3f504526c19fa95899568f33e9dabcf69d7c389
+EBUILD sysvinit-2.88.ebuild 2463 RMD160 b7e0282a873119902e6bf09016f6f91a6396a797 SHA1 be15ed7dc09d7fa75ed1ab6831ee4240ef9a2b9d SHA256 0318f1721492aab255834bc087b1c8c31874d792a3bf5904ad294bb941ee6209
+MISC ChangeLog 12380 RMD160 bf4adb2f05bf6874cb1551f813d7297bad32d488 SHA1 7174cd6a768a7ababaaf00ac9d10c018f8fc42de SHA256 b260bdec72d2871c4d27739d57bd292116639d47149b0c955fcd851025a6dd21
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.15 (GNU/Linux)
+
+iF4EAREIAAYFAkwLR2QACgkQTwhj9JtAlp7QfQEAvKCzA8QSWD0xT7lsEXOiXYeg
+TWZBlYwHUQLDvZDek7gBALyFy4yau23vpK87OfugZaS9hCYGK8He8Sdql/lMnhZ7
+=6SB4
+-----END PGP SIGNATURE-----
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 000000000000..4948806d9eb9
--- /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 000000000000..b8e403f629f7
--- /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-makefile.patch b/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
new file mode 100644
index 000000000000..22f463cddb51
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.88-makefile.patch
@@ -0,0 +1,60 @@
+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/sysvinit-2.88.ebuild b/sys-apps/sysvinit/sysvinit-2.88.ebuild
new file mode 100644
index 000000000000..4cab3501c67d
--- /dev/null
+++ b/sys-apps/sysvinit/sysvinit-2.88.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.88.ebuild,v 1.1 2010/06/06 06:59:47 vapier Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="/sbin/init - parent of all processes"
+HOMEPAGE="http://freshmeat.net/projects/sysvinit/"
+SRC_URI="mirror://nongnu/${PN}/${P}dsf.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="selinux ibm static kernel_FreeBSD"
+
+RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+S=${WORKDIR}/${P}dsf
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.86-kexec.patch #80220
+ epatch "${FILESDIR}"/${PN}-2.86-shutdown-single.patch #158615
+ epatch "${FILESDIR}"/${P}-makefile.patch #319197
+
+ # 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 hppa && insert='b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100'
+ use s390 && insert='s0:12345:respawn:/sbin/agetty 38400 console'
+ if use ibm ; then
+ insert="${insert}#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0"$'\n'
+ insert="${insert}#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
+ [[ -n ${insert} ]] && echo "# Architecture specific features"$'\n'"${insert}" >> inittab
+}
+
+src_compile() {
+ local myconf
+
+ tc-export CC
+ use static && append-ldflags -static
+ use selinux && myconf=WITH_SELINUX=yes
+ emake -C src ${myconf} || die
+}
+
+src_install() {
+ emake -C src install ROOT="${D}" || die
+ dodoc README doc/*
+
+ insinto /etc
+ doins "${WORKDIR}"/inittab || die "inittab"
+
+ doinitd "${FILESDIR}"/{reboot,shutdown}.sh || 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
+ # Do not return an error if this fails
+ /sbin/telinit U &>/dev/null
+ fi
+}