From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 12 Mar 2025 07:50:55 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f56.google.com (mail-wr1-f56.google.com [209.85.221.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52C6otER019223 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Mar 2025 07:50:55 +0100 Received: by mail-wr1-f56.google.com with SMTP id ffacd0b85a97d-39131f2bbe5sf2289885f8f.3 for ; Tue, 11 Mar 2025 23:50:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1741762250; cv=pass; d=google.com; s=arc-20240605; b=Aj0tOej5HeXuaPd5SIUd921yUqsZgzB2lHxiHc2WiC0Xn76TWnYc3iGozBMPwXM58b 8XEguKX5B4JPCsxUnG7eisIRJNZ8YEdUus3wyhmbIIHeCbMOqAsZRrxQNqMNve4KNoRg Ni8NBx+3KYA7ZryfSVF5h5hnrPkXbp/adC08QUsnGcHKYhAS7DezCt0ce6tCdQ3E0zwL nApNqC9y8704jPb2HKAIE8t73aaNVxi2XRxw6H9DeqeXRN0RuQcyrmzB7MdDMk3QLuxp nFB8X6HjtI3lZniMJK7YG9e2RU8JN/EER2DJMHwnl/SsaPpqDpHLoJcmEkppdgq/r0o/ aoZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qZR5Qec/9PrRt1O37wSc/HXivQUmFuT8GnICya8jz6g=; fh=A280r4ZtvuYTSjNrj2fEQ4tFEulZ6gvmze+oAfXMGgU=; b=NvsMLA8TRjzgctNLkoXa4rXZfmxYqztGlIbPGz2hK07pd5EJ8tNqEGy7woR/wL83hb fhXH8r0Y9kYnYePIESEXywWx7t0EE8yn25vwxUhTlcuSqZv851gokH2YJIlnxGKUgJ1L KDyunLiWl+X7g5HND9zPRlBPNap04it9zySeafsxTXTtThcbfGegn3sgWMxZqFno13VA EOCC556pxClW5Oh9RzdeGm4u1/IZlechffooSSty+KsOvtOrA8ChlOGfoWKXk0CtbNwM 0DR8VNZVMyGb4/bDf4q5OYSzXTEl3xr6cTIo+/RZHULSnW9wcJWauLL1q1VrbH8PSxWD Aqfg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=BU0Jsi9b; spf=pass (google.com: domain of fm-1328757-202503120650461db968238fb7440cc2-qjlrrk@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1328757-202503120650461db968238fb7440cc2-QJLRrk@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1741762250; x=1742367050; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=qZR5Qec/9PrRt1O37wSc/HXivQUmFuT8GnICya8jz6g=; b=s0kscA2verZCNzDsrYwxNYI2ojcfiVfumJgT0XajC/vhXYS/N8LhT4cYSdObFvMse+ oHEmJ3AbcsBi/EztqIlZocz7lu4L51cEx+UmsDO2rYeGGvA107RuAXzMjwoMQfgD4DT9 YvOrShQBx0+uD88ZXvZ9Zh27SKsI97aiqZdmeGikK7NUk8FOC901dvHjJXq6dQj4Bx8o DRtOMwC7d6UqHI2yFXWNp93UscXlsLq4J8jpzhFrS7P5IuKk1zkO6R5icRuniowCwzcM 8VJX3FseZHXbmA4zIXKPO+VtF0Wx6SD1o91bh/LTrFMpWpxrUWrV0agzModzgqmnyf80 hSOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741762250; x=1742367050; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qZR5Qec/9PrRt1O37wSc/HXivQUmFuT8GnICya8jz6g=; b=kgcJEBbq/0a4A8W71UmgQwa4g8TtIuYrDkCZWSeUQdF8F9LbBrWx035StuxvWv1tBX IE7ICmxusbb/T8x6ImMophLqgmVaFozs7e3HS+WiOsZsHbt0P7z6YZGQP1tfUjlPWgnE OdtXqfktUZxaauspBulMZdJ873kn1ivq58R4SNE1gXMKYnVK8ogzJJ3iQdWLhFrRup2u 2mqQpVHIDolUV6LpkdWhHVPZquCsLibnkRVfEVdz8Nb18ghWjE0k25VdrJSRqwpTGRGK gZkWbhSUDWNqkKlvWm4a2PAsimtEqi9Iv8sfnY1BWXb66H2FqDyX1cOcpZLpPqd1/VF3 2txw== X-Forwarded-Encrypted: i=2; AJvYcCU20Yr+N/UnbU7K9qwLVO69AIfVDvcIjUMu5BE3rfUBeCrFpZxfBN2zlbIcX4e//oyKTk75@ilbers.de X-Gm-Message-State: AOJu0YzI8zabvERoxvrpW/Wxo4PZY6/4tzyB1cGW4YaQWb/Lzt1qFY3C 4r8xfp/26kIG9gHZrfldHHak4ykQ9rc2GZy42t1BFBNotOeGJykq X-Google-Smtp-Source: AGHT+IEUkOvJ2i/OsonG15W7SjrnI9jmvK5d4bzbCB6nI9PEM/8JxT2OSGewkfJ/QrviEffIduh4Yg== X-Received: by 2002:adf:cc0f:0:b0:391:2e97:5788 with SMTP id ffacd0b85a97d-39132db5bfdmr10741561f8f.55.1741762249068; Tue, 11 Mar 2025 23:50:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=Adn5yVGR3JSYAv1U0F+kVfBVJ1WRol6MjooWaYeUtRpd2OzAGg== Received: by 2002:a5d:59ae:0:b0:38f:2204:701a with SMTP id ffacd0b85a97d-39129603ce7ls3412608f8f.2.-pod-prod-08-eu; Tue, 11 Mar 2025 23:50:47 -0700 (PDT) X-Received: by 2002:a5d:47a7:0:b0:391:29f:4f87 with SMTP id ffacd0b85a97d-39132da905cmr14004380f8f.49.1741762246818; Tue, 11 Mar 2025 23:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741762246; cv=none; d=google.com; s=arc-20240605; b=FUqdGN3GMLP7IZFthi8YsLlTBVWZ/+INJiTv32dNfnSH6bCHXw586n6vWHJvYZP9P1 HiInfYJGiV2huWo+ZGZu4DFBf8fo5CsvYTeVXjB+LldWdB02r70JIotWYQyUUDQHxqiC n8j0WDtle4vFRdFMXE6lXoF9H+rqsRD2OkflmbQL/v6+zqtAq+ou15lo6hRU7FIp8Uii EAhND/nA+YWW+4embQU1FgK4C/jWpSnA8ThJXg6AXf9NsYuTARNjy3GPGJsgBsS1BHJy s++RTXAWyDRk5Hk0xYRHUwLDK/mEheBCHPbtzIPLtDLs52wmRypdL8HyA1O9uW/bGIzH 7E0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=FrjGDRQxj87cjtbAztBtPJqCTw41mOCv2HakXpieaqQ=; fh=pR4tJPO4NbHlIB/rP4bIo54Z1zh5hd/ksAGQ0tcKkYM=; b=eM536jgwjs6OOLPNFdYviniXUmf/IdA8GZ0WtfEro1bfp2myT1702qEmt+/W/hOB+B fLTi0RplMkrLF3e3jbhtd1n6IuaT7TwSUSFxAwIHE6bwCauo0wdLEcqWdrdvEOJuywTU qEMIJGYgHW/ik+89O1ePNUH4GW+ap1+tB9ChnW5RbpY8S4OLzIyZe24uZVVQ/9h+mP9G GgoZFTez8girfZvItFbR+UulzjO+d6Rj7QOHgJlRvbx6duLX2bVbQ4u3wKSzVWC7P7M4 WYzRg0Pw4ihzODsz+lQosKqZBm41656vww3/CmFpcX7Hc420SaMRiwR9BEPmFoPtlpET aE9w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=BU0Jsi9b; spf=pass (google.com: domain of fm-1328757-202503120650461db968238fb7440cc2-qjlrrk@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1328757-202503120650461db968238fb7440cc2-QJLRrk@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-43d03e24477si2550005e9.1.2025.03.11.23.50.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Mar 2025 23:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1328757-202503120650461db968238fb7440cc2-qjlrrk@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 202503120650461db968238fb7440cc2 for ; Wed, 12 Mar 2025 07:50:46 +0100 From: "'Kasturi Shekar' via isar-users" To: isar-users@googlegroups.com Cc: Kasturi Shekar Subject: [PATCH v2] bmap-tools: Fix --psplash functionality with bmap-tools 3.6 (bookworm) Date: Wed, 12 Mar 2025 12:20:27 +0530 Message-Id: <20250312065027.566489-1-kasturi.shekar@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1328757:519-21489:flowmailer X-Original-Sender: kasturi.shekar@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=BU0Jsi9b; spf=pass (google.com: domain of fm-1328757-202503120650461db968238fb7440cc2-qjlrrk@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1328757-202503120650461db968238fb7440cc2-QJLRrk@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Kasturi Shekar Reply-To: Kasturi Shekar Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_PSBL, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 7XOf9vf4AS0H - Fixed the issue where the --psplash-pipe flag was not working in bmap-tools version 3.6 (Bookworm). - Added a patch to ensure the correct handling of the --psplash-pipe flag and avoid skipping the _psplash_pipe section when _progress_file is null. - With this fix, psplash can now be used with bmap-tools(v3.6) to properly display progress updates. Signed-off-by: Kasturi Shekar --- .../bmap-tools/bmap-tools.bb | 21 +++++ ...er-passing-error-of-set_psplash_pipe.patch | 28 +++++++ ...e-part-was-skipped-when-_progress_fi.patch | 78 +++++++++++++++++++ .../deploy-image/deploy-image_0.1.bb | 1 + 4 files changed, 128 insertions(+) create mode 100644 meta-isar/recipes-installer/bmap-tools/bmap-tools.bb create mode 100644 meta-isar/recipes-installer/bmap-tools/files/0001-Fix-path-parameter-passing-error-of-set_psplash_pipe.patch create mode 100644 meta-isar/recipes-installer/bmap-tools/files/0002-Fix-_psplash_pipe-part-was-skipped-when-_progress_fi.patch diff --git a/meta-isar/recipes-installer/bmap-tools/bmap-tools.bb b/meta-isar/recipes-installer/bmap-tools/bmap-tools.bb new file mode 100644 index 00000000..376ab433 --- /dev/null +++ b/meta-isar/recipes-installer/bmap-tools/bmap-tools.bb @@ -0,0 +1,21 @@ +# This software is a part of ISAR. +# Copyright (c) Siemens AG, 2025 +# +# SPDX-License-Identifier: MIT + +inherit dpkg + +SRC_URI = "apt://${BPN}" +PN = "bmap-tools" +CHANGELOG_V="+isar" + +SRC_URI += "file://0001-Fix-path-parameter-passing-error-of-set_psplash_pipe.patch;apply=no \ + file://0002-Fix-_psplash_pipe-part-was-skipped-when-_progress_fi.patch;apply=no" + +do_prepare_build:append() { + deb_add_changelog + + cd ${S} + quilt import -f ${WORKDIR}/*.patch + quilt push -a +} diff --git a/meta-isar/recipes-installer/bmap-tools/files/0001-Fix-path-parameter-passing-error-of-set_psplash_pipe.patch b/meta-isar/recipes-installer/bmap-tools/files/0001-Fix-path-parameter-passing-error-of-set_psplash_pipe.patch new file mode 100644 index 00000000..a45bcbc4 --- /dev/null +++ b/meta-isar/recipes-installer/bmap-tools/files/0001-Fix-path-parameter-passing-error-of-set_psplash_pipe.patch @@ -0,0 +1,28 @@ +From 06fa51d0270f84d9553c044bd7391f01459a70e8 Mon Sep 17 00:00:00 2001 +From: Jason +Date: Wed, 26 Jan 2022 16:26:47 +0800 +Subject: [PATCH] Fix path parameter passing error of set_psplash_pipe function + +--- + bmaptools/BmapCopy.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py +index c6a2603..dba24a5 100644 +--- a/bmaptools/BmapCopy.py ++++ b/bmaptools/BmapCopy.py +@@ -228,11 +228,11 @@ def set_psplash_pipe(self, path): + a best effort. + """ + +- if os.path.exists(pipe) and stat.S_ISFIFO(os.stat(pipe).st_mode): +- self._psplash_pipe = pipe ++ if os.path.exists(path) and stat.S_ISFIFO(os.stat(path).st_mode): ++ self._psplash_pipe = path + else: + _log.warning("'%s' is not a pipe, so psplash progress will not be " +- "updated" % pipe) ++ "updated" % path) + + def set_progress_indicator(self, file_obj, format_string): + """ diff --git a/meta-isar/recipes-installer/bmap-tools/files/0002-Fix-_psplash_pipe-part-was-skipped-when-_progress_fi.patch b/meta-isar/recipes-installer/bmap-tools/files/0002-Fix-_psplash_pipe-part-was-skipped-when-_progress_fi.patch new file mode 100644 index 00000000..bf17a7d1 --- /dev/null +++ b/meta-isar/recipes-installer/bmap-tools/files/0002-Fix-_psplash_pipe-part-was-skipped-when-_progress_fi.patch @@ -0,0 +1,78 @@ +From 163a49259d025e220e9de4fc2a6296c2c3053500 Mon Sep 17 00:00:00 2001 +From: Jason +Date: Mon, 7 Feb 2022 17:55:16 +0800 +Subject: [PATCH] Fix _psplash_pipe part was skipped when _progress_file is + null + +--- + bmaptools/BmapCopy.py | 56 +++++++++++++++++++++---------------------- + 1 file changed, 27 insertions(+), 29 deletions(-) + +diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py +index dba24a5..ca22aba 100644 +--- a/bmaptools/BmapCopy.py ++++ b/bmaptools/BmapCopy.py +@@ -396,36 +396,34 @@ def _update_progress(self, blocks_written): + else: + _log.debug("wrote %d blocks" % blocks_written) + +- if not self._progress_file: +- return +- +- if self.mapped_cnt: +- progress = '\r' + self._progress_format % percent + '\n' +- else: +- # Do not rotate the wheel too fast +- now = datetime.datetime.now() +- min_delta = datetime.timedelta(milliseconds=250) +- if now - self._progress_time < min_delta: +- return +- self._progress_time = now +- +- progress_wheel = ('-', '\\', '|', '/') +- progress = '\r' + progress_wheel[self._progress_index % 4] + '\n' +- self._progress_index += 1 +- +- # This is a little trick we do in order to make sure that the next +- # message will always start from a new line - we switch to the new +- # line after each progress update and move the cursor up. As an +- # example, this is useful when the copying is interrupted by an +- # exception - the error message will start form new line. +- if self._progress_started: +- # The "move cursor up" escape sequence +- self._progress_file.write('\033[1A') # pylint: disable=W1401 +- else: +- self._progress_started = True ++ if self._progress_file: ++ if self.mapped_cnt: ++ progress = '\r' + self._progress_format % percent + '\n' ++ else: ++ # Do not rotate the wheel too fast ++ now = datetime.datetime.now() ++ min_delta = datetime.timedelta(milliseconds=250) ++ if now - self._progress_time < min_delta: ++ return ++ self._progress_time = now ++ ++ progress_wheel = ('-', '\\', '|', '/') ++ progress = '\r' + progress_wheel[self._progress_index % 4] + '\n' ++ self._progress_index += 1 ++ ++ # This is a little trick we do in order to make sure that the next ++ # message will always start from a new line - we switch to the new ++ # line after each progress update and move the cursor up. As an ++ # example, this is useful when the copying is interrupted by an ++ # exception - the error message will start form new line. ++ if self._progress_started: ++ # The "move cursor up" escape sequence ++ self._progress_file.write('\033[1A') # pylint: disable=W1401 ++ else: ++ self._progress_started = True + +- self._progress_file.write(progress) +- self._progress_file.flush() ++ self._progress_file.write(progress) ++ self._progress_file.flush() + + # Update psplash progress when configured. This is using a best effort + # strategy to not affect the writing process when psplash breaks, is diff --git a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb index 242ca88e..54e521b5 100644 --- a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb +++ b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb @@ -10,6 +10,7 @@ inherit dpkg-raw SRC_URI = "file://usr/bin/deploy-image-wic.sh \ file://usr/lib/deploy-image-wic/handle-config.sh \ " +DEPENDS:bookworm += "bmap-tools" DEBIAN_DEPENDS = "bmap-tools, pv, dialog, util-linux, parted, fdisk, gdisk, pigz, xz-utils, pbzip2, zstd" do_install[cleandirs] = "${D}/usr/bin/ \ ${D}/usr/lib/deploy-image-wic \ -- 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/20250312065027.566489-1-kasturi.shekar%40siemens.com.