- add hooks & configurations files for archppc

first attempt. Nothing tested yet
This commit is contained in:
Benoit Chesneau 2007-04-10 17:55:48 +00:00
parent 178f5d7a1e
commit 080ed42e96
9 changed files with 684 additions and 0 deletions

107
install-ppc.conf Normal file
View file

@ -0,0 +1,107 @@
# vim:set ft=sh:
# Created by Tobias Powalowski <tpowa@archlinux.org>
# For more information on how using mkinitcpio please refer to the main config file
# or check the wiki.
MODULES=""
BINARIES=""
FILES=""
# SETUP
# You can choose between 3 types of install media:
# arch-base-install --> creates base install media
# arch-ftp-install --> creates ftp install media
# arch-current-install --> creates full current install media
#
# default is set to ftp install media
#
# Please change the other hooks only if you know what you are doing.
HOOKS="arch-ftp-installppc arch-bootmessage-ppc arch-motd arch-pam arch-shadow arch-base-ppc arch-hwdetect arch-udev ide pata scsi sata arch-net arch-isdn arch-pcmcia usb usbinput fw arch-raid arch-lvm2 arch-encrypt arch-filesystems-ppc arch-keymap-ppc arch-remote arch-cpufreq arch-fb arch-links arch-naim arch-pacman arch-addons arch-kexec arch-ppp arch-pppoe arch-yaboot arch-iptables arch-pciutils arch-usbutils arch-openvpn arch-vpnc"
#
# adding pxelinux hook if mkpxelinux is used.
if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then
HOOKS="$HOOKS arch-pxelinux"
fi
#
### NETWORK SETUP
# the default install media creating process, uses latest files from online cvs!
#
#SERVER PARAMETERS
FTPSERVER="ftp://ftp.archlinuxppc.org/current/os"
# CVS-CURRENT SERVER
CVSCURRENT=":pserver:anonymous:anonymous@cvs.archlinuxppc.org:/home/cvs-current"
# CVS-CURRENT TAG
TAG="CURRENT"
CVSARCH=":pserver:anonymous:anonymous@cvs.archlinuxppc.org:/home/cvs-arch"
###### LOCAL SETUP
# only needed if you want to build custom install media
# disabled by default you can ignore all those parameters below
# if you don't set LOCALSETUP="yes"
#
# Set this switch to "yes" if you want a custom install media
LOCALSETUP="no"
#### NOTES:
# To get the cvs tree use these commands:
# - change to your dir you want to hold the cvs files and execute the script below
# Example Script:
# ---------------
# #!/bin/sh
# export CVSROOT=":pserver:anonymous:anonymous@cvs.archlinuxppc.org:/home/cvs-arch"
# TAG="CURRENT"
# ### general setup stuff
# cvs -z3 co arch/scripts/{km,setup,quickinst}
# cvs -z3 co arch/doc/en/guide/install/arch-install-guide.txt
# cvs -z3 co arch/mirrors.txt
# ### needed for base install media
# export CVSROOT=":pserver:anonymous:anonymous@cvs.archlinuxppc.org:/home/cvs-current"
# TAG="CURRENT"
# cvs -z3 co -r ${TAG} arch/build/base/
# cvs -z3 co -r ${TAG} arch/build/kernels/
# ### needed for current install media
# cvs -z3 co -r ${TAG} arch/build/
# ---------------
# Now you can start to modify this tree to your needs.
### GENERAL REMASTER PARAMETERS
# enter here your custom/modified cvs tree
CVSTREE=""
# path to keyboard layout change script
KMSCRIPT="${CVSTREE}/arch/scripts/km"
# path to setup script
SETUP="${CVSTREE}/arch/scripts/setup"
# path to quickinst script
QUICKINST="${CVSTREE}/arch/scripts/quickinst"
# path to file which include the mirrors
MIRRORS="${CVSTREE}/arch/mirrors.txt"
# path to documentation file
DOCUMENTATION="${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt"
# path to built packages
PACKAGEDIR=""
# path to static pacman
# download it from:
# ftp://ftp.archlinuxppc.org/current/os/<yourarchitecture>/setup/pacman.pkg.tar.gz
# or build it on your own ;)
PACMANBINARY=""
# path to rc.sysinit to get arch version
RCSYSINIT="${CVSTREE}/arch/build/base/initscripts/rc.sysinit"
#### REMASTER FTP INSTALL MEDIA
# No extra parameters needed
#### REMASTER BASE/CURRENT INSTALL MEDIA
### main cvs dir for base install
# Note: the MAINCVSDIR dir must include a 'base' and 'kernels' directory
MAINCVSDIR="${CVSTREE}/current"

