realmfs-builder: optimize realm build size by removing docs/locales during pkg install
This commit is contained in:
parent
1bbbe3ebbc
commit
5d65a136d0
@ -4,9 +4,9 @@
|
||||
|
||||
BASE_PACKAGES="iproute2 less xz-utils sudo dbus libpam-systemd openssh-client packagekit-gtk3-module libcanberra-gtk3-module libpulse0 fonts-roboto-hinted bash-completion"
|
||||
|
||||
BASE_PRE_INSTALL_MODULES="utility-library configure-locale create-user set-hostname no-install-recommends write-apt-sources"
|
||||
BASE_PRE_INSTALL_MODULES="utility-library configure-locale create-user set-hostname no-install-recommends write-dpkg-cfg-nodocs write-apt-preferences write-apt-sources"
|
||||
|
||||
BASE_POST_INSTALL_MODULES="loginctl-enable-linger configure-systemd install-configure-host0 install-launch-script setup-theme-symlinks apt-cacher-ng add-xsettings-schema"
|
||||
BASE_POST_INSTALL_MODULES="loginctl-enable-linger configure-systemd install-configure-host0 install-launch-script setup-theme-symlinks apt-cacher-ng add-xsettings-schema delete-dpkg-cfg-nodocs"
|
||||
|
||||
trap "exit 1" TERM
|
||||
export TOP_PID=$$
|
||||
|
4
realmfs-builder/realmfs-modules/delete-dpkg-cfg-nodocs
Normal file
4
realmfs-builder/realmfs-modules/delete-dpkg-cfg-nodocs
Normal file
@ -0,0 +1,4 @@
|
||||
# 01_nodocs is deleted post install so that users are able to install docs in the realm after the build
|
||||
info "Deleting /etc/dpkg/dpkg.cfg.d/01_nodocs"
|
||||
|
||||
rm /etc/dpkg/dpkg.cfg.d/01_nodocs
|
26
realmfs-builder/realmfs-modules/write-apt-preferences
Normal file
26
realmfs-builder/realmfs-modules/write-apt-preferences
Normal file
@ -0,0 +1,26 @@
|
||||
info "Writing /etc/apt/preferences"
|
||||
|
||||
{
|
||||
echo 'Package: *'
|
||||
echo 'Pin: release a=stable'
|
||||
echo 'Pin-Priority: 1000'
|
||||
|
||||
echo 'Package: *'
|
||||
echo 'Pin: release a=unstable'
|
||||
echo 'Pin-Priority: 2'
|
||||
echo 'Package: firefox'
|
||||
echo 'Pin: release a=unstable'
|
||||
echo 'Pin-Priority: 1001'
|
||||
|
||||
echo 'Package: libfontconfig1'
|
||||
echo 'Pin: release a=unstable'
|
||||
echo 'Pin-Priority: 1001'
|
||||
|
||||
echo 'Package: fontconfig-config'
|
||||
echo 'Pin: release a=unstable'
|
||||
echo 'Pin-Priority: 1001'
|
||||
|
||||
echo 'Package: libnss3'
|
||||
echo 'Pin: release a=unstable'
|
||||
echo 'Pin-Priority: 1001'
|
||||
} > /etc/apt/preferences
|
10
realmfs-builder/realmfs-modules/write-dpkg-cfg-nodocs
Normal file
10
realmfs-builder/realmfs-modules/write-dpkg-cfg-nodocs
Normal file
@ -0,0 +1,10 @@
|
||||
# This will prevent installation of docs/locales, it will be reverse in the post-install stage to let users install docs/locales in their realms
|
||||
info "Writing /etc/dpkg/dpkg.cfg.d/01_nodocs"
|
||||
|
||||
{
|
||||
echo 'path-exclude=/usr/share/locale/*'
|
||||
echo 'path-exclude=/usr/share/man/*'
|
||||
echo 'path-exclude=/usr/share/doc/*'
|
||||
echo 'path-include=/usr/share/doc/*/copyright'
|
||||
|
||||
} > /etc/dpkg/dpkg.cfg.d/01_nodocs
|
Loading…
Reference in New Issue
Block a user