From eca04c21406d9e8b3d079c2163cbccf63805b0a0 Mon Sep 17 00:00:00 2001 From: r00t Date: Thu, 16 Jul 2015 12:48:35 -0400 Subject: [PATCH] adding baseline pkgs --- extra/packages.both | 37 ----------------------------------- lib/01-mk.chroot.func.sh | 38 +++++++++++++++++++++++++++++++++--- lib/prereqs/Arch/pkgs | 1 + lib/prereqs/iso.pkgs.lst | 39 +++++++++++++++++++++++++++++++++++++ lib/prereqs/iso.pkgs.lst.32 | 1 + lib/prereqs/iso.pkgs.lst.64 | 1 + 6 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 lib/prereqs/iso.pkgs.lst.32 create mode 100644 lib/prereqs/iso.pkgs.lst.64 diff --git a/extra/packages.both b/extra/packages.both index 74a45c1..871c2cf 100644 --- a/extra/packages.both +++ b/extra/packages.both @@ -7,8 +7,6 @@ afflib aircrack-ng apr apr-util -arch-install-scripts -archiso arj asciidoc atop @@ -23,7 +21,6 @@ bonnie++ bozocrack-git bridge-utils btrfs-progs -bzip2 cabextract cdrtools cdw @@ -35,13 +32,11 @@ ckermit clamav cmospwd colordiff -coreutils cowpatty cpio cpuburn cpupower crackpkcs12 -cronie #cryptcat cryptsetup customizepkg-scripting @@ -52,9 +47,6 @@ dd_rescue dd_rhelp debianutils debootstrap -dhclient -dhcp -dhcpcd dialog diffutils djohn @@ -63,7 +55,6 @@ dnssec-anchors dnstracer #dnsutils #replaced by bind-tools, https://www.archlinux.org/packages/extra/x86_64/bind-tools/ dos2unix -dosfstools dropbear dstat dump @@ -73,8 +64,6 @@ dvd+rw-tools e2fsprogs ecryptfs-utils ed -efibootmgr -efivar elfutils #elilo-efi elinks @@ -110,7 +99,6 @@ gpm gptfdisk gst-libav gst-plugins-ugly -gummiboot hashcat hddtemp hdparm @@ -132,10 +120,8 @@ iozone ipcalc iperf iperf3 -iproute2 ipsec-tools iptraf-ng -iputils irssi iso-codes isomaster @@ -145,10 +131,8 @@ jfsutils john keyutils kismet-allplugins -libisoburn lftp links -localepurge #logkeys logkeys-keymaps lm_sensors @@ -159,10 +143,7 @@ lsof lsscsi lxde lynx -lz4 #lzip -lzo -lzop macchanger magicrescue mbr @@ -175,10 +156,7 @@ megaraid-cli memtester mfoc minicom -mkinitcpio-nfs-utils -ms-sys mtd-utils -mtools mtr mtree #mtx @@ -189,11 +167,8 @@ ncftp ncompress ncrack net-snmp -net-tools -netctl netselect nettle -networkmanager networkmanager-pptp nginx-devel ngrep @@ -204,8 +179,6 @@ ntfsfixboot nwipe open-iscsi openipmi -openssh -openvpn ophcrack os-prober p7zip @@ -233,7 +206,6 @@ procinfo-ng procps-ng progsreiserfs psmisc -pv pwgen pxz pyrit-svn @@ -251,7 +223,6 @@ rpcbind rpmextract rp-pppoe rsnapshot -rsync rygel safecopy samba @@ -261,27 +232,20 @@ scrounge-ntfs scrub scsiadd sdparm -sed setserial sg3_utils sharutils -shorewall sipcalc sipcrack smartmontools smbclient s-nail socat -squashfs3-tools -squashfs-tools #star strace stress sucrack -sudo symlinks -sysfsutils -syslinux sysstat tcpdump tcpslice @@ -292,7 +256,6 @@ thin-provisioning-tools thttpd tmon tmux -traceroute tre truecrack-svn truecrypt diff --git a/lib/01-mk.chroot.func.sh b/lib/01-mk.chroot.func.sh index 466d40e..19920a4 100755 --- a/lib/01-mk.chroot.func.sh +++ b/lib/01-mk.chroot.func.sh @@ -212,10 +212,42 @@ EOF sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf fi + # Baseline packages + echo "Installing baseline packages..." + PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst | tr '\n' ' ') + for i in ${CHROOTDIR32} ${CHROOTDIR64}; + do + set +e + for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done + set -e + ${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + set +e + for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done + set -e + done + # 32-bit + PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.32 | tr '\n' ' ') + if [ -n "${PKGLIST}" ]; + then + ${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + fi + set +e + for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done + set -e + # 64-bit + PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.64 | tr '\n' ' ') + if [ -n "${PKGLIST}" ]; + then + ${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + fi + set +e + for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done + set -e + # preprocessing sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.* # both - echo "Installing common packages..." + echo "Installing extra common packages..." PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ') for i in ${CHROOTDIR32} ${CHROOTDIR64}; do @@ -278,7 +310,7 @@ EOF done # 32-bit - echo "Installing packages for 32-bit..." + echo "Installing extra packages for 32-bit..." PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ') if [ -n "${PKGLIST}" ]; then @@ -290,7 +322,7 @@ EOF echo "Done." # 64-bit - echo "Installing packages for 64-bit..." + echo "Installing estra packages for 64-bit..." PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ') if [ -n "${PKGLIST}" ]; then diff --git a/lib/prereqs/Arch/pkgs b/lib/prereqs/Arch/pkgs index dcc369e..faeb1db 100644 --- a/lib/prereqs/Arch/pkgs +++ b/lib/prereqs/Arch/pkgs @@ -1,5 +1,6 @@ binutils curl +findutils gcc-libs-multilib gcc-multilib git diff --git a/lib/prereqs/iso.pkgs.lst b/lib/prereqs/iso.pkgs.lst index 7c06411..ea50486 100644 --- a/lib/prereqs/iso.pkgs.lst +++ b/lib/prereqs/iso.pkgs.lst @@ -1 +1,40 @@ +arch-install-scripts +archiso +bzip2 +coreutils +cronie +dhclient +dhcp +dhcpcd +dosfstools +efibootmgr +efivar +ethtool +file +findutils +gummiboot +iproute2 +iputils +libisoburn +localepurge +lz4 +lzo +lzop +mkinitcpio-nfs-utils +ms-sys +mtools +net-tools +netctl +networkmanager +openssh +openvpn +pv +rsync +sed +shorewall +squashfs3-tools +squashfs-tools +sudo +sysfsutils syslinux +traceroute diff --git a/lib/prereqs/iso.pkgs.lst.32 b/lib/prereqs/iso.pkgs.lst.32 new file mode 100644 index 0000000..7626efb --- /dev/null +++ b/lib/prereqs/iso.pkgs.lst.32 @@ -0,0 +1 @@ +# This can be used for 32-bit only packages diff --git a/lib/prereqs/iso.pkgs.lst.64 b/lib/prereqs/iso.pkgs.lst.64 new file mode 100644 index 0000000..3d2d993 --- /dev/null +++ b/lib/prereqs/iso.pkgs.lst.64 @@ -0,0 +1 @@ +# This can be used for 64-bit only packages