From a5921ce6af285d5c42a4cb8b0ffc8ccb3d52cd9f Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Wed, 21 Jul 2004 05:03:42 +0000 Subject: [PATCH] adding in wolf31o2s gamecd patchset git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@420 d1e1f19c-881f-0410-ab34-b69fee027534 --- AUTHORS | 1 + ChangeLog | 12 ++++++++- livecd/files/gamecd-xinitrc | 2 ++ livecd/files/gamecd.motd.txt | 8 ++++++ livecd/files/generic-motd.txt | 12 +++++++++ livecd/files/livecd-bash_profile | 9 +++++++ livecd/files/livecd-local.start | 21 +++++++++++++++ livecd/files/livecd-rclocal | 19 -------------- livecd/files/minimal.motd.txt | 13 +++++++++ livecd/files/motd.txt | 26 ------------------ livecd/files/universal.motd.txt | 3 +++ livecd/runscript-support/kmerge.sh | 29 ++++++++++++--------- livecd/runscript-support/livecdfs-update.sh | 14 +++++++++- livecd/runscript/default-runscript.sh | 24 +++++++++++++---- modules/livecd_stage2_target.py | 4 +-- 15 files changed, 131 insertions(+), 66 deletions(-) create mode 100644 livecd/files/gamecd-xinitrc create mode 100644 livecd/files/gamecd.motd.txt create mode 100644 livecd/files/generic-motd.txt create mode 100644 livecd/files/livecd-bash_profile create mode 100644 livecd/files/livecd-local.start delete mode 100644 livecd/files/livecd-rclocal create mode 100644 livecd/files/minimal.motd.txt delete mode 100644 livecd/files/motd.txt create mode 100644 livecd/files/universal.motd.txt diff --git a/AUTHORS b/AUTHORS index 4a03dd33..b5e5a040 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,3 +4,4 @@ Daniel Robbins Contributors: Rob Holland +Chris Gianelloni diff --git a/ChangeLog b/ChangeLog index ba56f9d7..da66c899 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.72 2004/07/14 17:23:16 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.73 2004/07/21 05:03:42 zhen Exp $ + + 21 Jul 2004; John Davis +livecd/files/gamecd-xinitrc, + +livecd/files/gamecd.motd.txt, +livecd/files/generic-motd.txt, + +livecd/files/livecd-bash_profile, +livecd/files/livecd-local.start, + -livecd/files/livecd-rclocal, +livecd/files/minimal.motd.txt, + -livecd/files/motd.txt, +livecd/files/universal.motd.txt, + livecd/runscript/default-runscript.sh, livecd/runscript-support/kmerge.sh, + livecd/runscript-support/livecdfs-update.sh, + modules/livecd_stage2_target.py: + addition of wolf31o2's gamecd patchset. untested, so please beware 14 Jul 2004; John Davis livecd/runscript-support/livecdfs-update.sh, diff --git a/livecd/files/gamecd-xinitrc b/livecd/files/gamecd-xinitrc new file mode 100644 index 00000000..1303131c --- /dev/null +++ b/livecd/files/gamecd-xinitrc @@ -0,0 +1,2 @@ +GAME_EXECUTABLE & +exec fluxbox diff --git a/livecd/files/gamecd.motd.txt b/livecd/files/gamecd.motd.txt new file mode 100644 index 00000000..498490e9 --- /dev/null +++ b/livecd/files/gamecd.motd.txt @@ -0,0 +1,8 @@ + +To (re)start ##GAME_NAME, please type "startx" at the prompt below. + +Please report any bugs you find to http://bugs.gentoo.org. Be sure to include +detailed information about how to reproduce the bug you are reporting. + +Thank you for using Gentoo Linux! + diff --git a/livecd/files/generic-motd.txt b/livecd/files/generic-motd.txt new file mode 100644 index 00000000..e436a032 --- /dev/null +++ b/livecd/files/generic-motd.txt @@ -0,0 +1,12 @@ + +##GREETING + +The root password on this system has been auto-scrambled for security. + +If any ethernet adapters were detected at boot, they should be auto-configured +if DHCP is available on your network. + +Type "net-setup eth0" to specify eth0 IP address settings by hand. + +/proc/config(.gz) for kernel configuration. + diff --git a/livecd/files/livecd-bash_profile b/livecd/files/livecd-bash_profile new file mode 100644 index 00000000..c904ed8d --- /dev/null +++ b/livecd/files/livecd-bash_profile @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ -e /usr/X11R6/bin/X ]; then + if [ -e /etc/startx ]; then + rm -f /etc/startx + startx + cat /etc/motd + fi +fi diff --git a/livecd/files/livecd-local.start b/livecd/files/livecd-local.start new file mode 100644 index 00000000..e391ac00 --- /dev/null +++ b/livecd/files/livecd-local.start @@ -0,0 +1,21 @@ +# /etc/conf.d/local.start + +# This is a good place to load any misc. +# programs on startup ( 1>&2 ) + +[ -x /sbin/x-setup ] && /sbin/x-setup + +# Experimental ALSA stuff +if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ]; then + amixer scontrols > /etc/amixer + [ -n "`grep Master /etc/amixer`" ] && amixer set Master 75% \ + && amixer set Master unmute + [ -n "`grep PCM /etc/amixer`" ] && amixer set PCM 75% \ + && amixer set PCM unmute + [ -n "`grep Mic /etc/amixer`" ] && amixer set Mic 75% \ + && amixer set Mic cap + [ -n "`grep Wave /etc/amixer`" ] && amixer set Wave 75% \ + && amixer set Wave unmute + [ -n "`grep Capture /etc/amixer`" ] && amixer set Capture 75% \ + && amixer set Capture cap && amixer set Capture unmute +fi diff --git a/livecd/files/livecd-rclocal b/livecd/files/livecd-rclocal deleted file mode 100644 index 56f2ae90..00000000 --- a/livecd/files/livecd-rclocal +++ /dev/null @@ -1,19 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/files/Attic/livecd-rclocal,v 1.1 2004/05/12 21:19:34 zhen Exp $ - -depend() { - after * -} - -start() { - ebegin "Auto-scrambling root password for security" - echo root:\`pwgen -s 16\` | chpasswd > /dev/null 2>&1 - eend $? "Failed to start local." -} - -stop() { - ebegin "Stopping local" - eend $? "Failed to stop local." -} diff --git a/livecd/files/minimal.motd.txt b/livecd/files/minimal.motd.txt new file mode 100644 index 00000000..5b3f909d --- /dev/null +++ b/livecd/files/minimal.motd.txt @@ -0,0 +1,13 @@ + +To start an ssh server on this system, type "/etc/init.d/sshd start". If you +need to log in remotely as root, type "passwd root" to reset root's password +to a known value. + +View installation instructions by typing "links /mnt/cdrom/docs/handbook/html/index.html" +or "links http://www.gentoo.org/doc/en/handbook/handbook.xml" +for the latest version from the gentoo.org web site. + +Please report any bugs you find to http://bugs.gentoo.org. Be sure to include +detailed information about how to reproduce the bug you are reporting. +Thank you for using Gentoo Linux! + diff --git a/livecd/files/motd.txt b/livecd/files/motd.txt deleted file mode 100644 index 27b39af8..00000000 --- a/livecd/files/motd.txt +++ /dev/null @@ -1,26 +0,0 @@ - -##GREETING - -The root password on this system has been auto-scrambled for security. - -If any ethernet adapters were detected at boot, they should be auto-configured -if DHCP is available on your network. Type "net-setup eth0" to specify eth0 IP -address settings by hand. - -/proc/config(.gz) for kernel configuration. - -To start an ssh server on this system, type "/etc/init.d/sshd start". If you -need to log in remotely as root, type "passwd root" to reset root's password to -a known value. - -Stage tarball(s), distfiles and packages can be found in /mnt/cdrom/. - -View installation instructions by typing "links -/mnt/cdrom/docs/handbook/html/index.html" or "links -http://www.gentoo.org/doc/en/handbook/handbook.xml" for the latest version from -the gentoo.org Web site. - -Please report any bugs you find to http://bugs.gentoo.org. Be sure to include -detailed information about how to reproduce the bug you are reporting. Thanks -for using Gentoo Linux! - diff --git a/livecd/files/universal.motd.txt b/livecd/files/universal.motd.txt new file mode 100644 index 00000000..51b2fde8 --- /dev/null +++ b/livecd/files/universal.motd.txt @@ -0,0 +1,3 @@ + +Stage tarball(s), distfiles and packages can be found in /mnt/cdrom/. + diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index d283cd2a..84943428 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.7 2004/06/13 15:48:51 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.8 2004/07/21 05:03:42 zhen Exp $ die() { echo "$1" @@ -48,26 +48,31 @@ SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'` EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"` clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV} -if [ -n "${clst_livecd_bootsplash}" ] -then - genkernel --bootsplash=${clst_livecd_bootsplash} ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 -else - genkernel ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 -fi - -${genkernel} -#now we merge any kernel-dependent packages +# now we merge any kernel-dependent packages if [ -e "/var/tmp/${clst_kname}.packages" ] then for x in $( cat /var/tmp/${clst_kname}.packages ) do # we don't want to use the pkgcache for these since the results # are kernel-dependent. - emerge "$x" - /sbin/modules-update --assume-kernel=${clst_fudgeuname} + clst_kernel_merge="${clst_kernel_merge} ${x}" done fi +if [ -n "${clst_livecd_bootsplash}" ] +then + genkernel --bootsplash=${clst_livecd_bootsplash} \ + --callback="emerge ${clst_kernel_merge}" ${clst_livecd_gk_mainargs} \ + ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux \ + --kernel-config=/var/tmp/${clst_kname}.config \ + --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 +else + genkernel --callback="emerge ${clst_kernel_merge}" \ + ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} \ + --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config \ + --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 +fi + /sbin/modules-update --assume-kernel=${clst_fudgeuname} #now the unmerge... (wipe db entry) diff --git a/livecd/runscript-support/livecdfs-update.sh b/livecd/runscript-support/livecdfs-update.sh index ce272744..55e5bb4f 100755 --- a/livecd/runscript-support/livecdfs-update.sh +++ b/livecd/runscript-support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.8 2004/07/14 17:23:16 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.9 2004/07/21 05:03:42 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -46,6 +46,7 @@ rc-update del keymaps rc-update del consolefont rc-update add metalog default rc-update add modules default +rc-update add pwgen default [ -e /etc/init.d/bootsplash ] && rc-update add bootsplash default rm -rf /etc/localtime @@ -74,14 +75,25 @@ fi # tweak the motd for gentoo releases if [ "${clst_livecd_type}" = "gentoo-release-universal" ] then + cat /etc/generic.motd.txt /etc/universal.motd.txt \ + /etc/minimal.motd.txt > /etc/motd sed -i -e 's/^##GREETING/Welcome to the Gentoo Linux Universal Installation LiveCD!/' /etc/motd fi if [ "${clst_livecd_type}" = "gentoo-release-minimal" ] then + cat /etc/generic.motd.txt > /etc/motd sed -i -e 's/^##GREETING/Welcome to the Gentoo Linux Minimal Installation LiveCD!/' /etc/motd fi +if [ "${clst_livecd_type}" = "gentoo-gamecd" ] +then + cat /etc/generic.motd.txt /etc/gamecd.motd.txt > /etc/motd + sed -i -e 's/^##GREETING/Welcome to the Gentoo Linux ##GAME_NAME GameCD!/' /etc/motd +fi + +rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/gamecd.motd.txt + # setup bootsplash (if called for) if [ -n "${clst_livecd_bootsplash}" ] then diff --git a/livecd/runscript/default-runscript.sh b/livecd/runscript/default-runscript.sh index c2f970cd..bf03c831 100644 --- a/livecd/runscript/default-runscript.sh +++ b/livecd/runscript/default-runscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.15 2004/07/13 15:15:22 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.16 2004/07/21 05:03:42 zhen Exp $ #return codes to be used by archscript die() { @@ -121,15 +121,29 @@ case $1 in ;; preclean) - # overwrite /etc/init.d/local in the livecd root - rm -f ${clst_chroot_path}/etc/init.d/local - cp -a ${clst_sharedir}/livecd/files/livecd-rclocal ${clst_chroot_path}/etc/init.d/local - # move over the motd (if applicable) if [ -n "${clst_livecd_motd}" ] then cp -a ${clst_livecd_motd} ${clst_chroot_path}/etc/motd + else + cp -a ${clst_sharedir}/livecd/files/generic.motd.txt \ + ${clst_sharedir}/livecd/files/universal.motd.txt \ + ${clst_sharedir}/livecd/files/minimal.motd.txt \ + ${clst_sharedir}/livecd/files/gamecd.motd.txt \ + ${clst_chroot_path}/etc fi + + # move over the xinitrc (if applicable) + if [ -n "${clst_livecd_xinitrc}" ] + then + cp -a ${clst_livecd_xinitrc} ${clst_chroot_path}/etc/X11/xinit/xinitrc + fi + + # move over the environment + cp -a ${clst_sharedir}/livecd/files/livecd-bash_profile \ + ${clst_chroot_path}/root/.bash_profile + cp -a ${clst_sharedir}/livecd/files/livecd-local.start \ + ${clst_chroot_path}/etc/conf.d/local.start # now, finalize and tweak the livecd fs (inside of the chroot) cp ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh ${clst_chroot_path}/tmp diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index bb78531b..3d03450c 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.16 2004/07/14 18:07:50 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.17 2004/07/21 05:03:42 zhen Exp $ """ Builder class for a LiveCD stage2 build. @@ -37,7 +37,7 @@ class livecd_stage2_target(generic_stage_target): self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm",\ "livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\ "livecd/motd","livecd/overlay","livecd/modblacklist","livecd/bootsplash",\ - "livecd/rcadd","livecd/rcdel","livecd/fsscript"]) + "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc"]) generic_stage_target.__init__(self,spec,addlargs) file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) -- 2.26.2