public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "srinuvasan.a via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, amikan@ilbers.de,
	srinuvasan <srinuvasan.a@siemens.com>
Subject: [PATCH] isar-mmdebstrap: reduce rootfs size as much as possible
Date: Thu,  9 Jan 2025 17:47:28 +0530	[thread overview]
Message-ID: <20250109121728.96932-1-srinuvasan.a@siemens.com> (raw)

From: srinuvasan <srinuvasan.a@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 <srinuvasan.a@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.*'"
+
 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/20250109121728.96932-1-srinuvasan.a%40siemens.com.

             reply	other threads:[~2025-01-09 12:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 12:17 srinuvasan.a via isar-users [this message]
2025-01-09 12:41 ` Cedric Hombourger
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=20250109121728.96932-1-srinuvasan.a@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=amikan@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    --cc=srinuvasan.a@siemens.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