Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 21 years ago
parent
commit
ed759ebe6b
7 changed files with 39 additions and 492 deletions
  1. +0
    -5
      target/livecd/build.sh
  2. +11
    -5
      target/livecd/build_stage1.sh
  3. +8
    -42
      target/livecd/build_stage2.sh
  4. +19
    -1
      target/livecd/config.in
  5. +0
    -204
      target/livecd/default.pkgmap
  6. +0
    -235
      target/livecd/default.pkgsel
  7. +1
    -0
      target/livecd/linuxrc.c

+ 0
- 5
target/livecd/build.sh

@ -6,11 +6,6 @@ if [ -z "`which mksquashfs`" ] ; then
exit 1;
fi ;
if [ -z "`which mkisofs`" ] ; then
echo "Please make mkisofs is installed! Rock Package: base/cdrtools"
exit 1;
fi;
pkgloop
rm -rf $disksdir; mkdir -p $disksdir; chmod 700 $disksdir

+ 11
- 5
target/livecd/build_stage1.sh

@ -4,14 +4,20 @@ rm -rf $disksdir/initrd
mkdir -p $disksdir/initrd/{dev,proc,tmp,bin-static,mnt/{cdrom,floppy,stick},ramdisk,etc,ROCK}
cd $disksdir/initrd; ln -s bin-static sbin-static; ln -s . usr
#
if [ ! -x ../../../usr/bin/diet ] ; then
echo_error "can not find the target's diet binary - did dietlibc build?";
exit 1;
if [ -x ../../../usr/bin/diet ] ; then
export DIETHOME="../../../usr/dietlibc"
LXRCCC="../../../usr/bin/diet $CC";
elif [ -x /usr/bin/diet ] ; then
echo_status "using host's diet - did the target's dietlibc build fail?"
LXRCCC="/usr/bin/diet $CC";
else
echo_status "diet not found - using glibc -static - initrd may be too big..."
LXRCCC="$CC -static"
fi
echo_status "Create linuxrc binary."
../../../usr/bin/diet $CC $base/target/$target/linuxrc.c -Wall \
$LXRCCC $base/target/$target/linuxrc.c -Wall \
-DSTAGE_2_IMAGE="\"${ROCKCFG_SHORTID}/2nd_stage.img.z\"" \
-o linuxrc
-o linuxrc
#
echo_status "Copy various helper applications."
cp ../2nd_stage/bin/{tar,gzip} bin-static/

+ 8
- 42
target/livecd/build_stage2.sh

