Réorganisation des stages
authorroot <root@364a67c3-989e-7be9-548d-dae8560ea662>
Fri, 12 Feb 2010 03:12:38 +0000 (03:12 +0000)
committerroot <root@364a67c3-989e-7be9-548d-dae8560ea662>
Fri, 12 Feb 2010 03:12:38 +0000 (03:12 +0000)
82 files changed:
stage2/bootscripts/dhcp [deleted file]
stage2/bootscripts/nfs [deleted file]
stage2/bootscripts/portmap [deleted file]
stage2/bootscripts/sshd [deleted file]
stage2/cis-bootscripts
stage2/cis-dhcp [deleted file]
stage2/cis-emacs [deleted file]
stage2/cis-nano [deleted file]
stage2/cis-net-tools [deleted file]
stage2/cis-nfs-utils [deleted file]
stage2/cis-openssh [deleted file]
stage2/cis-openssl [deleted file]
stage2/cis-pam [deleted file]
stage2/cis-pciutils [deleted file]
stage2/cis-portmap [deleted file]
stage2/cis-reiserfsprogs [deleted file]
stage2/cis-sudo [deleted file]
stage2/cis-tcl [deleted file]
stage2/cis-tcp-wrappers [deleted file]
stage2/install-2
stage2/misc/nanorc [deleted file]
stage2/packages-update
stage3/bootscripts/dhcp [new file with mode: 0755]
stage3/bootscripts/nfs [new file with mode: 0755]
stage3/bootscripts/portmap [new file with mode: 0755]
stage3/bootscripts/sshd [new file with mode: 0755]
stage3/cis-dhcp [new file with mode: 0755]
stage3/cis-emacs
stage3/cis-nano [new file with mode: 0755]
stage3/cis-net-tools [new file with mode: 0755]
stage3/cis-nfs-utils [new file with mode: 0755]
stage3/cis-openssh [new file with mode: 0755]
stage3/cis-openssl [new file with mode: 0755]
stage3/cis-pam [new file with mode: 0755]
stage3/cis-pciutils [new file with mode: 0755]
stage3/cis-portmap [new file with mode: 0755]
stage3/cis-reiserfsprogs [new file with mode: 0755]
stage3/cis-sudo [new file with mode: 0755]
stage3/cis-tcl [new file with mode: 0755]
stage3/cis-tcp-wrappers [new file with mode: 0755]
stage3/packages-update
stage3/resources/emacsrc [new file with mode: 0644]
stage3/resources/nanorc [new file with mode: 0644]
stage3/stage3-install
stage5/README [deleted file]
stage5/TODO [deleted file]
stage5/cis-ac [deleted symlink]
stage5/cis-ac-nobuild [deleted symlink]
stage5/cis-avr-libc [deleted file]
stage5/cis-avrdude [deleted file]
stage5/cis-binutils [deleted file]
stage5/cis-gcc1 [deleted file]
stage5/cis-gcc2 [deleted file]
stage5/cis-gdb [deleted file]
stage5/cis-glibc [deleted file]
stage5/cis-kernel [deleted file]
stage5/cis-newlib [deleted file]
stage5/packages-update [deleted file]
stage5/stage5-additions [deleted file]
stage5/stage5-install-arm [deleted file]
stage5/stage5-install-avr [deleted file]
stage5/stage5-install-geda [deleted file]
stage5/stage5-install-ppc [deleted file]
stage6/README [new file with mode: 0644]
stage6/TODO [new file with mode: 0644]
stage6/cis-ac [new symlink]
stage6/cis-ac-nobuild [new symlink]
stage6/cis-avr-libc [new file with mode: 0755]
stage6/cis-avrdude [new file with mode: 0755]
stage6/cis-binutils [new file with mode: 0755]
stage6/cis-gcc1 [new file with mode: 0755]
stage6/cis-gcc2 [new file with mode: 0755]
stage6/cis-gdb [new file with mode: 0755]
stage6/cis-glibc [new file with mode: 0755]
stage6/cis-kernel [new file with mode: 0755]
stage6/cis-newlib [new file with mode: 0755]
stage6/packages-update [new file with mode: 0755]
stage6/stage5-additions [new file with mode: 0755]
stage6/stage5-install-arm [new file with mode: 0644]
stage6/stage5-install-avr [new file with mode: 0755]
stage6/stage5-install-geda [new file with mode: 0755]
stage6/stage5-install-ppc [new file with mode: 0755]

diff --git a/stage2/bootscripts/dhcp b/stage2/bootscripts/dhcp
deleted file mode 100755 (executable)
index fbbd241..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# dhcp
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-log_script_name "$0 $*"
-
-# Load global network parameters
-source /etc/sysconfig/network/network-parameters
-
-if [ -z "${DHCP_SERVER_IF}" ]; then
-    # DHCP server is not enabled
-    msg_log "DHCP server disabled in '/etc/sysconfig/network/network-parameters'"
-    exit ${EXIT_CODE_WARNING}
-fi
-
-# The lease file must exist on startup
-if [ ! -f /var/state/dhcp/dhcpd.leases ]; then
-    touch /var/state/dhcp/dhcpd.leases || exit ${EXIT_CODE_FAILURE}
-fi
-
-# See how we were called
-case "$1" in
-    start)
-       cmd_run_log_box_warn "DHCP server start" loadproc /usr/sbin/dhcpd -q ${DHCP_SERVER_IF}
-       ;;
-    
-    stop)
-       cmd_run_log_box_warn "DHCP server stop" killproc /usr/sbin/dhcpd
-       ;;
-   
-    restart)
-       $0 stop
-       sleep 1
-       $0 start
-       ;;
-
-    status)
-       statusproc /usr/sbin/dhcpd
-       ;;
-    
-    *)
-       echo "Usage: $0 {restart|start|status|stop}"
-        exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
diff --git a/stage2/bootscripts/nfs b/stage2/bootscripts/nfs
deleted file mode 100755 (executable)
index e8621b7..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/sh
-#
-# nfs           This shell script takes care of starting and stopping
-#               the NFS services.
-#
-# description: NFS is a popular protocol for file sharing across TCP/IP \
-#              networks. This service provides NFS server functionality, \
-#              which is configured via the /etc/exports file.
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-log_script_name "$0 $*"
-
-# Load global network parameters
-source /etc/sysconfig/network/network-parameters
-
-# Check that networking is up.
-#[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING}
-
-# Check for presence of executables
-if [ ! -x /usr/sbin/rpc.nfsd ]; then
-    echo "Missing rpc.nfsd executable"
-    exit ${EXIT_CODE_WARNING}
-fi
-if [ ! -x /usr/sbin/rpc.mountd ]; then
-    echo "Missing rpc.mountd executable"
-    exit ${EXIT_CODE_WARNING}
-fi
-if [ ! -x /usr/sbin/exportfs ]; then
-    echo "Missing exportfs executable"
-    exit ${EXIT_CODE_WARNING}
-fi
-if [ ! -s /etc/exports ]; then
-    echo "Missing /etc/exports configuration file"
-    exit ${EXIT_CODE_WARNING}
-fi
-
-if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
-    msg_log "NFS server disabled in '/etc/sysconfig/network/network-parameters'"
-    exit ${EXIT_CODE_WARNING}
-fi
-
-# Check for and source configuration file otherwise set defaults
-# TUNE_QUEUE: controls whether to up the size of input queues
-[ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs
-
-[ -z "$MOUNTD_NFS_V2" ] && MOUNTD_NFS_V2=auto
-[ -z "$MOUNTD_NFS_V3" ] && MOUNTD_NFS_V3=auto
-
-# Number of servers to be started by default
-[ -z "$NFSDCOUNT" ] && NFSDCOUNT=8
-
-# Remote quota server
-[ -z "$RQUOTAD" ] && RQUOTAD=`type -path rpc.rquotad`
-
-# Get the initial values for the input sock queues
-# at the time of running the script.
-if [ "$TUNE_QUEUE" = "yes" ]; then
-    RMEM_DEFAULT=`/sbin/sysctl -n net.core.rmem_default`
-    RMEM_MAX=`/sbin/sysctl -n net.core.rmem_max`
-    # 256kb recommended minimum size based on SPECsfs NFS benchmarks
-    [ -z "$NFS_QS" ] && NFS_QS=262144
-fi
-
-MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-nfs-version 2"
-MOUNTD_OPTIONS="$MOUNTD_OPTIONS --nfs-version 3"
-
-nfsd_start() {
-    # Apply input queue increase for nfs server
-    if [ "$TUNE_QUEUE" = "yes" ]; then
-       /sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1
-       /sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1
-    fi
-    cmd_run_log_box "Starting NFS services" loadproc /usr/sbin/exportfs -ra
-    if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
-       cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad
-    fi
-    cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT
-    
-    [ -n "$MOUNTD_PORT" ] \
-       && MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT"
-    [ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \
-       && MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp"
-    
-    cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS
-    
-    touch /var/lock/subsys/nfs
-    # reset input queue for rest of network services
-    if [ "$TUNE_QUEUE" = "yes" ]; then
-       /sbin/sysctl -w net.core.rmem_default=$RMEM_DEFAULT >/dev/null 2>&1
-       /sbin/sysctl -w net.core.rmem_max=$RMEM_MAX >/dev/null 2>&1
-    fi
-}
-
-nfsd_stop() {
-    cmd_run_log_box "Stopping NFS mountd" killproc rpc.mountd
-    cmd_run_log_box "Stopping NFS daemon" killproc nfsd
-    if [ -n "$RQUOTAD" ]; then
-       cmd_run_log_box "Stopping NFS quotas" killproc rpc.rquotad
-    fi
-
-    # Do it the last so that clients can still access the server
-    # when the server is running.
-    echo "Refreshing NFS Exported Filesystems..."
-    /usr/sbin/exportfs -au
-
-    rm -f /var/lock/subsys/nfs
-}
-
-
-# See how we were called
-case "$1" in
-    start)
-       cmd_run_log_box_warn "NFS server start" nfsd_start
-       ;;
-    
-    stop)
-       cmd_run_log_box_warn "NFS server stop" nfsd_stop
-       ;;
-   
-    reload)
-       /usr/sbin/exportfs -ra
-       touch /var/lock/subsys/nfs
-       ;;
-    
-    restart)
-       $0 stop
-       sleep 1
-       $0 start
-       ;;
-
-    status)
-       statusproc rpc.mountd
-       statusproc nfsd
-       if [ -n "$RQUOTAD" ]; then
-           statusproc rpc.rquotad
-       fi
-       ;;
-    
-    *)
-       echo "Usage: $0 {reload|restart|start|status|stop}"
-        exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
diff --git a/stage2/bootscripts/portmap b/stage2/bootscripts/portmap
deleted file mode 100755 (executable)
index 9a54dc4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-# portmap
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-log_script_name "$0 $*"
-
-# See how we were called
-case "$1" in
-    start)
-       cmd_run_log_box_warn "portmap start" loadproc portmap
-       ;;
-
-    stop)
-       cmd_run_log_box_warn "portmap stop" killproc portmap
-       ;;
-   
-    reload)
-       reloadproc portmap
-       ;;
-    
-    restart)
-       $0 stop
-       sleep 1
-       $0 start
-       ;;
-
-    status)
-       statusproc portmap
-       ;;
-    
-    *)
-       echo "Usage: $0 {reload|restart|start|status|stop}"
-        exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
diff --git a/stage2/bootscripts/sshd b/stage2/bootscripts/sshd
deleted file mode 100755 (executable)
index 83e4349..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-# sshd
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-log_script_name "$0 $*"
-
-SSHD="/usr/sbin/sshd -4"
-
-gen_keys() {
-    if [ ! -e /etc/ssh/ssh_host_key ] ; then
-       echo "Generating Hostkey..."
-       /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
-    fi
-    if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then
-       echo "Generating DSA-Hostkey..."
-       /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
-    fi
-    if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then
-       echo "Generating RSA-Hostkey..."
-       /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
-    fi
-}
-
-sshd_start() {
-    # Checking configuration
-    if [ ! -e /etc/ssh/sshd_config ] ; then
-       echo "You need an /etc/ssh/sshd_config file to run sshd"
-       echo "There is a sample file in  /usr/share/doc/openssh"
-       exit ${EXIT_CODE_FAILURE}
-    fi
-
-    gen_keys
-    
-    if [ $? -ne 0 ]; then
-       exit ${EXIT_CODE_FAILURE}
-    else
-       loadproc ${SSHD}
-    fi
-}
-
-# See how we were called
-case "$1" in
-    start)
-       cmd_run_log_box_warn "sshd start" sshd_start
-       ;;
-    
-    stop)
-       cmd_run_log_box_warn "sshd stop" killproc sshd
-       ;;
-   
-    reload)
-       reloadproc sshd
-       ;;
-    
-    restart)
-       $0 stop
-       sleep 1
-       $0 start
-       ;;
-
-    status)
-       statusproc sshd
-       ;;
-    
-    *)
-       echo "Usage: $0 {reload|restart|start|status|stop}"
-       exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
index 9fc3a49..b334ff5 100755 (executable)
@@ -84,7 +84,7 @@ fi
 sed -i -e "s!^\(export PATH=\).*tools.*!\1/bin:/usr/bin:/sbin:/usr/sbin!" /etc/rc.d/init.d/functions
 
 # Copying boot scripts
