diff --git a/scripts_debian/00_prepare.sh b/scripts_debian/00_prepare.sh index 5b7be6f..897bc0a 100755 --- a/scripts_debian/00_prepare.sh +++ b/scripts_debian/00_prepare.sh @@ -43,4 +43,3 @@ fi # Execute any template flavor or sub flavor 'post' scripts # ------------------------------------------------------------------------------ buildStep "$0" "post" - diff --git a/scripts_debian/02_install_groups.sh b/scripts_debian/02_install_groups.sh index d30152a..5439819 100755 --- a/scripts_debian/02_install_groups.sh +++ b/scripts_debian/02_install_groups.sh @@ -85,7 +85,7 @@ EOF chroot "${INSTALLDIR}" apt-get update true "${stout}" DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - chroot "${INSTALLDIR}" apt-get -y --force-yes dist-upgrade + chroot "${INSTALLDIR}" apt-get ${APT_GET_OPTIONS} dist-upgrade # ------------------------------------------------------------------------------ # Configure keyboard @@ -115,7 +115,7 @@ EOF for package_list in ${packages_list[@]}; do debug "Installing extra packages from: ${package_list}" DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - xargs chroot ${INSTALLDIR} apt-get -y --force-yes install < "${package_list}" + xargs chroot ${INSTALLDIR} apt-get ${APT_GET_OPTIONS} install < "${package_list}" done # ------------------------------------------------------------------------------ @@ -135,10 +135,10 @@ EOF debug "Installing systemd for debian (${DEBIANVERSION})" if [ "${DEBIANVERSION}" == "wheezy" ]; then echo 'Yes, do as I say!' | DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - chroot "${INSTALLDIR}" apt-get -y --force-yes remove sysvinit + chroot "${INSTALLDIR}" apt-get ${APT_GET_OPTIONS} remove sysvinit else DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - chroot "${INSTALLDIR}" apt-get -y --force-yes remove sysvinit + chroot "${INSTALLDIR}" apt-get ${APT_GET_OPTIONS} remove sysvinit fi # Prevent sysvinit from being re-installed @@ -155,12 +155,11 @@ EOF chroot "${INSTALLDIR}" apt-get update DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - chroot "${INSTALLDIR}" apt-get -y --force-yes install systemd-sysv + chroot "${INSTALLDIR}" apt-get ${APT_GET_OPTIONS} install systemd-sysv # ------------------------------------------------------------------------------ # Set multu-user.target as the default target (runlevel 3) # ------------------------------------------------------------------------------ - #chroot "${INSTALLDIR}" systemctl set-default multi-user.target chroot "${INSTALLDIR}" rm -f /etc/systemd/system/default.target chroot "${INSTALLDIR}" ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target @@ -176,7 +175,7 @@ EOF fi chroot ${INSTALLDIR} apt-get update DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - chroot ${INSTALLDIR} apt-get -y --force-yes -t wheezy-backports install init-system-helpers + chroot ${INSTALLDIR} apt-get ${APT_GET_OPTIONS} -t wheezy-backports install init-system-helpers fi # ------------------------------------------------------------------------------ @@ -199,4 +198,3 @@ fi # Execute any template flavor or sub flavor 'post' scripts # ------------------------------------------------------------------------------ buildStep "$0" "post" - diff --git a/scripts_debian/04_install_qubes.sh b/scripts_debian/04_install_qubes.sh index adeab12..190bb89 100755 --- a/scripts_debian/04_install_qubes.sh +++ b/scripts_debian/04_install_qubes.sh @@ -58,38 +58,12 @@ EOF chroot "${INSTALLDIR}" locale-gen chroot "${INSTALLDIR}" update-locale LANG=en_US.UTF-8 -# # -------------------------------------------------------------------------- -# # Update /etc/fstab -# # -------------------------------------------------------------------------- -# #debug "Updating template fstab file..." -# #cat >> "${INSTALLDIR}/etc/fstab" </dev/null 2>&1; then -# : -# else -# chroot "${INSTALLDIR}" groupadd -f user -# chroot "${INSTALLDIR}" useradd -g user -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user -# fi - -# # -------------------------------------------------------------------------- -# # Modules setup -# # -------------------------------------------------------------------------- -# echo "xen_netfront" >> "${INSTALLDIR}/etc/modules" - -# # -------------------------------------------------------------------------- -# # Remove `mesg` from root/.profile? -# # -------------------------------------------------------------------------- -# sed -i -e '/^mesg n/d' "${INSTALLDIR}/root/.profile" - -# # -------------------------------------------------------------------------- -# # Need a xen log directory or xen scripts will fail -# # -------------------------------------------------------------------------- -# mkdir -p -m 0700 "${INSTALLDIR}/var/log/xen" + rm -f "${INSTALLDIR}/usr/sbin/policy-rc.d" # -------------------------------------------------------------------------- # Copy extra files to installation directory. Contains: @@ -189,13 +138,6 @@ EOF # -------------------------------------------------------------------------- copyTree "qubes-files" "${SCRIPTSDIR}" "${INSTALLDIR}" -# # -------------------------------------------------------------------------- -# # Looks like hosts file may contain tabs and qubes will not parse it -# # correctly -# # -------------------------------------------------------------------------- -# expand "${INSTALLDIR}/etc/hosts" > "${INSTALLDIR}/etc/hosts.dist" -# mv "${INSTALLDIR}/etc/hosts.dist" "${INSTALLDIR}/etc/hosts" - touch "${INSTALLDIR}/tmp/.prepared_qubes" fi diff --git a/scripts_debian/09_cleanup.sh b/scripts_debian/09_cleanup.sh index 215024d..b99ae43 100755 --- a/scripts_debian/09_cleanup.sh +++ b/scripts_debian/09_cleanup.sh @@ -27,9 +27,6 @@ rm -rf "${INSTALLDIR}/var/cache/apt/archives/*" rm -f "${INSTALLDIR}/etc/apt/sources.list.d/qubes-builder.list" rm -f "${INSTALLDIR}/etc/apt/trusted.gpg.d/qubes-builder.gpg" -# XXX: Whats this for? -rm -rf buildchroot - # ------------------------------------------------------------------------------ # Execute any template flavor or sub flavor 'post' scripts # ------------------------------------------------------------------------------ diff --git a/scripts_debian/vars.sh b/scripts_debian/vars.sh index bcceee8..7c34bde 100755 --- a/scripts_debian/vars.sh +++ b/scripts_debian/vars.sh @@ -11,18 +11,8 @@ DEBIANVERSION=${DIST} # Location to grab debian packages +DEBIAN_MIRROR=http://ftp.us.debian.org/debian/ #DEBIAN_MIRROR=http://http.debian.net/debian -DEBIAN_MIRROR=http://ftp.ca.debian.org/debian/ -#DEBIAN_MIRROR=http://ftp.us.debian.org/debian/ +#DEBIAN_MIRROR=http://ftp.ca.debian.org/debian/ -# XXX: Is this even used? -EXTRAPKGS="openssh-clients,screen,vim-nox,less" - -# XXX: Is this even used? -QUBESDEBIANGIT="http://dsg.is/qubes/" - -# XXX: Is this even used? -# make runs the scripts with sudo -E, so HOME is set to /home/user during -# build, which does not exist. We need to write to ${HOME}/.gnupg so set it -# to something valid. -HOME=/root +APT_GET_OPTIONS="-o Dpkg::Options::="--force-confnew" --force-yes -y"