View file

@ -0,0 +1,159 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### check for root
if ! [ $UID -eq 0 ]; then
echo "ERROR: only works when run as root!"
exit 1
fi
### check for activated testing repository
if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then
echo "WARNING: TESTING REPOSITORY ACTIVATED"
echo "-------------------------------------"
echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!"
echo "Use a chroot instead to avoid those problems."
echo "5 seconds time to cancel with CTRL+C"
sleep 5
fi
### begin cvs part
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSTREE=$(mktemp /tmp/archcvs.XXXX)
rm ${CVSTREE}
mkdir -p ${CVSTREE}
# checkout actual CURRENT cvs
export CVSROOT=${CVSCURRENT}
export CVSROOT_ARCH=${CVSARCH}
else
CVSTREE=${CVSTREE}
fi
cd ${CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
cvs -d ${CVSROOT} co -r ${TAG} current/base/
cvs -d ${CVSROOT} co -r ${TAG} current/kernels/
MAINCVSDIR="${CVSTREE}/current"
cd ${MAINCVSDIR}
SEARCHCVS=$(find ./ -type d ! -name "CVS")
else
cd ${MAINCVSDIR}
SEARCHCVS=$(find ./base -type d ! -name "CVS")
SEARCHCVS="${SEARCHCVS} $(find ./kernels -type d ! -name "CVS")"
fi
if ! [ "${TEMPDIR}" = "" ]; then
mkdir -p ${TEMPDIR}/arch/pkg/setup
# Download all packages
PACKAGES=$(for i in ${SEARCHCVS};do ! [ "$(echo $i | awk -F/ '{print $3}')" = "" ] && echo -n "current/$(echo $i| awk -F/ '{print $3}') ";done)
if ! [ "${LOCALSETUP}" = "yes" ]; then
pacman -Sy
if ! [ "$(pacman -Sw --noconfirm ${PACKAGES})" ]; then
echo "ABORTING: Something went wrong in package retrieving or md5sum check."
exit 1
fi
else
DBGENERATE="$(mktemp /tmp/db-generate.XXX)"
rm ${DBGENERATE}
mkdir -p ${DBGENERATE}
gensync ${MAINCVSDIR}/base ${DBGENERATE}/db1.db.tar.gz ${PACKAGEDIR}
gensync ${MAINCVSDIR}/kernels ${DBGENERATE}/db2.db.tar.gz ${PACKAGEDIR}
mkdir -p ${DBGENERATE}/real-db
cd ${DBGENERATE}/real-db
tar xfz ../db1.db.tar.gz
tar xfz ../db2.db.tar.gz
tar cfz ../current.db.tar.gz *
PACMANREPO="$(mktemp /tmp/pacman-repo.XXX)"
rm ${PACMANREPO}
mkdir -p ${PACMANREPO}
mount --bind ${PACKAGEDIR} ${PACMANREPO}
mv ${DBGENERATE}/current.db.tar.gz ${PACMANREPO}/
rm -r ${DBGENERATE}
PACMANCONF="$(mktemp /tmp/pacman-conf.XXX)"
echo "[current]" >> ${PACMANCONF}
echo "Server = file://${PACMANREPO}" >> ${PACMANCONF}
pacman -Sy --config ${PACMANCONF}
if ! [ "$(pacman -Sw --noconfirm --config ${PACMANCONF} ${PACKAGES})" ]; then
echo "ABORTING: Something went wrong in package retrieving or md5sum check."
umount ${PACMANREPO}
exit 1
fi
fi
# collect the packages
cd ${MAINCVSDIR}
for COPY in ${SEARCHCVS};do
if ! [ "$(echo ${COPY} | awk -F/ '{print $3}')" = "" ]; then
source "${COPY}/PKGBUILD"
cp /var/cache/pacman/pkg/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz ${TEMPDIR}/arch/pkg/
echo "$(echo ${COPY}| awk -F/ '{print $2}')/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz" >> ${TEMPDIR}/arch/pkg/setup/packages.txt
fi
done
# generate packages.txt
sort -u ${TEMPDIR}/arch/pkg/setup/packages.txt -o ${TEMPDIR}/arch/pkg/setup/packages.txt
fi
SCRIPT=
BINARIES=
# always needed for every install
cd ${CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
cvs -d $CVSROOT_ARCH} co arch/scripts/{km,setup,quickinst}
cvs -d ${CVSROOT_ARCH} co arch/doc/en/guide/install/arch-install-guide.txt
cvs -d ${CVSROOT_ARCH} co arch/mirrors.txt
fi
# fix km script
KM=$(mktemp /tmp/km.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/scripts/km ${KM}
else
cp -f ${KMSCRIPT} ${KM}
fi
sed -i -e 's#$BASEDIR/keymaps/##g' ${KM}
chmod 755 ${KM}
mkdir -p ${TEMPDIR}/arch
add_file "${KM}" "/bin/km"
# fix mirrors.txt
if ! [ "${LOCALSETUP}" = "yes" ]; then
sed -i -e "s/i686/$(uname -m)/g" ${CVSTREE}/arch/mirrors.txt
add_file "${CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
add_file "${CVSTREE}/arch/mirrors.txt" "/arch/mirrors.txt"
else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS}
add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst"
add_file "${MIRRORS}" "/arch/mirrors.txt"
fi
DOCS=$(mktemp /tmp/docs.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${DOCS}
else
cp -f ${DOCUMENTATION} ${DOCS}
fi
gzip -9 ${DOCS}
add_file "${DOCS}.gz" "/arch/archdoc.txt.gz"
add_dir "/src"
if ! [ "${LOCALSETUP}" = "yes" ]; then
if ! [ "${TEMPDIR}" = "" ]; then
cp ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${TEMPDIR}/arch/archdoc.txt
cd ${TEMPDIR}/arch/pkg/setup/
wget ${FTPSERVER}/$(uname -m)/setup/pacman.pkg.tar.gz
cd ${TEMPDIR}/arch/pkg/
wget ${FTPSERVER}/$(uname -m)/current.db.tar.gz
fi
else
if ! [ "${TEMPDIR}" = "" ]; then
cp -f ${DOCUMENTATION} ${TEMPDIR}/arch/archdoc.txt
cp -f ${PACMANBINARY} ${TEMPDIR}/arch/pkg/setup/
mv ${PACMANREPO}/current.db.tar.gz ${TEMPDIR}/arch/pkg/
umount ${PACMANREPO}
fi
fi
# generate iso title name
[ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux BASE $(uname -m)" >> ${ISONAME}
}
help ()
{
cat <<HELPEOF
This hook sets up all you need for a arch base install image.
HELPEOF
}

78
install/arch-baseppc Normal file
View file

@ -0,0 +1,78 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### setting up base structure
add_dir "/proc"
add_dir "/sys"
add_dir "/dev"
add_dir "/mnt"
add_dir "/tmp"
add_dir "/var/run"
add_dir "/var/log"
add_dir "/addons"
add_dir "/home"
add_device "/dev/null" c 1 3
add_device "/dev/zero" c 1 5
add_device "/dev/console" c 5 1
### adding klibc lib files
for f in $(find /lib -name klibc-*.so); do
add_file $f
done
### adding klibc binaries
for f in $(find /usr/lib/klibc/bin/ ! -name "mount" ! -name "umount" ! -name "reboot" ! -name "halt" ! -name "chroot" ! -name "sh" ! -name "modprobe" ! -type d); do
add_file $f /bin/$(basename $f)
done
### adding needed programs from running system
add_file "${CONFIG}" "/config"
SCRIPT="arch-base"
BINARIES="init agetty mount modprobe modinfo umount basename du clear env head id md5sum nano netcat printf tail tee test tr tty uptime wc which whoami xargs yes syslog-ng bash swapon uniq cut seq snarf find sort mac-fdisk parted sfdisk gawk cp mv shutdown free ls rm sed test less chgrp chmod chown date df dialog dmesg egrep fgrep grep hostname kill killall killall5 more ps pwd rmdir stty sync tar touch uname vim lsmod modinfo rmmod hdparm true mktemp chroot dirname expr bzip2 hwclock depmod su"
add_file "/usr/bin/reset"
add_file "/sbin/swapoff"
add_file "/sbin/halt"
add_file "/sbin/telinit"
add_file "/bin/awk"
add_file "/etc/archboot/etc/init" "/init"
add_file "/usr/bin/vi"
add_file "/bin/dir"
add_file "/usr/share/terminfo/l/linux"
add_file "/usr/share/vim/syntax/syntax.vim"
add_file "/usr/share/vim/syntax/conf.vim"
add_file "/usr/share/vim/syntax/sh.vim"
add_file "/usr/share/vim/syntax/grub.vim"
add_file "/usr/share/vim/syntax/lilo.vim"
add_file "/usr/share/vim/syntax/manual.vim"
add_file "/usr/share/vim/syntax/synload.vim"
add_file "/usr/share/vim/syntax/colortest.vim"
add_file "/usr/share/vim/syntax/syncolor.vim"
add_file "/usr/share/vim/syntax/hitest.vim"
add_file "/usr/share/vim/syntax/whitespace.vim"
add_file "/usr/share/vim/syntax/modconf.vim"
add_file "/usr/share/vim/syntax/resolv.vim"
add_file "/usr/share/vim/syntax/fstab.vim"
add_file "/usr/share/vim/filetype.vim"
add_file "/etc/rc.d/functions"
add_file "/etc/archboot/etc/rc.conf" "/etc/rc.conf"
add_file "/etc/rc.d/syslog-ng"
### adding config files of installation system
for i in $(find /etc/archboot/etc/ -maxdepth 1 ! -type d ! -name 'init' ! -name "udev.rules" ! -name "menu.lst" ! -name "isolinux.cfg" ! -name "append-message*"); do
add_file "$i" "/etc/$(basename $i)"
done
### fixing network support
add_file "/lib/libnss_files.so.2"
add_file "/lib/libnss_dns.so.2"
}
help ()
{
cat <<HELPEOF
This hook sets up all initial directories and installs base
klibc utilities and libraries for a arch boot image.
DO NOT remove this one unless you know what you're doing.
HELPEOF
}

View file

@ -0,0 +1,52 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### generate boot.msg
[ "${RUNPROGRAM}" = "mkbootcd" ] && TITLEMSG="ISOLINUX"
[ "${RUNPROGRAM}" = "mkbootcd-grub" ] && TITLEMSG="GRUB"
[ "${RUNPROGRAM}" = "mksyslinux" ] && TITLEMSG="SYSLINUX"
[ "${RUNPROGRAM}" = "mkpxelinux" ] && TITLEMSG="PXELINUX"
CONFIGMSG="INSTALLATION / RESCUEBOOT SYSTEM"
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSMSG=$(mktemp /tmp/archmsg.XXXX)
rm ${CVSMSG}
mkdir -p ${CVSMSG}
# checkout actual name from cvs rc.sysinit
export CVSROOT=${CVSSETUP}
cd ${CVSMSG}
cvs -z3 co -r ${TAG} arch/build/base/initscripts/rc.sysinit
NAME=$(grep 'Arch' arch/build/base/initscripts/rc.sysinit | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g')
else
NAME=$(grep 'Arch' ${RCSYSINIT} | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g')
fi
echo "Arch Linux PPC" >> ${BOOTMESSAGE}
echo "http://www.archlinuxppc.org" >> ${BOOTMESSAGE}
echo "Arch Linux - Copyright 2002 - 2007 Judd Vinet <jvinet@zeroflux.org>" >> ${BOOTMESSAGE}
echo "Distributed under the GNU General Public License (GPL)" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
echo "${TITLEMSG} BOOT" >> ${BOOTMESSAGE}
echo "Creation Tool: '$(echo ${RUNPROGRAM} | sed 's|-grub||')' written by Tobias Powalowski <tpowa@archlinux.org>" >> ${BOOTMESSAGE}
echo "Edited by Benoit Chesneau <benoitc@archlinuxppc> for Arch Linux PPC" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
echo "${CONFIGMSG}" >> ${BOOTMESSAGE}
echo "${NAME}" >> ${BOOTMESSAGE}
echo "Kernel: ${USEKERNEL}" >> ${BOOTMESSAGE}
echo "Architecture: $(uname -m)" >> ${BOOTMESSAGE}
echo "Creation Date: $(date)" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
if [ "${RUNPROGRAM}" = "mkbootcd-grub" ]; then
[ -s "${APPENDBOOTMESSAGE}" ] && cat ${APPENDBOOTMESSAGE} >> ${BOOTMESSAGE}
else
[ -s "${APPENDBOOTMESSAGE_SYSLINUX}" ] && cat ${APPENDBOOTMESSAGE_SYSLINUX} >> ${BOOTMESSAGE}
fi
}
help ()
{
cat <<HELPEOF
This hook sets up dynamically the boot message, depending on
your system.
HELPEOF
}

View file

@ -0,0 +1,151 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### check for root
if ! [ $UID -eq 0 ]; then
echo "ERROR: only works when run as root!"
exit 1
fi
### check for activated testing repository
if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then
echo "WARNING: TESTING REPOSITORY ACTIVATED"
echo "-------------------------------------"
echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!"
echo "Use a chroot instead to avoid those problems."
echo "5 seconds time to cancel with CTRL+C"
sleep 5
fi
### begin cvs part
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSTREE=$(mktemp /tmp/archcvs.XXXX)
rm ${CVSTREE}
mkdir -p ${CVSTREE}
# checkout actual CURRENT cvs
export CVSROOT=${CVSSETUP}
export CVSROOT_ARCH=${CVSARCH}
else
CVSTREE=${CVSTREE}
fi
cd ${CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
cvs -d ${CVSROOT} co -r ${TAG} current/
MAINCVSDIR="${CVSTREE}/current"
cd ${MAINCVSDIR}
SEARCHCVS=$(find ./ -type d ! -name "CVS")
else
cd ${MAINCVSDIR}
SEARCHCVS=$(find ./ -type d ! -name "CVS")
fi
if ! [ "${TEMPDIR}" = "" ]; then
mkdir -p ${TEMPDIR}/arch/pkg/setup
# Download all packages
PACKAGES=$(for i in ${SEARCHCVS};do ! [ "$(echo $i | awk -F/ '{print $3}')" = "" ] && echo -n "current/$(echo $i| awk -F/ '{print $3}') ";done)
if ! [ "${LOCALSETUP}" = "yes" ]; then
pacman -Sy
if ! [ "$(pacman -Sw --noconfirm ${PACKAGES})" ]; then
echo "ABORTING: Something went wrong in package retrieving or md5sum check."
exit 1
fi
else
DBGENERATE="$(mktemp /tmp/db-generate.XXX)"
rm ${DBGENERATE}
mkdir -p ${DBGENERATE}
gensync ${MAINCVSDIR}/ ${DBGENERATE}/current.db.tar.gz ${PACKAGEDIR}
PACMANREPO="$(mktemp /tmp/pacman-repo.XXX)"
rm ${PACMANREPO}
mkdir -p ${PACMANREPO}
mount --bind ${PACKAGEDIR} ${PACMANREPO}
mv ${DBGENERATE}/current.db.tar.gz ${PACMANREPO}/
rm -r ${DBGENERATE}
PACMANCONF="$(mktemp /tmp/pacman-conf.XXX)"
echo "[current]" >> ${PACMANCONF}
echo "Server = file://${PACMANREPO}" >> ${PACMANCONF}
pacman -Sy --config ${PACMANCONF}
if ! [ "$(pacman -Sw --noconfirm --config ${PACMANCONF} ${PACKAGES})" ]; then
echo "ABORTING: Something went wrong in package retrieving or md5sum check."
umount ${PACMANREPO}
exit 1
fi
fi
# collect the packages
cd ${MAINCVSDIR}
for COPY in ${SEARCHCVS};do
if ! [ "$(echo ${COPY} | awk -F/ '{print $3}')" = "" ]; then
source "${COPY}/PKGBUILD"
cp /var/cache/pacman/pkg/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz ${TEMPDIR}/arch/pkg/
echo "$(echo ${COPY}| awk -F/ '{print $2}')/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz" >> ${TEMPDIR}/arch/pkg/setup/packages.txt
fi
done
# generate packages.txt
sort -u ${TEMPDIR}/arch/pkg/setup/packages.txt -o ${TEMPDIR}/arch/pkg/setup/packages.txt
fi
SCRIPT=
BINARIES=
# always needed for every install
cd ${CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
cvs -d ${CVSROOT_ARCH} co arch/scripts/{km,setup,quickinst}
cvs -d ${CVSROOT_ARCH} co arch/doc/en/guide/install/arch-install-guide.txt
cvs -d ${CVSROOT_ARCH} co arch/mirrors.txt
fi
# fix km script
KM=$(mktemp /tmp/km.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/scripts/km ${KM}
else
cp -f ${KMSCRIPT} ${KM}
fi
sed -i -e 's#$BASEDIR/keymaps/##g' ${KM}
chmod 755 ${KM}
mkdir -p ${TEMPDIR}/arch
add_file "${KM}" "/bin/km"
# fix mirrors.txt
if ! [ "${LOCALSETUP}" = "yes" ]; then
sed -i -e "s/i686/$(uname -m)/g" ${CVSTREE}/arch/mirrors.txt
add_file "${CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
add_file "${CVSTREE}/arch/mirrors.txt" "/arch/mirrors.txt"
else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS}
add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst"
add_file "${MIRRORS}" "/arch/mirrors.txt"
fi
DOCS=$(mktemp /tmp/docs.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${DOCS}
else
cp -f ${DOCUMENTATION} ${DOCS}
fi
gzip -9 ${DOCS}
add_file "${DOCS}.gz" "/arch/archdoc.txt.gz"
add_dir "/src"
if ! [ "${LOCALSETUP}" = "yes" ]; then
if ! [ "${TEMPDIR}" = "" ]; then
cp ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${TEMPDIR}/arch/archdoc.txt
cd ${TEMPDIR}/arch/pkg/setup/
wget ${FTPSERVER}/$(uname -m)/setup/pacman.pkg.tar.gz
cd ${TEMPDIR}/arch/pkg/
wget ${FTPSERVER}/$(uname -m)/current.db.tar.gz
fi
else
if ! [ "${TEMPDIR}" = "" ]; then
cp -f ${DOCUMENTATION} ${TEMPDIR}/arch/archdoc.txt
cp -f ${PACMANBINARY} ${TEMPDIR}/arch/pkg/setup/
mv ${PACMANREPO}/current.db.tar.gz ${TEMPDIR}/arch/pkg/
umount ${PACMANREPO}
fi
fi
# generate iso title name
[ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux CURRENT $(uname -m)" >> ${ISONAME}
}
help ()
{
cat <<HELPEOF
This hook sets up all you need for a arch current install image.
HELPEOF
}

View file

@ -0,0 +1,16 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=" $(checked_modules '/kernel/fs' | grep -v "nls") $(checked_modules '/kernel/fs/nls/nls_cp437') "
BINARIES="mkswap mke2fs mkreiserfs reiserfsck reiserfstune resize_reiserfs mkfs.ext2 badblocks blkid dumpe2fs e2fsck e2image e2label findfs fsck logsave resize2fs tune2fs mkfs.ext3 mkfs.xfs mkntfs fsck.ext2 fsck.ext3 fsck.xfs xfs_repair xfs_check xfs_freeze xfs_io xfs_admin xfs_db mkdosfs dosfsck"
FILES=""
SCRIPT="arch-filesystems"
}
help ()
{
cat<<HELPEOF
This hook is responsible for including filesystems on an arch boot image.
HELPEOF
}

View file

@ -0,0 +1,80 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### check for activated testing repository
if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then
echo "WARNING: TESTING REPOSITORY ACTIVATED"
echo "-------------------------------------"
echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!"
echo "Use a chroot instead to avoid those problems."
echo "5 seconds time to cancel with CTRL+C"
sleep 5
fi
### begin cvs part
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSTREE=$(mktemp /tmp/archcvs.XXXX)
rm ${CVSTREE}
mkdir -p ${CVSTREE}
# checkout actual CURRENT cvs
export CVSROOT=${CVSSETUP}
export CVSROOT_ARCH=${CVSARCH}
else
CVSTREE=${CVSTREE}
fi
SCRIPT=
BINARIES=
# always needed for every install
cd ${CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
cvs -d ${CVSROOT_ARCH} -coo arch/scripts/{km,setup,quickinst}
cvs -d ${CVSROOT_ARCH} co arch/doc/en/guide/install/arch-install-guide.txt
cvs -d ${CVSROOT_ARCH} co arch/mirrors.txt
fi
# fix km script
KM=$(mktemp /tmp/km.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/scripts/km ${KM}
else
cp -f ${KMSCRIPT} ${KM}
fi
sed -i -e 's#$BASEDIR/keymaps/##g' ${KM}
chmod 755 ${KM}
mkdir -p ${TEMPDIR}/arch
add_file "${KM}" "/bin/km"
# fix mirrors.txt
if ! [ "${LOCALSETUP}" = "yes" ]; then
sed -i -e "s/i686/$(uname -m)/g" ${CVSTREE}/arch/mirrors.txt
add_file "${CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
add_file "${CVSTREE}/arch/mirrors.txt" "/arch/mirrors.txt"
else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS}
add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst"
add_file "${MIRRORS}" "/arch/mirrors.txt"
fi
DOCS=$(mktemp /tmp/docs.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then
cp -f ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${DOCS}
else
cp -f ${DOCUMENTATION} ${DOCS}
fi
gzip -9 ${DOCS}
add_file "${DOCS}.gz" "/arch/archdoc.txt.gz"
add_dir "/src"
if ! [ "${LOCALSETUP}" = "yes" ]; then
! [ "${TEMPDIR}" = "" ] && cp ${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt ${TEMPDIR}/arch/archdoc.txt
else
! [ "${TEMPDIR}" = "" ] && cp -f ${DOCUMENTATION} ${TEMPDIR}/arch/archdoc.txt
fi
# generate iso title name
[ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux FTP $(uname -m)" >> ${ISONAME}
}
help ()
{
cat <<HELPEOF
This hook sets up all you need for a arch ftp install image.
HELPEOF
}

24
install/arch-keymap-ppc Normal file
View file

@ -0,0 +1,24 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=""
BINARIES=""
FILES=""
SCRIPT=""
KEYMAP_FILE="$(mktemp /tmp/keymap.XXXXXX)"
add_file /bin/loadkeys /bin/loadkeys
add_file /usr/bin/dumpkeys /bin/dumpkeys
add_file /usr/bin/kbd_mode /bin/kdb_mode
add_file /usr/bin/setfont /bin/setfont
for i in $(find /usr/share/kbd/ ! -type d -name "atari*" ! -name "sun*" ! -name "README*" ! -name "amiga*"); do
add_file $i
done
}
help ()
{
cat<<HELPEOF
This hook includes the keymaps and fonts on an arch boot image.
HELPEOF
}

17
install/arch-yaboot Normal file
View file

@ -0,0 +1,17 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=""
BINARIES="yaboot"
FILES=""
SCRIPT=""
add_file "/etc/archboot/etc/yaboot/yaboot.conf" "/etc/yaboot.conf"
}
help ()
{
cat<<HELPEOF
This hook includes yaboot on an arch boot image.
HELPEOF
}