-STAGE2_BOOTSCRIPTS="dhcp ifdown ifup keyboard mountnetfs network nfs portmap sshd sysklogd"
+STAGE2_BOOTSCRIPTS="ifdown ifup keyboard mountnetfs network sysklogd"
 for bootscript in ${STAGE2_BOOTSCRIPTS}; do
     install -m755 bootscripts/${bootscript} /etc/rc.d/init.d
 done
@@ -99,10 +99,6 @@ bootscript_add_rcsysinit keyboard  55 00
 
 # rc3.d
 bootscript_add_rc3 network    05 80
-bootscript_add_rc3 portmap    10 75
-bootscript_add_rc3 nfs        15 74
-bootscript_add_rc3 dhcp       20 73
-bootscript_add_rc3 sshd       25 70
 bootscript_add_rc3 mountnetfs 30 10
 
 chown -R root:root /etc/rc.d /etc/sysconfig
diff --git a/stage2/cis-dhcp b/stage2/cis-dhcp
deleted file mode 100755 (executable)
index 45e0875..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}
-./configure
-make -j ${MAKEJOBS}
-make LIBDIR=/usr/lib INCDIR=/usr/include install
-
-# This is for the DHCP client
-cat > /etc/dhclient.conf << "EOF"
-# dhclient.conf
-
-timeout 15;
-
-interface "eth0"{
-  supersede domain-name "_DOMAIN_";
-  prepend domain-name-servers 127.0.0.1;
-  request subnet-mask, broadcast-address, time-offset, routers,
-          domain-name, domain-name-servers, host-name;
-  require subnet-mask, domain-name-servers;
-}
-EOF
-
-sed -i -e "s!_DOMAIN_!${DOMAIN}!g" /etc/dhclient.conf
-
-cat > /etc/sysconfig/network/dhcp-client << "EOF"
-# dhcp-client
-# DHCP client program informations
-#
-DHCP_PROG="/sbin/dhclient"
-DHCP_START="-q -1"
-DHCP_STOP="-q -r"
-EOF
-
-# Is it really necessary? If necessary, uncomment entries.
-cat > /etc/dhclient-exit-hooks << "EOF"
-#!/bin/sh
-
-# Load global network parameters
-. /etc/sysconfig/network/network-parameters
-
-#  Update /etc/hosts only if we have an ip address.
-if [ -n "${new_ip_address}" ]; then
-    #echo "127.0.0.1    localhost.localdomain localhost" > /etc/hosts
-    #echo "${new_ip_address} ${DEFAULT_HOSTNAME}" >> /etc/hosts
-    exit_status=0
-else
-    exit_status=1
-fi
-EOF
-chmod 740 /etc/dhclient-exit-hooks
-
-# The following commands will create a base configuration file for a DHCP server.
-cat > /etc/dhcpd.conf << EOF 
-# Configuration file for DHCP server.
-
-default-lease-time 72000;
-max-lease-time 144000;
-ddns-update-style ad-hoc;
-
-subnet 192.168.0.0 netmask 255.255.255.0 {
-  range 192.168.0.2 192.168.0.240;
-  option broadcast-address 192.168.0.255;
-  option routers 192.168.0.1;
-  option domain-name-servers 192.168.0.1;
-}
-EOF
-
-exit $?
diff --git a/stage2/cis-emacs b/stage2/cis-emacs
deleted file mode 100755 (executable)
index 4137455..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
-    --prefix=/usr \
-    --without-sound \
-    --with-x=no \
-    --without-dbus \
-    --with-xpm=no \
-    --with-jpeg=no \
-    --with-png=no \
-    --with-gif=no \
-    --with-tiff=no \
-    --without-rsvg \
-    --libexecdir=/usr/sbin \
-    --localstatedir=/var
-make -j ${MAKEJOBS} bootstrap
-make install
-
-cat > /etc/skel/.emacs << "EOF"
-;; ~/.emacs
-
-;; Emacs initialization file
-
-;; Do not display a splash screen on startup
-(setq inhibit-splash-screen t)
-
-;; Pour avoir les accents
-(set-keyboard-coding-system 'utf-8)
-
-;; Set up the keyboard so the delete key on both the regular keyboard
-;; and the keypad delete the character under the cursor and to the right
-;; under X, instead of the default, backspace behavior.
-(global-set-key [delete] 'delete-char)
-(global-set-key [kp-delete] 'delete-char)
-
-;; Turn on font-lock mode for Emacs
-(global-font-lock-mode t)
-
-;; Always end a file with a newline
-(setq require-final-newline t)
-
-;; Stop at the end of the file, not just add lines
-(setq next-line-add-newlines nil)
-
-;; Replaces tabs in files with spaces
-(setq-default indent-tabs-mode nil)
-
-;; Makes the compilation buffer always scrolls to follow
-;; output as it comes in.
-(setq compilation-scroll-output t)
-
-;;===========================================================
-;; Key bindings for compiling programs
-;;===========================================================
-;; Must add helper function for the make also, otherwise
-;; the first definition caused both F3 and F4 to execute "make clean".
-(defun compile-make-clean ()
-  (interactive)           ;; can be called from kbd
-  (compile "make clean"))
-
-(defun compile-make ()
-  (interactive) 
-  (compile "make"))
-
-(defun checkpatch()
-  (interactive)
-  (compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name))))
-
-;; buffer-cycle.el
-;; F1: Switch to previous buffers
-(autoload 'cycle-buffer-prev "buffer-cycle" t)
-(global-set-key [f1] 'cycle-buffer-prev)
-;; F2: Switch to next buffers
-(autoload 'cycle-buffer-next "buffer-cycle" t)
-(global-set-key [f2] 'cycle-buffer-next)
-
-;; F4: make clean
-(global-set-key [f4] 'compile-make-clean)
-
-;; F5: make
-(global-set-key [f5] 'compile-make)
-
-;; F6: go to next error
-(global-set-key [f6] 'next-error)
-
-;; F7: comment region
-(global-set-key [f7] 'comment-region)
-
-;; F8: code indentation
-(global-set-key [f8] 'indent-region)
-
-;; F9: run checkpatch.pl
-(global-set-key [f9] 'checkpatch)
-EOF
-
-exit $?
diff --git a/stage2/cis-nano b/stage2/cis-nano
deleted file mode 100755 (executable)
index 48ffe0c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-../${PACKAGE}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    ${CONFIGURE_OPTS}
-make
-make install
-install -m644 ${SCRDIR}/misc/nanorc /etc
-ldconfig
-
-exit $?
diff --git a/stage2/cis-net-tools b/stage2/cis-net-tools
deleted file mode 100755 (executable)
index cb0940a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}
-yes "" | make config
-sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \
-    -e 's|HAVE_MII 0|HAVE_MII 1|g' config.h
-sed -i -e 's|# HAVE_IP_TOOLS=0|HAVE_IP_TOOLS=1|g' \
-    -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make
-make -j ${MAKEJOBS}
-make update
-
-exit $?
diff --git a/stage2/cis-nfs-utils b/stage2/cis-nfs-utils
deleted file mode 100755 (executable)
index bb347e5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-# Problem with build directory
-cd ${LFS_TMP}/${1}
-./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --disable-nfsv4 \
-    --disable-gss
-make -j ${MAKEJOBS}
-make install
-
-cat > /etc/exports << "EOF"
-# NFS file systems export list
-#
-# An entry in /etc/exports will typically look like this: 
-#    directory machine1(option11,option12) machine2(option21,option22)
-
-#/root                 192.168.0.0/24(rw,sync,no_root_squash)
-#/srv/www/htdocs       192.168.0.0/24(rw,sync)
-EOF
-
-exit $?
diff --git a/stage2/cis-openssh b/stage2/cis-openssh
deleted file mode 100755 (executable)
index c418771..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-install -v -m700 -d /var/lib/sshd
-chown -v root:sys /var/lib/sshd
-
-hv_groupadd sshd
-hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc/ssh \
-    --datadir=/usr/share/sshd \
-    --with-pam \
-    --libexecdir=/usr/lib/openssh \
-    --with-md5-passwords \
-    --with-privsep-path=/var/lib/sshd
-make -j ${MAKEJOBS}
-make -j ${MAKEJOBS} install
-
-cd ${LFS_TMP}/${1}
-install -v -m755 -d /usr/share/doc/${1}
-install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
-    /usr/share/doc/${1}
-
-# Disabling root logins
-sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config
-
-# Enabling X11 forwarding
-sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config
-
-# Setting MaxAuthTries to 1
-sed -i -e "s!^#MaxAuthTries.*!MaxAuthTries 1!g" /etc/ssh/sshd_config
-
-exit $?
diff --git a/stage2/cis-openssl b/stage2/cis-openssl
deleted file mode 100755 (executable)
index 6299cee..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}
-decompress_package ${OPENSSL_ROOT_CERTS} ./ 1> /dev/null
-MAKEDEPPROG=gcc CC=gcc ./config \
-    --prefix=/usr \
-    --openssldir=/etc/ssl \
-    shared \
-    zlib-dynamic
-MAKEDEPPROG=gcc CC=gcc make
-
-# Install man pages in /usr/share/man instead of /etc/ssl/man
-make MANDIR=/usr/share/man install
-install -v -d -m755 /usr/share/doc/${PACKAGE}
-cp -v -r doc/{HOWTO,README,*.{txt,html,gif}} \
-    /usr/share/doc/${PACKAGE}
-
-cp -rv certs /etc/ssl
-
-# Create a single file that contains all of the installed certificates:
-for pem in /etc/ssl/certs/*.pem; do
-   cat $pem
-   echo ""
-done > /etc/ssl/ca-bundle.crt
-
-exit $?
diff --git a/stage2/cis-pam b/stage2/cis-pam
deleted file mode 100755 (executable)
index e65418e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}-build
-# --libdir=/lib
-#   Necessary to prevent PAM from instaling into /lib64
-../${1}/configure \
-    --libdir=/lib \
-    --sbindir=/lib/security \
-    --docdir=/usr/share/doc/${1} \
-    --enable-read-both-confs
-make -j ${MAKEJOBS}
-make install
-
-chmod -v 4755 /lib/security/unix_chkpwd
-
-mv -v /lib/security/pam_tally /sbin
-
-mv -v /lib/libpam{,c,_misc}.la /usr/lib
-sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la
-
-if [ -L /lib/libpam.so ]; then
-   for LINK in libpam{,c,_misc}.so; do
-       ln -svfT ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK}
-       rm -v /lib/${LINK}
-   done
-fi
-
-mkdir -p /etc/pam.d
-cat > /etc/pam.d/other << EOF
-# /etc/pam.d/other
-
-auth            required        pam_unix.so     nullok
-account         required        pam_unix.so
-session         required        pam_unix.so
-password        required        pam_unix.so     nullok
-EOF
-
-cat > /etc/pam.conf << EOF
-# /etc/pam.conf
-
-other           auth            required        pam_unix.so     nullok
-other           account         required        pam_unix.so
-other           session         required        pam_unix.so
-other           password        required        pam_unix.so     nullok
-EOF
-
-exit $?
diff --git a/stage2/cis-pciutils b/stage2/cis-pciutils
deleted file mode 100755 (executable)
index 24983fa..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd /${LFS_TMP}/${1}
-
-# ZLIB=no: Prevents compression of the pci.ids file which is needed by HAL.
-make PREFIX=/usr ZLIB=no
-
-make PREFIX=/usr install
-
-# Some packages require the PCI static library:
-make PREFIX=/usr install-lib
-
-exit $?
diff --git a/stage2/cis-portmap b/stage2/cis-portmap
deleted file mode 100755 (executable)
index 1f34931..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}
-make -j ${MAKEJOBS}
-make install
-
-exit $?
diff --git a/stage2/cis-reiserfsprogs b/stage2/cis-reiserfsprogs
deleted file mode 100755 (executable)
index c330a8f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}
-./configure \
-    --prefix=/usr \
-    --sbindir=/sbin
-# Doesn't seem to use CFLAGS...
-make -j ${MAKEJOBS}
-make install
-ln -sf reiserfsck /sbin/fsck.reiserfs
-ln -sf mkreiserfs /sbin/mkfs.reiserfs
-
-exit $?
diff --git a/stage2/cis-sudo b/stage2/cis-sudo
deleted file mode 100755 (executable)
index dc2a573..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc
-make -j ${MAKEJOBS}
-make install
-
-cat > /etc/sudoers << EOF
-# User alias specification
-User_Alias  ADMIN = _REGUSER_
-
-# Allow people in group ADMIN to run all commands without a password
-ADMIN       ALL = NOPASSWD: ALL
-EOF
-
-sed -i -e "s!_REGUSER_!${REGUSER}!g" /etc/sudoers
-chmod 600 /etc/sudoers
-
-exit $?
diff --git a/stage2/cis-tcl b/stage2/cis-tcl
deleted file mode 100755 (executable)
index 5be0be5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}
-cd unix
-./configure --prefix=/usr \
-            --enable-threads \
-            --mandir=/usr/share/man
-make
-
-# removes the references to the build directory and replaces them with saner
-# system-wide locations:
-sed -i \
-    -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \
-    -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \
-    -e "/SEARCH/s/=.*/=''/" \
-    tclConfig.sh
-
-make install
-make install-private-headers
-
-PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tcl\([0-9]*\.[0-9]*\).*!\1!g")
-
-ln -svfT tclsh${PKG_VER_BASE} /usr/bin/tclsh
-
-exit $?
diff --git a/stage2/cis-tcp-wrappers b/stage2/cis-tcp-wrappers
deleted file mode 100755 (executable)
index 5a0adeb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}
-sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c
-make -j ${MAKEJOBS} REAL_DAEMON_DIR=/usr/sbin STYLE=-DPROCESS_OPTIONS linux
-make install
-
-# Creating /etc/hosts.allow
-cat > /etc/hosts.allow << "EOF"
-ALL : LOCAL 192.168.0.0/255.255.255.0 : RFC931
-EOF
-
-# Creating /etc/hosts.deny
-cat > /etc/hosts.deny << "EOF"
-ALL: ALL: RFC931
-EOF
-
-exit $?
index a090916..4415639 100755 (executable)
@@ -59,32 +59,7 @@ ipkg_ac    ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sbin"
 ipkg_cust  ${TEXINFO} cis-texinfo
 ipkg_cust  ${UDEV} cis-udev
 ipkg_cust  ${UDEV_CONFIG} cis-udev-config
-###############ipkg_cust  ${GRUB} cis-grub
-
-# Additional HV packages
-ipkg_cust  ${NANO} cis-nano --enable-color --enable-multibuffer
-ipkg_ac    ${WHICH}
-ipkg_cust  ${EMACS} cis-emacs
-ipkg_cust  ${PCIUTILS} cis-pciutils
-ipkg_cust  ${REISERFSPROGS} cis-reiserfsprogs
-ipkg_cust  ${NET_TOOLS} cis-net-tools
-ipkg_cust  ${DHCP} cis-dhcp
-ipkg_ac_nb ${POPT}
-ipkg_cust  ${PAM} cis-pam
-ipkg_cust  ${OPENSSL} cis-openssl
-ipkg_cust  ${OPENSSH} cis-openssh
-ipkg_ac    ${EXPAT}
-ipkg_ac    ${APR} --with-installbuilddir=/usr/lib/apr-1/build
-ipkg_ac    ${APR_UTIL} --with-apr=/usr/bin/apr-1-config
-ipkg_ac    ${NEON} --with-ssl
-ipkg_cust  ${TCL} cis-tcl
-ipkg_ac    ${SQLITE}
-ipkg_ac    ${SUBVERSION}
-ipkg_cust  ${SUDO} cis-sudo
-ipkg_ac    ${WGET}
-ipkg_cust  ${TCPWRAPPERS} cis-tcp-wrappers
-ipkg_cust  ${PORTMAP} cis-portmap
-ipkg_cust  ${NFS_UTILS}   cis-nfs-utils
+#ipkg_cust  ${GRUB} cis-grub
 
 rscr once  "Installing HV-utilities" cis-hv-utilities
 rscr mult  "Compressing man pages"   cis-compressdoc
diff --git a/stage2/misc/nanorc b/stage2/misc/nanorc
deleted file mode 100644 (file)
index b2f4e7b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-set autoindent
-set const
-set fill 72
-set historylog
-set multibuffer
-set regexp
-set smooth
-set suspend
-
-## Nanorc files
-include /usr/share/nano/nanorc.nanorc
-
-## C/C++
-include /usr/share/nano/c.nanorc
-
-## HTML
-include /usr/share/nano/html.nanorc
-
-## Patch files
-include /usr/share/nano/patch.nanorc
-
-## Manpages
-include /usr/share/nano/man.nanorc
-
-## Groff
-include /usr/share/nano/groff.nanorc
-
-## Perl
-include /usr/share/nano/perl.nanorc
-
-## Python
-include /usr/share/nano/python.nanorc
-
-## Bourne shell scripts
-include /usr/share/nano/sh.nanorc
-
-include /usr/share/nano/gentoo.nanorc
-
-## Syntax Highlight Pack
-## CSS
-include /usr/share/nano/css.nanorc
-
-## php
-include /usr/share/nano/php.nanorc
-
-## makefile .am
-include /usr/share/nano/gentoo.nanorc
index 4eb36ca..01ce4d0 100755 (executable)
@@ -51,7 +51,6 @@ lpkg     1 ${TAR_PACKAGE}
 lpkg     1 ${TEXINFO}
 lpkg     1 ${UDEV}
 lpkg     1 ${XZ_UTILS}
-lpkg     1 ${NANO}
 
 # These packages are only for stage2
 fpkg       ${PERL} http://ftp.funet.fi/pub/CPAN/src
@@ -76,29 +75,4 @@ fpkg       ${SYSKLOGD} http://www.infodrom.org/projects/sysklogd/download
 fpkg       ${UDEV_CONFIG} http://www.linuxfromscratch.org/lfs/downloads/development
 fpkg       ${GRUB} ftp://alpha.gnu.org/gnu/grub
 
-# Additional packages (not in original LFS, only for hvlinux).
-fpkg_gnu   ${EMACS}
-fpkg_gnu   ${WHICH}
-fpkg       ${REISERFSPROGS} http://www.kernel.org/pub/linux/utils/fs/reiserfs
-fpkg       ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils
-fpkg       ${NET_TOOLS} http://www.tazenda.demon.co.uk/phil/net-tools
-fpkg       ${DHCP} ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history
-fpkg       ${POPT} http://rpm5.org/files/popt
-fpkg       ${PAM} http://www.kernel.org/pub/linux/libs/pam/library
-fpkg       ${OPENSSL} ftp://ftp.openssl.org/source
-fpkg       ${OPENSSL_ROOT_CERTS} http://anduin.linuxfromscratch.org/files/BLFS
-fpkg       ${OPENSSH} ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
-fpkg_sf    ${EXPAT}
-fpkg       ${APR}      http://apache.sunsite.ualberta.ca/apr
-fpkg       ${APR_UTIL} http://apache.sunsite.ualberta.ca/apr
-fpkg       ${NEON}     http://www.webdav.org/neon
-fpkg_sf    ${TCL}
-fpkg       ${SQLITE} http://www.sqlite.org
-fpkg       ${SUBVERSION} http://subversion.tigris.org/downloads
-fpkg       ${SUDO} http://www.sudo.ws/sudo/dist
-fpkg_gnu   ${WGET}
-fpkg       ${TCPWRAPPERS} ftp://ftp.porcupine.org/pub/security
-fpkg       ${PORTMAP} http://neil.brown.name/portmap
-fpkg       ${NFS_UTILS} ftp://ftp.kernel.org/pub/linux/utils/nfs
-
 exit $?
diff --git a/stage3/bootscripts/dhcp b/stage3/bootscripts/dhcp
new file mode 100755 (executable)
index 0000000..fbbd241
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# dhcp
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+# Load global network parameters
+source /etc/sysconfig/network/network-parameters
+
+if [ -z "${DHCP_SERVER_IF}" ]; then
+    # DHCP server is not enabled
+    msg_log "DHCP server disabled in '/etc/sysconfig/network/network-parameters'"
+    exit ${EXIT_CODE_WARNING}
+fi
+
+# The lease file must exist on startup
+if [ ! -f /var/state/dhcp/dhcpd.leases ]; then
+    touch /var/state/dhcp/dhcpd.leases || exit ${EXIT_CODE_FAILURE}
+fi
+
+# See how we were called
+case "$1" in
+    start)
+       cmd_run_log_box_warn "DHCP server start" loadproc /usr/sbin/dhcpd -q ${DHCP_SERVER_IF}
+       ;;
+    
+    stop)
+       cmd_run_log_box_warn "DHCP server stop" killproc /usr/sbin/dhcpd
+       ;;
+   
+    restart)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+    status)
+       statusproc /usr/sbin/dhcpd
+       ;;
+    
+    *)
+       echo "Usage: $0 {restart|start|status|stop}"
+        exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?
diff --git a/stage3/bootscripts/nfs b/stage3/bootscripts/nfs
new file mode 100755 (executable)
index 0000000..e8621b7
--- /dev/null
@@ -0,0 +1,147 @@
+#!/bin/sh
+#
+# nfs           This shell script takes care of starting and stopping
+#               the NFS services.
+#
+# description: NFS is a popular protocol for file sharing across TCP/IP \
+#              networks. This service provides NFS server functionality, \
+#              which is configured via the /etc/exports file.
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+# Load global network parameters
+source /etc/sysconfig/network/network-parameters
+
+# Check that networking is up.
+#[ ${NETWORKING} = "no" ] && exit ${EXIT_CODE_WARNING}
+
+# Check for presence of executables
+if [ ! -x /usr/sbin/rpc.nfsd ]; then
+    echo "Missing rpc.nfsd executable"
+    exit ${EXIT_CODE_WARNING}
+fi
+if [ ! -x /usr/sbin/rpc.mountd ]; then
+    echo "Missing rpc.mountd executable"
+    exit ${EXIT_CODE_WARNING}
+fi
+if [ ! -x /usr/sbin/exportfs ]; then
+    echo "Missing exportfs executable"
+    exit ${EXIT_CODE_WARNING}
+fi
+if [ ! -s /etc/exports ]; then
+    echo "Missing /etc/exports configuration file"
+    exit ${EXIT_CODE_WARNING}
+fi
+
+if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" -a "x${NFS_SERVER_ENA}" != "xYES" ]; then
+    msg_log "NFS server disabled in '/etc/sysconfig/network/network-parameters'"
+    exit ${EXIT_CODE_WARNING}
+fi
+
+# Check for and source configuration file otherwise set defaults
+# TUNE_QUEUE: controls whether to up the size of input queues
+[ -f /etc/sysconfig/network/nfs ] && . /etc/sysconfig/network/nfs
+
+[ -z "$MOUNTD_NFS_V2" ] && MOUNTD_NFS_V2=auto
+[ -z "$MOUNTD_NFS_V3" ] && MOUNTD_NFS_V3=auto
+
+# Number of servers to be started by default
+[ -z "$NFSDCOUNT" ] && NFSDCOUNT=8
+
+# Remote quota server
+[ -z "$RQUOTAD" ] && RQUOTAD=`type -path rpc.rquotad`
+
+# Get the initial values for the input sock queues
+# at the time of running the script.
+if [ "$TUNE_QUEUE" = "yes" ]; then
+    RMEM_DEFAULT=`/sbin/sysctl -n net.core.rmem_default`
+    RMEM_MAX=`/sbin/sysctl -n net.core.rmem_max`
+    # 256kb recommended minimum size based on SPECsfs NFS benchmarks
+    [ -z "$NFS_QS" ] && NFS_QS=262144
+fi
+
+MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-nfs-version 2"
+MOUNTD_OPTIONS="$MOUNTD_OPTIONS --nfs-version 3"
+
+nfsd_start() {
+    # Apply input queue increase for nfs server
+    if [ "$TUNE_QUEUE" = "yes" ]; then
+       /sbin/sysctl -w net.core.rmem_default=$NFSD_QS >/dev/null 2>&1
+       /sbin/sysctl -w net.core.rmem_max=$NFSD_QS >/dev/null 2>&1
+    fi
+    cmd_run_log_box "Starting NFS services" loadproc /usr/sbin/exportfs -ra
+    if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
+       cmd_run_log_box "Starting NFS quotas" loadproc rpc.rquotad
+    fi
+    cmd_run_log_box "Starting NFS daemon" loadproc rpc.nfsd $NFSDCOUNT
+    
+    [ -n "$MOUNTD_PORT" ] \
+       && MOUNTD_OPTIONS="$MOUNTD_OPTIONS -p $MOUNTD_PORT"
+    [ "$MOUNTD_TCP" = "no" -o "$MOUNTD_TCP" = "NO" ] \
+       && MOUNTD_OPTIONS="$MOUNTD_OPTIONS --no-tcp"
+    
+    cmd_run_log_box "Starting NFS mountd" loadproc rpc.mountd $MOUNTD_OPTIONS
+    
+    touch /var/lock/subsys/nfs
+    # reset input queue for rest of network services
+    if [ "$TUNE_QUEUE" = "yes" ]; then
+       /sbin/sysctl -w net.core.rmem_default=$RMEM_DEFAULT >/dev/null 2>&1
+       /sbin/sysctl -w net.core.rmem_max=$RMEM_MAX >/dev/null 2>&1
+    fi
+}
+
+nfsd_stop() {
+    cmd_run_log_box "Stopping NFS mountd" killproc rpc.mountd
+    cmd_run_log_box "Stopping NFS daemon" killproc nfsd
+    if [ -n "$RQUOTAD" ]; then
+       cmd_run_log_box "Stopping NFS quotas" killproc rpc.rquotad
+    fi
+
+    # Do it the last so that clients can still access the server
+    # when the server is running.
+    echo "Refreshing NFS Exported Filesystems..."
+    /usr/sbin/exportfs -au
+
+    rm -f /var/lock/subsys/nfs
+}
+
+
+# See how we were called
+case "$1" in
+    start)
+       cmd_run_log_box_warn "NFS server start" nfsd_start
+       ;;
+    
+    stop)
+       cmd_run_log_box_warn "NFS server stop" nfsd_stop
+       ;;
+   
+    reload)
+       /usr/sbin/exportfs -ra
+       touch /var/lock/subsys/nfs
+       ;;
+    
+    restart)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+    status)
+       statusproc rpc.mountd
+       statusproc nfsd
+       if [ -n "$RQUOTAD" ]; then
+           statusproc rpc.rquotad
+       fi
+       ;;
+    
+    *)
+       echo "Usage: $0 {reload|restart|start|status|stop}"
+        exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?
diff --git a/stage3/bootscripts/portmap b/stage3/bootscripts/portmap
new file mode 100755 (executable)
index 0000000..9a54dc4
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# portmap
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+# See how we were called
+case "$1" in
+    start)
+       cmd_run_log_box_warn "portmap start" loadproc portmap
+       ;;
+
+    stop)
+       cmd_run_log_box_warn "portmap stop" killproc portmap
+       ;;
+   
+    reload)
+       reloadproc portmap
+       ;;
+    
+    restart)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+    status)
+       statusproc portmap
+       ;;
+    
+    *)
+       echo "Usage: $0 {reload|restart|start|status|stop}"
+        exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?
diff --git a/stage3/bootscripts/sshd b/stage3/bootscripts/sshd
new file mode 100755 (executable)
index 0000000..83e4349
--- /dev/null
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# sshd
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+SSHD="/usr/sbin/sshd -4"
+
+gen_keys() {
+    if [ ! -e /etc/ssh/ssh_host_key ] ; then
+       echo "Generating Hostkey..."
+       /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
+    fi
+    if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then
+       echo "Generating DSA-Hostkey..."
+       /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
+    fi
+    if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then
+       echo "Generating RSA-Hostkey..."
+       /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
+    fi
+}
+
+sshd_start() {
+    # Checking configuration
+    if [ ! -e /etc/ssh/sshd_config ] ; then
+       echo "You need an /etc/ssh/sshd_config file to run sshd"
+       echo "There is a sample file in  /usr/share/doc/openssh"
+       exit ${EXIT_CODE_FAILURE}
+    fi
+
+    gen_keys
+    
+    if [ $? -ne 0 ]; then
+       exit ${EXIT_CODE_FAILURE}
+    else
+       loadproc ${SSHD}
+    fi
+}
+
+# See how we were called
+case "$1" in
+    start)
+       cmd_run_log_box_warn "sshd start" sshd_start
+       ;;
+    
+    stop)
+       cmd_run_log_box_warn "sshd stop" killproc sshd
+       ;;
+   
+    reload)
+       reloadproc sshd
+       ;;
+    
+    restart)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+    status)
+       statusproc sshd
+       ;;
+    
+    *)
+       echo "Usage: $0 {reload|restart|start|status|stop}"
+       exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?
diff --git a/stage3/cis-dhcp b/stage3/cis-dhcp
new file mode 100755 (executable)
index 0000000..bf572fa
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}
+./configure
+make -j ${MAKEJOBS}
+make LIBDIR=/usr/lib INCDIR=/usr/include install
+
+# This is for the DHCP client
+cat > /etc/dhclient.conf << "EOF"
+# dhclient.conf
+
+timeout 15;
+
+interface "eth0"{
+  supersede domain-name "_DOMAIN_";
+  prepend domain-name-servers 127.0.0.1;
+  request subnet-mask, broadcast-address, time-offset, routers,
+          domain-name, domain-name-servers, host-name;
+  require subnet-mask, domain-name-servers;
+}
+EOF
+
+sed -i -e "s!_DOMAIN_!${DOMAIN}!g" /etc/dhclient.conf
+
+cat > /etc/sysconfig/network/dhcp-client << "EOF"
+# dhcp-client
+# DHCP client program informations
+#
+DHCP_PROG="/sbin/dhclient"
+DHCP_START="-q -1"
+DHCP_STOP="-q -r"
+EOF
+
+# Is it really necessary? If necessary, uncomment entries.
+cat > /etc/dhclient-exit-hooks << "EOF"
+#!/bin/sh
+
+# Load global network parameters
+. /etc/sysconfig/network/network-parameters
+
+#  Update /etc/hosts only if we have an ip address.
+if [ -n "${new_ip_address}" ]; then
+    #echo "127.0.0.1    localhost.localdomain localhost" > /etc/hosts
+    #echo "${new_ip_address} ${DEFAULT_HOSTNAME}" >> /etc/hosts
+    exit_status=0
+else
+    exit_status=1
+fi
+EOF
+chmod 740 /etc/dhclient-exit-hooks
+
+# The following commands will create a base configuration file for a DHCP server.
+cat > /etc/dhcpd.conf << EOF 
+# Configuration file for DHCP server.
+
+default-lease-time 72000;
+max-lease-time 144000;
+ddns-update-style ad-hoc;
+
+subnet 192.168.0.0 netmask 255.255.255.0 {
+  range 192.168.0.2 192.168.0.240;
+  option broadcast-address 192.168.0.255;
+  option routers 192.168.0.1;
+  option domain-name-servers 192.168.0.1;
+}
+EOF
+
+install -v -m740 ${SCRDIR}/bootscripts/dhcp /etc/rc.d/init.d
+bootscript_add_rc3 dhcp 20 73
+
+exit $?
index d9db20d..93e91ba 100755 (executable)
@@ -20,44 +20,7 @@ make bootstrap
 make install
 ldconfig
 
