diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index bc34768..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -initscripts-8.54.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..226cfb7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +initscripts-8.54.1.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index f6975f6..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: initscripts -# $Id$ -NAME := initscripts -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common diff --git a/initscripts-8.54.1-dont-install-orig.patch b/initscripts-8.54.1-dont-install-orig.patch new file mode 100644 index 0000000..131f5e4 --- /dev/null +++ b/initscripts-8.54.1-dont-install-orig.patch @@ -0,0 +1,26 @@ +diff -up initscripts-8.54.1/Makefile.dont-install-orig initscripts-8.54.1/Makefile +--- initscripts-8.54.1/Makefile.dont-install-orig 2006-11-28 18:58:26.000000000 -0500 ++++ initscripts-8.54.1/Makefile 2007-09-27 15:01:47.000000000 -0400 +@@ -39,7 +39,12 @@ install: + mkdir -p $(ROOT)/etc/X11 + install -m755 prefdm $(ROOT)/etc/X11/prefdm + +- cp -af rc.d sysconfig ppp udev $(ROOT)/etc ++ install -m755 -d $(ROOT)/etc/rc.d $(ROOT)/etc/sysconfig ++ install -m755 rc.d/rc rc.d/rc.local rc.d/rc.sysinit $(ROOT)/etc/rc.d/ ++ cp -af rc.d/init.d $(ROOT)/etc/rc.d/ ++ install -m755 sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/ ++ cp -af sysconfig/network-scripts $(ROOT)/etc/sysconfig/ ++ cp -af ppp udev $(ROOT)/etc + mkdir -p $(ROOT)/etc/ppp/peers + chmod 755 $(ROOT)/etc/rc.d/* $(ROOT)/etc/rc.d/init.d/* + chmod 755 $(ROOT)/etc/ppp/peers +@@ -60,8 +65,6 @@ install: + mkdir -p $(ROOT)/etc/sysconfig/console + if uname -m | grep -q s390 ; then \ + install -m644 sysconfig/init.s390 $(ROOT)/etc/sysconfig/init ; \ +- else \ +- rm -f $(ROOT)/etc/sysconfig/init.s390 ; \ + fi + + mv $(ROOT)/etc/sysconfig/network-scripts/ifup $(ROOT)/sbin diff --git a/initscripts-8.54.1-olpc.patch b/initscripts-8.54.1-olpc.patch new file mode 100644 index 0000000..eef5b11 --- /dev/null +++ b/initscripts-8.54.1-olpc.patch @@ -0,0 +1,27 @@ +diff -up initscripts-8.54.1/inittab.olpc initscripts-8.54.1/inittab +--- initscripts-8.54.1/inittab.olpc 2006-10-12 13:51:04.000000000 -0400 ++++ initscripts-8.54.1/inittab 2007-09-13 13:31:32.000000000 -0400 +@@ -15,7 +15,7 @@ + # 5 - X11 + # 6 - reboot (Do NOT set initdefault to this) + # +-id:3:initdefault: ++id:5:initdefault: + + # System initialization. + si::sysinit:/etc/rc.d/rc.sysinit +@@ -44,10 +44,7 @@ pr:12345:powerokwait:/sbin/shutdown -c " + # Run gettys in standard runlevels +-1:2345:respawn:/sbin/mingetty tty1 +-2:2345:respawn:/sbin/mingetty tty2 +-3:2345:respawn:/sbin/mingetty tty3 +-4:2345:respawn:/sbin/mingetty tty4 +-5:2345:respawn:/sbin/mingetty tty5 +-6:2345:respawn:/sbin/mingetty tty6 ++1:2345:respawn:/sbin/mingetty --loginpause --autologin root --noclear tty1 ++2:2345:respawn:/sbin/mingetty --loginpause --autologin root --noclear tty2 ++3:2345:respawn:/sbin/agetty -l /bin/bash -w -n ttyS0 115200 vt100 + + # Run xdm in runlevel 5 +-x:5:respawn:/etc/X11/prefdm -nodaemon ++x:5:respawn:/usr/sbin/olpc-dm diff --git a/initscripts-8.54.1-prettyboot.patch b/initscripts-8.54.1-prettyboot.patch new file mode 100644 index 0000000..961e591 --- /dev/null +++ b/initscripts-8.54.1-prettyboot.patch @@ -0,0 +1,58 @@ +diff -up initscripts-8.54.1/rc.d/rc.sysinit.prettyboot initscripts-8.54.1/rc.d/rc.sysinit +--- initscripts-8.54.1/rc.d/rc.sysinit.prettyboot 2007-05-08 08:21:47.000000000 -0400 ++++ initscripts-8.54.1/rc.d/rc.sysinit 2007-09-27 14:40:46.000000000 -0400 +@@ -11,6 +11,14 @@ unamer=`uname -r` + + set -m + ++if [ -x /usr/bin/rhgb-client ] ; then ++ # OLPC's rhgb-client depends on localhost being up ++ /sbin/ip addr add 127.0.0.1/8 dev lo ++ /sbin/ip addr add ::1/128 dev lo ++ /sbin/ip link set lo up ++ /usr/bin/rhgb-client --update=sysinit-top # early "we're alive" indication ++fi ++ + if [ -f /etc/sysconfig/network ]; then + . /etc/sysconfig/network + fi +@@ -228,9 +236,10 @@ init_crypto() { + return $ret + } + +-if [ -x /sbin/setsysfont -a -c /dev/tty1 ]; then +- /sbin/setsysfont < /dev/tty1 > /dev/tty1 2>/dev/null +-fi ++# OLPC does the setsysfont later, in z-boot-anim-stop after DCON is frozen. ++#if [ -x /sbin/setsysfont -a -c /dev/tty1 ]; then ++# /sbin/setsysfont < /dev/tty1 > /dev/tty1 2>/dev/null ++#fi + + # Print a text banner. + echo -en $"\t\tWelcome to " +@@ -327,10 +336,13 @@ if [ -x /bin/taskset ]; then + fi + fi + ++update_boot_stage udev ++( sleep 3 ; update_boot_stage udev_mid ) & + nashpid=$(pidof nash 2>/dev/null) + [ -n "$nashpid" ] && kill $nashpid >/dev/null 2>&1 + unset nashpid + /sbin/start_udev ++update_boot_stage udev_post + + # Load other user-defined modules + for file in /etc/sysconfig/modules/*.modules ; do +diff -up initscripts-8.54.1/rc.d/rc.prettyboot initscripts-8.54.1/rc.d/rc +--- initscripts-8.54.1/rc.d/rc.prettyboot 2007-09-27 14:38:55.000000000 -0400 ++++ initscripts-8.54.1/rc.d/rc 2007-09-27 14:40:10.000000000 -0400 +@@ -31,6 +31,8 @@ export runlevel previous + if [ "$previous" = "N" ]; then + if [ -f /var/run/confirm ]; then + echo $"Entering interactive startup" ++ # bail out of pretty boot ++ chvt 1 + else + echo $"Entering non-interactive startup" + fi diff --git a/initscripts-8.54.1-readonly.patch b/initscripts-8.54.1-readonly.patch new file mode 100644 index 0000000..0366ef1 --- /dev/null +++ b/initscripts-8.54.1-readonly.patch @@ -0,0 +1,46 @@ +diff -up initscripts-8.54.1/rwtab.readonly initscripts-8.54.1/rwtab +--- initscripts-8.54.1/rwtab.readonly 2007-04-13 18:44:55.000000000 -0400 ++++ initscripts-8.54.1/rwtab 2007-09-27 13:57:37.000000000 -0400 +@@ -24,10 +24,7 @@ empty /var/tux + empty /media + + files /etc/adjtime +-files /etc/fstab +-files /etc/mtab + files /etc/ntp.conf +-files /etc/resolv.conf + files /etc/lvm/.cache + files /etc/lvm/archive + files /etc/lvm/backup +diff -up initscripts-8.54.1/statetab.readonly initscripts-8.54.1/statetab +--- initscripts-8.54.1/statetab.readonly 2006-10-27 13:02:22.000000000 -0400 ++++ initscripts-8.54.1/statetab 2007-09-27 14:20:11.000000000 -0400 +@@ -10,3 +10,8 @@ + # /etc/ssh + # /var/spool/mail + # ++/etc/ssh ++/etc/sysconfig/i18n ++/etc/timezone ++/var/lib/dbus ++/var/lib/random-seed +diff -up initscripts-8.54.1/sysconfig/readonly-root.readonly initscripts-8.54.1/sysconfig/readonly-root +--- initscripts-8.54.1/sysconfig/readonly-root.readonly 2007-04-13 18:48:20.000000000 -0400 ++++ initscripts-8.54.1/sysconfig/readonly-root 2007-09-27 14:17:39.000000000 -0400 +@@ -2,7 +2,7 @@ + READONLY=no + # Set to 'yes' to mount various temporary state as either tmpfs + # or on the block device labelled RW_LABEL. Implied by READONLY +-TEMPORARY_STATE=no ++TEMPORARY_STATE=yes + # Place to put a tmpfs for temporary scratch writable space + RW_MOUNT=/var/lib/stateless/writable + # Label on local filesystem which can be used for temporary scratch space +@@ -12,6 +12,6 @@ RW_OPTIONS= + # Label for partition with persistent data + STATE_LABEL=stateless-state + # Where to mount to the persistent data +-STATE_MOUNT=/var/lib/stateless/state ++STATE_MOUNT=/security/state + # Options to use for peristent mount + STATE_OPTIONS= diff --git a/initscripts.spec b/initscripts.spec index 8f218eb..1e33dab 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,21 +1,30 @@ Summary: The inittab file and the /etc/init.d scripts Name: initscripts -Version: 8.54 +Version: 8.54.1 License: GPL Group: System Environment/Base -Release: 1 +Release: 18%{?dist} Source: initscripts-%{version}.tar.bz2 +Source1: olpc-login +Patch0: initscripts-8.54.1-dont-install-orig.patch +Patch1: initscripts-8.54.1-olpc.patch +Patch2: initscripts-8.54.1-readonly.patch +Patch3: initscripts-8.54.1-prettyboot.patch BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root -Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15 +Requires: mingetty >= 1.0.7-9, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15 Requires: /sbin/sysctl, syslog Requires: /sbin/fuser, /bin/grep Requires: module-init-tools Requires: util-linux >= 2.10s-11, mount >= 2.11l Requires: bash >= 3.0, SysVinit >= 2.85-38 -Requires: /sbin/ip, /sbin/arping, net-tools +Requires: /sbin/ip, net-tools Requires: /etc/redhat-release, dev Requires: ethtool >= 1.8-2, /sbin/runuser Requires: udev >= 078-1 +Requires: olpc-utils >= 0.20 +Requires: popt +# For stateless linux +Requires: cpio, findutils Conflicts: mkinitrd < 4.0, kernel < 2.6.12 Conflicts: ypbind < 1.6-12, psacct < 6.3.2-12, kbd < 1.06-19, lokkit < 0.50-14 Conflicts: dhclient < 3.0.3-7 @@ -25,7 +34,7 @@ Conflicts: alsa-utils < 1.0.14-0.5.rc2.fc7 Obsoletes: rhsound sapinit Obsoletes: hotplug Prereq: /sbin/chkconfig, /usr/sbin/groupadd, /bin/sed, coreutils -BuildRequires: glib2-devel popt gettext pkgconfig +BuildRequires: glib2-devel gettext pkgconfig %description The initscripts package contains the basic system scripts used to boot @@ -35,6 +44,10 @@ deactivate most network interfaces. %prep %setup -q +%patch0 -p1 -b .dont-install-orig +%patch1 -p1 -b .olpc +%patch2 -p1 -b .readonly +%patch3 -p1 -b .prettyboot %build make @@ -43,6 +56,9 @@ make rm -rf $RPM_BUILD_ROOT make ROOT=$RPM_BUILD_ROOT SUPERUSER=`id -un` SUPERGROUP=`id -gn` mandir=%{_mandir} install +mkdir -p $RPM_BUILD_ROOT/etc/pam.d/ +cp -f %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ + %find_lang %{name} %ifnarch s390 s390x @@ -66,10 +82,6 @@ chown root:utmp /var/log/wtmp /var/run/utmp /var/log/btmp chmod 664 /var/log/wtmp /var/run/utmp chmod 600 /var/log/btmp -/sbin/chkconfig --add netfs -/sbin/chkconfig --add network -/sbin/chkconfig --add netconsole - # Handle converting prefdm back to respawn if fgrep -q "x:5:once:/etc/X11/prefdm -nodaemon" /etc/inittab ; then sed --in-place=.rpmsave 's|^x:5:once:/etc/X11/prefdm -nodaemon|x:5:respawn:/etc/X11/prefdm -nodaemon|g' /etc/inittab @@ -201,8 +213,71 @@ rm -rf $RPM_BUILD_ROOT %ghost %attr(0600,root,utmp) /var/log/btmp %ghost %attr(0664,root,utmp) /var/log/wtmp %ghost %attr(0664,root,utmp) /var/run/utmp +%{_sysconfdir}/pam.d/olpc-login %changelog +* Thu Apr 01 2008 Michael Stone 8.54.1-18 +- Tell our agetty to login with /bin/bash now that we're locking the root account + +* Thu Jan 10 2008 Michael Stone 8.54.1-17 +- Correct Bernie's '--pauselogin' typo +- Depend on a more specific version of mingetty supporting --loginpause + +* Wed Jan 10 2008 Bernardo Innocenti 8.54.1-16 +- dlo#5879, dlo#5705, dlo#5537, dlo#5058: Automatic root login in the console + +* Wed Jan 02 2008 Bernardo Innocenti 8.54.1-15 +- Rebuild + +* Tue Dec 25 2007 Bernardo Innocenti 8.54.1-14 +- Update dependencies +- Happy holidays! + +* Fri Nov 01 2007 Bernardo Innocenti 8.54.1-13 +- Re-enable olpc-dm respawn due to popular demand + +* Fri Oct 12 2007 Bernardo Innocenti 8.54.1-12 +- Require olpc-utils for olpc-dm +- olpc-dm now lives in /usr/sbin + +* Fri Oct 12 2007 Bernardo Innocenti 8.54.1-11 +- Drop olpc-dm: it is now in olpc-dm + +* Fri Oct 12 2007 Bernardo Innocenti 8.54.1-10 +- Don't bind-mount /home/olpc/.Xauthority: unbreaks alternate boot + +* Mon Oct 1 2007 8.54.1-9 +- Create /etc/statetab; pretty boot improvements. + +* Tue Sep 18 2007 John (J5) Palmieri 8.54.1-8 +- don't crash if /etc/sysconfig/i18n does not exist + +* Thu Sep 11 2007 John (J5) Palmieri 8.54.1-7 +- fix crasher bug in olpc-dm + +* Tue Sep 11 2007 John (J5) Palmieri 8.54.1-6 +- clean up olpc-dm +- make sure olpc-dm sources /etc/sysconfig/i18n +- add an olpc-login pam control file to avoid unneeded checks + +* Thu Aug 30 2007 John (J5) Palmieri 8.54.1-5 +- remove /etc/mtab and /etc/fstab from /etc/rwtab + +* Mon Aug 13 2007 John (J5) Palmieri 8.54.1-4 +- update the olpc patch to include /home/olpc/.Xauthority in rwtab + +* Mon Aug 13 2007 John (J5) Palmieri 8.54.1-3 +- fix rwtab to not have resolv.conf which screws up NetworkManager +- don't print out tty in olpc-dm anymore + +* Thu Aug 09 2007 John (J5) Palmieri 8.54.1-2 +- branch and optimize for olpc +- add olpc-dm the new display manager for olpc +- don't start netfs, network or netconsole anymore + +* Mon Jun 25 2007 Bill Nottingham 8.54.1-1 +- netfs: check for rpcbind, not portmap (#245595) + * Tue May 15 2007 Bill Nottingham 8.54-1 - translation updates: as, bg, cs, ja, ms - redirect bogus errors from cryptsetup to /dev/null diff --git a/olpc-login b/olpc-login new file mode 100644 index 0000000..bb32a67 --- /dev/null +++ b/olpc-login @@ -0,0 +1,11 @@ +#%PAM-1.0 +auth required pam_env.so +auth required pam_permit.so +account required pam_nologin.so +account include system-auth +password include system-auth +session optional pam_keyinit.so force revoke +session include system-auth +session required pam_loginuid.so +session optional pam_console.so + diff --git a/sources b/sources index f4858e6..9f430fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad2b468d14646c1630e8be8f8943f8ca initscripts-8.54.tar.bz2 +c1b2f090197c6c391f0233a6089b9dcd initscripts-8.54.1.tar.bz2