Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:GA
btrfsprogs
btrfsprogs.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File btrfsprogs.spec of Package btrfsprogs
# # spec file for package btrfsprogs # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define udev_with_btrfs_builtin 190 %define udev_version %(rpm -q --queryformat %%{VERSION} udev) %define package_udev_rules %{udev_version} >= %{udev_with_btrfs_builtin} # enable building of btrfsprogs-static %if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1315 %define build_static 0 %else # temporarily disable until libzstd-devel-static %define build_static 0 %endif # the tarball contains prebuilt documentation %define build_docs 0 %define package_libbtrfsutil 0 %define _dracutmodulesdir %{_libexecdir}/dracut/modules.d Name: btrfsprogs Version: 4.19.1 Release: 0 Summary: Utilities for the Btrfs filesystem License: GPL-2.0 Group: System/Filesystems Url: http://btrfs.wiki.kernel.org/index.php/Main_Page #Git-Web: http://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git #Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs Source: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v%{version}.tar.gz # support for mkinitrd in < 13.1 Source1: boot-btrfs.sh Source2: module-setup.sh.in Source3: dracut-fsck-help.txt Source4: setup-btrfs.sh Source5: sles11-defaults.h Patch1: mkfs-default-features.patch Patch2: 0001-btrfs-progs-Add-support-for-metadata_uuid-field.patch Patch3: 0002-btrfs-progs-btrfstune-Add-support-for-changing-the-u.patch Patch4: 0003-btrfs-progs-Remove-fsid-metdata_uuid-fields-from-fs_.patch Patch5: 0004-btrfs-progs-Remove-btrfs_fs_info-new_fsid.patch Patch6: 0005-btrfs-progs-Directly-pass-root-to-change_devices_uui.patch Patch7: btrfs-progs-check-fixup_extent_flags-needs-to-deal-with-non-skinny-metadata.patch Patch8: btrfs-progs-check-initialize-qgroup_item_count-in-ea.patch Patch9: 0001-btrfs-progs-add-LOGICAL_INO_V2-to-ioctl.h.patch Patch10: 0001-btrfs-progs-inspect-add-support-for-LOGICAL_INO_V2-i.patch Patch11: 0001-btrfs-progs-inspect-increase-logical-resolve-default.patch Patch12: 0001-btrfs-progs-build-add-libmount-dependency.patch Patch13: 0002-btrfs-progs-utils-introduce-find_mount_fsroot.patch Patch14: 0003-btrfs-progs-inspect-use-find_mount_fsroot-in-logical.patch Patch15: 0001-btrfs-progs-Add-optional-dependency-on-libudev.patch Patch16: 0002-btrfs-progs-Ignore-devices-representing-paths-in-mul.patch Patch17: 0003-btrfs-progs-Add-fallback-code-for-path-device-ignore.patch #bsc#1186571 - 32-bit overflow prevention Patch18: 0001-btrfs-progs-Don-t-BUG_ON-when-write_dev_supers-fails.patch Patch19: 0002-btrfs-progs-Refactor-btrfs_finish_extent_commit.patch Patch20: 0003-btrfs-progs-Handle-error-properly-in-btrfs_commit_tr.patch Patch21: 0004-btrfs-progs-convert-Workaround-delayed-ref-bug-by-li.patch Patch22: 0005-btrfs-progs-Exhaust-delayed-refs-and-dirty-block-gro.patch Patch23: 0006-btrfs-progs-convert-prevent-32bit-overflow-for-cctx-.patch Patch24: 0007-btrfs-progs-convert-refuse-to-convert-filesystem-wit.patch %if %build_docs BuildRequires: asciidoc %endif BuildRequires: autoconf BuildRequires: automake BuildRequires: dracut BuildRequires: libattr-devel BuildRequires: libblkid-devel BuildRequires: libext2fs-devel BuildRequires: libmount-devel BuildRequires: libreiserfscore-devel >= 3.6.27 Requires: libreiserfscore0 >= 3.6.27 BuildRequires: libuuid-devel %if 0%{?suse_version} > 1500 BuildRequires: libzstd-devel %endif BuildRequires: lzo-devel BuildRequires: pkg-config %if 0%{?suse_version} >= 1310 BuildRequires: suse-module-tools %endif BuildRequires: udev BuildRequires: libudev-devel %if %build_docs BuildRequires: xmlto %endif BuildRequires: zlib-devel %if 0%{?suse_version} >= 1310 Requires(post): coreutils Requires(postun): coreutils %endif Supplements: filesystem(btrfs) Recommends: btrfsmaintenance %if %{package_udev_rules} Requires: btrfsprogs-udev-rules %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Utilities needed to create and maintain btrfs file systems under Linux. %if %build_static %package -n btrfsprogs-static Summary: Static build of utilities for the Btrfs filesystem Group: System/Filesystems BuildRequires: glibc-devel-static BuildRequires: libblkid-devel-static BuildRequires: libcom_err-devel-static BuildRequires: libext2fs-devel-static BuildRequires: libuuid-devel-static BuildRequires: lzo-devel-static BuildRequires: zlib-devel-static %description -n btrfsprogs-static Static build of utilities needed to create and maintain btrfs file systems under Linux. Suitable for limited or rescue environments. Warning: the zlib and lzo libraries are statically linked in and may lack important updates %endif %package -n libbtrfs0 Summary: Library for interacting with Btrfs Group: System/Libraries %description -n libbtrfs0 This package contains the libbtrfs.so shared library needed for some applications to interface with btrfs. %package -n libbtrfs-devel Summary: Include Files and Libraries for developing with Btrfs Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} Requires: libbtrfs0 = %{version} %description -n libbtrfs-devel This package contains the libraries and headers files for developers to build applications to interface with Btrfs. # rpm < 4.6.0 (SLE11 uses 4.4) doesn't support noarch subpackages. # Fortunately, it doesn't use systemd either so we can just skip it. %if %{package_udev_rules} %package udev-rules Summary: Udev rules for configuring btrfs file systems Group: System/Kernel Conflicts: udev < %{udev_with_btrfs_builtin} BuildArch: noarch %description udev-rules This package contains the udev rule file for configuring device mapper devices that are components of btrfs file systems. It is meant to be used with versions of udev that contain the "built-in" btrfs command (v190 and newer). Older versions of udev will call the version of "btrfs ready" contained in the btrfsprogs package, which does the right thing. %endif %if 0%{package_libbtrfsutil} %package -n libbtrfsutil1 Summary: Utility library for interacting with Btrfs Group: System/Libraries %description -n libbtrfsutil1 This package contains the libbtrfsutil.so shared library. This library is LGPL unlike libbtrfs.so and can be used by applications to interact with Btrfs filesystems. %package -n libbtrfsutil-devel Summary: Include Files and Libraries for developing with libbtrfsutil Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} Requires: libbtrfsutil1 = %{version} %description -n libbtrfsutil-devel This package contains the libraries and headers files for developers to build applications to interface with Btrfs using libbtrfsutil. %endif %prep %setup -q -n btrfs-progs-v%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 %build ./autogen.sh %if 0%{?suse_version} == 1110 cp %{SOURCE5} . export CFLAGS="%{optflags} -include sles11-defaults.h" %endif %configure \ --disable-python \ %if !%{build_docs} --disable-documentation \ %endif %if 0%{?suse_version} <= 1500 --disable-zstd %endif make V=1 %{?_smp_mflags} all \ %if %{build_static} static %endif %install make install \ %if %{build_static} install-static \ %endif DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} %if !%{build_docs} cd Documentation install -m 0755 -d %{buildroot}/%{_mandir}/man5 install -m 0755 -d %{buildroot}/%{_mandir}/man8 install -m 0644 *.5 %{buildroot}/%{_mandir}/man5 install -m 0644 *.8 %{buildroot}/%{_mandir}/man8 cd .. %endif %if %{build_static} make install-static DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} %endif install -m 0755 -d %{buildroot}/%{_sbindir} install -m 0755 -d %{buildroot}/%{_bindir} # move some utilities out of /usr/sbin mv %{buildroot}/%{_sbindir}/btrfs-map-logical %{buildroot}/%{_bindir} # initrd rescue utilities install -m 0755 btrfs-select-super %{buildroot}/%{_sbindir} install -m 0755 btrfs-image %{buildroot}/%{_sbindir} install -m 0755 btrfstune %{buildroot}/%{_sbindir} install -m 0755 btrfs-find-root %{buildroot}/%{_sbindir} install -m 0755 -d %{buildroot}/sbin ln -s %{_sbindir}/btrfs %{buildroot}/sbin ln -s %{_sbindir}/btrfs-convert %{buildroot}/sbin ln -s %{_sbindir}/btrfs-select-super %{buildroot}/sbin ln -s %{_sbindir}/btrfs-image %{buildroot}/sbin ln -s %{_sbindir}/btrfstune %{buildroot}/sbin ln -s %{_sbindir}/btrfsck %{buildroot}/sbin ln -s %{_sbindir}/btrfs-find-root %{buildroot}/sbin ln -s %{_sbindir}/mkfs.btrfs %{buildroot}/sbin ln -s %{_sbindir}/fsck.btrfs %{buildroot}/sbin %if 0%{?suse_version} < 1310 install -d -m0755 %{buildroot}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/ %endif # don't install .a for now rm -f %{buildroot}/%{_libdir}/*.a # bash completion install -m 0755 -d %{buildroot}/%{_datadir}/bash-completion/completions install -m 0644 btrfs-completion %{buildroot}/%{_datadir}/bash-completion/completions/btrfs sed -e 's,@@INSTALLDIR@@,%{_datadir}/%{name}/,;' %{SOURCE2} > module-setup.sh install -m 0755 -D module-setup.sh %{buildroot}/%{_dracutmodulesdir}/95suse-btrfs/module-setup.sh rm -f module-setup.sh install -m 0644 -D %{SOURCE3} %{buildroot}/%{_datadir}/%{name}/dracut-fsck-help.txt %if 0%{package_libbtrfsutil} %else rm -f %{buildroot}/%{_libdir}/libbtrfsutil.so* rm -f %{buildroot}/%{_includedir}/btrfsutil.h %endif %if 0%{!?for_debugging:1} DEBUG_FILES="/sbin/btrfs-find-root %{_sbindir}/btrfs-find-root %{_mandir}/man8/btrfs-find-root.8 /sbin/btrfs-select-super %{_sbindir}/btrfs-select-super" for file in $DEBUG_FILES; do rm -f %{buildroot}$file done %endif %post -n libbtrfs0 -p /sbin/ldconfig %postun -n libbtrfs0 -p /sbin/ldconfig %if 0%{package_libbtrfsutil} %post -n libbtrfsutil1 -p /sbin/ldconfig %postun -n libbtrfsutil1 -p /sbin/ldconfig %endif %if 0%{?suse_version} >= 1310 %post %{?regenerate_initrd_post} %postun %{?regenerate_initrd_post} %posttrans %{?regenerate_initrd_posttrans} %endif %files %defattr(-, root, root) %doc COPYING %dir %{_datadir}/%{name} %{_datadir}/%{name}/dracut-fsck-help.txt %dir %{_dracutmodulesdir}/95suse-btrfs/ %{_dracutmodulesdir}/95suse-btrfs/module-setup.sh /sbin/fsck.btrfs # mkinitrd utils /sbin/btrfs /sbin/btrfs-convert /sbin/btrfs-image /sbin/btrfstune /sbin/btrfsck /sbin/mkfs.btrfs %{_sbindir}/btrfs %{_sbindir}/btrfs-convert %{_sbindir}/btrfs-image %{_sbindir}/btrfstune %{_sbindir}/btrfsck %{_sbindir}/fsck.btrfs %{_sbindir}/mkfs.btrfs %if 0%{?suse_version} < 1310 %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/boot-btrfs.sh /lib/mkinitrd/scripts/setup-btrfs.sh %endif %{_bindir}/btrfs-map-logical %{_mandir}/man8/btrfs-image.8%{?ext_man} %{_mandir}/man8/btrfsck.8%{?ext_man} %{_mandir}/man8/fsck.btrfs.8%{?ext_man} %{_mandir}/man8/mkfs.btrfs.8%{?ext_man} %{_mandir}/man8/btrfs.8%{?ext_man} %{_mandir}/man5/btrfs.5%{?ext_man} %{_mandir}/man8/btrfs-convert.8%{?ext_man} %{_mandir}/man8/btrfs-map-logical.8%{?ext_man} %{_mandir}/man8/btrfstune.8%{?ext_man} %{_mandir}/man8/btrfs-balance.8%{?ext_man} %{_mandir}/man8/btrfs-check.8%{?ext_man} %{_mandir}/man8/btrfs-device.8%{?ext_man} %{_mandir}/man8/btrfs-filesystem.8%{?ext_man} %{_mandir}/man8/btrfs-inspect-internal.8%{?ext_man} %{_mandir}/man8/btrfs-property.8%{?ext_man} %{_mandir}/man8/btrfs-qgroup.8%{?ext_man} %{_mandir}/man8/btrfs-quota.8%{?ext_man} %{_mandir}/man8/btrfs-receive.8%{?ext_man} %{_mandir}/man8/btrfs-replace.8%{?ext_man} %{_mandir}/man8/btrfs-rescue.8%{?ext_man} %{_mandir}/man8/btrfs-restore.8%{?ext_man} %{_mandir}/man8/btrfs-scrub.8%{?ext_man} %{_mandir}/man8/btrfs-send.8%{?ext_man} %{_mandir}/man8/btrfs-subvolume.8%{?ext_man} %{_mandir}/man8/btrfs-select-super.8%{?ext_man} %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/btrfs %if 0%{?for_debugging:1} /sbin/btrfs-find-root %{_sbindir}/btrfs-find-root %{_mandir}/man8/btrfs-find-root.8%{?ext_man} /sbin/btrfs-select-super %{_sbindir}/btrfs-select-super %endif %if %{build_static} %files -n btrfsprogs-static %defattr(-, root, root) %{_sbindir}/btrfs.static %{_sbindir}/btrfs-convert.static %{_sbindir}/btrfs-image.static %{_sbindir}/btrfstune.static %{_sbindir}/btrfsck.static %{_sbindir}/mkfs.btrfs.static %{_sbindir}/btrfs-corrupt-block.static %{_sbindir}/btrfs-find-root.static %{_sbindir}/btrfs-map-logical.static %{_sbindir}/btrfs-select-super.static %endif %files -n libbtrfs0 %defattr(-, root, root) %{_libdir}/libbtrfs.so.* %files -n libbtrfs-devel %defattr(-, root, root) %dir %{_includedir}/btrfs %{_includedir}/btrfs/* %{_libdir}/libbtrfs.so %if 0%{package_libbtrfsutil} %files -n libbtrfsutil1 %defattr(-, root, root) %{_libdir}/libbtrfsutil.so.* %files -n libbtrfsutil-devel %defattr(-, root, root) %{_includedir}/btrfsutil.h %{_libdir}/libbtrfsutil.so %endif %if %{package_udev_rules} %files udev-rules %defattr(-, root, root) %dir %{_udevrulesdir} %{_udevrulesdir}/64-btrfs-dm.rules %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor