diff --git a/realmfs-builder/common.inc b/realmfs-builder/common.inc index 817f1f0..765ee43 100644 --- a/realmfs-builder/common.inc +++ b/realmfs-builder/common.inc @@ -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=$$ diff --git a/realmfs-builder/realmfs-modules/delete-dpkg-cfg-nodocs b/realmfs-builder/realmfs-modules/delete-dpkg-cfg-nodocs new file mode 100644 index 0000000..84ad4f1 --- /dev/null +++ b/realmfs-builder/realmfs-modules/delete-dpkg-cfg-nodocs @@ -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 diff --git a/realmfs-builder/realmfs-modules/write-apt-preferences b/realmfs-builder/realmfs-modules/write-apt-preferences new file mode 100644 index 0000000..e3831dd --- /dev/null +++ b/realmfs-builder/realmfs-modules/write-apt-preferences @@ -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 diff --git a/realmfs-builder/realmfs-modules/write-dpkg-cfg-nodocs b/realmfs-builder/realmfs-modules/write-dpkg-cfg-nodocs new file mode 100644 index 0000000..269931d --- /dev/null +++ b/realmfs-builder/realmfs-modules/write-dpkg-cfg-nodocs @@ -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