Compare commits

..

No commits in common. "rawhide" and "f31" have entirely different histories.
rawhide ... f31

10 changed files with 326 additions and 367 deletions

54
.gitignore vendored
View File

@ -68,57 +68,3 @@
/btrfs-progs-v5.6.1.tar.xz
/btrfs-progs-v5.7-rc1.tar.xz
/btrfs-progs-v5.7.tar.xz
/btrfs-progs-v5.9.tar.xz
/btrfs-progs-v5.10-rc1.tar.xz
/btrfs-progs-v5.10.tar.xz
/btrfs-progs-v5.11.tar.xz
/btrfs-progs-v5.11.1.tar.sign
/btrfs-progs-v5.11.1.tar.xz
/btrfs-progs-v5.12.tar.sign
/btrfs-progs-v5.12.tar.xz
/btrfs-progs-v5.12.1.tar.sign
/btrfs-progs-v5.12.1.tar.xz
/btrfs-progs-v5.13.tar.sign
/btrfs-progs-v5.13.tar.xz
/btrfs-progs-v5.13.1.tar.sign
/btrfs-progs-v5.13.1.tar.xz
/btrfs-progs-v5.14.tar.sign
/btrfs-progs-v5.14.tar.xz
/btrfs-progs-v5.14.1.tar.sign
/btrfs-progs-v5.14.1.tar.xz
/btrfs-progs-v5.14.2.tar.sign
/btrfs-progs-v5.14.2.tar.xz
/btrfs-progs-v5.14.91.tar.sign
/btrfs-progs-v5.14.91.tar.xz
/btrfs-progs-v5.15.tar.sign
/btrfs-progs-v5.15.tar.xz
/btrfs-progs-v5.15.1.tar.sign
/btrfs-progs-v5.15.1.tar.xz
/btrfs-progs-v5.16.tar.sign
/btrfs-progs-v5.16.tar.xz
/btrfs-progs-v5.16.1.tar.sign
/btrfs-progs-v5.16.1.tar.xz
/btrfs-progs-v5.16.2.tar.sign
/btrfs-progs-v5.16.2.tar.xz
/btrfs-progs-v5.18.tar.sign
/btrfs-progs-v5.18.tar.xz
/btrfs-progs-v5.19.1.tar.sign
/btrfs-progs-v5.19.1.tar.xz
/btrfs-progs-v6.0.tar.sign
/btrfs-progs-v6.0.tar.xz
/btrfs-progs-v6.0.1.tar.sign
/btrfs-progs-v6.0.1.tar.xz
/btrfs-progs-v6.0.2.tar.sign
/btrfs-progs-v6.0.2.tar.xz
/btrfs-progs-v6.1.tar.sign
/btrfs-progs-v6.1.tar.xz
/btrfs-progs-v6.1.1.tar.sign
/btrfs-progs-v6.1.1.tar.xz
/btrfs-progs-v6.1.2.tar.sign
/btrfs-progs-v6.1.2.tar.xz
/btrfs-progs-v6.1.3.tar.sign
/btrfs-progs-v6.1.3.tar.xz
/btrfs-progs-v6.2.1.tar.sign
/btrfs-progs-v6.2.1.tar.xz
/btrfs-progs-v6.2.2.tar.sign
/btrfs-progs-v6.2.2.tar.xz

View File

