diff --git a/btrfs-progs-v5.16.2.tar.sign b/btrfs-progs-v5.16.2.tar.sign new file mode 100644 index 0000000000000000000000000000000000000000..9f7bd3185a57c59842a545cf6b018d11082b2384 Binary files /dev/null and b/btrfs-progs-v5.16.2.tar.sign differ diff --git a/btrfs-progs-v5.16.2.tar.xz b/btrfs-progs-v5.16.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..83e28728b87e841530696ca78d8288d1abd12b84 Binary files /dev/null and b/btrfs-progs-v5.16.2.tar.xz differ diff --git a/btrfs-progs.spec b/btrfs-progs.spec new file mode 100644 index 0000000000000000000000000000000000000000..cb92e1b3bb65c43be730fd448fe1ae71e1c94077 --- /dev/null +++ b/btrfs-progs.spec @@ -0,0 +1,150 @@ +%define anolis_release 1 +# Local definition of version_no_tilde when it doesn't exist +%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}} + +Name: btrfs-progs +Version: 5.16.2 +Release: %{anolis_release}%{?dist} +Summary: Userspace programs for btrfs + +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 + +BuildRequires: gnupg2 +BuildRequires: gcc, autoconf, automake, make +BuildRequires: e2fsprogs-devel +BuildRequires: libacl-devel, lzo-devel +BuildRequires: pkgconfig(blkid) +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libzstd) >= 1.0.0 +BuildRequires: asciidoc, xmlto +BuildRequires: systemd +BuildRequires: python3-devel >= 3.4 +BuildRequires: python3-setuptools + +%description +The btrfs-progs package provides all the userspace programs needed to create, +check, modify and correct any inconsistencies in the btrfs filesystem. + +%package -n libbtrfs +Summary: btrfs filesystem-specific runtime libraries +License: GPLv2 +# Upstream deprecated this library +Provides: deprecated() +# This was not properly split out before +Conflicts: %{name} < 4.20.2 + +%description -n libbtrfs +libbtrfs contains the main library used by btrfs +filesystem-specific programs. + +%package -n libbtrfsutil +Summary: btrfs filesystem-specific runtime utility libraries +License: LGPLv2+ +# This was not properly split out before +Conflicts: %{name}-devel < 4.20.2 + +%description -n libbtrfsutil +libbtrfsutil contains an alternative utility library used by btrfs +filesystem-specific programs. + +%package devel +Summary: btrfs filesystem-specific libraries and headers +# libbtrfsutil is LGPLv2+ +License: GPLv2 and LGPLv2+ +Requires: %{name} = %{version}-%{release} +Requires: libbtrfs%{?_isa} = %{version}-%{release} +Requires: libbtrfsutil%{?_isa} = %{version}-%{release} + +%description devel +btrfs-progs-devel contains the libraries and header files needed to +develop btrfs filesystem-specific programs. + +It includes development files for two libraries: +- libbtrfs (GPLv2) +- libbtrfsutil (LGPLv2+) + +You should install btrfs-progs-devel if you want to develop +btrfs filesystem-specific programs. + +%package -n python3-btrfsutil +Summary: Python 3 bindings for libbtrfsutil +License: LGPLv2+ +Requires: libbtrfsutil%{?_isa} = %{version}-%{release} +%{?python_provide:%python_provide python3-btrfsutil} + +%description -n python3-btrfsutil +python3-btrfsutil contains Python 3 bindings to the libbtrfsutil library, +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. + +%prep +xzcat '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=- +%autosetup -n %{name}-v%{version_no_tilde} -p1 + +%build +./autogen.sh +%configure CFLAGS="%{optflags} -fno-strict-aliasing" --disable-python +%make_build + +pushd libbtrfsutil/python +%py3_build +popd + +%install +%make_install mandir=%{_mandir} bindir=%{_sbindir} libdir=%{_libdir} incdir=%{_includedir} +install -Dpm0644 btrfs-completion %{buildroot}%{_datadir}/bash-completion/completions/btrfs +# Nuke the static lib +rm -v %{buildroot}%{_libdir}/*.a + +pushd libbtrfsutil/python +%py3_install +popd + +%files +%license COPYING +%{_sbindir}/btrfsck +%{_sbindir}/fsck.btrfs +%{_sbindir}/mkfs.btrfs +%{_sbindir}/btrfs-image +%{_sbindir}/btrfs-convert +%{_sbindir}/btrfs-select-super +%{_sbindir}/btrfstune +%{_sbindir}/btrfs +%{_sbindir}/btrfs-map-logical +%{_sbindir}/btrfs-find-root +%{_mandir}/man5/* +%{_mandir}/man8/* +%{_udevrulesdir}/64-btrfs-dm.rules +%{_udevrulesdir}/64-btrfs-zoned.rules +%{_datadir}/bash-completion/completions/btrfs + +%files -n libbtrfs +%license COPYING +%{_libdir}/libbtrfs.so.0* + +%files -n libbtrfsutil +%license libbtrfsutil/COPYING +%{_libdir}/libbtrfsutil.so.1* + +%files devel +%{_includedir}/* +%{_libdir}/libbtrfs.so +%{_libdir}/libbtrfsutil.so +%{_libdir}/pkgconfig/libbtrfsutil.pc + +%files -n python3-btrfsutil +%license libbtrfsutil/COPYING +%{python3_sitearch}/btrfsutil.*.so +%{python3_sitearch}/btrfsutil-*.egg-info/ + +%changelog +* Mon Apr 11 2022 Zhongling He 5.16.2-1 +- Init package from upstream v5.16.2 diff --git a/gpgkey-F2B41200C54EFB30380C1756C565D5F9D76D583B.gpg b/gpgkey-F2B41200C54EFB30380C1756C565D5F9D76D583B.gpg new file mode 100644 index 0000000000000000000000000000000000000000..8a68d3f2e8d19229b6c656935cbea48501d5bf7a Binary files /dev/null and b/gpgkey-F2B41200C54EFB30380C1756C565D5F9D76D583B.gpg differ