-cat > /etc/skel/.emacs << "EOF"
-;; ~/.emacs
-
-;; Emacs initialization file
-
-;; Are we running XEmacs or Emacs?
-(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
-
-;; Set up the keyboard so the delete key on both the regular keyboard
-;; and the keypad delete the character under the cursor and to the right
-;; under X, instead of the default, backspace behavior.
-(global-set-key [delete] 'delete-char)
-(global-set-key [kp-delete] 'delete-char)
-
-;; Do not display a splash screen on startup
-(setq inhibit-splash-screen t)
-
-;; Turn on font-lock mode for Emacs
-(cond ((not running-xemacs)
-       (global-font-lock-mode t)
-))
-
-;; Always end a file with a newline
-(setq require-final-newline t)
-
-;; Stop at the end of the file, not just add lines
-(setq next-line-add-newlines nil)
-
-;; Enable wheelmouse support by default
-(mwheel-install)
-(setq mwheel-follow-mouse t)
-
-;; Replaces tabs in files with spaces
-(setq-default indent-tabs-mode nil)
-
-;; Makes the compilation buffer always scrolls to follow
-;; output as it comes in.
-(setq compilation-scroll-output t)
-EOF
+install -m644 ${SCRDIR}/resources/emacsrc /etc/skel/.emacs
+install -m644 ${SCRDIR}/resources/emacsrc /root/.emacs
 
 exit $?
diff --git a/stage3/cis-nano b/stage3/cis-nano
new file mode 100755 (executable)
index 0000000..824eeff
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}-build
+../${PACKAGE}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    ${CONFIGURE_OPTS}
+make
+make install
+install -m644 ${SCRDIR}/resources/nanorc /etc
+ldconfig
+
+exit $?
diff --git a/stage3/cis-net-tools b/stage3/cis-net-tools
new file mode 100755 (executable)
index 0000000..cb0940a
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}
+yes "" | make config
+sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \
+    -e 's|HAVE_MII 0|HAVE_MII 1|g' config.h
+sed -i -e 's|# HAVE_IP_TOOLS=0|HAVE_IP_TOOLS=1|g' \
+    -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make
+make -j ${MAKEJOBS}
+make update
+
+exit $?
diff --git a/stage3/cis-nfs-utils b/stage3/cis-nfs-utils
new file mode 100755 (executable)
index 0000000..6a5eeda
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+# Problem with build directory
+cd ${LFS_TMP}/${1}
+./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --disable-nfsv4 \
+    --disable-gss
+make -j ${MAKEJOBS}
+make install
+
+cat > /etc/exports << "EOF"
+# NFS file systems export list
+#
+# An entry in /etc/exports will typically look like this: 
+#    directory machine1(option11,option12) machine2(option21,option22)
+
+#/root                 192.168.0.0/24(rw,sync,no_root_squash)
+#/srv/www/htdocs       192.168.0.0/24(rw,sync)
+EOF
+
+install -v -m740 ${SCRDIR}/bootscripts/nfs /etc/rc.d/init.d
+bootscript_add_rc3 nfs 15 74
+
+exit $?
diff --git a/stage3/cis-openssh b/stage3/cis-openssh
new file mode 100755 (executable)
index 0000000..078ea38
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+install -v -m700 -d /var/lib/sshd
+chown -v root:sys /var/lib/sshd
+
+hv_groupadd sshd
+hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd
+
+cd ${LFS_TMP}/${1}-build
+../${1}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/ssh \
+    --datadir=/usr/share/sshd \
+    --with-pam \
+    --libexecdir=/usr/lib/openssh \
+    --with-md5-passwords \
+    --with-privsep-path=/var/lib/sshd
+make -j ${MAKEJOBS}
+make -j ${MAKEJOBS} install
+
+cd ${LFS_TMP}/${1}
+install -v -m755 -d /usr/share/doc/${1}
+install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
+    /usr/share/doc/${1}
+
+# Disabling root logins
+sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config
+
+# Enabling X11 forwarding
+sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config
+
+# Setting MaxAuthTries to 1
+sed -i -e "s!^#MaxAuthTries.*!MaxAuthTries 1!g" /etc/ssh/sshd_config
+
+install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d
+bootscript_add_rc3 sshd 25 70
+
+exit $?
diff --git a/stage3/cis-openssl b/stage3/cis-openssl
new file mode 100755 (executable)
index 0000000..6299cee
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}
+decompress_package ${OPENSSL_ROOT_CERTS} ./ 1> /dev/null
+MAKEDEPPROG=gcc CC=gcc ./config \
+    --prefix=/usr \
+    --openssldir=/etc/ssl \
+    shared \
+    zlib-dynamic
+MAKEDEPPROG=gcc CC=gcc make
+
+# Install man pages in /usr/share/man instead of /etc/ssl/man
+make MANDIR=/usr/share/man install
+install -v -d -m755 /usr/share/doc/${PACKAGE}
+cp -v -r doc/{HOWTO,README,*.{txt,html,gif}} \
+    /usr/share/doc/${PACKAGE}
+
+cp -rv certs /etc/ssl
+
+# Create a single file that contains all of the installed certificates:
+for pem in /etc/ssl/certs/*.pem; do
+   cat $pem
+   echo ""
+done > /etc/ssl/ca-bundle.crt
+
+exit $?
diff --git a/stage3/cis-pam b/stage3/cis-pam
new file mode 100755 (executable)
index 0000000..e65418e
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}-build
+# --libdir=/lib
+#   Necessary to prevent PAM from instaling into /lib64
+../${1}/configure \
+    --libdir=/lib \
+    --sbindir=/lib/security \
+    --docdir=/usr/share/doc/${1} \
+    --enable-read-both-confs
+make -j ${MAKEJOBS}
+make install
+
+chmod -v 4755 /lib/security/unix_chkpwd
+
+mv -v /lib/security/pam_tally /sbin
+
+mv -v /lib/libpam{,c,_misc}.la /usr/lib
+sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la
+
+if [ -L /lib/libpam.so ]; then
+   for LINK in libpam{,c,_misc}.so; do
+       ln -svfT ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK}
+       rm -v /lib/${LINK}
+   done
+fi
+
+mkdir -p /etc/pam.d
+cat > /etc/pam.d/other << EOF
+# /etc/pam.d/other
+
+auth            required        pam_unix.so     nullok
+account         required        pam_unix.so
+session         required        pam_unix.so
+password        required        pam_unix.so     nullok
+EOF
+
+cat > /etc/pam.conf << EOF
+# /etc/pam.conf
+
+other           auth            required        pam_unix.so     nullok
+other           account         required        pam_unix.so
+other           session         required        pam_unix.so
+other           password        required        pam_unix.so     nullok
+EOF
+
+exit $?
diff --git a/stage3/cis-pciutils b/stage3/cis-pciutils
new file mode 100755 (executable)
index 0000000..24983fa
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd /${LFS_TMP}/${1}
+
+# ZLIB=no: Prevents compression of the pci.ids file which is needed by HAL.
+make PREFIX=/usr ZLIB=no
+
+make PREFIX=/usr install
+
+# Some packages require the PCI static library:
+make PREFIX=/usr install-lib
+
+exit $?
diff --git a/stage3/cis-portmap b/stage3/cis-portmap
new file mode 100755 (executable)
index 0000000..6c45582
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}
+make -j ${MAKEJOBS}
+make install
+
+install -v -m740 ${SCRDIR}/bootscripts/portmap /etc/rc.d/init.d
+bootscript_add_rc3 portmap 10 75
+
+exit $?
diff --git a/stage3/cis-reiserfsprogs b/stage3/cis-reiserfsprogs
new file mode 100755 (executable)
index 0000000..c330a8f
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}
+./configure \
+    --prefix=/usr \
+    --sbindir=/sbin
+# Doesn't seem to use CFLAGS...
+make -j ${MAKEJOBS}
+make install
+ln -sf reiserfsck /sbin/fsck.reiserfs
+ln -sf mkreiserfs /sbin/mkfs.reiserfs
+
+exit $?
diff --git a/stage3/cis-sudo b/stage3/cis-sudo
new file mode 100755 (executable)
index 0000000..dc2a573
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}-build
+../${1}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc
+make -j ${MAKEJOBS}
+make install
+
+cat > /etc/sudoers << EOF
+# User alias specification
+User_Alias  ADMIN = _REGUSER_
+
+# Allow people in group ADMIN to run all commands without a password
+ADMIN       ALL = NOPASSWD: ALL
+EOF
+
+sed -i -e "s!_REGUSER_!${REGUSER}!g" /etc/sudoers
+chmod 600 /etc/sudoers
+
+exit $?
diff --git a/stage3/cis-tcl b/stage3/cis-tcl
new file mode 100755 (executable)
index 0000000..5be0be5
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}
+cd unix
+./configure --prefix=/usr \
+            --enable-threads \
+            --mandir=/usr/share/man
+make
+
+# removes the references to the build directory and replaces them with saner
+# system-wide locations:
+sed -i \
+    -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \
+    -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \
+    -e "/SEARCH/s/=.*/=''/" \
+    tclConfig.sh
+
+make install
+make install-private-headers
+
+PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tcl\([0-9]*\.[0-9]*\).*!\1!g")
+
+ln -svfT tclsh${PKG_VER_BASE} /usr/bin/tclsh
+
+exit $?
diff --git a/stage3/cis-tcp-wrappers b/stage3/cis-tcp-wrappers
new file mode 100755 (executable)
index 0000000..5a0adeb
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}
+sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c
+make -j ${MAKEJOBS} REAL_DAEMON_DIR=/usr/sbin STYLE=-DPROCESS_OPTIONS linux
+make install
+
+# Creating /etc/hosts.allow
+cat > /etc/hosts.allow << "EOF"
+ALL : LOCAL 192.168.0.0/255.255.255.0 : RFC931
+EOF
+
+# Creating /etc/hosts.deny
+cat > /etc/hosts.deny << "EOF"
+ALL: ALL: RFC931
+EOF
+
+exit $?
index a3971d6..27ce74c 100755 (executable)
@@ -17,11 +17,37 @@ export RCMD_NO_EXIT=1
 
 update_packages_init
 