@ -0,0 +1,108 @@
From fe8715e1337a1bad5c49e165ab77c033c334efbc Mon Sep 17 00:00:00 2001
From: Qu Wenruo <wqu@suse.com>
Date: Mon, 20 Jul 2020 20:51:08 +0800
Subject: [PATCH 1/2] btrfs-progs: convert: prevent 32bit overflow for
cctx->total_bytes
[BUG]
When convert is called on a 64GiB ext4 fs, it fails like this:
$ btrfs-convert /dev/loop0p1
create btrfs filesystem:
blocksize: 4096
nodesize: 16384
features: extref, skinny-metadata (default)
checksum: crc32c
creating ext2 image file
ERROR: missing data block for bytenr 1048576
ERROR: failed to create ext2_saved/image: -2
WARNING: an error occurred during conversion, filesystem is partially created but not finalized and not mountable
Btrfs-convert also corrupts the source fs:
$ LANG=C e2fsck /dev/loop0p1 -f
e2fsck 1.45.6 (20-Mar-2020)
Resize inode not valid. Recreate<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 3681 has zero dtime. Fix<y>? yes
Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
Inode 3744 was part of the orphaned inode list. FIXED.
Deleted inode 3745 has zero dtime. Fix<y>? yes
Inode 3747 has INLINE_DATA_FL flag on filesystem without inline data support.
Clear<y>? yes
...
[CAUSE]
After some debugging, the first strange behavior is, the value of
cctx->total_bytes is 0 in ext2_open_fs().
It turns out that, the value assign for cctx->total_bytes could lead to
bit overflow for the unsigned int value.
And that 0 cctx->total_bytes leads to various problems for later free
space calculation.
For example, in calculate_available_space(), we use cctx->total_bytes to
ensure we won't create a data chunk beyond device end:
cue_len = min(cctx->total_bytes - cur_off, cur_len);
If that cur_offset is also 0, we will create a cache_extent with 0 size,
which could cause a lot of problems for cache tree search.
[FIX]
Do manual casting for the multiply operation, so we could got a real u64
result. The fix will be applied to all supported fses (ext* and
reiserfs).
Reported-by: Christian Zangl <coralllama@gmail.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 670a19828ad40004d05ad70cdd45d58008d3fb51)
---
convert/main.c | 1 +
convert/source-ext2.c | 2 +-
convert/source-reiserfs.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/convert/main.c b/convert/main.c
index 7709e9a6..df6a2ae3 100644
--- a/convert/main.c
+++ b/convert/main.c
@@ -1136,6 +1136,7 @@ static int do_convert(const char *devname, u32 convert_flags, u32 nodesize,
if (ret)
goto fail;
+ ASSERT(cctx.total_bytes);
blocksize = cctx.blocksize;
total_bytes = (u64)blocksize * (u64)cctx.block_count;
if (blocksize < 4096) {
diff --git a/convert/source-ext2.c b/convert/source-ext2.c
index f11ef651..d73684ef 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -87,7 +87,7 @@ static int ext2_open_fs(struct btrfs_convert_context *cctx, const char *name)
cctx->fs_data = ext2_fs;
cctx->blocksize = ext2_fs->blocksize;
cctx->block_count = ext2_fs->super->s_blocks_count;
- cctx->total_bytes = ext2_fs->blocksize * ext2_fs->super->s_blocks_count;
+ cctx->total_bytes = (u64)ext2_fs->super->s_blocks_count * ext2_fs->blocksize;
cctx->volume_name = strndup((char *)ext2_fs->super->s_volume_name, 16);
cctx->first_data_block = ext2_fs->super->s_first_data_block;
cctx->inodes_count = ext2_fs->super->s_inodes_count;
diff --git a/convert/source-reiserfs.c b/convert/source-reiserfs.c
index 9fd6b9ab..3b4cb5ad 100644
--- a/convert/source-reiserfs.c
+++ b/convert/source-reiserfs.c
@@ -82,7 +82,7 @@ static int reiserfs_open_fs(struct btrfs_convert_context *cxt, const char *name)
cxt->fs_data = fs;
cxt->blocksize = fs->fs_blocksize;
cxt->block_count = get_sb_block_count(fs->fs_ondisk_sb);
- cxt->total_bytes = cxt->blocksize * cxt->block_count;
+ cxt->total_bytes = (u64)cxt->block_count * cxt->blocksize;
cxt->volume_name = strndup(fs->fs_ondisk_sb->s_label, 16);
cxt->first_data_block = 0;
cxt->inodes_count = reiserfs_count_objectids(fs);
--
2.26.2

View File

@ -1,91 +0,0 @@
From: Neal Gompa <neal@gompa.dev>
Subject: [PATCH 1/1] btrfs-progs: mkfs: Enforce 4k sectorsize by default
Date: Wed, 22 Mar 2023 18:17:14 -0400
Content-Transfer-Encoding: 8bit
We have had working subpage support in Btrfs for many cycles now.
Generally, we do not want people creating filesystems by default
with non-4k sectorsizes since it creates portability problems.
Signed-off-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
---
Documentation/Subpage.rst | 15 ++++++++-------
Documentation/mkfs.btrfs.rst | 13 +++++++++----
mkfs/main.c | 2 +-
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/Documentation/Subpage.rst b/Documentation/Subpage.rst
index 21a495d5..39ef7d6d 100644
--- a/Documentation/Subpage.rst
+++ b/Documentation/Subpage.rst
@@ -9,17 +9,18 @@ to the exactly same size of the block and page. On x86_64 this is typically
pages, like 64KiB on 64bit ARM or PowerPC. This means filesystems created
with 64KiB sector size cannot be mounted on a system with 4KiB page size.
-While with subpage support, systems with 64KiB page size can create (still needs
-"-s 4k" option for mkfs.btrfs) and mount filesystems with 4KiB sectorsize,
-allowing us to push 4KiB sectorsize as default sectorsize for all platforms in the
-near future.
+Since v6.3, filesystems are created with a 4KiB sectorsize by default,
+though it remains possible to create filesystems with other page sizes
+(such as 64KiB with the "-s 64k" option for mkfs.btrfs). This ensures that
+new filesystems are compatible across other architecture variants using
+larger page sizes.
Requirements, limitations
-------------------------
-The initial subpage support has been added in v5.15, although it's still
-considered as experimental at the time of writing (v5.18), most features are
-already working without problems.
+The initial subpage support has been added in v5.15. Most features are
+already working without problems. Subpage support is used by default
+for systems with a non-4KiB page size since v6.3.
End users can mount filesystems with 4KiB sectorsize and do their usual
workload, while should not notice any obvious change, as long as the initial
diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
index ba7227b3..16abf0ca 100644
--- a/Documentation/mkfs.btrfs.rst
+++ b/Documentation/mkfs.btrfs.rst
@@ -116,10 +116,15 @@ OPTIONS
-s|--sectorsize <size>
Specify the sectorsize, the minimum data block allocation unit.
- The default value is the page size and is autodetected. If the sectorsize
- differs from the page size, the created filesystem may not be mountable by the
- running kernel. Therefore it is not recommended to use this option unless you
- are going to mount it on a system with the appropriate page size.
+ By default, the value is 4KiB, but it can be manually set to match the
+ system page size. However, if the sector size is different from the page
+ size, the resulting filesystem may not be mountable by the current
+ kernel, apart from the default 4KiB. Hence, using this option is not
+ advised unless you intend to mount it on a system with the suitable
+ page size.
+
+ .. note::
+ Versions prior to 6.3 set the sectorsize matching to the page size.
-L|--label <string>
Specify a label for the filesystem. The *string* should be less than 256
diff --git a/mkfs/main.c b/mkfs/main.c
index f5e34cbd..5e1834d7 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1207,7 +1207,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
}
if (!sectorsize)
- sectorsize = (u32)sysconf(_SC_PAGESIZE);
+ sectorsize = (u32)SZ_4K;
if (btrfs_check_sectorsize(sectorsize))
goto error;
--
2.39.2

View File

@ -0,0 +1,79 @@
From fcd0fd043749cd2623a918cf9862d10e2a227ae4 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.com>
Date: Tue, 21 Jul 2020 12:13:27 +0200
Subject: [PATCH 1/2] btrfs-progs: mkfs: clean up default profile settings
Extract the defaults for data and metadata profiles to a header and
use the symbolic names instead of hardcoding the profiles.
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 071cb030a41fde2cab07217b52ba7c86b72fb8d8)
---
mkfs/common.h | 10 ++++++++++
mkfs/main.c | 21 ++++++++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/mkfs/common.h b/mkfs/common.h
index 426852be..61969dcc 100644
--- a/mkfs/common.h
+++ b/mkfs/common.h
@@ -28,6 +28,16 @@
#define BTRFS_MKFS_SYSTEM_GROUP_SIZE SZ_4M
#define BTRFS_MKFS_SMALL_VOLUME_SIZE SZ_1G
+/*
+ * Default settings for block group types
+ */
+#define BTRFS_MKFS_DEFAULT_DATA_ONE_DEVICE 0 /* SINGLE */
+#define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE BTRFS_BLOCK_GROUP_DUP
+#define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE_SSD 0 /* SINGLE */
+
+#define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE BTRFS_BLOCK_GROUP_RAID0
+#define BTRFS_MKFS_DEFAULT_META_MULTI_DEVICE BTRFS_BLOCK_GROUP_RAID1
+
/*
* Tree root blocks created during mkfs
*/
diff --git a/mkfs/main.c b/mkfs/main.c
index 0a4de617..6c9a24a4 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1144,19 +1144,30 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
* For mixed groups defaults are single/single.
*/
if (!mixed) {
+ u64 tmp;
+
if (!metadata_profile_opt) {
if (dev_cnt == 1 && ssd && verbose)
printf("Detected a SSD, turning off metadata "
"duplication. Mkfs with -m dup if you want to "
"force metadata duplication.\n");
- metadata_profile = (dev_cnt > 1) ?
- BTRFS_BLOCK_GROUP_RAID1 : (ssd) ?
- 0: BTRFS_BLOCK_GROUP_DUP;
+ if (dev_cnt > 1) {
+ tmp = BTRFS_MKFS_DEFAULT_META_MULTI_DEVICE;
+ } else {
+ if (ssd)
+ tmp = BTRFS_MKFS_DEFAULT_META_ONE_DEVICE_SSD;
+ else
+ tmp = BTRFS_MKFS_DEFAULT_META_ONE_DEVICE;
+ }
+ metadata_profile = tmp;
}
if (!data_profile_opt) {
- data_profile = (dev_cnt > 1) ?
- BTRFS_BLOCK_GROUP_RAID0 : 0; /* raid0 or single */
+ if (dev_cnt > 1)
+ tmp = BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE;
+ else
+ tmp = BTRFS_MKFS_DEFAULT_DATA_ONE_DEVICE;
+ data_profile = tmp;
}
} else {
u32 best_nodesize = max_t(u32, sysconf(_SC_PAGESIZE), sectorsize);
--
2.26.2

View File

@ -1,52 +0,0 @@
From 56ea5a3eba4f2048d3e6297a7ab7eb5ef19e2177 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa@fedoraproject.org>
Date: Tue, 21 Mar 2023 15:40:15 -0400
Subject: [PATCH 2/2] btrfs-progs: mkfs: doc: Drop version change for 4k
sectorsize
This is not yet upstream so we don't know what version this change
has landed in.
---
Documentation/Subpage.rst | 4 ++--
Documentation/mkfs.btrfs.rst | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Documentation/Subpage.rst b/Documentation/Subpage.rst
index 39ef7d6d..a128db95 100644
--- a/Documentation/Subpage.rst
+++ b/Documentation/Subpage.rst
@@ -9,7 +9,7 @@ to the exactly same size of the block and page. On x86_64 this is typically
pages, like 64KiB on 64bit ARM or PowerPC. This means filesystems created
with 64KiB sector size cannot be mounted on a system with 4KiB page size.
-Since v6.3, filesystems are created with a 4KiB sectorsize by default,
+Filesystems are created with a 4KiB sectorsize by default,
though it remains possible to create filesystems with other page sizes
(such as 64KiB with the "-s 64k" option for mkfs.btrfs). This ensures that
new filesystems are compatible across other architecture variants using
@@ -20,7 +20,7 @@ Requirements, limitations
The initial subpage support has been added in v5.15. Most features are
already working without problems. Subpage support is used by default
-for systems with a non-4KiB page size since v6.3.
+for systems with a non-4KiB page size.
End users can mount filesystems with 4KiB sectorsize and do their usual
workload, while should not notice any obvious change, as long as the initial
diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
index 50d9921a..0f6056a4 100644
--- a/Documentation/mkfs.btrfs.rst
+++ b/Documentation/mkfs.btrfs.rst
@@ -123,9 +123,6 @@ OPTIONS
advised unless you intend to mount it on a system with the suitable
page size.
- .. note::
- Versions prior to 6.3 set the sectorsize matching to the page size.
-
-L|--label <string>
Specify a label for the filesystem. The *string* should be less than 256
bytes and must not contain newline characters.
--
2.39.2

View File

@ -0,0 +1,49 @@
From 5e76619fcda3d792b2cb188fc2d950c61d7ebf09 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.com>
Date: Tue, 21 Jul 2020 12:28:05 +0200
Subject: [PATCH 2/2] btrfs-progs: mkfs: switch to single as default profile
for multiple-devices
The single profile is better suited as default for data on multiple
devices. Switch from RAID0 because:
- it's easier to convert to other profiles, as single consumes some
chunks per device, but RAID0 has chunks on all devices regardless of
the used space
- RAID0 has no redundancy and compared one disk failure affects many
files due to striping, while with single the chances are a bit higher
that complete files are stored on one device
- when the device sizes are not equal and not even close to equal, the
maximum achievable size with RAID0 is size of the smallest device due
to striping, with single it's the sum of all device sizes
The changed defaults could affect scripts and deployments that rely on
the old values, but given the number of possible profiles for multiple
devices let's hope that they're specified explicitly in majority of
cases.
Issue: #270
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit f1507716c67e2d6012f1e7a0f1538d4f669faa23)
---
mkfs/common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/common.h b/mkfs/common.h
index 61969dcc..cc88db71 100644
--- a/mkfs/common.h
+++ b/mkfs/common.h
@@ -35,7 +35,7 @@
#define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE BTRFS_BLOCK_GROUP_DUP
#define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE_SSD 0 /* SINGLE */
-#define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE BTRFS_BLOCK_GROUP_RAID0
+#define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE 0 /* SINGLE */
#define BTRFS_MKFS_DEFAULT_META_MULTI_DEVICE BTRFS_BLOCK_GROUP_RAID1
/*
--
2.26.2

View File

@ -0,0 +1,49 @@
From 11c4a7b38a6aeef51b075d70e5aca36c42398842 Mon Sep 17 00:00:00 2001
From: Qu Wenruo <wqu@suse.com>
Date: Mon, 20 Jul 2020 20:51:09 +0800
Subject: [PATCH 2/2] btrfs-progs: tests: add convert test case for multiply
overflow
The new test case will test whether btrfs-convert can handle 64G ext*
fs.
This exercise the cctx->total_bytes calculation where multiplying 4K
(unsigned int) and 16777216 (u32) could lead to bit overflow for
unsigned int and got 0, and screw up later free space calculation.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 61f41474469b0b0fba9ec1978dfa91d9cbc6c914)
---
.../018-fs-size-overflow/test.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100755 tests/convert-tests/018-fs-size-overflow/test.sh
diff --git a/tests/convert-tests/018-fs-size-overflow/test.sh b/tests/convert-tests/018-fs-size-overflow/test.sh
new file mode 100755
index 00000000..d819f695
--- /dev/null
+++ b/tests/convert-tests/018-fs-size-overflow/test.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Check if btrfs-convert can handle an ext4 fs whose size is 64G.
+# That fs size could trigger a multiply overflow and screw up free space
+# calculation
+
+source "$TEST_TOP/common"
+source "$TEST_TOP/common.convert"
+
+setup_root_helper
+prepare_test_dev 64g
+check_prereq btrfs-convert
+check_global_prereq mke2fs
+
+convert_test_prep_fs ext4 mke2fs -t ext4 -b 4096
+run_check_umount_test_dev
+
+# Unpatched btrfs-convert would fail half way due to corrupted free space
+# cache tree
+convert_test_do_convert
--
2.26.2

View File

@ -1,39 +1,32 @@
# Local definition of version_no_tilde when it doesn't exist
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
# Disable for now until version handling question is dealt with
%bcond_with python
Name: btrfs-progs
Version: 6.2.2
Release: 1%{?dist}
Version: 5.7
Release: 4%{?dist}
Summary: Userspace programs for btrfs
License: GPL-2.0-only
License: GPLv2
URL: https://btrfs.wiki.kernel.org/index.php/Main_Page
Source0: https://www.kernel.org/pub/linux/kernel/people/kdave/%{name}/%{name}-v%{version_no_tilde}.tar.xz
Source1: https://www.kernel.org/pub/linux/kernel/people/kdave/%{name}/%{name}-v%{version_no_tilde}.tar.sign
Source2: gpgkey-F2B41200C54EFB30380C1756C565D5F9D76D583B.gpg
# Upstreamable changes
## From: https://lore.kernel.org/linux-btrfs/20230322221714.2702819-1-neal@gompa.dev/T/#t
Patch0101: 0001-btrfs-progs-mkfs-Enforce-4k-sectorsize-by-default.patch
## Fedora specific doc change stacked on top
Patch0102: 0002-btrfs-progs-mkfs-doc-Drop-version-change-for-4k-sect.patch
# Backports from upstream
## Do not use raid0 by default for mkfs multi-disk (#1855174)
Patch0001: 0001-btrfs-progs-mkfs-clean-up-default-profile-settings.patch
Patch0002: 0002-btrfs-progs-mkfs-switch-to-single-as-default-profile.patch
## Fix convert for 64-bit ext4 filesystems (#1851674)
Patch0003: 0001-btrfs-progs-convert-prevent-32bit-overflow-for-cctx-.patch
Patch0004: 0002-btrfs-progs-tests-add-convert-test-case-for-multiply.patch
BuildRequires: gnupg2
BuildRequires: gcc, autoconf, automake, make
BuildRequires: git-core
BuildRequires: e2fsprogs-devel
BuildRequires: libacl-devel, lzo-devel
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(libgcrypt) >= 1.8.0
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libzstd) >= 1.0.0
BuildRequires: python3-sphinx
BuildRequires: gcc, autoconf, automake
BuildRequires: e2fsprogs-devel, libuuid-devel, zlib-devel, libzstd-devel
BuildRequires: libacl-devel, libblkid-devel, lzo-devel
BuildRequires: asciidoc, xmlto
BuildRequires: systemd
%if %{with python}
BuildRequires: python3-devel >= 3.4
BuildRequires: python3-setuptools
%endif
%description
The btrfs-progs package provides all the userspace programs needed to create,
@ -41,9 +34,7 @@ check, modify and correct any inconsistencies in the btrfs filesystem.
%package -n libbtrfs
Summary: btrfs filesystem-specific runtime libraries
License: GPL-2.0-only
# Upstream deprecated this library
Provides: deprecated()
License: GPLv2
# This was not properly split out before
Conflicts: %{name} < 4.20.2
@ -53,7 +44,7 @@ filesystem-specific programs.
%package -n libbtrfsutil
Summary: btrfs filesystem-specific runtime utility libraries
License: LGPL-2.1-or-later
License: LGPLv3
# This was not properly split out before
Conflicts: %{name}-devel < 4.20.2
@ -63,8 +54,8 @@ filesystem-specific programs.
%package devel
Summary: btrfs filesystem-specific libraries and headers
# libbtrfsutil is LGPLv2+
License: GPL-2.0-only and LGPL-2.1-or-later
# libbtrfsutil is LGPLv3
License: GPLv2 and LGPLv3
Requires: %{name} = %{version}-%{release}
Requires: libbtrfs%{?_isa} = %{version}-%{release}
Requires: libbtrfsutil%{?_isa} = %{version}-%{release}
@ -75,14 +66,15 @@ develop btrfs filesystem-specific programs.
It includes development files for two libraries:
- libbtrfs (GPLv2)
- libbtrfsutil (LGPLv2+)
- libbtrfsutil (LGPLv3)
You should install btrfs-progs-devel if you want to develop
btrfs filesystem-specific programs.
%if %{with python}
%package -n python3-btrfsutil
Summary: Python 3 bindings for libbtrfsutil
License: LGPL-2.1-or-later
License: LGPLv3
Requires: libbtrfsutil%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python3-btrfsutil}
@ -92,19 +84,21 @@ which can be used for btrfs filesystem-specific programs in Python.
You should install python3-btrfsutil if you want to use or develop
btrfs filesystem-specific programs in Python.
%endif
%prep
xzcat '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=-
%autosetup -n %{name}-v%{version_no_tilde} -S git_am
%autosetup -n %{name}-v%{version_no_tilde} -p1
%build
./autogen.sh
%configure CFLAGS="%{optflags} -fno-strict-aliasing" --with-crypto=libgcrypt --disable-python
%configure CFLAGS="%{optflags} -fno-strict-aliasing" %{!?with_python:--disable-python}
%make_build
%if %{with python}
pushd libbtrfsutil/python
%py3_build
popd
%endif
%install
%make_install mandir=%{_mandir} bindir=%{_sbindir} libdir=%{_libdir} incdir=%{_includedir}
@ -112,9 +106,11 @@ install -Dpm0644 btrfs-completion %{buildroot}%{_datadir}/bash-completion/comple
# Nuke the static lib
rm -v %{buildroot}%{_libdir}/*.a
%if %{with python}
pushd libbtrfsutil/python
%py3_install
popd
%endif
%files
%license COPYING
@ -128,10 +124,9 @@ popd
%{_sbindir}/btrfs
%{_sbindir}/btrfs-map-logical
%{_sbindir}/btrfs-find-root
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_mandir}/man5/*.gz
%{_mandir}/man8/*.gz
%{_udevrulesdir}/64-btrfs-dm.rules
%{_udevrulesdir}/64-btrfs-zoned.rules
%{_datadir}/bash-completion/completions/btrfs
%files -n libbtrfs
@ -139,145 +134,22 @@ popd
%{_libdir}/libbtrfs.so.0*
%files -n libbtrfsutil
%license libbtrfsutil/COPYING
%license libbtrfsutil/COPYING*
%{_libdir}/libbtrfsutil.so.1*
%files devel
%{_includedir}/*
%{_libdir}/libbtrfs.so
%{_libdir}/libbtrfsutil.so
%{_libdir}/pkgconfig/libbtrfsutil.pc
%if %{with python}
%files -n python3-btrfsutil
%license libbtrfsutil/COPYING
%license libbtrfsutil/COPYING*
%{python3_sitearch}/btrfsutil.*.so
%{python3_sitearch}/btrfsutil-*.egg-info/
%{python3_sitearch}/btrfsutil-*.egg-info
%endif
%changelog
* Sun Mar 26 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.2.2-1
- Update to 6.2.2
* Wed Mar 22 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.2.1-2
- Add patch to force default sectorsize to 4k
* Mon Mar 06 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.2.1-1
- Update to 6.2.1
* Wed Jan 25 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.1.3-1
- Update to 6.1.3
- Switch to SPDX license identifiers
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jan 05 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.1.2-1
- Update to 6.1.2
* Tue Jan 03 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-1
- Update to 6.1.1
* Fri Dec 30 2022 Neal Gompa <ngompa@fedoraproject.org> - 6.1-2
- Add fix to show UUID with "btrfs subvolume list -u"
* Fri Dec 23 2022 Neal Gompa <ngompa@fedoraproject.org> - 6.1-1
- Update to 6.1
- Use libgcrypt for cryptographic hash functions
* Fri Nov 25 2022 Neal Gompa <ngompa@fedoraproject.org> - 6.0.2-1
- Update to 6.0.2
* Fri Nov 04 2022 Igor Raits <ignatenkobrain@fedoraproject.org> - 6.0.1-1
- Update to 6.0.1
* Thu Oct 13 2022 Neal Gompa <ngompa@fedoraproject.org> - 6.0-1
- Update to 6.0
* Thu Oct 13 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.19.1-1
- Update to 5.19.1
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 5.18-2
- Rebuilt for Python 3.11
* Wed May 25 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.18-1
- Update to 5.18
* Wed Feb 16 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.16.2-1
- Update to 5.16.2
* Sat Feb 05 2022 Igor Raits <igor.raits@gmail.com> - 5.16.1-1
- Update to 5.16.1
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Jan 17 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.16-1
- Update to 5.16
* Mon Nov 22 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.15.1-1
- Update to 5.15.1
* Fri Nov 05 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.15-1
- Update to 5.15
* Sat Oct 30 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.14.91-1
- Update to 5.14.91 (5.15~rc1)
* Sat Oct 09 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.14.2-1
- Update to 5.14.2
* Mon Sep 20 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.14.1-1
- Update to 5.14.1
* Fri Sep 10 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.14-2
- Mark libbtrfs as deprecated, per upstream release notes
* Fri Sep 10 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.14-1
- Update to 5.14
* Fri Jul 30 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.13.1-1
- Update to 5.13.1
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jul 13 2021 Neal Gompa <ngompa@fedoraproject.org> - 5.13-1
- Update to 5.13
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 5.12.1-2
- Rebuilt for Python 3.10
* Thu May 13 2021 Neal Gompa <ngompa13@gmail.com> - 5.12.1-1
- Update to 5.12.1
* Mon May 10 2021 Neal Gompa <ngompa13@gmail.com> - 5.12-1
- Update to 5.12
* Sun Mar 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.11.1-1
- Update to 5.11.1
* Fri Mar 05 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.11-1
- Update to 5.11
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 19 2021 Neal Gompa <ngompa13@gmail.com> - 5.10-1
- New upstream release
* Fri Jan 15 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.10~rc1-1
- Update to 5.10-rc1
* Fri Oct 23 2020 Neal Gompa <ngompa13@gmail.com> - 5.9-1
- New upstream release
- Build Python bindings
- Drop patches incorporated into this release
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 24 2020 Neal Gompa <ngompa13@gmail.com> - 5.7-4
- Backport fix for converting 64-bit ext4 filesystems (#1851674)

View File

@ -1,2 +1 @@
SHA512 (btrfs-progs-v6.2.2.tar.sign) = cd05827dfd66de7eefb0dc9534baacffe7b115fa1f3b2c0d0e7bb280ff47ed9c6308684db2284f65750fb883bbcc2fecb36c09b597f11b07e29d8864b032af33
SHA512 (btrfs-progs-v6.2.2.tar.xz) = 967e1c1a6b956a4e11a794aad090d1cf370fd98e4186525ccfbbbc9ae3f2bb66ace1d684730f93c558403b7ac1c991aec3d04d07548b19ee1516352a069431db
SHA512 (btrfs-progs-v5.7.tar.xz) = 72c3af13ca589f2e0b96cb7602319035ef8aab6ee224fff3544a5d0bfc013a66552dde4533ec5e64696d404b8905431cd0f25367c40fd34ea39be7c0ed8c2d16