Le jeudi 9 janvier 2025 à 13:17:57 UTC+1, srinuv...@siemens.com a écrit :
From: srinuvasan <srinuv...@siemens.com>

reduce the rootfs image size by excluding man and doc, this
changes significantly reduce size from (~80MB) to (~64MB).

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
index 931f6f13..1e2ad40f 100644
--- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
+++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
@@ -24,6 +24,14 @@ DPKG_HOOKS ?= "${@'--hook-dir='+d.getVar('MM_HOOK_JESSIE') \
MMHOOKS:focal ?= "${DPKG_HOOKS}"
MMHOOKS:buster ?= "${DPKG_HOOKS}"

+CLEANUP_DOCS = "--dpkgopt='path-exclude=/usr/share/man/*' \
+ --dpkgopt='path-include=/usr/share/man/man[1-9]/*' \
+ --dpkgopt='path-exclude=/usr/share/locale/*' \
+ --dpkgopt='path-include=/usr/share/locale/locale.alias' \
+ --dpkgopt='path-exclude=/usr/share/doc/*' \
+ --dpkgopt='path-include=/usr/share/doc/*/copyright' \
+ --dpkgopt='path-include=/usr/share/doc/*/changelog.Debian.*'"
+

Not.a good idea IMO - some users may want to build images with man pages / documentation
At best this could be an image extension. It could take informed decisions: if /usr/bin/man isn’t there then remove man pages. Users should be able to enable/disable that customisation

DISTRO_BOOTSTRAP_KEYRING = "${WORKDIR}/distro-keyring.gpg"

def get_distro_have_https_source(d):
@@ -199,6 +207,7 @@ do_bootstrap() {
--customize-hook='sed -i "/en_US.UTF-8 UTF-8/s/^#//g" "$1/etc/locale.gen"' \
--customize-hook='chroot "$1" /usr/sbin/locale-gen' \
--customize-hook='chroot "$1" /usr/bin/apt-get -y clean' \
+ ${CLEANUP_DOCS} \
--skip=cleanup/apt \
--skip=download/empty \
${@get_apt_opts(d, '--aptopt')} \
--
2.39.5

--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/0e5c17be-55f1-4646-b44b-a10ded2b745bn%40googlegroups.com.