From: Cedric Hombourger <chombourger@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] isar-mmdebstrap: reduce rootfs size as much as possible
Date: Thu, 9 Jan 2025 04:41:31 -0800 (PST) [thread overview]
Message-ID: <0e5c17be-55f1-4646-b44b-a10ded2b745bn@googlegroups.com> (raw)
In-Reply-To: <20250109121728.96932-1-srinuvasan.a@siemens.com>
[-- Attachment #1.1: Type: text/plain, Size: 2379 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 3562 bytes --]
next prev parent reply other threads:[~2025-01-09 12:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 12:17 srinuvasan.a via isar-users
2025-01-09 12:41 ` Cedric Hombourger [this message]
2025-01-09 12:58 ` Anton Mikanovich
2025-01-09 13:16 ` Cedric Hombourger
2025-01-09 14:23 ` 'Arjunan, Srinu' via isar-users
2025-01-09 15:20 ` 'Jan Kiszka' via isar-users
2025-01-09 15:27 ` 'Arjunan, Srinu' via isar-users
2025-01-09 15:29 ` 'Jan Kiszka' via isar-users
2025-01-10 6:02 ` 'Arjunan, Srinu' via isar-users
2025-01-10 6:13 ` 'Jan Kiszka' via isar-users
2025-01-10 6:17 ` 'Jan Kiszka' via isar-users
2025-01-10 7:19 ` Anton Mikanovich
2025-01-10 7:24 ` Cedric Hombourger
2025-01-10 8:04 ` 'Jan Kiszka' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e5c17be-55f1-4646-b44b-a10ded2b745bn@googlegroups.com \
--to=chombourger@gmail.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox