Smaller DAB templates without recommends

apmuthu

Renowned Member
Feb 26, 2009
870
11
83
Chennai - India & Singapore
github.com
DAB installs packages by using debconf get selections and then dpkg -i ....
This installs various large sized doc debs. To make a small DAB based template we need the equivalent of
aptitude --without-recommends .... or apt-get --no-install-recommends install .... for certain deb packages that have unnecessary voluminous docs.

What is the DAB equivalent for it short of chrooting with a /etc/resolv.conf and using a bash file with the apt-get commands above?
 
The chroot method below works on DAB for OpenVZ in PVE 3.4 for Debian Jessie (8) 64 bit build:
Code:
    dab install php5-intl php5-imagick
    install -m 0755 aptnorec.sh ${BASEDIR}/aptnorec.sh
    echo "nameserver 8.8.8.8" > ${BASEDIR}/etc/resolv.conf
    /usr/sbin/chroot ${BASEDIR} /aptnorec.sh
    rm -f ${BASEDIR}/etc/resolv.conf
    rm -f ${BASEDIR}/aptnorec.sh
where the aptnorec.sh file used above is in the DAB Build files folder with the following contents:
Code:
#! /bin/bash

apt-get update
# apt-get dist-upgrade
apt-get --no-install-recommends install -y imagemagick htmldoc dvipng texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra texlive-lang-greek texlive-pictures preview-latex-style
apt-get clean all

The downside of this method is that each time the template is built, the binaries will have to be taken from the web again as they will not get downloaded and stored in the build cache folder for the distribution as the normally install debs are.

This is best mitigated with options for the "dab install" command for such purposes in DAB itself.