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 10:08:20 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f61.google.com (mail-wr1-f61.google.com [209.85.221.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52C98Jk8019897 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Mar 2025 10:08:19 +0100 Received: by mail-wr1-f61.google.com with SMTP id ffacd0b85a97d-39130f02631sf2525729f8f.2 for ; Wed, 12 Mar 2025 02:08:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1741770494; cv=pass; d=google.com; s=arc-20240605; b=e8YYDKZ2EZV1Os4naIx3SNoAmmU1PQIctT5AyMa5ajxUUYE19fh3K8XVruZGxrIgXe I7nZFRybwhXDlO4NMYsw5WYKI6sf2TFnoMD/M1EAij+STYvxCHo4Tn0p0H9aIHJMzTbD kjTopzJYs8f3fSXuJL9RM+5Gz9tqFGbpJY3sCM+stCQ22pHAhT2oK1wVud/nbj3zIHAx 0mS4IBxZQfZVKnrTkxDpvL1J90M0CrvFO2kkBfhUjw0oaNx+gZRLKGvS+LRMpc5Jmya7 LOF0Ev7KJ8rRJF2p6m7y+o12j21wylC8OK7mlljnc+vuy/R0ovMMQVeEoll//TwcoYlC H9Aw== 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=iVcEB69bENiYYIVomfdl68XM+JnHKAA1sm6N4vGYCV0=; fh=VDkbHccAqpGDUKDjhCBZzfDSVSqRH2Dr9behsiM+QF8=; b=d2Z/46j1zeXSLLxG+ANRDonmAJjy8zPa1A9Fha3N1HKfQmN09TPB7Yl9JQ4avddqtm usoSi1D+075J6gAtsgswEsWQv9Ib/TnjVwtQIgK58/AXiMCmoNh+PfxCkv/h6rXSYJjq DLOPl5Ln0DMgZHUY7ckKOOR0h90qOnPfjY7DQZVxVrkC/5H5ds1YSwtu9t+wMZRd1fm7 hJ2Tr5L4eDmy/ermyZDOpf2q/QLOPKpmJik9gxwOWOdmwsSyegCqPujcDIz4Oxyj1A6h eZoZSUd0+JTcWNHNwJIvp02kazRdxdZqHNn81FMSBf51aTVGbwHSwDYRjqc8r1TLcl25 e3Gw==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=gKUEKkaj; spf=pass (google.com: domain of fm-1328757-20250312090810d566a21fa6777804c2-xodthk@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1328757-20250312090810d566a21fa6777804c2-XODtHk@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=1741770494; x=1742375294; 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=iVcEB69bENiYYIVomfdl68XM+JnHKAA1sm6N4vGYCV0=; b=r2MPkliNfZy66DyZUrHITDp9dTamUJjmI6XbweSUjwrDQ7nx+BoYf3GHeKZAEXNH37 ed4KM7fEpeotW720GfpR5hhoJTOTRlVLmXM6XvJPRw6KP3PMr1EsQJY4I+hxxVx1Ben5 qBBV08Y8EL6HxO/a8C7tSVVhYphXIGxMV2VwM6J8GwWEc8F1XhVqTVmrNgjCwbJJSJd7 p0zoqhX9+eyVGLmrTiPCSHMi7Y/osabdgq0s4vT5CXmJpLvS9Bs+Z9Ny1cWROBJ3rR66 OgmoiCJmhUqmW9tat58LXbvbT5PzdLygWrKmQ+tZ7q78SY1nbSHp0QRP4Hub4Dj7Xd+O TCJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741770494; x=1742375294; 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=iVcEB69bENiYYIVomfdl68XM+JnHKAA1sm6N4vGYCV0=; b=w/TPtvqyndPHob1GIVzYMFYTYou/ULR5dyfCWTVVZOdAg72o4uzu841Dd5b6JPj7d2 s0MBACxxfiECgCE0e0+fF6QL1kvkt9cugNzUEci2yDZvzNohjf8pXPgJ8Z76JPWVFrq8 sG97vUz0lPL4wEknl5IzDG20GJ7oyX12o4CXmGABQVogkB1Nw4aZPuwZum1NQVPCKWG2 sDGIujy6hKq+SmFtb/fd5UG+Qt65KTw5Vbsjk4J4IVP7v+4emM4NhFo93O/eKXZ1s9cG 636n5YWdMaI78xm5FGsNKbbsOGKnohP1NaLRKVvRHtDEJGdtjF7BmDqN+osa+WerXNdR K/Wg== X-Forwarded-Encrypted: i=2; AJvYcCVDvq/MA4XYeGj4aLlupQk9+yPipgYvkHdQFwTlFfc8RMcLbYYHCq2QxIG1rXOXWNCHAANi@ilbers.de X-Gm-Message-State: AOJu0YyTct7WZVepMIQhbOyVNc4bW9dNE8uInFz6oszi7TfDVUtKxFcI XvtW2NqlyoOpNTRyZeM322lVOGCxS6jP6egowbcJw1GXhh06jLS6 X-Google-Smtp-Source: AGHT+IGDlTnxYbZzjbaAk73akhxVwWDFd+jcqnyIlnEzAaJzFhYR0m2n4J9unBAtLvaShqeIF5/+iw== X-Received: by 2002:a05:6000:1f83:b0:390:f9d0:5e3 with SMTP id ffacd0b85a97d-39263affd7amr6594285f8f.1.1741770493362; Wed, 12 Mar 2025 02:08:13 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=Adn5yVGAJ8De7ly74d4It6Hl3KehKZTHM4W6Cc1frfyJk41tUw== Received: by 2002:a5d:59ae:0:b0:38d:ca0d:d5f9 with SMTP id ffacd0b85a97d-3912967efb9ls3672165f8f.1.-pod-prod-01-eu; Wed, 12 Mar 2025 02:08:11 -0700 (PDT) X-Received: by 2002:a05:6000:4102:b0:390:df02:47f0 with SMTP id ffacd0b85a97d-3926c1ce305mr6448146f8f.42.1741770491149; Wed, 12 Mar 2025 02:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741770491; cv=none; d=google.com; s=arc-20240605; b=BUsFGHSH7IJH9WOTqw8BBPvAsViZFIzK1c+1k8KQnf27GDnm4DclAjBRHotEALE7yF j5P8AlZsMIjp+36Jz+dH4TYTmard2sR/PT3qczm4LS9XpdtIPFgvPswW8PDx3lND+/5Z qgC93IZtnrndJbCWzGtGfkmCWdsETSrQbpfbTIJSDtOlKf1HEotrPHBW88BGGzvikjsJ WJTI1weesgs97ignzSjAwNWheHNEa7+S2LjfdzUMppa+ybjG4/BxfFBZbg3tjwgU/BXX Y5chqlDCvztI9ta+TdHF0YDxzKjxk0pXiqbeudC0/j4MspPzd7686sFVbNjAqRzmKhaz Ckug== 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=lKZRR96VarVGjEaAcejRB2rGIIDEJKSwV8iN/Vp6w0U=; fh=pR4tJPO4NbHlIB/rP4bIo54Z1zh5hd/ksAGQ0tcKkYM=; b=fSecqNAByv+XGH8cGq+5FMzQjO18vl0U8FxIgp/xf8aC9+E0h9PFUEOmAkC08W37Qx BDE5cj/ttVMFuSsUIPlcPEqSMYSCG3ONYvvioHjU1EippnhGwW+eAt+4k2d4mL1zDINR uvgFcPglYv09Qin9RXhV1wwXIM4Hulp3wuZUsloR4O/Y77mpNbo58lhGDWDXkt7ZmByO kN7cg2GIeGfmaEKrQFJ6IgFyegLVuNCqGLrtMQSaxl3jYxz7OHm8k1JSJE8MyY87icFL Tb0yQHieSPXEOWd9gs+W/TOZ1XNEUrFpeoAef0LgJCb14LXD5AydZlz0Dat/XtXFM5ob r9lA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=gKUEKkaj; spf=pass (google.com: domain of fm-1328757-20250312090810d566a21fa6777804c2-xodthk@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1328757-20250312090810d566a21fa6777804c2-XODtHk@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-3912c081348si110527f8f.4.2025.03.12.02.08.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Mar 2025 02:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1328757-20250312090810d566a21fa6777804c2-xodthk@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 20250312090810d566a21fa6777804c2 for ; Wed, 12 Mar 2025 10:08:10 +0100 From: "'Kasturi Shekar' via isar-users" To: isar-users@googlegroups.com Cc: Kasturi Shekar Subject: [PATCH v3] bmap-tools: Fix --psplash functionality with bmap-tools 3.6 (bookworm) Date: Wed, 12 Mar 2025 14:37:53 +0530 Message-Id: <20250312090753.566643-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=gKUEKkaj; spf=pass (google.com: domain of fm-1328757-20250312090810d566a21fa6777804c2-xodthk@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1328757-20250312090810d566a21fa6777804c2-XODtHk@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=-4.9 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_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: 8cW9Uc6yJQt+ - 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. Debian is not going to fix it in bookworm, Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034290 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100092 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/20250312090753.566643-1-kasturi.shekar%40siemens.com.