From patchwork Wed Jan 15 10:26:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: auh@yoctoproject.org X-Patchwork-Id: 55575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3828EC0218D for ; Wed, 15 Jan 2025 10:26:08 +0000 (UTC) Received: from a27-191.smtp-out.us-west-2.amazonses.com (a27-191.smtp-out.us-west-2.amazonses.com [54.240.27.191]) by mx.groups.io with SMTP id smtpd.web11.17864.1736936764377756682 for ; Wed, 15 Jan 2025 02:26:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@yoctoproject.org header.s=rnkzp2s7ci3kogmesvov2nwn7wcc2dgx header.b=YMNxAiOP; dkim=pass header.i=@amazonses.com header.s=7v7vs6w47njt4pimodk5mmttbegzsi6n header.b=ke6C+oTD; spf=pass (domain: us-west-2.amazonses.com, ip: 54.240.27.191, mailfrom: 01010194697fb06c-c40a8332-45a1-4792-81cb-cf089de2ed0b-000000@us-west-2.amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=rnkzp2s7ci3kogmesvov2nwn7wcc2dgx; d=yoctoproject.org; t=1736936763; h=Content-Type:MIME-Version:From:To:Cc:Subject:Message-Id:Date; bh=4nXcihqQT7WCC5i54wBy+sNXgrJJpDkUe0NImLZjlkA=; b=YMNxAiOPx0GLFkGFbpbWpk8/7SBBL5PwdZVPJg8Xq/RtOF1b0Pk8zAnGIvXYklgr 87XfTnwWIE0xnF6W27ZkkyEl+TJtCt2gUFklHonY3fUYM0NL0qAi9lDv7jnJrhEdC/N iMcyLDRBIxKadpMWY4/0c2fRwqQOVhji5sgo5cVs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=7v7vs6w47njt4pimodk5mmttbegzsi6n; d=amazonses.com; t=1736936763; h=Content-Type:MIME-Version:From:To:Cc:Subject:Message-Id:Date:Feedback-ID; bh=4nXcihqQT7WCC5i54wBy+sNXgrJJpDkUe0NImLZjlkA=; b=ke6C+oTDq8HmL8ZXS2l/Obe0nLOQRRf3GMPWxLJQxazLQN3mWk/MLSyRBFLQZTB6 LMJrVz/C5DUO8c1dwKhMyRteAuknLiMJaBGJGpgohIFAvrc91hFKOPU/+BE2gbhpa70 KHnKn5nF8unKG2xEiaJioB/7jDIcyjodagm2ktKU= MIME-Version: 1.0 From: auh@yoctoproject.org To: Chen Qi , Chen Qi Cc: openembedded-core@lists.openembedded.org Subject: [AUH] util-linux-libuuid,util-linux: upgrading to 2.40.4,2.40.4 FAILED Message-ID: <01010194697fb06c-c40a8332-45a1-4792-81cb-cf089de2ed0b-000000@us-west-2.amazonses.com> Date: Wed, 15 Jan 2025 10:26:03 +0000 Feedback-ID: ::1.us-west-2.9np3MYPs3fEaOBysGKSlUD4KtcmPijcmS9Az2Hwf7iQ=:AmazonSES X-SES-Outgoing: 2025.01.15-54.240.27.191 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 15 Jan 2025 10:26:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209831 Hello, this email is a notification from the Auto Upgrade Helper that the automatic attempt to upgrade the recipe(s) *util-linux-libuuid,util-linux* to *2.40.4,2.40.4* has Failed(do_compile). Detailed error information: do_compile failed Next steps: - apply the patch: git am 0001-util-linux-libuuid-util-linux-upgrade-2.40.2-2.40.4-.patch - check the changes to upstream patches and summarize them in the commit message, - compile an image that contains the package - perform some basic sanity tests - amend the patch and sign it off: git commit -s --reset-author --amend - send it to the appropriate mailing list Alternatively, if you believe the recipe should not be upgraded at this time, you can fill RECIPE_NO_UPDATE_REASON in respective recipe file so that automatic upgrades would no longer be attempted. Please review the attached files for further information and build/update failures. Any problem please file a bug at https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Automated%20Update%20Handler Regards, The Upgrade Helper -- >8 -- From 7339f7ad49751ea3dbd7139818075938986395d8 Mon Sep 17 00:00:00 2001 From: Upgrade Helper Date: Wed, 15 Jan 2025 05:19:00 +0000 Subject: [PATCH] util-linux-libuuid,util-linux: upgrade 2.40.2 -> 2.40.4,2.40.2 -> 2.40.4 --- ...2.40.2.bb => util-linux-libuuid_2.40.4.bb} | 0 meta/recipes-core/util-linux/util-linux.inc | 4 +- ...x-securedir-and-pam_lastlog2-install.patch | 82 -------- ...dd-sector-size-commanand-line-option.patch | 83 ++++++++ .../util-linux/avoid_parallel_tests.patch | 4 +- .../util-linux/configure-sbindir.patch | 4 +- .../display_testname_for_subtest.patch | 2 +- ...-and-sfdisk-sector-size-improvements.patch | 178 ++---------------- .../util-linux/util-linux/ptest.patch | 6 +- ...l-linux_2.40.2.bb => util-linux_2.40.4.bb} | 0 10 files changed, 105 insertions(+), 258 deletions(-) rename meta/recipes-core/util-linux/{util-linux-libuuid_2.40.2.bb => util-linux-libuuid_2.40.4.bb} (100%) delete mode 100644 meta/recipes-core/util-linux/util-linux/0001-autotools-fix-securedir-and-pam_lastlog2-install.patch create mode 100644 meta/recipes-core/util-linux/util-linux/0005-cfdisk-add-sector-size-commanand-line-option.patch rename meta/recipes-core/util-linux/{util-linux_2.40.2.bb => util-linux_2.40.4.bb} (100%) diff --git a/meta/recipes-core/util-linux/util-linux-libuuid_2.40.2.bb b/meta/recipes-core/util-linux/util-linux-libuuid_2.40.4.bb similarity index 100% rename from meta/recipes-core/util-linux/util-linux-libuuid_2.40.2.bb rename to meta/recipes-core/util-linux/util-linux-libuuid_2.40.4.bb diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 1dc30c0535..c8591270ea 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -38,8 +38,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ file://fcntl-lock.c \ - file://0001-autotools-fix-securedir-and-pam_lastlog2-install.patch \ file://libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch \ + file://0005-cfdisk-add-sector-size-commanand-line-option.patch \ " -SRC_URI[sha256sum] = "d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3" +SRC_URI[sha256sum] = "5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79" diff --git a/meta/recipes-core/util-linux/util-linux/0001-autotools-fix-securedir-and-pam_lastlog2-install.patch b/meta/recipes-core/util-linux/util-linux/0001-autotools-fix-securedir-and-pam_lastlog2-install.patch deleted file mode 100644 index 272e574a77..0000000000 --- a/meta/recipes-core/util-linux/util-linux/0001-autotools-fix-securedir-and-pam_lastlog2-install.patch +++ /dev/null @@ -1,82 +0,0 @@ -From f912fb1bbb0ff5af2736d154347a3b9fc40476eb Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 27 Aug 2024 12:00:21 +0200 -Subject: [PATCH] autotools: fix securedir and pam_lastlog2 install - -Addresses: https://github.com/util-linux/util-linux/pull/3173 -Signed-off-by: Karel Zak - -Upstream-Status: Backport -[https://github.com/util-linux/util-linux/commit/9c787eaac43f5f01146f792b0239f587e4b81202] - -Signed-off-by: Yi Zhao ---- - Makefile.am | 6 +++--- - configure.ac | 6 +++--- - pam_lastlog2/src/Makemodule.am | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index ee2d553..a5dcaea 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -56,7 +56,7 @@ usrsbin_exec_PROGRAMS = - man_MANS = - pkgconfig_DATA = - usrlib_exec_LTLIBRARIES = --usrsecurelib_exec_LTLIBRARIES = -+securelib_exec_LTLIBRARIES = - bin_PROGRAMS = - sbin_PROGRAMS = - dist_usrbin_exec_SCRIPTS = -@@ -155,11 +155,11 @@ EXTRA_DIST += \ - # pylibmountexec module must be installed after usrlib_exec libraries, - # otherwise the libtool relink step will fail to find libmount.la and - # will try -lmount which is possibly not available. --# The same for usrsecurelib_exec and liblastlog2.la -+# The same for securelib_exec and liblastlog2.la - # - # So introduce this dependency rule: - # install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES --# install-usrsecurelib_execLTLIBRARIES: install-usrlib_execLTLIBRARIES -+# install-securelib_execLTLIBRARIES: install-usrlib_execLTLIBRARIES - @verbatim_extra_dependency@ - - # -diff --git a/configure.ac b/configure.ac -index 0375d29..134cf38 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -123,8 +123,8 @@ AS_CASE([$libdir], - ) - AC_SUBST([usrlib_execdir]) - --usrsecurelib_execdir='${usrlib_execdir}/security' --AC_SUBST([usrsecurelib_execdir]) -+securelib_execdir='${libdir}/security' -+AC_SUBST([securelib_execdir]) - - # static configuration maintaned by packages (e.g. /usr/lib) - AC_ARG_VAR([SYSCONFSTATICDIR], -@@ -2767,7 +2767,7 @@ verbatim_extra_dependency=' - # otherwise the libtool relink step will fail to find libmount.la and - # will try -lmount which is possibly not available. - install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES --install-usrsecurelib_execLTLIBRARIES: install-usrlib_execLTLIBRARIES -+install-securelib_execLTLIBRARIES: install-usrlib_execLTLIBRARIES - - ' - AC_SUBST([verbatim_extra_dependency]) -diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am -index 6d23653..a2becac 100644 ---- a/pam_lastlog2/src/Makemodule.am -+++ b/pam_lastlog2/src/Makemodule.am -@@ -1,4 +1,4 @@ --usrsecurelib_exec_LTLIBRARIES += pam_lastlog2.la -+securelib_exec_LTLIBRARIES += pam_lastlog2.la - - pam_lastlog2_la_SOURCES = \ - pam_lastlog2/src/pam_lastlog2.c --- -2.25.1 - diff --git a/meta/recipes-core/util-linux/util-linux/0005-cfdisk-add-sector-size-commanand-line-option.patch b/meta/recipes-core/util-linux/util-linux/0005-cfdisk-add-sector-size-commanand-line-option.patch new file mode 100644 index 0000000000..13187a85db --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0005-cfdisk-add-sector-size-commanand-line-option.patch @@ -0,0 +1,83 @@ +From 5e814bebf8d6ba39fcd2ef6ca63c197b6f6ac83e Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 14 Oct 2024 15:48:46 +0200 +Subject: [PATCH] cfdisk: add --sector-size commanand line option + +* improves compatibility with fdisk +* add ability to work with disk images where libfdisk defaults to 512 + +Signed-off-by: Karel Zak +--- + disk-utils/cfdisk.8.adoc | 3 +++ + disk-utils/cfdisk.c | 15 ++++++++++++++- + 2 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/disk-utils/cfdisk.8.adoc b/disk-utils/cfdisk.8.adoc +index 97fad62..759f39f 100644 +--- a/disk-utils/cfdisk.8.adoc ++++ b/disk-utils/cfdisk.8.adoc +@@ -55,6 +55,9 @@ Use exclusive BSD lock for device or file it operates. The optional argument _mo + *-r*, *--read-only*:: + Forced open in read-only mode. + ++*-b*, *--sector-size* _sectorsize_:: ++Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096. The kernel is aware of the sector size for regular block devices. Use this option only on very old kernels, when working with disk images, or to override the kernel's default sector size. Since util-linux-2.17, *fdisk* distinguishes between logical and physical sector size. This option changes both sector sizes to the specified _sectorsize_. ++ + *-z*, *--zero*:: + Start with an in-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an *sfdisk*(8)-compatible script. + +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c +index 183b767..f37e2d7 100644 +--- a/disk-utils/cfdisk.c ++++ b/disk-utils/cfdisk.c +@@ -2739,6 +2739,8 @@ static void __attribute__((__noreturn__)) usage(void) + _(" --lock[=] use exclusive device lock (%s, %s or %s)\n"), "yes", "no", "nonblock"); + fputs(_(" -r, --read-only forced open cfdisk in read-only mode\n"), out); + ++ fputs(_(" -b, --sector-size physical and logical sector size\n"), out); ++ + fputs(USAGE_SEPARATOR, out); + fprintf(out, USAGE_HELP_OPTIONS(26)); + +@@ -2751,6 +2753,7 @@ int main(int argc, char *argv[]) + const char *diskpath = NULL, *lockmode = NULL; + int rc, c, colormode = UL_COLORMODE_UNDEF; + int read_only = 0; ++ size_t user_ss = 0; + struct cfdisk _cf = { .lines_idx = 0 }, + *cf = &_cf; + enum { +@@ -2760,6 +2763,7 @@ int main(int argc, char *argv[]) + { "color", optional_argument, NULL, 'L' }, + { "lock", optional_argument, NULL, OPT_LOCK }, + { "help", no_argument, NULL, 'h' }, ++ { "sector-size", required_argument, NULL, 'b' }, + { "version", no_argument, NULL, 'V' }, + { "zero", no_argument, NULL, 'z' }, + { "read-only", no_argument, NULL, 'r' }, +@@ -2771,8 +2775,15 @@ int main(int argc, char *argv[]) + textdomain(PACKAGE); + close_stdout_atexit(); + +- while((c = getopt_long(argc, argv, "L::hVzr", longopts, NULL)) != -1) { ++ while((c = getopt_long(argc, argv, "b:L::hVzr", longopts, NULL)) != -1) { + switch(c) { ++ case 'b': ++ user_ss = strtou32_or_err(optarg, ++ _("invalid sector size argument")); ++ if (user_ss != 512 && user_ss != 1024 && ++ user_ss != 2048 && user_ss != 4096) ++ errx(EXIT_FAILURE, _("invalid sector size argument")); ++ break; + case 'h': + usage(); + break; +@@ -2811,6 +2822,8 @@ int main(int argc, char *argv[]) + cf->cxt = fdisk_new_context(); + if (!cf->cxt) + err(EXIT_FAILURE, _("failed to allocate libfdisk context")); ++ if (user_ss) ++ fdisk_save_user_sector_size(cf->cxt, user_ss, user_ss); + + fdisk_set_ask(cf->cxt, ask_callback, (void *) cf); + diff --git a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch index 8ea00dbb95..f6989cab86 100644 --- a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch +++ b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch @@ -1,4 +1,4 @@ -From da58b4150f6932de36c962ea657713bcf4ea44be Mon Sep 17 00:00:00 2001 +From b4a350a7716364ef7adc81573fc3ef2a4f727c1a Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Mon, 14 Jun 2021 14:00:31 +0200 Subject: [PATCH] util-linux: Add ptest @@ -14,7 +14,7 @@ Upstream-Status: Inappropriate 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 651ef2b..2a8012e 100644 +index f849e9e..c3adc50 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch index 74abdc2038..9aa028abd4 100644 --- a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch +++ b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch @@ -1,4 +1,4 @@ -From 0387d71516c978899cfd556ca512f530a212b4a9 Mon Sep 17 00:00:00 2001 +From 1ce2433b988db5a89f43c97a94f248e75239b109 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Mon, 24 Sep 2012 07:24:51 +0100 Subject: [PATCH] util-linux: Ensure that ${sbindir} is respected @@ -14,7 +14,7 @@ Upstream-Status: Inappropriate [configuration] 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 23594ff..651ef2b 100644 +index 07369a5..f849e9e 100644 --- a/configure.ac +++ b/configure.ac @@ -110,7 +110,10 @@ AC_SUBST([runstatedir]) diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch index 871b0b2d30..0ddc858557 100644 --- a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch +++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch @@ -1,4 +1,4 @@ -From 45450d0339cd7ee27f53c0f2fac1cc74ed9bbfb8 Mon Sep 17 00:00:00 2001 +From 294401860936a4d4cc96c4469b8255e055026178 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 3 Dec 2015 04:08:00 +0100 Subject: [PATCH] Display testname for subtest diff --git a/meta/recipes-core/util-linux/util-linux/libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch b/meta/recipes-core/util-linux/util-linux/libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch index 356194a8ba..697fd6791c 100644 --- a/meta/recipes-core/util-linux/util-linux/libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch +++ b/meta/recipes-core/util-linux/util-linux/libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch @@ -1,161 +1,7 @@ -From 7ada6547fcd1f649fadaa8021ff21e3e0f431459 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Oct 2024 11:45:32 +0200 -Subject: [PATCH 1/4] libfdisk: make sure libblkid uses the same sector size - -Libfdisk uses libblkid to check for filesystems on the device. It -makes sense for both libraries to share the logical sector size -setting, as this setting can be modified by using the fdisk command -line. - -We do not see this as an issue, as filesystem detection rarely depends -on sector size (with the exception of some RAIDs). Additionally, -libblkid is usually intelligent enough to check multiple locations -independently of the current device's sector size setting. - -Addresses: https://github.com/util-linux/util-linux/pull/3235 - -Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3237] - -Signed-off-by: Karel Zak ---- - libfdisk/src/wipe.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libfdisk/src/wipe.c b/libfdisk/src/wipe.c -index bb5f1bb38bf..f389ed4194a 100644 ---- a/libfdisk/src/wipe.c -+++ b/libfdisk/src/wipe.c -@@ -133,6 +133,7 @@ int fdisk_do_wipe(struct fdisk_context *cxt) - DBG(WIPE, ul_debugobj(wp, "blkid_probe_set_device() failed [rc=%d]", rc)); - return rc; - } -+ blkid_probe_set_sectorsize(pr, cxt->sector_size); - - DBG(WIPE, ul_debugobj(wp, " wiping...")); - blkid_wipe_all(pr); -@@ -176,6 +177,8 @@ int fdisk_check_collisions(struct fdisk_context *cxt) - free(cxt->collision); - cxt->collision = NULL; - -+ blkid_probe_set_sectorsize(pr, cxt->sector_size); -+ - blkid_probe_enable_superblocks(pr, 1); - blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_TYPE | - BLKID_SUBLKS_BADCSUM); - -From 54f9a79301dcf492cab8e07134f96a921d367aa0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Oct 2024 15:47:03 +0200 -Subject: [PATCH 2/4] fdisk: (man) improve --sector-size description - -Signed-off-by: Karel Zak ---- - disk-utils/fdisk.8.adoc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/disk-utils/fdisk.8.adoc b/disk-utils/fdisk.8.adoc -index cb72b4a3ea5..5941aa34968 100644 ---- a/disk-utils/fdisk.8.adoc -+++ b/disk-utils/fdisk.8.adoc -@@ -40,7 +40,7 @@ Note that *partx*(8) provides a rich interface for scripts to print disk layouts - == OPTIONS - - *-b*, *--sector-size* _sectorsize_:: --Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096. (Recent kernels know the sector size. Use this option only on old kernels or to override the kernel's ideas.) Since util-linux-2.17, *fdisk* differentiates between logical and physical sector size. This option changes both sector sizes to _sectorsize_. -+Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096. The kernel is aware of the sector size for regular block devices. Use this option only on very old kernels, when working with disk images, or to override the kernel's default sector size. Since util-linux-2.17, *fdisk* distinguishes between logical and physical sector size. This option changes both sector sizes to the specified _sectorsize_. - - *-B*, *--protect-boot*:: - Don't erase the beginning of the first disk sector when creating a new disk label. This feature is supported for GPT and MBR. - -From fd38ee2274f7a30393d3839dfce556260355c3fa Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Oct 2024 15:48:46 +0200 -Subject: [PATCH 3/4] cfdisk: add --sector-size commanand line option - -* improves compatibility with fdisk -* add ability to work with disk images where libfdisk defaults to 512 - -Signed-off-by: Karel Zak ---- - disk-utils/cfdisk.8.adoc | 3 +++ - disk-utils/cfdisk.c | 15 ++++++++++++++- - 2 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/disk-utils/cfdisk.8.adoc b/disk-utils/cfdisk.8.adoc -index 97fad621d12..759f39f0e1a 100644 ---- a/disk-utils/cfdisk.8.adoc -+++ b/disk-utils/cfdisk.8.adoc -@@ -55,6 +55,9 @@ Use exclusive BSD lock for device or file it operates. The optional argument _mo - *-r*, *--read-only*:: - Forced open in read-only mode. - -+*-b*, *--sector-size* _sectorsize_:: -+Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096. The kernel is aware of the sector size for regular block devices. Use this option only on very old kernels, when working with disk images, or to override the kernel's default sector size. Since util-linux-2.17, *fdisk* distinguishes between logical and physical sector size. This option changes both sector sizes to the specified _sectorsize_. -+ - *-z*, *--zero*:: - Start with an in-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an *sfdisk*(8)-compatible script. - -diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c -index 2e0aada474a..bc1c87d83e4 100644 ---- a/disk-utils/cfdisk.c -+++ b/disk-utils/cfdisk.c -@@ -2731,6 +2731,8 @@ static void __attribute__((__noreturn__)) usage(void) - _(" --lock[=] use exclusive device lock (%s, %s or %s)\n"), "yes", "no", "nonblock"); - fputs(_(" -r, --read-only forced open cfdisk in read-only mode\n"), out); - -+ fputs(_(" -b, --sector-size physical and logical sector size\n"), out); -+ - fputs(USAGE_SEPARATOR, out); - fprintf(out, USAGE_HELP_OPTIONS(26)); - -@@ -2743,6 +2745,7 @@ int main(int argc, char *argv[]) - const char *diskpath = NULL, *lockmode = NULL; - int rc, c, colormode = UL_COLORMODE_UNDEF; - int read_only = 0; -+ size_t user_ss = 0; - struct cfdisk _cf = { .lines_idx = 0 }, - *cf = &_cf; - enum { -@@ -2752,6 +2755,7 @@ int main(int argc, char *argv[]) - { "color", optional_argument, NULL, 'L' }, - { "lock", optional_argument, NULL, OPT_LOCK }, - { "help", no_argument, NULL, 'h' }, -+ { "sector-size", required_argument, NULL, 'b' }, - { "version", no_argument, NULL, 'V' }, - { "zero", no_argument, NULL, 'z' }, - { "read-only", no_argument, NULL, 'r' }, -@@ -2763,8 +2767,15 @@ int main(int argc, char *argv[]) - textdomain(PACKAGE); - close_stdout_atexit(); - -- while((c = getopt_long(argc, argv, "L::hVzr", longopts, NULL)) != -1) { -+ while((c = getopt_long(argc, argv, "b:L::hVzr", longopts, NULL)) != -1) { - switch(c) { -+ case 'b': -+ user_ss = strtou32_or_err(optarg, -+ _("invalid sector size argument")); -+ if (user_ss != 512 && user_ss != 1024 && -+ user_ss != 2048 && user_ss != 4096) -+ errx(EXIT_FAILURE, _("invalid sector size argument")); -+ break; - case 'h': - usage(); - break; -@@ -2803,6 +2814,8 @@ int main(int argc, char *argv[]) - cf->cxt = fdisk_new_context(); - if (!cf->cxt) - err(EXIT_FAILURE, _("failed to allocate libfdisk context")); -+ if (user_ss) -+ fdisk_save_user_sector_size(cf->cxt, user_ss, user_ss); - - fdisk_set_ask(cf->cxt, ask_callback, (void *) cf); - - -From ef7b76baa17ddb5414691fa8f49d61415c30871c Mon Sep 17 00:00:00 2001 +From 01c6f63f61f8ce835350b6848f10ea7ded52c05c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 14 Oct 2024 15:50:40 +0200 -Subject: [PATCH 4/4] sfdisk: add --sector-size commanand line option +Subject: [PATCH] sfdisk: add --sector-size commanand line option * improves compatibility with fdisk * add ability to work with disk images where libfdisk defaults to 512 @@ -168,10 +14,10 @@ Signed-off-by: Karel Zak 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc -index 26ccad5a3b2..ce9e97b7682 100644 +index bc3ff9b..d1eaa37 100644 --- a/disk-utils/sfdisk.8.adoc +++ b/disk-utils/sfdisk.8.adoc -@@ -208,6 +208,9 @@ The default list of columns may be extended if _list_ is specified in the format +@@ -201,6 +201,9 @@ The default list of columns may be extended if _list_ is specified in the format *-q*, *--quiet*:: Suppress extra info messages. @@ -181,7 +27,7 @@ index 26ccad5a3b2..ce9e97b7682 100644 *-u*, *--unit S*:: Deprecated option. Only the sector unit is supported. This option is not supported when using the *--show-size* command. -@@ -256,7 +259,7 @@ Specify the maximal number of GPT partitions. +@@ -249,7 +252,7 @@ Specify the maximal number of GPT partitions. *grain*:: Specify minimal size in bytes used to calculate partitions alignment. The default is 1MiB and it's strongly recommended to use the default. Do not modify this variable if you're not sure. *sector-size*:: @@ -191,10 +37,10 @@ index 26ccad5a3b2..ce9e97b7682 100644 Note that it is only possible to use header lines before the first partition is specified in the input. diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index cf402007b51..5e7c1d926e4 100644 +index d8dd8d2..97d4265 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c -@@ -2155,6 +2155,8 @@ static void __attribute__((__noreturn__)) usage(void) +@@ -2084,6 +2084,8 @@ static void __attribute__((__noreturn__)) usage(void) _(" --color[=] colorize output (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); @@ -203,7 +49,7 @@ index cf402007b51..5e7c1d926e4 100644 fprintf(out, _(" --lock[=] use exclusive device lock (%s, %s or %s)\n"), "yes", "no", "nonblock"); fputs(_(" -N, --partno specify partition number\n"), out); -@@ -2191,6 +2193,7 @@ int main(int argc, char *argv[]) +@@ -2120,6 +2122,7 @@ int main(int argc, char *argv[]) const char *outarg = NULL; int rc = -EINVAL, c, longidx = -1, bytes = 0; int colormode = UL_COLORMODE_UNDEF; @@ -211,7 +57,7 @@ index cf402007b51..5e7c1d926e4 100644 struct sfdisk _sf = { .partno = -1, .wipemode = WIPEMODE_AUTO, -@@ -2217,6 +2220,7 @@ int main(int argc, char *argv[]) +@@ -2145,6 +2148,7 @@ int main(int argc, char *argv[]) OPT_NOTELL, OPT_RELOCATE, OPT_LOCK, @@ -219,7 +65,7 @@ index cf402007b51..5e7c1d926e4 100644 }; static const struct option longopts[] = { -@@ -2246,6 +2250,7 @@ int main(int argc, char *argv[]) +@@ -2174,6 +2178,7 @@ int main(int argc, char *argv[]) { "output", required_argument, NULL, 'o' }, { "partno", required_argument, NULL, 'N' }, { "reorder", no_argument, NULL, 'r' }, @@ -227,7 +73,7 @@ index cf402007b51..5e7c1d926e4 100644 { "show-geometry", no_argument, NULL, 'g' }, { "quiet", no_argument, NULL, 'q' }, { "verify", no_argument, NULL, 'V' }, -@@ -2450,6 +2455,13 @@ int main(int argc, char *argv[]) +@@ -2373,6 +2378,13 @@ int main(int argc, char *argv[]) sf->lockmode = optarg; } break; @@ -241,7 +87,7 @@ index cf402007b51..5e7c1d926e4 100644 default: errtryhelp(EXIT_FAILURE); } -@@ -2460,6 +2472,8 @@ int main(int argc, char *argv[]) +@@ -2383,6 +2395,8 @@ int main(int argc, char *argv[]) sfdisk_init(sf); if (bytes) fdisk_set_size_unit(sf->cxt, FDISK_SIZEUNIT_BYTES); diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch index 7345926b88..8e566e1a2c 100644 --- a/meta/recipes-core/util-linux/util-linux/ptest.patch +++ b/meta/recipes-core/util-linux/util-linux/ptest.patch @@ -1,4 +1,4 @@ -From f9be73c3e2b0a4f0923950dcb058be85d3ee8ed7 Mon Sep 17 00:00:00 2001 +From 92cd7605698b20f14cb8ac5e0a2ecfac54147ba4 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 3 Dec 2015 04:08:00 +0100 Subject: [PATCH] Define TESTS variable @@ -10,10 +10,10 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am -index 50ab8d0..7e2340d 100644 +index 8204bc0..10be2f1 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -64,6 +64,7 @@ tmpfiles_DATA = +@@ -65,6 +65,7 @@ tmpfiles_DATA = dist_bashcompletion_DATA = check_PROGRAMS = dist_check_SCRIPTS = diff --git a/meta/recipes-core/util-linux/util-linux_2.40.2.bb b/meta/recipes-core/util-linux/util-linux_2.40.4.bb similarity index 100% rename from meta/recipes-core/util-linux/util-linux_2.40.2.bb rename to meta/recipes-core/util-linux/util-linux_2.40.4.bb