+# These packages were already downloaded for stage1:
+lpkg     1 ${NANO}
+
 # These packages were already downloaded for stage2:
 lpkg     2 ${INETUTILS}
 lpkg     2 ${EMACS}
 
 # These packages are only for stage3
+fpkg_gnu   ${EMACS}
+fpkg_gnu   ${WHICH}
+fpkg       ${REISERFSPROGS} http://www.kernel.org/pub/linux/utils/fs/reiserfs
+fpkg       ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils
+fpkg       ${NET_TOOLS} http://www.tazenda.demon.co.uk/phil/net-tools
+fpkg       ${DHCP} ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history
+fpkg       ${POPT} http://rpm5.org/files/popt
+fpkg       ${PAM} http://www.kernel.org/pub/linux/libs/pam/library
+fpkg       ${OPENSSL} ftp://ftp.openssl.org/source
+fpkg       ${OPENSSL_ROOT_CERTS} http://anduin.linuxfromscratch.org/files/BLFS
+fpkg       ${OPENSSH} ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
+fpkg_sf    ${EXPAT}
+fpkg       ${APR}      http://apache.sunsite.ualberta.ca/apr
+fpkg       ${APR_UTIL} http://apache.sunsite.ualberta.ca/apr
+fpkg       ${NEON}     http://www.webdav.org/neon
+fpkg_sf    ${TCL}
+fpkg       ${SQLITE} http://www.sqlite.org
+fpkg       ${SUBVERSION} http://subversion.tigris.org/downloads
+fpkg       ${SUDO} http://www.sudo.ws/sudo/dist
+fpkg_gnu   ${WGET}
+fpkg       ${TCPWRAPPERS} ftp://ftp.porcupine.org/pub/security
+fpkg       ${PORTMAP} http://neil.brown.name/portmap
+fpkg       ${NFS_UTILS} ftp://ftp.kernel.org/pub/linux/utils/nfs
 fpkg_sf    ${PCRE}
 fpkg_sf    ${STRACE}
 fpkg_sf    ${DDCLIENT}
