[packages/btrfs-progs] - updated to 4.17 - updated man patch - added sh patch (adjust for ksh rejecting variable substituti
qboosh
qboosh at pld-linux.org
Thu Jul 19 18:50:29 CEST 2018
commit 6d4283bb0ef9f1161d81499171bcd467f8367270
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jul 19 18:52:21 2018 +0200
- updated to 4.17
- updated man patch
- added sh patch (adjust for ksh rejecting variable substitution)
- added python-async patch (adjust Python API for "async" being keyword since Python 3.5)
- added libbtrfsutil* and python3-btrfsutil packages
btrfs-progs-man.patch | 30 ++++++---
btrfs-progs-python-async.patch | 40 ++++++++++++
btrfs-progs-sh.patch | 11 ++++
btrfs-progs.spec | 144 ++++++++++++++++++++++++++++++++++++++---
4 files changed, 206 insertions(+), 19 deletions(-)
---
diff --git a/btrfs-progs.spec b/btrfs-progs.spec
index e7c721c..03405a9 100644
--- a/btrfs-progs.spec
+++ b/btrfs-progs.spec
@@ -1,13 +1,23 @@
+#
+# Conditional build:
+%bcond_without python # Python bindings for libbtrfsutil
+%bcond_without tests # libbtrfsutil tests (requires python)
+
+%if %{without python}
+%undefine with_tests
+%endif
Summary: Utilities belonging to the btrfs filesystem
Summary(pl.UTF-8): Narzędzia należące do systemu plików btrfs
Name: btrfs-progs
-Version: 4.12
+Version: 4.17
Release: 1
License: GPL v2
Group: Applications/System
Source0: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/%{name}-v%{version}.tar.xz
-# Source0-md5: 4b1a143677597de413381118db8c10bb
+# Source0-md5: cbe47358a971d80529356a3b9aafa097
Patch0: %{name}-man.patch
+Patch1: %{name}-sh.patch
+Patch2: %{name}-python-async.patch
URL: http://btrfs.wiki.kernel.org/
BuildRequires: acl-devel
BuildRequires: asciidoc
@@ -18,10 +28,17 @@ BuildRequires: libcom_err-devel
BuildRequires: libuuid-devel
BuildRequires: lzo-devel >= 2
BuildRequires: pkgconfig >= 0.9.0
+%{?with_python:BuildRequires: python3-devel >= 1:3.4}
+BuildRequires: reiserfsprogs-devel >= 3.6.27
BuildRequires: tar >= 1:1.22
+BuildRequires: udev-devel >= 1:190
BuildRequires: xmlto
BuildRequires: xz
BuildRequires: zlib-devel
+BuildRequires: zstd-devel >= 1.0.0
+Requires: e2fsprogs-libs >= 1.42.0
+Requires: reiserfsprogs-libs >= 1:3.6.27
+Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sbindir /sbin
@@ -37,11 +54,22 @@ przy zapisie (copy-on-write), którego celem jest zaimplementowanie
zaawansowanych możliwości ze szczególnym naciskiem na odporność na
awarie, naprawę i łatwe administrowanie.
+%package libs
+Summary: Shared btrfs library
+Summary(pl.UTF-8): Biblioteka współdzielona btrfs
+Group: Libraries
+
+%description libs
+Shared btrfs library.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona btrfs.
+
%package devel
Summary: Header files for btrfs filesystem-specific library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dla systemu plików btrfs
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-libs = %{version}-%{release}
%description devel
This package contains the header files needed to develop btrfs
@@ -63,17 +91,81 @@ Static btrfs filesystem library.
%description static -l pl.UTF-8
Statyczna biblioteka dla systemu plików btrfs.
+%package -n libbtrfsutil
+Summary: Library for managing Btrfs filesystems
+Summary(pl.UTF-8): Biblioteka do zarządzania systemami plików Btrfs
+License: LGPL v3
+Group: Libraries
+
+%description -n libbtrfsutil
+libbtrfsutil is a library for managing Btrfs filesystems. It is
+licensed under the LGPL. libbtrfsutil provides interfaces for a subset
+of the operations offered by the btrfs command line utility. It also
+has official Python bindings (Python 3 only).
+
+%description -n libbtrfsutil -l pl.UTF-8
+libbtrfsutil to biblioteka do zarządzania systemami plików Btrfs. Jest
+dostępna na licencji LGPL. Udostępnia interfejsy do podzbioru operacji
+oferowanych przez narzędzie linii poleceń btrfs. Ma także oficjalne
+wiązania do Pythona (tylko Pythona 3).
+
+%package -n libbtrfsutil-devel
+Summary: Header file for libbtrfsutil library
+Summary(pl.UTF-8): Plik nagłówkowy biblioteki libbtrfsutil
+License: LGPL v3
+Group: Development/Libraries
+Requires: libbtrfsutil = %{version}-%{release}
+
+%description -n libbtrfsutil-devel
+Header file for libbtrfsutil library.
+
+%description -n libbtrfsutil-devel -l pl.UTF-8
+Plik nagłówkowy biblioteki libbtrfsutil.
+
+%package -n libbtrfsutil-static
+Summary: Static libbtrfsutil library
+Summary(pl.UTF-8): Statyczna biblioteka libbtrfsutil
+License: LGPL v3
+Group: Development/Libraries
+Requires: libbtrfsutil-devel = %{version}-%{release}
+
+%description -n libbtrfsutil-static
+Static libbtrfsutil library.
+
+%description -n libbtrfsutil-static -l pl.UTF-8
+Statyczna biblioteka libbtrfsutil.
+
+%package -n python3-btrfsutil
+Summary: Python library for managing Btrfs filesystems
+Summary(pl.UTF-8): Biblioteka Pythona do zarządzania systemami plików Btrfs
+Group: Libraries/Python
+License: LGPL v3
+Requires: libbtrfsutil = %{version}-%{release}
+
+%description -n python3-btrfsutil
+Python library for managing Btrfs filesystems.
+
+%description -n python3-btrfsutil -l pl.UTF-8
+Biblioteka Pythona do zarządzania systemami plików Btrfs.
+
%prep
%setup -q -n %{name}-v%{version}
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
-%configure
+%configure \
+ %{!?with_python:--disable-python}
%{__make} \
V=1
+%if %{with tests}
+%{__make} test-libbtrfsutil
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
@@ -84,26 +176,34 @@ install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
libdir=%{_libdir} \
DESTDIR=$RPM_BUILD_ROOT
+%if %{with python}
+%{__make} install_python \
+ prefix=%{_prefix} \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%post -n libbtrfsutil -p /sbin/ldconfig
+%postun -n libbtrfsutil -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc CHANGES README.md
%attr(755,root,root) %{_sbindir}/btrfs
%attr(755,root,root) %{_sbindir}/btrfs-convert
-%attr(755,root,root) %{_sbindir}/btrfs-debug-tree
%attr(755,root,root) %{_sbindir}/btrfs-find-root
%attr(755,root,root) %{_sbindir}/btrfs-image
%attr(755,root,root) %{_sbindir}/btrfs-map-logical
%attr(755,root,root) %{_sbindir}/btrfs-select-super
-%attr(755,root,root) %{_sbindir}/btrfs-zero-log
%attr(755,root,root) %{_sbindir}/btrfsck
%attr(755,root,root) %{_sbindir}/btrfstune
%attr(755,root,root) %{_sbindir}/fsck.btrfs
%attr(755,root,root) %{_sbindir}/mkfs.btrfs
-%attr(755,root,root) %{_libdir}/libbtrfs.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbtrfs.so.0
/lib/udev/rules.d/64-btrfs-dm.rules
%{_mandir}/man5/btrfs.5*
%{_mandir}/man8/btrfs.8*
@@ -113,6 +213,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/fsck.btrfs.8*
%{_mandir}/man8/mkfs.btrfs.8*
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbtrfs.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbtrfs.so.0
+
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libbtrfs.so
@@ -121,3 +226,24 @@ rm -rf $RPM_BUILD_ROOT
%files static
%defattr(644,root,root,755)
%{_libdir}/libbtrfs.a
+
+%files -n libbtrfsutil
+%defattr(644,root,root,755)
+%doc libbtrfsutil/README.md
+%attr(755,root,root) %{_libdir}/libbtrfsutil.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbtrfsutil.so.1
+
+%files -n libbtrfsutil-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbtrfsutil.so
+%{_includedir}/btrfsutil.h
+
+%files -n libbtrfsutil-static
+%defattr(644,root,root,755)
+%{_libdir}/libbtrfsutil.a
+
+%if %{with python}
+%files -n python3-btrfsutil
+%attr(755,root,root) %{py3_sitedir}/btrfsutil.cpython-*.so
+%{py3_sitedir}/btrfsutil-1.0.0-py*.egg-info
+%endif
diff --git a/btrfs-progs-man.patch b/btrfs-progs-man.patch
index af98d9a..9f42d35 100644
--- a/btrfs-progs-man.patch
+++ b/btrfs-progs-man.patch
@@ -1,17 +1,27 @@
---- btrfs-progs-v4.5.1/Documentation/Makefile.in.orig 2016-04-01 21:55:07.283162563 +0200
-+++ btrfs-progs-v4.5.1/Documentation/Makefile.in 2016-04-01 21:56:25.349825953 +0200
-@@ -92,10 +92,10 @@
+--- btrfs-progs-v4.17/Documentation/Makefile.in.orig 2018-06-15 16:21:17.000000000 +0200
++++ btrfs-progs-v4.17/Documentation/Makefile.in 2018-07-18 20:55:12.806687678 +0200
+@@ -37,9 +37,9 @@
+ MAN_TXT = $(MAN3_TXT) $(MAN8_TXT) $(MAN5_TXT)
+ MAN_XML = $(patsubst %.asciidoc,%.xml,$(MAN_TXT))
+ MAN_HTML = $(patsubst %.asciidoc,%.html,$(MAN_TXT))
+-GZ_MAN3 = $(patsubst %.asciidoc,%.3.gz,$(MAN3_TXT))
+-GZ_MAN5 = $(patsubst %.asciidoc,%.5.gz,$(MAN5_TXT))
+-GZ_MAN8 = $(patsubst %.asciidoc,%.8.gz,$(MAN8_TXT))
++GZ_MAN3 = $(patsubst %.asciidoc,%.3,$(MAN3_TXT))
++GZ_MAN5 = $(patsubst %.asciidoc,%.5,$(MAN5_TXT))
++GZ_MAN8 = $(patsubst %.asciidoc,%.8,$(MAN8_TXT))
+
+ mandir ?= $(prefix)/share/man
+ man3dir = $(mandir)/man3
+@@ -99,9 +99,9 @@
+ $(INSTALL) -m 644 $(GZ_MAN5) $(DESTDIR)$(man5dir)
+ # the source file name of btrfs.5 clashes with section 8 page, but we
# want to keep the code generic
- $(MV) $(DESTDIR)$(man5dir)/btrfs-man5.5.gz $(DESTDIR)$(man5dir)/btrfs.5.gz
+- $(MV) $(DESTDIR)$(man5dir)/btrfs-man5.5.gz $(DESTDIR)$(man5dir)/btrfs.5.gz
++ $(MV) $(DESTDIR)$(man5dir)/btrfs-man5.5 $(DESTDIR)$(man5dir)/btrfs.5
$(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir)
- $(LN_S) -f btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz
-- $(LN_S) -f btrfs-rescue.8.gz $(DESTDIR)$(man8dir)/btrfs-zero-log.8.gz
-- $(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-debug-tree.8.gz
-- $(LN_S) -f btrfs-inspect-internal.8.gz $(DESTDIR)$(man8dir)/btrfs-show-super.8.gz
+ $(LN_S) -f btrfs-check.8 $(DESTDIR)$(man8dir)/btrfsck.8
-+ $(LN_S) -f btrfs-rescue.8 $(DESTDIR)$(man8dir)/btrfs-zero-log.8
-+ $(LN_S) -f btrfs-inspect-internal.8 $(DESTDIR)$(man8dir)/btrfs-debug-tree.8
-+ $(LN_S) -f btrfs-inspect-internal.8 $(DESTDIR)$(man8dir)/btrfs-show-super.8
uninstall:
cd $(DESTDIR)$(man8dir); rm -f btrfs-check.8.gz $(GZ_MAN8)
diff --git a/btrfs-progs-python-async.patch b/btrfs-progs-python-async.patch
new file mode 100644
index 0000000..8574205
--- /dev/null
+++ b/btrfs-progs-python-async.patch
@@ -0,0 +1,40 @@
+--- btrfs-progs-v4.17/libbtrfsutil/python/subvolume.c.orig 2018-06-15 16:21:17.000000000 +0200
++++ btrfs-progs-v4.17/libbtrfsutil/python/subvolume.c 2018-07-19 18:23:25.792471799 +0200
+@@ -322,7 +322,7 @@
+
+ PyObject *create_subvolume(PyObject *self, PyObject *args, PyObject *kwds)
+ {
+- static char *keywords[] = {"path", "async", "qgroup_inherit", NULL};
++ static char *keywords[] = {"path", "async_", "qgroup_inherit", NULL};
+ struct path_arg path = {.allow_fd = false};
+ enum btrfs_util_error err;
+ int async = 0;
+@@ -352,7 +352,7 @@
+ PyObject *create_snapshot(PyObject *self, PyObject *args, PyObject *kwds)
+ {
+ static char *keywords[] = {
+- "source", "path", "recursive", "read_only", "async",
++ "source", "path", "recursive", "read_only", "async_",
+ "qgroup_inherit", NULL,
+ };
+ struct path_arg src = {.allow_fd = true}, dst = {.allow_fd = false};
+--- btrfs-progs-v4.17/libbtrfsutil/python/tests/test_subvolume.py.orig 2018-06-15 16:21:17.000000000 +0200
++++ btrfs-progs-v4.17/libbtrfsutil/python/tests/test_subvolume.py 2018-07-19 18:24:06.355804667 +0200
+@@ -202,7 +202,7 @@
+ btrfsutil.create_subvolume(subvol + '6//')
+ self.assertTrue(btrfsutil.is_subvolume(subvol + '6'))
+
+- transid = btrfsutil.create_subvolume(subvol + '7', async=True)
++ transid = btrfsutil.create_subvolume(subvol + '7', async_=True)
+ self.assertTrue(btrfsutil.is_subvolume(subvol + '7'))
+ self.assertGreater(transid, 0)
+
+@@ -265,7 +265,7 @@
+ btrfsutil.create_snapshot(subvol, snapshot + '2', recursive=True)
+ self.assertTrue(os.path.exists(os.path.join(snapshot + '2', 'nested/more_nested/nested_dir')))
+
+- transid = btrfsutil.create_snapshot(subvol, snapshot + '3', recursive=True, async=True)
++ transid = btrfsutil.create_snapshot(subvol, snapshot + '3', recursive=True, async_=True)
+ self.assertTrue(os.path.exists(os.path.join(snapshot + '3', 'nested/more_nested/nested_dir')))
+ self.assertGreater(transid, 0)
+
diff --git a/btrfs-progs-sh.patch b/btrfs-progs-sh.patch
new file mode 100644
index 0000000..5ae9abc
--- /dev/null
+++ b/btrfs-progs-sh.patch
@@ -0,0 +1,11 @@
+--- btrfs-progs-v4.17/configure.ac.orig 2018-06-15 16:21:17.000000000 +0200
++++ btrfs-progs-v4.17/configure.ac 2018-07-18 20:17:29.626713519 +0200
+@@ -280,7 +280,7 @@
+ documentation: ${enable_documentation}
+ doc generator: ${ASCIIDOC_TOOL}
+ backtrace support: ${enable_backtrace}
+- btrfs-convert: ${enable_convert} ${convertfs:+($convertfs)}
++ btrfs-convert: ${enable_convert}${convertfs:+ ($convertfs)}
+ btrfs-restore zstd: ${enable_zstd}
+ Python bindings: ${enable_python}
+ Python interpreter: ${PYTHON}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/btrfs-progs.git/commitdiff/6d4283bb0ef9f1161d81499171bcd467f8367270
More information about the pld-cvs-commit
mailing list