From facf7308e0ef620b7a2d1108c1d3025d618bcbf6 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mar 10 2019 13:39:05 +0000 Subject: New upstream v4.20.2 - Properly split out libraries into libs subpackages - Slightly modernize the spec --- diff --git a/.gitignore b/.gitignore index fb7706f..8c5a99a 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ /btrfs-progs-v4.17.1.tar.xz /btrfs-progs-v4.19.tar.xz /btrfs-progs-v4.19.1.tar.xz +/btrfs-progs-v4.20.2.tar.xz diff --git a/btrfs-progs.spec b/btrfs-progs.spec index a24a4a8..d04d1d8 100644 --- a/btrfs-progs.spec +++ b/btrfs-progs.spec @@ -1,6 +1,9 @@ +# Disable for now until version handling question is dealt with +%bcond_with python + Name: btrfs-progs -Version: 4.19.1 -Release: 2%{?dist} +Version: 4.20.2 +Release: 1%{?dist} Summary: Userspace programs for btrfs License: GPLv2 @@ -12,7 +15,11 @@ 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, python3-devel >= 3.4 +BuildRequires: systemd + +%if %{with python} +BuildRequires: python3-devel >= 3.4 +%endif %define _root_sbindir /sbin @@ -20,34 +27,87 @@ BuildRequires: systemd, python3-devel >= 3.4 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 +# 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: LGPLv3 +# 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 -Requires: btrfs-progs = %{version}-%{release} +# libbtrfsutil is LGPLv3 +License: GPLv2 and LGPLv3 +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 (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: LGPLv3 +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. +%endif + %prep -%setup -q -n %{name}-v%{version} +%autosetup -n %{name}-v%{version} %build ./autogen.sh -%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +%configure CFLAGS="%{optflags} -fno-strict-aliasing" %{!?with_python:--disable-python} make %{?_smp_mflags} +%if %{with python} +pushd libbtrfsutil/python +%py3_build +popd +%endif + %install -rm -rf $RPM_BUILD_ROOT -make mandir=%{_mandir} bindir=%{_sbindir} libdir=%{_libdir} incdir=%{_includedir} install DESTDIR=$RPM_BUILD_ROOT +make mandir=%{_mandir} bindir=%{_sbindir} libdir=%{_libdir} incdir=%{_includedir} install DESTDIR=%{buildroot} # Nuke the static lib -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a +rm -f %{buildroot}/%{_libdir}/*.a + +%if %{with python} +pushd libbtrfsutil/python +%py3_install +popd +%endif %files -%doc COPYING -%{_libdir}/libbtrfs.so.0* +%license COPYING %{_sbindir}/btrfsck %{_sbindir}/fsck.btrfs %{_sbindir}/mkfs.btrfs @@ -62,15 +122,32 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a %{_mandir}/man8/*.gz %{_udevrulesdir}/64-btrfs-dm.rules +%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}/libbtrfsutil.so -%{_libdir}/libbtrfsutil.so.1 -%{_libdir}/libbtrfsutil.so.1.1.0 + +%if %{with python} +%files -n python3-btrfsutil +%license libbtrfsutil/COPYING* +%{python3_sitearch}/btrfsutil.*.so +%{python3_sitearch}/btrfsutil-*.egg-info +%endif %changelog +* Sun Mar 10 2019 Neal Gompa - 4.20.2-1 +- New upstream release +- Properly split out libraries into libs subpackages +- Slightly modernize the spec + * Thu Jan 31 2019 Fedora Release Engineering - 4.19.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index f368246..d2d5f82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (btrfs-progs-v4.19.1.tar.xz) = 834b0a16216437301637d44561fd265db167b7084de7d43d36802907645627d955421c1f5c46f0eb72d85f8b8d70905e5f6c0d539a34693704aa188085dfeec4 +SHA512 (btrfs-progs-v4.20.2.tar.xz) = a542423589e7ee35b9a1791ef13e4c8ea4be56b33d6119a18d046233cfc04678c525cad545387aeb48e0dbd8249c5a501100fdee8f6d6882c906e0a737a1778a