diff --git a/stage3/resources/emacsrc b/stage3/resources/emacsrc
new file mode 100644 (file)
index 0000000..9db7a0e
--- /dev/null
@@ -0,0 +1,180 @@
+;; ~/.emacs
+
+;; Emacs initialization file.
+;; Font Lock mode, Auto Compression mode, File Name Shadow
+;; Mode, and mouse wheel support are enabled by default.
+
+;; Do not display a splash screen on startup
+(setq inhibit-splash-screen t)
+
+;; Emacs Load Path
+(setq load-path (cons "/usr/local/share/emacs/site-lisp" load-path))
+
+;; Affichage du numéro de colonne
+(setq column-number-mode t)
+
+;; Always end a file with a newline
+(setq require-final-newline t)
+
+;; Stop at the end of the file, not just add lines
+(setq next-line-add-newlines nil)
+
+;; Replaces tabs in files with spaces
+(setq-default indent-tabs-mode nil)
+
+;; Makes the compilation buffer always scrolls to follow
+;; output as it comes in.
+(setq compilation-scroll-output t)
+
+;; Pour avoir les accents
+(set-keyboard-coding-system 'utf-8)
+
+;; Set up the keyboard so the delete key on both the regular keyboard
+;; and the keypad delete the character under the cursor and to the right
+;; under X, instead of the default, backspace behavior.
+(global-set-key [delete] 'delete-char)
+(global-set-key [kp-delete] 'delete-char)
+
+;; For an unknow reason, the CTRL+RIGHT and RIGHT keys seem
+;; to be inveerted...
+
+;; Map RIGHT and LEFT
+;;(global-set-key [(meta O) (D)] 'backward-char)
+;;(global-set-key [(meta O) (C)] 'forward-char)
+;; Map CTRL+RIGHT and CTRL+LEFT
+(global-set-key [C-right] 'forward-word)
+(global-set-key [C-left] 'backward-word)
+
+;; Map Home key to beginning-of-buffer
+(global-set-key "\e[1~" 'beginning-of-buffer)
+;; Map End key to end-of-buffer
+(global-set-key "\e[4~" 'end-of-buffer)
+
+;;===========================================================
+;; Key bindings for compiling programs
+;;===========================================================
+;; Must add helper function for the make also, otherwise
+;; the first definition caused both F3 and F4 to execute "make clean".
+(defun compile-make-clean ()
+  (interactive)           ;; can be called from kbd
+  (compile "make clean"))
+
+(defun compile-make ()
+  (interactive) 
+  (compile "make"))
+
+(defun checkpatch()
+  (interactive)
+  (compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name))))
+
+;; buffer-cycle.el
+;; F1: Switch to previous buffers
+(autoload 'cycle-buffer-prev "buffer-cycle" t)
+(global-set-key [f1] 'cycle-buffer-prev)
+;; F2: Switch to next buffers
+(autoload 'cycle-buffer-next "buffer-cycle" t)
+(global-set-key [f2] 'cycle-buffer-next)
+
+;; F4: make clean
+(global-set-key [f4] 'compile-make-clean)
+
+;; F5: make
+(global-set-key [f5] 'compile-make)
+
+;; F6: go to next error
+(global-set-key [f6] 'next-error)
+
+;; F7: comment region
+(global-set-key [f7] 'comment-region)
+
+;; F8: code indentation
+(global-set-key [f8] 'indent-region)
+
+;; F9: run checkpatch.pl
+(global-set-key [f9] 'checkpatch)
+
+;;==================================================
+;; Modes
+;;==================================================
+
+(defun linux-c-mode ()
+  "C mode with adjusted defaults for use with the Linux kernel."
+  (interactive)
+  (c-mode)
+  (c-set-style "K&R")
+  ;; Replaces tabs in files with spaces
+  (setq indent-tabs-mode t)
+  (setq c-basic-offset 8))
+
+(defun csv-mode ()
+  "CSV mode."
+  (interactive)
+  (setq indent-tabs-mode t)
+)
+
+;; Default for .h and .d files -> linux mode.
+(add-to-list 'auto-mode-alist '("\.[ch]$" . linux-c-mode))
+
+;; Verilog mode
+(autoload 'verilog-mode "verilog-mode" "Verilog mode" t)
+(add-to-list 'auto-mode-alist '("\\.v\\'" . verilog-mode))
+
+;; PHP mode
+(autoload 'php-mode "php-mode" "PHP mode" t)
+(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
+
+;; ChordPro mode
+(autoload 'chordpro-mode "chordpro-mode" "Chordpro mode" t)
+(add-to-list 'auto-mode-alist '("\\.cp\\'" . chordpro-mode))
+(add-to-list 'auto-mode-alist '("\\.chopro\\'" . chordpro-mode))
+
+;; Lilypond mode
+(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
+(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
+(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))
+
+;; CSV mode
+(add-to-list 'auto-mode-alist '("\\.csv$" . csv-mode))
+
+;; Mutt mode
+(autoload 'muttrc-mode "muttrc-mode" "Major mode to edit muttrc files" t)
+(add-to-list 'auto-mode-alist '("muttrc\\'" . muttrc-mode))
+
+;; When an Emacs init file gets large or has a lot of function definitions, you
+;; should consider compiling it: it will load faster when Emacs starts, and its
+;; functions will execute faster.
+;; Here is a way to automatically compile your InitFile each time you save it:
+(defun byte-compile-user-init-file ()
+  (let ((byte-compile-warnings '(unresolved)))
+    ;; in case compilation fails, don't leave the old .elc around:
+    (when (file-exists-p (concat user-init-file ".elc"))
+      (delete-file (concat user-init-file ".elc")))
+    (byte-compile-file user-init-file)
+    ;; (message "%s compiled" user-init-file)
+    ))
+(defun my-emacs-lisp-mode-hook ()
+  (when (equal buffer-file-name user-init-file)
+    (add-hook 'after-save-hook 'byte-compile-user-init-file t t)))
+(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
+
+(custom-set-variables
+  ;; custom-set-variables was added by Custom.
+  ;; If you edit it by hand, you could mess it up, so be careful.
+  ;; Your init file should contain only one such instance.
+  ;; If there is more than one, they won't work right.
+ '(column-number-mode t)
+ '(current-language-environment "UTF-8"))
+(custom-set-faces
+  ;; custom-set-faces was added by Custom.
+  ;; If you edit it by hand, you could mess it up, so be careful.
+  ;; Your init file should contain only one such instance.
+  ;; If there is more than one, they won't work right.
+ '(default ((t (:background "black" :foreground "white" :bold t))))
+ '(font-lock-comment-face ((t (:foreground "red" :bold t))))
+ '(font-lock-constant-face ((t (:foreground "magenta" :bold t))))
+ '(font-lock-function-name-face ((t (:foreground "blue" :bold t))))
+ '(font-lock-keyword-face ((t (:foreground "cyan" :bold t))))
+ '(font-lock-string-face ((t (:foreground "green" :bold t))))
+ '(font-lock-type-face ((t (:foreground "red" :bold t))))
+ '(font-lock-variable-name-face ((t (:foreground "yellow" :bold t))))
+ '(font-lock-warning-face ((t (:foreground "magenta" :bold t)))))
diff --git a/stage3/resources/nanorc b/stage3/resources/nanorc
new file mode 100644 (file)
index 0000000..b2f4e7b
--- /dev/null
@@ -0,0 +1,47 @@
+set autoindent
+set const
+set fill 72
+set historylog
+set multibuffer
+set regexp
+set smooth
+set suspend
+
+## Nanorc files
+include /usr/share/nano/nanorc.nanorc
+
+## C/C++
+include /usr/share/nano/c.nanorc
+
+## HTML
+include /usr/share/nano/html.nanorc
+
+## Patch files
+include /usr/share/nano/patch.nanorc
+
+## Manpages
+include /usr/share/nano/man.nanorc
+
+## Groff
+include /usr/share/nano/groff.nanorc
+
+## Perl
+include /usr/share/nano/perl.nanorc
+
+## Python
+include /usr/share/nano/python.nanorc
+
+## Bourne shell scripts
+include /usr/share/nano/sh.nanorc
+
+include /usr/share/nano/gentoo.nanorc
+
+## Syntax Highlight Pack
+## CSS
+include /usr/share/nano/css.nanorc
+
+## php
+include /usr/share/nano/php.nanorc
+
+## makefile .am
+include /usr/share/nano/gentoo.nanorc
index 511bc41..513f03a 100755 (executable)
@@ -23,18 +23,40 @@ init_log_file
 # Scripts directory
 export SCRDIR=$(pwd)
 
+ipkg_cust  ${NANO} cis-nano --enable-color --enable-multibuffer
+ipkg_ac    ${WHICH}
+ipkg_cust  ${EMACS} cis-emacs
+ipkg_cust  ${PCIUTILS} cis-pciutils
+ipkg_cust  ${REISERFSPROGS} cis-reiserfsprogs
+ipkg_cust  ${NET_TOOLS} cis-net-tools
+ipkg_cust  ${DHCP} cis-dhcp
+ipkg_ac_nb ${POPT}
+ipkg_cust  ${PAM} cis-pam
+ipkg_cust  ${OPENSSL} cis-openssl
+ipkg_cust  ${OPENSSH} cis-openssh
+ipkg_ac    ${EXPAT}
+ipkg_ac    ${APR} --with-installbuilddir=/usr/lib/apr-1/build
+ipkg_ac    ${APR_UTIL} --with-apr=/usr/bin/apr-1-config
+ipkg_ac    ${NEON} --with-ssl
+ipkg_cust  ${TCL} cis-tcl
+ipkg_ac    ${SQLITE}
+ipkg_ac    ${SUBVERSION}
+ipkg_cust  ${SUDO} cis-sudo
+ipkg_ac    ${STRACE}
 ipkg_ac    ${PCRE} \
     --docdir=/usr/share/doc/pcre \
     --enable-utf8 \
     --enable-unicode-properties \
     --enable-pcregrep-libz \
     --enable-pcregrep-libbz2
-ipkg_ac    ${STRACE}
 
 # Networking
+ipkg_ac    ${WGET}
+ipkg_cust  ${TCPWRAPPERS} cis-tcp-wrappers
+ipkg_cust  ${PORTMAP} cis-portmap
+ipkg_cust  ${NFS_UTILS}   cis-nfs-utils
 ipkg_cust  ${INETUTILS} cis-inetutils
 if [ "x${USE_DYNAMIC_DNS}" = "xyes" ]; then
-    # For updating dynamic DNS entries.
     ipkg_cust ${DDCLIENT} cis-ddclient
 fi
 ipkg_ac_nb ${LIBPCAP}
@@ -42,18 +64,20 @@ ipkg_ac    ${TCPDUMP}
 ipkg_ac_nb ${NMAP} --without-nmapfe
 ipkg_cust  ${BIND} cis-bind
 ipkg_cust  ${IPTABLES} cis-iptables
+ipkg_ac    ${CURL}
+ipkg_ac    ${RSYNC}
 
 if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then
     ipkg_cust ${MYSQL} cis-mysql
 fi
 
+# Archiving
 ipkg_cust  ${ZIP}   cis-zip
 ipkg_cust  ${UNZIP} cis-unzip
 ipkg_cust  ${UNRAR} cis-unrar
 ipkg_ac    ${CPIO}
+
 ipkg_ac    ${PARTED} --disable-device-mapper
-ipkg_ac    ${CURL}
-ipkg_ac    ${RSYNC}
 ipkg_ac    ${ED}
 ipkg_ac    ${BC} --with-readline
 INIT_D_PATH=/etc/rc.d/init.d \
diff --git a/stage5/README b/stage5/README
deleted file mode 100644 (file)
index db4bd73..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Installation instructions
--------------------------
-
-1. ./stage5-install-avr
-2. ./stage5-install-arm
diff --git a/stage5/TODO b/stage5/TODO
deleted file mode 100644 (file)
index 5e991c8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
--Ajouter splint.
--Ajouter l'installatuion des man pages de avr-libc et du manuel de avr-libc.
diff --git a/stage5/cis-ac b/stage5/cis-ac
deleted file mode 120000 (symlink)
index 9214a69..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../stage2/cis-ac
\ No newline at end of file
diff --git a/stage5/cis-ac-nobuild b/stage5/cis-ac-nobuild
deleted file mode 120000 (symlink)
index 06c3fe7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../stage2/cis-ac-nobuild
\ No newline at end of file
diff --git a/stage5/cis-avr-libc b/stage5/cis-avr-libc
deleted file mode 100755 (executable)
index 57284d2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --host=${TARGET} \
-    --prefix=${PREFIX} &&
-make &&
-make install &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage5/cis-avrdude b/stage5/cis-avrdude
deleted file mode 100755 (executable)
index 2035993..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc &&
-make all &&
-make install
-
-# Return last error
-exit $?
diff --git a/stage5/cis-binutils b/stage5/cis-binutils
deleted file mode 100755 (executable)
index da05271..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --target=${TARGET} \
-    --prefix=${PREFIX} \
-    --with-sysroot=${SYSROOT} &&
-make &&
-make install
-
-# Return last error
-exit $?
diff --git a/stage5/cis-gcc1 b/stage5/cis-gcc1
deleted file mode 100755 (executable)
index de0b1c9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-# This is necessary so that the compiler is built without
-# libc includes, which are not yet installed for this target.
-#export CFLAGS="${CFLAGS} -Dinhibit_libc"
-
-#Fortunately, there are configuration options for GCC which tell it not
-#to build 'libgcc_s.so'.  The '--without-headers' option is supposed to
-#take care of this, but its implementation is incomplete, so you must
-#also configure with the '--with-newlib' option.  While '--with-newlib'
-#appears to mean "Use the Newlib C library", its effect is to tell the
-#GCC build machinery, "Don't assume there is a C library available."
-
-#We also need to disable some of the libraries that would normally be
-#built along with GCC, and specify that only the compiler for the C
-#language is needed.
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --target=${TARGET} \
-    --prefix=${PREFIX} \
-    --with-sysroot=${SYSROOT} \
-    --without-headers --with-newlib \
-    --disable-shared \
-    --disable-threads \
-    --disable-libssp \
-    --disable-libgomp \
-    --disable-libmudflap \
-    --enable-languages=c &&
-make all-gcc &&
-make install-gcc
-
-exit $?
diff --git a/stage5/cis-gcc2 b/stage5/cis-gcc2
deleted file mode 100755 (executable)
index 87330e9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --target=${TARGET} \
-    --prefix=${PREFIX} \
-    --without-dwarf2 \
-    --without-stabs \
-    --disable-libssp \
-    --enable-languages=c &&
-make all &&
-make install &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage5/cis-gdb b/stage5/cis-gdb
deleted file mode 100755 (executable)
index 255dde4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --target=${TARGET} \
-    --prefix=${PREFIX} &&
-make &&
-make install
-
-# Return last error
-exit $?
diff --git a/stage5/cis-glibc b/stage5/cis-glibc
deleted file mode 100755 (executable)
index 13ad8f6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-cd ${LFS_TMP}/${1} &&
-
-# Configure options:
-# --disable-profile
-#     Builds the libraries without profiling information.
-# --enable-add-ons
-#     Use all the add-ons it finds.
-#     crypt and localdata are now part of glibc.
-# --enable-kernel=2.x.x
-#     Compile the library for support of linux 2.6.x kernels.
-#     The kernel version specified must not be newer than the
-#     version of the kernel running on the build machine.
-# --without-gd
-#     Prevents the build of the memusagestat program, which
-#     strangely enough insists on linking against the host's
-#     libraries (libgd, libpng, libz, and so forth).
-cd ${LFS_TMP}/${1}-build &&
-BUILD_CC=gcc CC=${CROSS_COMPILE}gcc AR=${CROSS_COMPILE}ar RANLIB=${CROSS_COMPILE}ranlib AS=${CROSS_COMPILE}as LD=${CROSS_COMPILE}ld \
-    ../${1}/configure \
-    --prefix=/usr \
-    --host=${TARGET} \
-    --with-headers=${SYSROOT}/usr/include \
-    --enable-add-ons \
-    --enable-kernel=${GLIBC_KERNEL_VERSION} \
-    --disable-profile \
-    --without-gd \
-    --without-cvs \
-    --without-selinux &&
-
-#    --enable-threads=posix \
-#    --enable-static-nss \
-#    --enable-add-ons \
-#    --disable-sanity-checks \
-#    --without-__thread \
-
-make &&
-make install_root=${SYSROOT} install
-  
-# Return last error
-exit $?
diff --git a/stage5/cis-kernel b/stage5/cis-kernel
deleted file mode 100755 (executable)
index 00a4941..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# The ARCH variable must be exported for this script
-#   eg. ARCH=powerpc
-
-# We don't compile anything, we only install headers
-##################################################################unset CROSS_COMPILE &&
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Move files to their final destination 
-mkdir -pv ${SYSROOT}/usr/src &&
-cp -a ${LFS_TMP}/${1} ${SYSROOT}/usr/src &&
-
-cd ${SYSROOT}/usr/src &&
-
-# Create the link only if it does not exist. Otherwise, the
-# new link will be created inside kernel directory.
-rm -fv linux &&
-ln -sfv ${1} linux &&
-
-cd ${SYSROOT}/usr/src/${1} &&
-
-# First step, install kernel API headers:
-make mrproper &&
-make headers_check &&
-make INSTALL_HDR_PATH=dest headers_install &&
-mkdir -pv ${SYSROOT}/usr/include &&
-cp -rv dest/include/* ${SYSROOT}/usr/include &&
-
-# Second, install HV kernel compilation script:
-cat > ${SYSROOT}/usr/src/compile-kernel << "EOF" &&
-#!/bin/sh
-
-KERNEL_VERSION=$(basename $(pwd))
-DEST=/boot
-
-export ARCH=_ARCH_
-export CROSS_COMPILE=_CROSS_COMPILE_
-export SYSROOT=_SYSROOT_
-
-KERNELMAKE="make -j 4"
-
-${KERNELMAKE} bzImage &&
-
-if cat .config | grep "CONFIG_MODULES=y" 1> /dev/null 2>&1; then
-    ${KERNELMAKE} modules &&
-    ${KERNELMAKE} INSTALL_MOD_PATH=${SYSROOT} modules_install
-fi &&
-
-cp arch/${ARCH}/boot/images/zImage.elf ${DEST}/vmlinuz-${KERNEL_VERSION} &&
-cp arch/${ARCH}/boot/images/zImage.elf ${DEST}/vmlinuz-latest &&
-cp System.map                          ${DEST}/System-${KERNEL_VERSION}.map &&
-cp .config                             ${DEST}/config-${KERNEL_VERSION}
-
-if [ $? -ne 0 ]; then
-    echo "*** Kernel compilation error ***."
-    exit 1
-fi
-
-exit 0
-EOF
-
-sed -i -e "s!_ARCH_!${ARCH}!g"                   ${SYSROOT}/usr/src/compile-kernel &&
-sed -i -e "s!_CROSS_COMPILE_!${CROSS_COMPILE}!g" ${SYSROOT}/usr/src/compile-kernel &&
-sed -i -e "s!_SYSROOT_!${SYSROOT}!g"             ${SYSROOT}/usr/src/compile-kernel &&
-
-chmod -v u+x ${SYSROOT}/usr/src/compile-kernel
-
-# Return last error
-exit $?
diff --git a/stage5/cis-newlib b/stage5/cis-newlib
deleted file mode 100755 (executable)
index 45f3650..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --target=${TARGET} \
-    --prefix=${PREFIX} &&
-make all &&
-make install &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage5/packages-update b/stage5/packages-update
deleted file mode 100755 (executable)
index fbad3af..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-# Must be defined before sourcing other files.
-LFS_STAGE="stage5"
-
-# Reading system configuration informations, functions and package versions.
-source ../functions
-source ../functions-update
-source ../packages-list
-
-update_packages_init
-
-# Begin
-
-lpkg     1 ${AVR_BINUTILS}
-lpkg     1 ${ARM_BINUTILS}
-lpkg     1 ${KERNEL}
-lpkg     1 ${GLIBC}
-lpkg     1 ${AVR_GCC_CORE}
-lpkg     1 ${ARM_GCC_CORE}
-fpkg       ${AVR_LIBC} "http://download.savannah.gnu.org/releases/avr-libc"
-fpkg       ${NEWLIB} "ftp://sources.redhat.com/pub/newlib"
-fpkg_gnu   ${AVR_GDB}
-fpkg       ${AVRDUDE} "http://download.savannah.gnu.org/releases/avrdude"
-fpkg_mis   ${SPLINT} "${SPLINT}.src" "http://splint.org/downloads"
-
-GEDA_BASE_URL=http://geda.seul.org/release/v$(get_pkg_ver_base ${LIBGEDA})/$(get_pkg_ver ${LIBGEDA})
-
-fpkg       ${LIBGEDA}       ${GEDA_BASE_URL}
-fpkg       ${GEDA_SYMBOLS}  ${GEDA_BASE_URL}
-fpkg       ${GEDA_GSCHEM}   ${GEDA_BASE_URL}
-fpkg       ${GEDA_GNETLIST} ${GEDA_BASE_URL}
-fpkg       ${GEDA_SYMCHECK} ${GEDA_BASE_URL}
-fpkg       ${GEDA_GATTRIB}  ${GEDA_BASE_URL}
-
-# Return last error
-exit $?
diff --git a/stage5/stage5-additions b/stage5/stage5-additions
deleted file mode 100755 (executable)
index 5c1538b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage4"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage4
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-source /etc/profile
-
-# Init log file
-mkdir -p ${LFS_LOG_DIR} || exit 1
-if [ ! -f ${LFS_LOG_FILE} ]; then
-    touch ${LFS_LOG_FILE} || exit 1
-fi
-
-ipkg ${GDB} cis-gdb
-
-exit $?
diff --git a/stage5/stage5-install-arm b/stage5/stage5-install-arm
deleted file mode 100644 (file)
index 9dcb7c1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP=/mnt/hv-packages/tmp
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-source /etc/profile
-
-init_log_file
-
-export TARGET="arm-elf"
-export PREFIX="/usr/arm-elf"
-
-var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
-source /etc/profile &&
-
-ipkg      ${ARM_BINUTILS} cis-binutils
-ipkg_mult ${ARM_GCC_CORE} cis-gcc1 "${GCC_CORE}-pass1" 
-ipkg      ${NEWLIB}       cis-newlib
-ipkg_mult ${ARM_GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2" 
-ipkg      ${GDB}          cis-gdb
-
-exit $?
diff --git a/stage5/stage5-install-avr b/stage5/stage5-install-avr
deleted file mode 100755 (executable)
index 8cb4c7f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="/tmp"
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-source /etc/profile
-
-if [ "x${USER}" != "xroot" ]; then
-    echo "You must be the superuser to install hvlinux."
-    exit 1
-fi
-
-init_log_file
-
-export TARGET="avr"
-export PREFIX="/usr/avr"
-
-var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
-source /etc/profile &&
-
-ipkg      ${AVR_BINUTILS} cis-binutils
-ipkg_mult ${AVR_GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2"
-ipkg      ${AVR_LIBC}     cis-avr-libc
-ipkg      ${AVRDUDE}      cis-avrdude
-ipkg      ${SPLINT}       cis-ac-nobuild
-ipkg      ${AVR_GDB}      cis-gdb
-
-exit $?
diff --git a/stage5/stage5-install-geda b/stage5/stage5-install-geda
deleted file mode 100755 (executable)
index 6ee68d5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="$(dirname $(dirname $(pwd)))/packages/tmp"
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-source /etc/profile
-
-init_log_file
-
-if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; then
-    ipkg_ac  ${LIBGEDA}
-    ipkg_ac  ${GEDA_SYMBOLS}
-    ipkg_ac  ${GEDA_GSCHEM}
-    ipkg_ac  ${GEDA_GNETLIST}
-    ipkg_ac  ${GEDA_SYMCHECK}
-    ipkg_ac  ${GEDA_GATTRIB}
-fi
-
-exit $?
diff --git a/stage5/stage5-install-ppc b/stage5/stage5-install-ppc
deleted file mode 100755 (executable)
index 8d80feb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP=/tmp
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-source /etc/profile
-
-init_log_file
-
-export CFLAGS="-pipe -O2"
-export CXXFLAGS=${CFLAGS}
-
-export ARCH="powerpc"
-export TARGET="powerpc-405-linux-gnu"
-export PREFIX="/usr/powerpc-405"
-export SYSROOT=${PREFIX}/sysroot
-export CROSS_COMPILE=${TARGET}-
-
-var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
-source /etc/profile &&
-
-ipkg      ${BINUTILS} cis-binutils
-ipkg_mult ${GCC_CORE} cis-gcc1 "${GCC_CORE}-pass1"
-ipkg      ${KERNEL}   cis-kernel
-ipkg      ${GLIBC}    cis-glibc
-
-exit 1
-exit 1
-
-ipkg_mult ${GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2" 
-ipkg      ${GDB}      cis-gdb
-
-exit $?
diff --git a/stage6/README b/stage6/README
new file mode 100644 (file)
index 0000000..db4bd73
--- /dev/null
@@ -0,0 +1,6 @@
+
+Installation instructions
+-------------------------
+
+1. ./stage5-install-avr
+2. ./stage5-install-arm
diff --git a/stage6/TODO b/stage6/TODO
new file mode 100644 (file)
index 0000000..5e991c8
--- /dev/null
@@ -0,0 +1,3 @@
+
+-Ajouter splint.
+-Ajouter l'installatuion des man pages de avr-libc et du manuel de avr-libc.
diff --git a/stage6/cis-ac b/stage6/cis-ac
new file mode 120000 (symlink)
index 0000000..9214a69
--- /dev/null
@@ -0,0 +1 @@
+../stage2/cis-ac
\ No newline at end of file
diff --git a/stage6/cis-ac-nobuild b/stage6/cis-ac-nobuild
new file mode 120000 (symlink)
index 0000000..06c3fe7
--- /dev/null
@@ -0,0 +1 @@
+../stage2/cis-ac-nobuild
\ No newline at end of file
diff --git a/stage6/cis-avr-libc b/stage6/cis-avr-libc
new file mode 100755 (executable)
index 0000000..57284d2
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --host=${TARGET} \
+    --prefix=${PREFIX} &&
+make &&
+make install &&
+
+# Restore original CFLAGS and CXXFLAGS values.
+restore_flags
+
+# Return last error
+exit $?
diff --git a/stage6/cis-avrdude b/stage6/cis-avrdude
new file mode 100755 (executable)
index 0000000..2035993
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --prefix=/usr \
+    --sysconfdir=/etc &&
+make all &&
+make install
+
+# Return last error
+exit $?
diff --git a/stage6/cis-binutils b/stage6/cis-binutils
new file mode 100755 (executable)
index 0000000..da05271
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --target=${TARGET} \
+    --prefix=${PREFIX} \
+    --with-sysroot=${SYSROOT} &&
+make &&
+make install
+
+# Return last error
+exit $?
diff --git a/stage6/cis-gcc1 b/stage6/cis-gcc1
new file mode 100755 (executable)
index 0000000..de0b1c9
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+# This is necessary so that the compiler is built without
+# libc includes, which are not yet installed for this target.
+#export CFLAGS="${CFLAGS} -Dinhibit_libc"
+
+#Fortunately, there are configuration options for GCC which tell it not
+#to build 'libgcc_s.so'.  The '--without-headers' option is supposed to
+#take care of this, but its implementation is incomplete, so you must
+#also configure with the '--with-newlib' option.  While '--with-newlib'
+#appears to mean "Use the Newlib C library", its effect is to tell the
+#GCC build machinery, "Don't assume there is a C library available."
+
+#We also need to disable some of the libraries that would normally be
+#built along with GCC, and specify that only the compiler for the C
+#language is needed.
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --target=${TARGET} \
+    --prefix=${PREFIX} \
+    --with-sysroot=${SYSROOT} \
+    --without-headers --with-newlib \
+    --disable-shared \
+    --disable-threads \
+    --disable-libssp \
+    --disable-libgomp \
+    --disable-libmudflap \
+    --enable-languages=c &&
+make all-gcc &&
+make install-gcc
+
+exit $?
diff --git a/stage6/cis-gcc2 b/stage6/cis-gcc2
new file mode 100755 (executable)
index 0000000..87330e9
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --target=${TARGET} \
+    --prefix=${PREFIX} \
+    --without-dwarf2 \
+    --without-stabs \
+    --disable-libssp \
+    --enable-languages=c &&
+make all &&
+make install &&
+
+# Restore original CFLAGS and CXXFLAGS values.
+restore_flags
+
+# Return last error
+exit $?
diff --git a/stage6/cis-gdb b/stage6/cis-gdb
new file mode 100755 (executable)
index 0000000..255dde4
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --target=${TARGET} \
+    --prefix=${PREFIX} &&
+make &&
+make install
+
+# Return last error
+exit $?
diff --git a/stage6/cis-glibc b/stage6/cis-glibc
new file mode 100755 (executable)
index 0000000..13ad8f6
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+cd ${LFS_TMP}/${1} &&
+
+# Configure options:
+# --disable-profile
+#     Builds the libraries without profiling information.
+# --enable-add-ons
+#     Use all the add-ons it finds.
+#     crypt and localdata are now part of glibc.
+# --enable-kernel=2.x.x
+#     Compile the library for support of linux 2.6.x kernels.
+#     The kernel version specified must not be newer than the
+#     version of the kernel running on the build machine.
+# --without-gd
+#     Prevents the build of the memusagestat program, which
+#     strangely enough insists on linking against the host's
+#     libraries (libgd, libpng, libz, and so forth).
+cd ${LFS_TMP}/${1}-build &&
+BUILD_CC=gcc CC=${CROSS_COMPILE}gcc AR=${CROSS_COMPILE}ar RANLIB=${CROSS_COMPILE}ranlib AS=${CROSS_COMPILE}as LD=${CROSS_COMPILE}ld \
+    ../${1}/configure \
+    --prefix=/usr \
+    --host=${TARGET} \
+    --with-headers=${SYSROOT}/usr/include \
+    --enable-add-ons \
+    --enable-kernel=${GLIBC_KERNEL_VERSION} \
+    --disable-profile \
+    --without-gd \
+    --without-cvs \
+    --without-selinux &&
+
+#    --enable-threads=posix \
+#    --enable-static-nss \
+#    --enable-add-ons \
+#    --disable-sanity-checks \
+#    --without-__thread \
+
+make &&
+make install_root=${SYSROOT} install
+  
+# Return last error
+exit $?
diff --git a/stage6/cis-kernel b/stage6/cis-kernel
new file mode 100755 (executable)
index 0000000..00a4941
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# The ARCH variable must be exported for this script
+#   eg. ARCH=powerpc
+
+# We don't compile anything, we only install headers
+##################################################################unset CROSS_COMPILE &&
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Move files to their final destination 
+mkdir -pv ${SYSROOT}/usr/src &&
+cp -a ${LFS_TMP}/${1} ${SYSROOT}/usr/src &&
+
+cd ${SYSROOT}/usr/src &&
+
+# Create the link only if it does not exist. Otherwise, the
+# new link will be created inside kernel directory.
+rm -fv linux &&
+ln -sfv ${1} linux &&
+
+cd ${SYSROOT}/usr/src/${1} &&
+
+# First step, install kernel API headers:
+make mrproper &&
+make headers_check &&
+make INSTALL_HDR_PATH=dest headers_install &&
+mkdir -pv ${SYSROOT}/usr/include &&
+cp -rv dest/include/* ${SYSROOT}/usr/include &&
+
+# Second, install HV kernel compilation script:
+cat > ${SYSROOT}/usr/src/compile-kernel << "EOF" &&
+#!/bin/sh
+
+KERNEL_VERSION=$(basename $(pwd))
+DEST=/boot
+
+export ARCH=_ARCH_
+export CROSS_COMPILE=_CROSS_COMPILE_
+export SYSROOT=_SYSROOT_
+
+KERNELMAKE="make -j 4"
+
+${KERNELMAKE} bzImage &&
+
+if cat .config | grep "CONFIG_MODULES=y" 1> /dev/null 2>&1; then
+    ${KERNELMAKE} modules &&
+    ${KERNELMAKE} INSTALL_MOD_PATH=${SYSROOT} modules_install
+fi &&
+
+cp arch/${ARCH}/boot/images/zImage.elf ${DEST}/vmlinuz-${KERNEL_VERSION} &&
+cp arch/${ARCH}/boot/images/zImage.elf ${DEST}/vmlinuz-latest &&
+cp System.map                          ${DEST}/System-${KERNEL_VERSION}.map &&
+cp .config                             ${DEST}/config-${KERNEL_VERSION}
+
+if [ $? -ne 0 ]; then
+    echo "*** Kernel compilation error ***."
+    exit 1
+fi
+
+exit 0
+EOF
+
+sed -i -e "s!_ARCH_!${ARCH}!g"                   ${SYSROOT}/usr/src/compile-kernel &&
+sed -i -e "s!_CROSS_COMPILE_!${CROSS_COMPILE}!g" ${SYSROOT}/usr/src/compile-kernel &&
+sed -i -e "s!_SYSROOT_!${SYSROOT}!g"             ${SYSROOT}/usr/src/compile-kernel &&
+
+chmod -v u+x ${SYSROOT}/usr/src/compile-kernel
+
+# Return last error
+exit $?
diff --git a/stage6/cis-newlib b/stage6/cis-newlib
new file mode 100755 (executable)
index 0000000..45f3650
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# First argument of this script is the package name
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${1} &&
+
+# Saves CFLAGS and CXXFLAGS, and clears them.
+save_flags_no_optimizations
+
+cd ${LFS_TMP}/${1}-build &&
+../${1}/configure \
+    --target=${TARGET} \
+    --prefix=${PREFIX} &&
+make all &&
+make install &&
+
+# Restore original CFLAGS and CXXFLAGS values.
+restore_flags
+
+# Return last error
+exit $?
diff --git a/stage6/packages-update b/stage6/packages-update
new file mode 100755 (executable)
index 0000000..fbad3af
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Must be defined before sourcing other files.
+LFS_STAGE="stage5"
+
+# Reading system configuration informations, functions and package versions.
+source ../functions
+source ../functions-update
+source ../packages-list
+
+update_packages_init
+
+# Begin
+
+lpkg     1 ${AVR_BINUTILS}
+lpkg     1 ${ARM_BINUTILS}
+lpkg     1 ${KERNEL}
+lpkg     1 ${GLIBC}
+lpkg     1 ${AVR_GCC_CORE}
+lpkg     1 ${ARM_GCC_CORE}
+fpkg       ${AVR_LIBC} "http://download.savannah.gnu.org/releases/avr-libc"
+fpkg       ${NEWLIB} "ftp://sources.redhat.com/pub/newlib"
+fpkg_gnu   ${AVR_GDB}
+fpkg       ${AVRDUDE} "http://download.savannah.gnu.org/releases/avrdude"
+fpkg_mis   ${SPLINT} "${SPLINT}.src" "http://splint.org/downloads"
+
+GEDA_BASE_URL=http://geda.seul.org/release/v$(get_pkg_ver_base ${LIBGEDA})/$(get_pkg_ver ${LIBGEDA})
+
+fpkg       ${LIBGEDA}       ${GEDA_BASE_URL}
+fpkg       ${GEDA_SYMBOLS}  ${GEDA_BASE_URL}
+fpkg       ${GEDA_GSCHEM}   ${GEDA_BASE_URL}
+fpkg       ${GEDA_GNETLIST} ${GEDA_BASE_URL}
+fpkg       ${GEDA_SYMCHECK} ${GEDA_BASE_URL}
+fpkg       ${GEDA_GATTRIB}  ${GEDA_BASE_URL}
+
+# Return last error
+exit $?
diff --git a/stage6/stage5-additions b/stage6/stage5-additions
new file mode 100755 (executable)
index 0000000..5c1538b
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage4"
+export LFS_LOG_DIR=/var/log/hvlinux-install/stage4
+export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+source /etc/profile
+
+# Init log file
+mkdir -p ${LFS_LOG_DIR} || exit 1
+if [ ! -f ${LFS_LOG_FILE} ]; then
+    touch ${LFS_LOG_FILE} || exit 1
+fi
+
+ipkg ${GDB} cis-gdb
+
+exit $?
diff --git a/stage6/stage5-install-arm b/stage6/stage5-install-arm
new file mode 100644 (file)
index 0000000..9dcb7c1
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
+export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
+export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
+export LFS_TMP=/mnt/hv-packages/tmp
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+source /etc/profile
+
+init_log_file
+
+export TARGET="arm-elf"
+export PREFIX="/usr/arm-elf"
+
+var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
+source /etc/profile &&
+
+ipkg      ${ARM_BINUTILS} cis-binutils
+ipkg_mult ${ARM_GCC_CORE} cis-gcc1 "${GCC_CORE}-pass1" 
+ipkg      ${NEWLIB}       cis-newlib
+ipkg_mult ${ARM_GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2" 
+ipkg      ${GDB}          cis-gdb
+
+exit $?
diff --git a/stage6/stage5-install-avr b/stage6/stage5-install-avr
new file mode 100755 (executable)
index 0000000..8cb4c7f
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
+export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
+export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
+export LFS_TMP="/tmp"
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+source /etc/profile
+
+if [ "x${USER}" != "xroot" ]; then
+    echo "You must be the superuser to install hvlinux."
+    exit 1
+fi
+
+init_log_file
+
+export TARGET="avr"
+export PREFIX="/usr/avr"
+
+var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
+source /etc/profile &&
+
+ipkg      ${AVR_BINUTILS} cis-binutils
+ipkg_mult ${AVR_GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2"
+ipkg      ${AVR_LIBC}     cis-avr-libc
+ipkg      ${AVRDUDE}      cis-avrdude
+ipkg      ${SPLINT}       cis-ac-nobuild
+ipkg      ${AVR_GDB}      cis-gdb
+
+exit $?
diff --git a/stage6/stage5-install-geda b/stage6/stage5-install-geda
new file mode 100755 (executable)
index 0000000..6ee68d5
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
+export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
+export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
+export LFS_TMP="$(dirname $(dirname $(pwd)))/packages/tmp"
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+source /etc/profile
+
+init_log_file
+
+if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; then
+    ipkg_ac  ${LIBGEDA}
+    ipkg_ac  ${GEDA_SYMBOLS}
+    ipkg_ac  ${GEDA_GSCHEM}
+    ipkg_ac  ${GEDA_GNETLIST}
+    ipkg_ac  ${GEDA_SYMCHECK}
+    ipkg_ac  ${GEDA_GATTRIB}
+fi
+
+exit $?
diff --git a/stage6/stage5-install-ppc b/stage6/stage5-install-ppc
new file mode 100755 (executable)
index 0000000..8d80feb
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage5"
+export LFS_LOG_DIR=/var/log/hvlinux-install/stage5
+export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
+export LFS_TMP=/tmp
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+source /etc/profile
+
+init_log_file
+
+export CFLAGS="-pipe -O2"
+export CXXFLAGS=${CFLAGS}
+
+export ARCH="powerpc"
+export TARGET="powerpc-405-linux-gnu"
+export PREFIX="/usr/powerpc-405"
+export SYSROOT=${PREFIX}/sysroot
+export CROSS_COMPILE=${TARGET}-
+
+var_add_path "PATH" /etc/profile "${PREFIX}/bin" &&
+source /etc/profile &&
+
+ipkg      ${BINUTILS} cis-binutils
+ipkg_mult ${GCC_CORE} cis-gcc1 "${GCC_CORE}-pass1"
+ipkg      ${KERNEL}   cis-kernel
+ipkg      ${GLIBC}    cis-glibc
+
+exit 1
+exit 1
+
+ipkg_mult ${GCC_CORE} cis-gcc2 "${GCC_CORE}-pass2" 
+ipkg      ${GDB}      cis-gdb
+
+exit $?