@ -1,34 +1,16 @@
#
set -e
taropt="--use-compress-program=bzip2 -xf"
#
echo_header "Creating 2nd stage filesystem:"
mkdir -p $disksdir/2nd_stage
cd $disksdir/2nd_stage
mkdir -p mnt/source mnt/target ramdisk
. $base/target/$target/default.pkgmap
if [ -f ../../pkgs/bize.tar.bz2 -a ! -f ../../pkgs/mine.tar.bz2 ] ; then
packager=bize
else
packager=mine
fi
package_map="+$ROCKCFG_PKG_LINUX_DEFAULT +$packager $package_map"
#
echo_status "Extracting the packages archives."
for x in $( ls ../../pkgs/*.tar.bz2 | tr . / | cut -f8 -d/ )
do
if echo "" $package_map "" | grep -q " +$x "
then
echo_status "\`- Extracting $x.tar.bz2 ..."
tar --use-compress-program=bzip2 -xpf ../../pkgs/$x.tar.bz2
elif ! echo "" $package_map "" | grep -q " -$x "
then
echo_error "\`- Not found in \$package_map: $x"
echo_error " ... fix target/$target/build.sh"
fi
echo_status "\`- Extracting $x.tar.bz2 ..."
tar --use-compress-program=bzip2 -xpf ../../pkgs/$x.tar.bz2
done
#
echo_status "Saving boot/* - we do not need this on the 2nd stage ..."
@ -39,26 +21,11 @@ echo_status "Remove the stuff we do not need ..."
rm -rf home usr/{doc,man,info}
rm -rf var/adm/* var/adm var/mail
rm -rf usr/{include,src} usr/*-linux-gnu {,usr/}lib/*.{a,o} opt/*/lib/*.{a,o}
#for x in usr/lib/*/; do rm -rf ${x%/}; done
#
echo_status "Installing some terminfo databases ..."
tar $taropt ../../pkgs/ncurses.tar.bz2 \
usr/share/terminfo/x/xterm usr/share/terminfo/a/ansi \
usr/share/terminfo/n/nxterm usr/share/terminfo/l/linux \
usr/share/terminfo/v/vt200 usr/share/terminfo/v/vt220 \
usr/share/terminfo/v/vt100 usr/share/terminfo/s/screen
#
echo_status "Installing some keymaps ..."
tar $taropt ../../pkgs/kbd.tar.bz2 \
usr/share/kbd/keymaps/amiga usr/share/kbd/keymaps/i386/qwerty \
usr/share/kbd/keymaps/atari usr/share/kbd/keymaps/i386/qwertz \
usr/share/kbd/keymaps/sun
find usr/share/kbd -name '*dvo*' -o -name '*az*' -o -name '*fgG*' | \
xargs rm -rf
# TODO finish-package!!
echo_status "Running ldconfig to create links ..."
ldconfig -r .
#
echo_status "Installing pci.ids ..."
tar $taropt ../../pkgs/pciutils.tar.bz2 \
usr/share/pci.ids
echo_status "replacing some vital files for live useage ..."
cp -f $base/target/$target/fixedfiles/inittab etc/inittab
cp -f $base/target/$target/fixedfiles/login-shell sbin/login-shell
@ -69,4 +36,3 @@ cp -f $base/target/$target/fixedfiles/XF86Config etc/X11/XF86Config
#
echo_status "Creating 2nd_stage.img.z image... (this takes some time)... "
cd .. ; mksquashfs 2nd_stage 2nd_stage.img.z -noappend > /dev/null 2>&1

+ 19
- 1
target/livecd/config.in

@ -21,7 +21,7 @@
# --- ROCK-COPYRIGHT-NOTE-END ---
. target/livecd/default.pkgsel
#. target/livecd/default.pkgsel
ROCKCFG_LIVECD_USEKISS=1
@ -40,7 +40,11 @@ ROCKCFGSET_DIETLIBC_gawk=1
ROCKCFGSET_PKG_TERMCAP_USEIT=1
ROCKCFGSET_PKG_GCC2_NO_CHILL=1
ROCKCFGSET_PKG_GCC3_NO_JAVA=1
ROCKCFGSET_PKG_GCC32_NO_JAVA=1
ROCKCFGSET_PKG_GCC33_NO_JAVA=1
ROCKCFGSET_PKG_GCC34_NO_JAVA=1
ROCKCFGSET_PKG_GCC_GCC34=1
ROCKCFGSET_PKG_GCC_GCC32=0
ROCKCFGSET_PKG_BASH_PROGCOMP=0
ROCKCFGSET_DO_REBUILD_STAGE=0
@ -48,3 +52,17 @@ ROCKCFGSET_CREATE_DOCS=0
ROCKCFGSET_OPTSIZE=1
ROCKCFGSET_LIMITCXX=0
ROCKCFGSET_PKG_LINUX_SRC24=0
ROCKCFGSET_PKG_LINUX_SRC26=1
ROCKCFGSET_PKG_LINUX_IMG24=0
ROCKCFGSET_PKG_LINUX_IMG26=1
ROCKCFGSET_PKG_LINUX_HEADERS=linux26
ROCKCFGSET_PKG_LINUX_USE26MODTOOLS=1
# hardwired for now...
. misc/pkgsel/minimal-desktop.in
pkgenable kiss
pkgenable dietlibc
pkgenable squashfs-tools

+ 0
- 204
target/livecd/default.pkgmap

@ -1,204 +0,0 @@
package_map='
+00-dirtree
+aterm
-bind
-bin86
+bize
+devfsd
+dhcp
+dialog
+dump
-autoconf
-automake
+bash
+bc
-binutils
-bison
+bonnie++
+bzip2
+cracklib
-cron
+squashfs-tools
+cpio
+cpuburn
+cpuid
+curl
-diffutils
+disktype
-dietlibc
+e2fsprogs
+ed
+eject
+expat
+file
+coreutils
+findutils
-flex
+fbset
+gawk
+gcc32
+gcc33
+gcc34
-gettext
+genromfs
+glibc22
+glibc23
+grep
-groff
+grub
+gzip
+hdparm
+iproute2
+iptables
+intel-rng
+jfsutils
+kbd
+kiss
+less
+lilo
-libtool
+libjpeg
+libpng
+libpcap
+libtiff
+libungif
-linux26
-linux24
-linux26-header
-linux24-header
-linux26-src
-linux24-src
+lrzsz
-m4
-make
-man
-man-pages
+madm
+memtest86
+magicpoint
-mine
+minicom
+microcode_ctl
+mktemp
+mkdosfs
+modutils
+module-init-tools
+ncompress
+ncurses
+netkit-base
+net-tools
+nfs-utils
+ntfsprogs
+netkit-telnet
+netkit-ftp
+netkit-tftpA
+nvi
+openssh
+openssl
-patch
+parted
+pcmcia-cs
+popt
+perl5
+procinfo
+procps
+portmap
+psmisc
+pciutils
+raidtools
+reiserfsprogs
+rsync
+rockplug
+screen
+sed
+setserial
+shadow
+sysfiles
+sysklogd
+sysvinit
+tar
+tcpdump
-termcap
-texinfo
+time
+unzip
+util-linux
-uml_utilities
+vim
+vlock
+wget
+wireless-tools
+xfree86
+x86info
+xpdf
+zip
-zlib
+zsh
-rock-doc
-rock-src
+kdelibs
+arts
+glib
+gtkdoc
+openjade
+docbookx
+pkgconfig
+audiofile
+alsa
+alsa-driver
+fam
+freetype
+libart_lgpl23
+libxml2
+libxml
+libxslt
+mad
-bison
+esound
+tcp_wrappers
+ogg-vorbis
+pcre
+qt
+libmng
+python
+paragui
+libsdl
+libsdl_mixer
+libsdl_image
-nasm
+readline
+bdb33
+bdb40
+bdb41
+bdb42
+gdbm
+gmp
+tcltk
+ruby
+swig
+guile
+numpy
+kdebase
+openmotif
+kdeaddons
+kdeadmin
+kdeartwork
+kdebindings
+kdeedu
+kdegames
+kdegraphics
+kdemultimedia
+kdenetwork
+kdepim
+kdesdk
+kdetoys
+kdeutils
+koffice
+koffice-i18n
+kde-i18n-de
+k3b
+cdrtools
+attr
+acl
-syslinux
'

+ 0
- 235
target/livecd/default.pkgsel

@ -1,235 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/misc/pkgsel/minimal+xfree.in
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# TITLE: XFree86 + KDE minimum (almost)
pkgfilter sed '
# Add strictly required packages
/ 00-dirtree / { p; d; };
/ aterm / { p; d; };
/ bind / { p; d; };
/ bin86 / { p; d; };
/ bize / { p; d; };
/ cpuburn / { p; d; };
/ cpuid / { p; d; };
/ devfsd / { p; d; };
/ dhcp / { p; d; };
/ dialog / { p; d; };
/ dump / { p; d; };
/ dietlibc / { p; d; };
/ autoconf / { p; d; };
/ automake / { p; d; };
/ bash / { p; d; };
/ bc / { p; d; };
/ binutils / { p; d; };
/ bison / { p; d; };
/ bonnie++ / { p; d; };
/ bzip2 / { p; d; };
/ cracklib/ { p; d; };
/ cron / { p; d; };
/ squashfs-tools / { p; d; };
/ cpio / { p; d; };
/ curl / { p; d; };
/ diffutils / { p; d; };
/ disktype / { p; d; };
/ e2fsprogs / { p; d; };
/ ed / { p; d; };
/ eject / { p; d; };
/ expat / { p; d; };
/ file / { p; d; };
/ fbset / { p; d; };
/ coreutils / { p; d; };
/ findutils / { p; d; };
/ flex / { p; d; };
/ gawk / { p; d; };
/ gcc / { p; d; };
/ gettext / { p; d; };
/ genromfs / { p; d; };
/ glibc / { p; d; };
/ grep / { p; d; };
/ groff / { p; d; };
/ grub / { p; d; };
/ gzip / { p; d; };
/ hdparm / { p; d; };
/ intel-rng / { p; d; };
/ iproute2 / { p; d; };
/ iptables / { p; d; };
/ jfsutils / { p; d; };
/ kbd / { p; d; };
/ kiss / { p; d; };
/ less / { p; d; };
/ lilo / { p; d; };
/ libtool / { p; d; };
/ libjpeg / { p; d; };
/ libpng / { p; d; };
/ libpcap / { p; d; };
/ libtiff / { p; d; };
/ libungif / { p; d; };
/ linux / { p; d; };
/ linux-header / { p; d; };
/ linux-src / { p; d; };
/ lrzsz / { p; d; };
/ m4 / { p; d; };
/ make / { p; d; };
/ man / { p; d; };
/ man-pages / { p; d; };
/ madm / { p; d; };
/ magicpoint / { p; d; };
/ memtest86 / { p; d; };
/ mine / { p; d; };
/ minicom / { p; d; };
/ microcode_ctl / { p; d; };
/ module-init-tools / { p; d; };
/ mktemp / { p; d; };
/ modutils / { p; d; };
/ ncompress / { p; d; };
/ ncurses / { p; d; };
/ netkit-base / { p; d; };
/ net-tools/ { p; d; };
/ nfs-utils / { p; d; };
/ ntfsprogs / { p; d; };
/ netkit-telnet / { p; d; };
/ netkit-ftp / { p; d; };
/ netkit-tftp / { p; d; };
/ nvi / { p; d; };
/ openssh / { p; d; };
/ openssl / { p; d; };
/ patch / { p; d; };
/ parted / { p; d; };
/ pcmcia-cs / { p; d; };
/ popt / { p; d; };
/ perl5 / { p; d; };
/ procinfo / { p; d; };
/ procps / { p; d; };
/ portmap / { p; d; };
/ psmisc / { p; d; };
/ pciutils / { p; d; };
/ raidtools / { p; d; };
/ reiserfsprogs / { p; d; };
/ rsync / { p; d; };
/ rockplug / { p; d; };
/ screen / { p; d; };
/ syslinux / { p; d; };
/ sed / { p; d; };
/ setserial / { p; d; };
/ shadow / { p; d; };
/ sysfiles / { p; d; };
/ sysklogd / { p; d; };
/ sysvinit / { p; d; };
/ tar / { p; d; };
/ tcpdump / { p; d; };
/ texinfo / { p; d; };
/ time / { p; d; };
/ unzip / { p; d; };
/ util-linux / { p; d; };
/ vim / { p; d; };
/ vlock / { p; d; };
/ wget / { p; d; };
/ wireless-tools / { p; d; };
/ xfree86 / { p; d; };
/ x86info / { p; d; };
/ xpdf / { p; d; };
/ zip / { p; d; };
/ zlib / { p; d; };
/ zsh/ { p; d; };
/ rock-doc / { p; d; };
/ rock-src/ { p; d; };
# Some architecture-specifc-packages with missing deps
/ macosd / { s/^X /O / ; p; d; };
# Add architecture-specific-packages
/ alpha / { p; d; };
/ mips / { p; d; };
/ powerpc / { p; d; };
/ sparc / { p; d; };
/ x86 / { p; d; };
# kde-stuff
/ kdelibs / { p; d; };
/ arts / { p; d; };
/ glib / { p; d; };
/ gtkdoc / { p; d; };
/ openjade / { p; d; };
/ docbookx / { p; d; };
/ pkgconfig / { p; d; };
/ audiofile / { p; d; };
/ alsa / { p; d; };
/ alsa-driver / { p; d; };
/ fam / { p; d; };
/ freetype / { p; d; };
/ libart_lgpl23 / { p; d; };
/ libxml2 / { p; d; };
/ libxml / { p; d; };
/ libxslt / { p; d; };
/ mad / { p; d; };
/ mkdosfs / { p; d; };
/ bison / { p; d; };
/ esound / { p; d; };
/ tcp_wrappers / { p; d; };
/ ogg-vorbis / { p; d; };
/ pcre / { p; d; };
/ qt / { p; d; };
/ libmng / { p; d; };
/ python / { p; d; };
/ paragui / { p; d; };
/ libsdl / { p; d; };
/ libsdl_mixer / { p; d; };
/ libsdl_image / { p; d; };
/ nasm / { p; d; };
/ readline / { p; d; };
/ bdb / { p; d; };
/ gdbm / { p; d; };
/ gmp / { p; d; };
/ tcltk / { p; d; };
/ ruby / { p; d; };
/ swig / { p; d; };
/ guile / { p; d; };
/ numpy / { p; d; };
/ kdebase / { p; d; };
/ openmotif / { p; d; };
/ kdeaddons / { p; d; };
/ kdeadmin / { p; d; };
/ kdeartwork / { p; d; };
/ kdebindings / { p; d; };
/ kdeedu / { p; d; };
/ kdegames / { p; d; };
/ kdegraphics / { p; d; };
/ kdemultimedia / { p; d; };
/ kdenetwork / { p; d; };
/ kdepim / { p; d; };
/ kdesdk / { p; d; };
/ kdetoys / { p; d; };
/ kdeutils / { p; d; };
/ koffice / { p; d; };
/ koffice-i18n / { p; d; };
/ kde-i18n-de / { p; d; };
/ k3b / { p; d; };
/ cdrtools / { p; d; };
/ attr / { p; d; };
/ acl / { p; d; };
# Disabling the rest of packages
/.*/ { s/^X /O / ; p; d; };'

+ 1
- 0
target/livecd/linuxrc.c

@ -472,6 +472,7 @@ int prepare_root() {
/* create needed directories in /var */
DEBUG("preparing /var");
if(mkdir("/var/run",0755) != 0 ) { perror("could not create /var/run"); ret=-1; }
if(mkdir("/var/spool",0755) != 0 ) { perror("could not create /var/spool"); ret=-1; }
if(mkdir("/var/lock",0755) != 0 ) { perror("could not create /var/lock"); ret=-1; }
if(mkdir("/var/tmp",0777) != 0 ) { perror("could not create /var/tmp"); ret=-1; }
if(mkdir("/var/log",0755) != 0 ) { perror("could not create /var/log"); ret=-1; }

Loading…
Cancel
Save