diff --git a/btrfs-progs-qgroup-show-fix-formatting-of-limit-valu.patch b/btrfs-progs-qgroup-show-fix-formatting-of-limit-valu.patch new file mode 100644 index 0000000..6913969 --- /dev/null +++ b/btrfs-progs-qgroup-show-fix-formatting-of-limit-valu.patch @@ -0,0 +1,72 @@ +From ab32c4445d0d14632e5ae717e56d57455eb98294 Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Fri, 26 May 2023 17:04:11 +0200 +Subject: [PATCH] btrfs-progs: qgroup show: fix formatting of limit values in + json output + +There are reports that json output of 'qgroup show' crashes due to +internal error when printing the limit values: + + INTERNAL ERROR: unknown unit base, mode 2304 + btrfs(internal_error+0x10a)[0x5605c37ce48a] + btrfs(pretty_size_snprintf+0x5c)[0x5605c37d105c] + btrfs(fmt_print+0x44e)[0x5605c37d178e] + btrfs(+0x7ed1d)[0x5605c3800d1d] + btrfs(main+0x8f)[0x5605c379beff] + /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0] + /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79] + btrfs(_start+0x25)[0x5605c379d405] + common/units.c:82: pretty_size_snprintf: Assertion `0` failed, value 0 + btrfs(+0x1d4b1)[0x5605c379f4b1] + btrfs(pretty_size_snprintf+0x7b)[0x5605c37d107b] + btrfs(fmt_print+0x44e)[0x5605c37d178e] + btrfs(+0x7ed1d)[0x5605c3800d1d] + btrfs(main+0x8f)[0x5605c379beff] + /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0] + /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79] + btrfs(_start+0x25)[0x5605c379d405] + +This is caused by "size" format that requires the unit mode, but it was not +specified and some stack value used. As json prints the raw values, use +the plain %llu format. + +Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1206960 +Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1209136#c15 +Signed-off-by: David Sterba +--- + cmds/qgroup.c | 4 ++-- + tests/cli-tests/005-qgroup-show/test.sh | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/cmds/qgroup.c b/cmds/qgroup.c +index 654fca4bb7d67e..4c66ee0ad5e41f 100644 +--- a/cmds/qgroup.c ++++ b/cmds/qgroup.c +@@ -1439,10 +1439,10 @@ static const struct rowspec qgroup_show_rowspec[] = { + { .key = "qgroupid", .fmt = "qgroupid", .out_json = "qgroupid" }, + { .key = "referenced", .fmt = "%llu", .out_json = "referenced" }, + { .key = "exclusive", .fmt = "%llu", .out_json = "exclusive" }, +- { .key = "max_referenced", .fmt = "size", .out_json = "max_referenced" }, ++ { .key = "max_referenced", .fmt = "%llu", .out_json = "max_referenced" }, + /* Special value if limits not set. */ + { .key = "max_referenced-none", .fmt = "%s", .out_json = "max_referenced" }, +- { .key = "max_exclusive", .fmt = "size", .out_json = "max_exclusive" }, ++ { .key = "max_exclusive", .fmt = "%llu", .out_json = "max_exclusive" }, + /* Special value if limits not set. */ + { .key = "max_exclusive-none", .fmt = "%s", .out_json = "max_exclusive" }, + { .key = "path", .fmt = "str", .out_json = "path" }, +diff --git a/tests/cli-tests/005-qgroup-show/test.sh b/tests/cli-tests/005-qgroup-show/test.sh +index 455f2d3c2da101..97e51273aa6929 100755 +--- a/tests/cli-tests/005-qgroup-show/test.sh ++++ b/tests/cli-tests/005-qgroup-show/test.sh +@@ -17,6 +17,7 @@ run_mayfail "$TOP/btrfs" --format json qgroup show "$TEST_MNT" + run_mayfail $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT" + run_mayfail $SUDO_HELPER "$TOP/btrfs" --format json qgroup show "$TEST_MNT" + run_check $SUDO_HELPER "$TOP/btrfs" quota enable "$TEST_MNT" ++run_check $SUDO_HELPER "$TOP/btrfs" qgroup limit 128m "$TEST_MNT" + run_mayfail "$TOP/btrfs" qgroup show "$TEST_MNT" + run_mayfail "$TOP/btrfs" --format json qgroup show "$TEST_MNT" + run_check $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT" +-- +2.40.0 + diff --git a/btrfs-progs-v6.1.3.tar.gz b/btrfs-progs-v6.1.3.tar.gz deleted file mode 100644 index 065a826..0000000 --- a/btrfs-progs-v6.1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:747d6367cbf88d2a997befe72f49c66339ebfb28ca60880f4f5b4e0ec779bcce -size 2882830 diff --git a/btrfs-progs-v6.1.3.tar.sign b/btrfs-progs-v6.1.3.tar.sign deleted file mode 100644 index 175fec0..0000000 Binary files a/btrfs-progs-v6.1.3.tar.sign and /dev/null differ diff --git a/btrfs-progs-v6.3.tar.gz b/btrfs-progs-v6.3.tar.gz new file mode 100644 index 0000000..9eb8f62 --- /dev/null +++ b/btrfs-progs-v6.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:058685b9f3074a3504edd5b92f7878d6986b1ebe6f681bfedec298caa812ade7 +size 3045903 diff --git a/btrfs-progs-v6.3.tar.sign b/btrfs-progs-v6.3.tar.sign new file mode 100644 index 0000000..03fd6d4 Binary files /dev/null and b/btrfs-progs-v6.3.tar.sign differ diff --git a/btrfsprogs.changes b/btrfsprogs.changes index fd1038a..5e2c73b 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,73 @@ +------------------------------------------------------------------- +Mon May 29 00:00:00 CEST 2023 - dsterba@suse.cz + +- qgroup show: fix formatting of limit values in json output (bsc#1206960, + bsc#1209136) +- Added patch: btrfs-progs-qgroup-show-fix-formatting-of-limit-valu.patch + +------------------------------------------------------------------- +Mon May 22 00:00:00 CEST 2023 - dsterba@suse.cz + +- update to 6.3 + * mkfs: option -R deprecated, options unified in -O (-R still works) + * mkfs: fix potential race with udev leading to EBUSY due to repeatedly + opened file descriptors + * block-group-tree is out of experimental mode + * available as 'mkfs.btrfs -O block-group-tree' + * btrfstune can do in-place conversion to/from (use with care) + * balance: fix recognizing old and new syntax + * subvol snapshot: specific error if a failure is caused by an active swapfile + * tree-stats: rephrase warning when run on a mounted filesystem + * completion: 'filesystem du' also completes files + * check: fix docs, help text and warning that --force + --repair works on a + mounted filesystem + * build: fix static build when static libudev is available + * documentation: + * more updates from wiki, developer docs, changelogs + * reformatting + * updates and fixes + * other: + * test updates and fixes + * CI cleanups and old files removed + * integration with Github actions + +------------------------------------------------------------------- +Tue Apr 11 00:00:00 CEST 2023 - dsterba@suse.cz + +- Use pre-generated documentation from tarball, fixes build on SLE targets + where sphinx might not be available + +------------------------------------------------------------------- +Tue Apr 11 00:00:00 CEST 2023 - dsterba@suse.cz + +- update to 6.2.2 + * fix build on old x86 architectures with builtin crypto + * device stats: fix printing wrong values in tabular output + * qgroup show: fix qgroup id formatting in json output + * restore: fix restoring xattrs on directories + * restore: don't modify metadata in dry-run mode + * balance: fix some cases wrongly parsed as old syntax + * balance: warn when deprecated syntax is used + * seeding: fall back to old way if sysfs device fsid is not available + * convert: handle orphan file ext4 feature + * other: + * sync ioctl definitions + * enable github CI + * update documentation +- update to 6.2.1 + * fix build with crypto libraries + * CI images updated, build tests extended +- update to 6.2: + * receive: fix a corruption when decompressing zstd extents + * subvol sync: print total number and deletion progress + * accelerated hash algorithm implementations in fallback mode on x86_64 + * fi mkswapfile: new option --uuid + * new global option --log=level to set the verbosity level directly + * other: + * experimental: update checksum conversion (not usable yet) + * build actually requires -std=gnu11 + * refactor help option formatting, auto wrap long lines + ------------------------------------------------------------------- Wed Mar 8 19:03:04 UTC 2023 - Callum Farmer diff --git a/btrfsprogs.spec b/btrfsprogs.spec index bce1ef9..3ea5a16 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -29,12 +29,12 @@ %endif # the tarball contains prebuilt documentation -%define build_docs 1 +%define build_docs 0 %define _dracutmodulesdir %(pkg-config --variable dracutmodulesdir dracut) Name: btrfsprogs -Version: 6.1.3 +Version: 6.3 Release: 0 Summary: Utilities for the Btrfs filesystem License: GPL-2.0-only @@ -55,6 +55,7 @@ Provides: btrfs-progs = %{version}-%{release} Provides: btrfs-progs(%_arch) = %{version}-%{release} Patch1: mkfs-default-features.patch +Patch2: btrfs-progs-qgroup-show-fix-formatting-of-limit-valu.patch %if %build_docs BuildRequires: python3-Sphinx @@ -209,6 +210,7 @@ bash command line completion support for btrfsprogs. %prep %setup -q -n btrfs-progs-v%{version} %patch1 -p1 +%patch2 -p1 %build ./autogen.sh