summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-08-10 08:52:55 +0000
committerRoy Marples <uberlord@gentoo.org>2007-08-10 08:52:55 +0000
commit927fc5a19c76b9ed8c827ea96bdbfdd13965eaff (patch)
tree2020b96ace0983f36e9280ca3ec6f0cb5fdab9db /sys-apps
parentVersion bump, had to drop ~ppc keyword (diff)
downloadgentoo-2-927fc5a19c76b9ed8c827ea96bdbfdd13965eaff.tar.gz
gentoo-2-927fc5a19c76b9ed8c827ea96bdbfdd13965eaff.tar.bz2
gentoo-2-927fc5a19c76b9ed8c827ea96bdbfdd13965eaff.zip
Fixup inittab for kFreeBSD support, #121786.
Write utmp sanely on SMP systems, #188262 thanks to Gil Kloepfer. (Portage version: 2.1.3.3)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/sysvinit/ChangeLog9
-rw-r--r--sys-apps/sysvinit/files/digest-sysvinit-2.86-r66
-rw-r--r--sys-apps/sysvinit/files/digest-sysvinit-2.86-r76
-rw-r--r--sys-apps/sysvinit/files/digest-sysvinit-2.86-r9 (renamed from sys-apps/sysvinit/files/digest-sysvinit-2.86-r5)0
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch45
-rw-r--r--sys-apps/sysvinit/sysvinit-2.86-r5.ebuild93
-rw-r--r--sys-apps/sysvinit/sysvinit-2.86-r6.ebuild95
-rw-r--r--sys-apps/sysvinit/sysvinit-2.86-r9.ebuild (renamed from sys-apps/sysvinit/sysvinit-2.86-r7.ebuild)28
8 files changed, 71 insertions, 211 deletions
diff --git a/sys-apps/sysvinit/ChangeLog b/sys-apps/sysvinit/ChangeLog
index fec40c941e54..0c207ab1c379 100644
--- a/sys-apps/sysvinit/ChangeLog
+++ b/sys-apps/sysvinit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/sysvinit
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.52 2007/05/11 03:28:01 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.53 2007/08/10 08:52:55 uberlord Exp $
+
+*sysvinit-2.86-r9 (10 Aug 2007)
+
+ 10 Aug 2007; Roy Marples <uberlord@gentoo.org>
+ +files/sysvinit-2.86-utmp-smp.patch, +sysvinit-2.86-r9.ebuild:
+ Fixup inittab for kFreeBSD support, #121786.
+ Write utmp sanely on SMP systems, #188262 thanks to Gil Kloepfer.
11 May 2007; Joshua Kinard <kumba@gentoo.org> sysvinit-2.86-r8.ebuild:
Stable on mips.
diff --git a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r6 b/sys-apps/sysvinit/files/digest-sysvinit-2.86-r6
deleted file mode 100644
index 7fc9a567296b..000000000000
--- a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r6
+++ /dev/null
@@ -1,6 +0,0 @@
-MD5 650af823f937d386e81520b1741d4d45 sysvinit-2.86-kexec.patch 4139
-RMD160 5f8e9ccd3a39701cf47a1a541c78a4be971d46fc sysvinit-2.86-kexec.patch 4139
-SHA256 936245ef3060939bec3099efc006009336b3672422c1de41983b277ab5ddac47 sysvinit-2.86-kexec.patch 4139
-MD5 7d5d61c026122ab791ac04c8a84db967 sysvinit-2.86.tar.gz 99009
-RMD160 46587ab51390b5c8cd3179a3690f86efdbe9b4b9 sysvinit-2.86.tar.gz 99009
-SHA256 035f98fae17d9cff002993c564ccc83dc4ed136127172caeff872b6abdb679d8 sysvinit-2.86.tar.gz 99009
diff --git a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r7 b/sys-apps/sysvinit/files/digest-sysvinit-2.86-r7
deleted file mode 100644
index 7fc9a567296b..000000000000
--- a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r7
+++ /dev/null
@@ -1,6 +0,0 @@
-MD5 650af823f937d386e81520b1741d4d45 sysvinit-2.86-kexec.patch 4139
-RMD160 5f8e9ccd3a39701cf47a1a541c78a4be971d46fc sysvinit-2.86-kexec.patch 4139
-SHA256 936245ef3060939bec3099efc006009336b3672422c1de41983b277ab5ddac47 sysvinit-2.86-kexec.patch 4139
-MD5 7d5d61c026122ab791ac04c8a84db967 sysvinit-2.86.tar.gz 99009
-RMD160 46587ab51390b5c8cd3179a3690f86efdbe9b4b9 sysvinit-2.86.tar.gz 99009
-SHA256 035f98fae17d9cff002993c564ccc83dc4ed136127172caeff872b6abdb679d8 sysvinit-2.86.tar.gz 99009
diff --git a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r5 b/sys-apps/sysvinit/files/digest-sysvinit-2.86-r9
index 7fc9a567296b..7fc9a567296b 100644
--- a/sys-apps/sysvinit/files/digest-sysvinit-2.86-r5
+++ b/sys-apps/sysvinit/files/digest-sysvinit-2.86-r9
diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch b/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch
new file mode 100644
index 000000000000..eb04da9a7b14
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch
@@ -0,0 +1,45 @@
+--- src/init.c.ORIG 2004-07-30 07:16:20.000000000 -0500
++++ src/init.c 2007-06-15 14:07:39.774320481 -0500
+@@ -949,6 +949,25 @@
+ sigprocmask(SIG_SETMASK, &omask, NULL);
+
+ /*
++ * Update utmp/wtmp file prior to starting
++ * any child. This MUST be done right here in
++ * the child process in order to prevent a race
++ * condition that occurs when the child
++ * process' time slice executes before the
++ * parent (can and does happen in a uniprocessor
++ * environment). If the child is a getty and
++ * the race condition happens, then init's utmp
++ * update will happen AFTER the getty runs
++ * and expects utmp to be updated already!
++ *
++ * Do NOT log if process field starts with '+'
++ * FIXME: that's for compatibility with *very*
++ * old getties - probably it can be taken out.
++ */
++ if (ch->action == RESPAWN && ch->process[0] != '+')
++ write_utmp_wtmp("", ch->id, getpid(), INIT_PROCESS, "");
++
++ /*
+ * In sysinit, boot, bootwait or single user mode:
+ * for any wait-type subprocess we _force_ the console
+ * to be its controlling tty.
+@@ -1088,15 +1107,7 @@
+ case ONDEMAND:
+ case RESPAWN:
+ ch->flags |= RUNNING;
+- if (spawn(ch, &(ch->pid)) < 0) break;
+- /*
+- * Do NOT log if process field starts with '+'
+- * FIXME: that's for compatibility with *very*
+- * old getties - probably it can be taken out.
+- */
+- if (ch->process[0] != '+')
+- write_utmp_wtmp("", ch->id, ch->pid,
+- INIT_PROCESS, "");
++ (void)spawn(ch, &(ch->pid));
+ break;
+ }
+ }
diff --git a/sys-apps/sysvinit/sysvinit-2.86-r5.ebuild b/sys-apps/sysvinit/sysvinit-2.86-r5.ebuild
deleted file mode 100644
index b1beeb5e865c..000000000000
--- a/sys-apps/sysvinit/sysvinit-2.86-r5.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.86-r5.ebuild,v 1.12 2007/04/05 14:16:55 wolf31o2 Exp $
-
-inherit eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="/sbin/init - parent of all processes"
-HOMEPAGE="http://freshmeat.net/projects/sysvinit/"
-SRC_URI="ftp://ftp.cistron.nl/pub/people/miquels/software/${P}.tar.gz
- ftp://sunsite.unc.edu/pub/Linux/system/daemons/init/${P}.tar.gz
- http://www.gc-linux.org/down/isobel/kexec/sysvinit/sysvinit-2.86-kexec.patch"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
-IUSE="selinux ibm static"
-
-RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )"
-DEPEND="${RDEPEND}
- virtual/os-headers"
-
-src_unpack() {
- unpack ${P}.tar.gz
- cd "${S}"
- cp "${FILESDIR}"/change_console.{c,8} src/ || die
- epatch "${FILESDIR}"/${P}-docs.patch
- epatch "${FILESDIR}"/${P}-shutdown-usage.patch
- epatch "${FILESDIR}"/sysvinit-2.86-off-by-one.patch
- epatch "${DISTDIR}"/sysvinit-2.86-kexec.patch
- epatch "${FILESDIR}"/sysvinit-2.86-POSIX-1003.1e.patch #5818
- epatch "${FILESDIR}"/sysvinit-2.86-execl.patch
- epatch "${FILESDIR}"/sysvinit-2.86-utmp-64bit.patch
- cd src
- epatch "${FILESDIR}"/${PV}-gentoo.patch
- use selinux && epatch "${FILESDIR}"/${PV}-selinux-1.patch
-
- # Mung inittab for specific architectures
- cd "${WORKDIR}"
- cp "${FILESDIR}"/inittab . || die "cp inittab"
- local insert=""
- use ppc && insert="#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux\n"
- use arm && insert='#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100'
- use hppa && insert='b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100'
- 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
- [[ -n ${insert} ]] && echo "# Architecture specific features"$'\n'"${insert}" >> inittab
-}
-
-src_compile() {
- use static && append-ldflags -static
-
- # Note: The LCRYPT define below overrides the test in
- # sysvinit's Makefile. This is because sulogin must be linked
- # to libcrypt in any case, but when building stage2 in
- # catalyst, /usr/lib/libcrypt.a isn't available. In truth
- # this doesn't change how sulogin is built since ld would use
- # the shared obj by default anyway! The other option is to
- # refrain from building sulogin, but that isn't a good option.
- # (09 Jul 2004 agriffis)
- emake -C src \
- CC="$(tc-getCC)" \
- DISTRO="Gentoo" \
- LCRYPT="-lcrypt" \
- all change_console \
- || die
-}
-
-src_install() {
- dodoc README doc/*
-
- cd src
- make install DISTRO="Gentoo" ROOT="${D}" || die "make install"
-
- into /
- dosbin change_console || die
- doman change_console.8
-
- insinto /etc
- doins "${WORKDIR}"/inittab || die "inittab"
-}
-
-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
-}
diff --git a/sys-apps/sysvinit/sysvinit-2.86-r6.ebuild b/sys-apps/sysvinit/sysvinit-2.86-r6.ebuild
deleted file mode 100644
index 5a2a8132291b..000000000000
--- a/sys-apps/sysvinit/sysvinit-2.86-r6.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.86-r6.ebuild,v 1.7 2007/04/05 14:16:55 wolf31o2 Exp $
-
-inherit eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="/sbin/init - parent of all processes"
-HOMEPAGE="http://freshmeat.net/projects/sysvinit/"
-SRC_URI="ftp://ftp.cistron.nl/pub/people/miquels/software/${P}.tar.gz
- ftp://sunsite.unc.edu/pub/Linux/system/daemons/init/${P}.tar.gz
- http://www.gc-linux.org/down/isobel/kexec/sysvinit/sysvinit-2.86-kexec.patch"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
-IUSE="selinux ibm static"
-
-RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )"
-DEPEND="${RDEPEND}
- virtual/os-headers"
-
-src_unpack() {
- unpack ${P}.tar.gz
- cd "${S}"
- cp "${FILESDIR}"/change_console.{c,8} src/ || die
- epatch "${FILESDIR}"/${P}-docs.patch
- epatch "${FILESDIR}"/${P}-shutdown-usage.patch
- epatch "${FILESDIR}"/sysvinit-2.86-off-by-one.patch
- epatch "${DISTDIR}"/sysvinit-2.86-kexec.patch
- #epatch "${FILESDIR}"/sysvinit-2.86-POSIX-1003.1e.patch #5818
- epatch "${FILESDIR}"/sysvinit-2.86-execl.patch
- epatch "${FILESDIR}"/sysvinit-2.86-utmp-64bit.patch
- cd src
- epatch "${FILESDIR}"/${PV}-gentoo.patch
- use selinux && epatch "${FILESDIR}"/${PV}-selinux-1.patch
-
- # Mung inittab for specific architectures
- cd "${WORKDIR}"
- cp "${FILESDIR}"/inittab . || die "cp inittab"
- local insert=""
- use ppc && insert="#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux\n"
- use arm && insert='#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100'
- use hppa && insert='b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100'
- 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
- [[ -n ${insert} ]] && echo "# Architecture specific features"$'\n'"${insert}" >> inittab
-}
-
-src_compile() {
- use static && append-ldflags -static
-
- # Note: The LCRYPT define below overrides the test in
- # sysvinit's Makefile. This is because sulogin must be linked
- # to libcrypt in any case, but when building stage2 in
- # catalyst, /usr/lib/libcrypt.a isn't available. In truth
- # this doesn't change how sulogin is built since ld would use
- # the shared obj by default anyway! The other option is to
- # refrain from building sulogin, but that isn't a good option.
- # (09 Jul 2004 agriffis)
- emake -C src \
- CC="$(tc-getCC)" \
- DISTRO="Gentoo" \
- LCRYPT="-lcrypt" \
- all change_console \
- || die
-}
-
-src_install() {
- dodoc README doc/*
-
- cd src
- make install DISTRO="Gentoo" ROOT="${D}" || die "make install"
-
- into /
- dosbin change_console || die
- doman change_console.8
-
- 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
-}
diff --git a/sys-apps/sysvinit/sysvinit-2.86-r7.ebuild b/sys-apps/sysvinit/sysvinit-2.86-r9.ebuild
index da4dc835041c..ca3c7ee901c0 100644
--- a/sys-apps/sysvinit/sysvinit-2.86-r7.ebuild
+++ b/sys-apps/sysvinit/sysvinit-2.86-r9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.86-r7.ebuild,v 1.12 2007/04/06 16:10:25 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.86-r9.ebuild,v 1.1 2007/08/10 08:52:55 uberlord Exp $
inherit eutils toolchain-funcs flag-o-matic
@@ -12,8 +12,8 @@ SRC_URI="ftp://ftp.cistron.nl/pub/people/miquels/software/${P}.tar.gz
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 arm hppa ~ia64 m68k mips ppc ppc64 s390 sh sparc x86"
-IUSE="selinux ibm static"
+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}
@@ -23,14 +23,15 @@ src_unpack() {
unpack ${P}.tar.gz
cd "${S}"
cp "${FILESDIR}"/change_console.{c,8} src/ || die
- epatch "${FILESDIR}"/${P}-docs.patch
- epatch "${FILESDIR}"/${P}-shutdown-usage.patch
- epatch "${FILESDIR}"/sysvinit-2.86-off-by-one.patch
- epatch "${DISTDIR}"/sysvinit-2.86-kexec.patch
- #epatch "${FILESDIR}"/sysvinit-2.86-POSIX-1003.1e.patch #5818
- epatch "${FILESDIR}"/sysvinit-2.86-execl.patch
- epatch "${FILESDIR}"/sysvinit-2.86-utmp-64bit.patch
+ epatch "${FILESDIR}/${P}"-docs.patch
+ epatch "${FILESDIR}/${P}"-shutdown-usage.patch
+ epatch "${FILESDIR}/${P}"-off-by-one.patch
+ epatch "${DISTDIR}/${P}"-kexec.patch
+ #epatch "${FILESDIR}/${P}"-POSIX-1003.1e.patch #5818
+ epatch "${FILESDIR}/${P}"-execl.patch
+ epatch "${FILESDIR}/${P}"-utmp-64bit.patch
epatch "${FILESDIR}/${P}"-shutdown-single.patch
+ epatch "${FILESDIR}/${P}"-utmp-smp.patch
cd src
epatch "${FILESDIR}"/${PV}-gentoo.patch
use selinux && epatch "${FILESDIR}"/${PV}-selinux-1.patch
@@ -42,11 +43,18 @@ src_unpack() {
use ppc && insert="#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux\n"
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
+ # Support kFreeBSD, #121786
+ if use kernel_FreeBSD; then
+ sed -i -e 's/linux/cons25/g' \
+ -e 's/ttyS0/cuaa0/g' \
+ -e 's/ttyS1/cuaa1/g' inittab
+ fi
[[ -n ${insert} ]] && echo "# Architecture specific features"$'\n'"${insert}" >> inittab
}