diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-05-04 23:33:53 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-05-04 23:33:53 +0400 |
commit | 2829807158abea589f00731c16edb889f9169b99 (patch) | |
tree | d157705c1aec334a358db10ee867a25cddf237aa /protostar | |
parent | 3e96ac7524ee640a2e65dc56c79cb07223a3e1f9 (diff) | |
download | live-2829807158abea589f00731c16edb889f9169b99.tar.gz |
Use APT to install packages
Diffstat (limited to 'protostar')
-rwxr-xr-x | protostar | 58 |
1 files changed, 57 insertions, 1 deletions
@@ -22,6 +22,40 @@ BOOTSTRAPFS="${BOOTSTRAPFS:-rpool/deb}" ROOT="/$BOOTSTRAPFS" BOOTARCH="${ROOT}/boot_archive" +# Disable boot-archive trigger, need bootadm >= 2.10+1: +export DEB_BOOTADM_DISABLE_UPDATE_ARCHIVE=1 + +# These packages are installed via APT, after debootstraping: +EXTRA_PACKAGES=" +bash-completion +bzip2 +debootstrap +drvtools +dtrace +file +illumos-nfs-common +installgrub +kmdb +less +lynx +mc +mdb-kvm +mdb-proc +openssh-client +openssh-server +pciutils +ping +python-apt +python-newt +screen +sysstat +traceroute +truss +vim +wget +xz-utils +" + # Move files from usr to usr1, # Create links from usr to usr1. # E. g.: @@ -39,6 +73,18 @@ usr_symlink_move() { ln -sf "/usr1/$f" "usr/$f" } +mount_in_root() { + mount -F lofs /devices $ROOT/devices + mount -F lofs /proc $ROOT/proc + mount -F lofs /dev $ROOT/dev +} + +umount_in_root() { + umount $ROOT/dev + umount $ROOT/proc + umount $ROOT/devices +} + if [ -z "${ROOT}" ] || [ "${ROOT}" = / ]; then echo "WTF? Bad root: \`${ROOT}'" >&2 exit 1 @@ -55,10 +101,20 @@ else echo "Preparing base system (debootstrap)..." debootstrap \ --exclude=logrotate,locales,rsyslog,cron,gawk,aptitude,aptitude-common,libboost-iostreams1.48.0,libboost-iostreams1.49.0,libcwidget3,libboost-iostreams1.54.0 \ - --include=python-newt,python-apt,truss,installgrub,illumos-grub-eltorito,illumos-kernel,mc,vim,screen,openssh-client,wget,bzip2,xz-utils,debootstrap,less,file,lynx,bash-completion,drvtools,mdb-proc,mdb-kvm,dtrace,inetutils-ping,inetutils-traceroute,pciutils,sysstat,libsun-solaris-kstat-perl,kmdb,illumos-nfs-common,openssh-server \ + --include=illumos-grub-eltorito,illumos-kernel \ "${DIST}" \ "${ROOT}" \ "${REPO}" + +mount_in_root +trap 'umount_in_root' SIGINT SIGTERM +set -x +chroot $ROOT apt-get update +chroot $ROOT apt-get -y --no-install-recommends install $EXTRA_PACKAGES +chroot $ROOT apt-get clean +set +x +trap - SIGINT SIGTERM +umount_in_root zfs snapshot ${BOOTSTRAPFS}@init fi |