db07609875
segfaults from bnc#710486 due to unchecked usage of return value of open_ctree() [fixed compilation warnings] - pull upstream, replace existing patches, spec update - update 'restore' utility - lzo support - tools may now take earlies superblock when opening the fs - other fixes - pull integration-20111030 branch - mkfs: force mkfs if desired - other fixes - add btrfs-dump-super to mkinitrd - other fixes - skip non-existent devices or without media - documentation updates - scrubbing single device - graceful error handling when opening fs fails - updated mkinitrd script to scan devices before mount (bnc#727383) OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=115
201 lines
7.3 KiB
RPMSpec
201 lines
7.3 KiB
RPMSpec
#
|
|
# spec file for package btrfsprogs
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
|
|
Name: btrfsprogs
|
|
Url: http://btrfs.wiki.kernel.org/index.php/Main_Page
|
|
Version: 0.19
|
|
Release: 50
|
|
%define tar_version v0.19-118-gfdb6c04
|
|
Summary: Utilities for the Btrfs filesystem
|
|
License: GPL v2 only
|
|
Group: System/Filesystems
|
|
Supplements: filesystem(btrfs)
|
|
# git archive --format=tar --prefix=btrfs-progs-`git describe`/ HEAD > %D/btrfs-progs-`git describe`.tar
|
|
Source: btrfs-progs-%{tar_version}.tar.bz2
|
|
Source1: boot-btrfs.sh
|
|
Patch0: memleak-fix.diff
|
|
Patch1: Plug-Memory-leak-in-find_and_setup_log_root.patch
|
|
Patch1000: local-version-override.patch
|
|
|
|
# patches above upstream master:
|
|
# + hugo's integration
|
|
Patch100: 0100-btrfs-progs-ignore-a-option-in-mkfs.patch
|
|
Patch102: 0102-Add-the-force-option.patch
|
|
Patch103: 0103-mkfs.btrfs-man-page-document-the-force-option.patch
|
|
Patch104: 0104-Ignore-the-error-ENXIO-and-ENOMEDIUM-during-a-devs-s.patch
|
|
Patch105: 0105-Regression-tests.patch
|
|
Patch106: 0106-Fix-sub-snap-parameter-handling.patch
|
|
Patch107: 0107-Add-info-for-the-commands.patch
|
|
Patch108: 0108-Add-the-header-footer-introduction-of-the-man-page.patch
|
|
Patch109: 0109-helpextract-tool-to-extract-the-info-for-the-help-fr.patch
|
|
Patch110: 0110-Update-the-makefile-for-generating-the-man-page.patch
|
|
Patch111: 0111-Show-the-help-messages-from-the-info-in-the-comment.patch
|
|
Patch112: 0112-Update-the-makefile-for-generating-the-help-messages.patch
|
|
Patch113: 0113-Btrfs-progs-add-restriper-commands.patch
|
|
Patch114: 0114-btrfs-progs-add-qgroup-commands.patch
|
|
Patch115: 0115-btrfs-progs-fixup-is_mounted-checks.patch
|
|
# + josef's restore utility fixes
|
|
Patch116: 0116-Btrfs-progs-add-an-option-for-specifying-the-root-to.patch
|
|
Patch117: 0117-Btrfs-progs-try-other-mirrors-if-decomression-fails.patch
|
|
Patch118: 0118-Btrfs-progs-try-other-mirrors-on-read-failure.patch
|
|
Patch119: 0119-btrfs-progs-Fix-error-handling-for-failed-reads-in-r.patch
|
|
Patch120: 0120-btrfs-progs-Check-metadata-mirrors-in-find-root.patch
|
|
Patch121: 0121-restore-Split-output-directory-and-btrfs-local-path-.patch
|
|
Patch122: 0122-restore-Add-regex-matching-of-paths-and-files-to-be-.patch
|
|
Patch123: 0123-btrfs-progs-In-find-root-dump-bytenr-for-every-slot.patch
|
|
Patch124: 0124-btrfs-progs-Add-utility-to-dump-all-superblocks-foun.patch
|
|
Patch125: 0125-btrfs-progs-Add-the-ability-to-use-the-earliest-supe.patch
|
|
Patch126: 0126-btrfs-progs-Use-oldest-super-for-btrfs-select-super..patch
|
|
Patch127: 0127-btrfs-progs-add-lzo-compression-support-to-restore.patch
|
|
Patch128: 0128-btrfs-progs-fix-regexec-to-only-work-if-we-actually-.patch
|
|
Patch129: 0129-btrfs-progs-Fix-compilation-errors-with-btrfs-select.patch
|
|
Patch130: 0130-Btrfs-progs-fix-restore-to-fall-back-to-the-broken-o.patch
|
|
Patch131: 0131-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch
|
|
Patch132: 0132-Btrfs-progs-make-find_and_setup_root-return-an-error.patch
|
|
Patch133: 0133-Btrfs-progs-check-return-value-properly.patch
|
|
Patch134: 0134-Btrfs-progs-give-restore-a-list-roots-option.patch
|
|
Patch135: 0135-Btrfs-progs-fix-compiler-warning-of-extent-tree.c.patch
|
|
Patch136: 0136-Btrfs-progs-change-the-way-mkfs-picks-raid-profiles.patch
|
|
Patch137: 0137-Btrfs-progs-fail-gracefully-on-error-from-open_ctree.patch
|
|
Patch138: 0138-Btrfs-progs-bugfix-for-scrubbing-single-devices.patch
|
|
|
|
#
|
|
Patch150: btrfs-progs-fix-open_ctree_usage_segfaults.patch
|
|
|
|
# - missing kernel features: qgroups
|
|
Patch900: 0900-Revert-btrfs-progs-add-qgroup-commands.patch
|
|
Patch901: 0901-Revert-Btrfs-progs-add-restriper-commands.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libacl-devel libext2fs-devel libuuid-devel lzo-devel zlib-devel
|
|
# for /bin/true
|
|
Requires: coreutils
|
|
|
|
%description
|
|
Utilities needed to create and maintain btrfs file systems under Linux.
|
|
|
|
%prep
|
|
%setup -q -n btrfs-progs-%{tar_version}
|
|
%patch0
|
|
%patch1 -p1
|
|
%patch1000 -p1
|
|
%patch100 -p1
|
|
%patch102 -p1
|
|
%patch103 -p1
|
|
%patch104 -p1
|
|
%patch105 -p1
|
|
%patch106 -p1
|
|
%patch107 -p1
|
|
%patch108 -p1
|
|
%patch109 -p1
|
|
%patch110 -p1
|
|
%patch111 -p1
|
|
%patch112 -p1
|
|
%patch113 -p1
|
|
%patch114 -p1
|
|
%patch115 -p1
|
|
%patch116 -p1
|
|
%patch117 -p1
|
|
%patch118 -p1
|
|
%patch119 -p1
|
|
%patch120 -p1
|
|
%patch121 -p1
|
|
%patch122 -p1
|
|
%patch123 -p1
|
|
%patch124 -p1
|
|
%patch125 -p1
|
|
%patch126 -p1
|
|
%patch127 -p1
|
|
%patch128 -p1
|
|
%patch129 -p1
|
|
%patch130 -p1
|
|
%patch131 -p1
|
|
%patch132 -p1
|
|
%patch133 -p1
|
|
%patch134 -p1
|
|
%patch135 -p1
|
|
%patch136 -p1
|
|
%patch137 -p1
|
|
%patch138 -p1
|
|
%patch150 -p1
|
|
%patch900 -p1
|
|
%patch901 -p1
|
|
|
|
%build
|
|
make %{?_smp_mflags} CFLAGS="%{optflags}" all convert \
|
|
btrfs-zero-log btrfs-select-super btrfs-image btrfstune \
|
|
restore find-root btrfs-dump-super
|
|
|
|
%install
|
|
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=/sbin mandir=%{_mandir}
|
|
install -m 0755 -d ${RPM_BUILD_ROOT}/sbin
|
|
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir}
|
|
# remove dangerous and unwanted tools
|
|
rm ${RPM_BUILD_ROOT}/sbin/btrfs-corrupt-block
|
|
rm ${RPM_BUILD_ROOT}/sbin/calc-size
|
|
# add btrfs- prefix to generic names
|
|
mv ${RPM_BUILD_ROOT}/sbin/restore ${RPM_BUILD_ROOT}/sbin/btrfs-restore
|
|
mv ${RPM_BUILD_ROOT}/sbin/find-root ${RPM_BUILD_ROOT}/sbin/btrfs-find-root
|
|
# move some utilities out of /sbin
|
|
mv ${RPM_BUILD_ROOT}/sbin/{btrfs-show,btrfs-vol,btrfsctl} ${RPM_BUILD_ROOT}/%{_bindir}
|
|
mv ${RPM_BUILD_ROOT}/sbin/{btrfs-map-logical,btrfs-debug-tree} ${RPM_BUILD_ROOT}/%{_bindir}
|
|
# mkinitrd rescue utilities
|
|
install -m 0755 btrfs-zero-log ${RPM_BUILD_ROOT}/sbin
|
|
install -m 0755 btrfs-select-super ${RPM_BUILD_ROOT}/sbin
|
|
install -m 0755 btrfs-image ${RPM_BUILD_ROOT}/sbin
|
|
install -m 0755 btrfstune ${RPM_BUILD_ROOT}/sbin
|
|
install -m 0755 btrfs-dump-super ${RPM_BUILD_ROOT}/sbin
|
|
# command line options are not compatible (bnc#599224)
|
|
# copy needed if /bin is different fs from /sbin
|
|
cp /bin/true ${RPM_BUILD_ROOT}/sbin/fsck.btrfs
|
|
install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
|
cp %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
/sbin/fsck.btrfs
|
|
# mkinitrd utils
|
|
/sbin/btrfs
|
|
/sbin/btrfs-zero-log
|
|
/sbin/btrfs-convert
|
|
/sbin/btrfs-select-super
|
|
/sbin/btrfs-image
|
|
/sbin/btrfstune
|
|
/sbin/btrfsck
|
|
/sbin/btrfs-restore
|
|
/sbin/btrfs-find-root
|
|
/sbin/btrfs-dump-super
|
|
/sbin/mkfs.btrfs
|
|
/lib/mkinitrd/scripts/boot-btrfs.sh
|
|
# other
|
|
/usr/bin/btrfs-map-logical
|
|
/usr/bin/btrfs-debug-tree
|
|
# obsolete
|
|
/usr/bin/btrfs-show
|
|
/usr/bin/btrfs-vol
|
|
/usr/bin/btrfsctl
|
|
%_mandir/man8/btrfs-image.8.gz
|
|
%_mandir/man8/btrfs-show.8.gz
|
|
%_mandir/man8/btrfsck.8.gz
|
|
%_mandir/man8/btrfsctl.8.gz
|
|
%_mandir/man8/mkfs.btrfs.8.gz
|
|
%_mandir/man8/btrfs.8.gz
|
|
|
|
%changelog
|