btrfsprogs/btrfsprogs.spec

188 lines
6.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package btrfsprogs
#
# Copyright (c) 2013 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.20
Release: 0
- update to upstream master (194aa4a1) - btrfs-restore: deal with NULL returns from read_node_slot - btrfs-restore: use the correct leafsize when reading the FS location - btrfs-find-root: Add options to control generation and level - btrfsck: fix incorrect casting on items in the corrupt_blocks tree - Btrfs-progs: fix closing of devices - Btrfs-progs: enhance btrfs-image to restore image onto multiple disks - Btrfs-progs: cleanup btrfs-image usage - Btrfs-progs: delete fs_devices itself from fs_uuid list before freeing - Btrfs-progs: skip open devices which is missing - Btrfs-progs: fix misuse of skinny metadata in btrfs-image - Btrfs-progs: recover raid0/raid10/raid5/raid6 metadata chunk - Btrfs-progs: Add chunk rebuild function for RAID1/SINGLE/DUP - Btrfs-progs: introduce list_{first, next}_entry/list_splice_tail{_init} - Btrfs-progs: Add chunk recover function - using old chunk items - Btrfs-progs: Add block group check funtion - Btrfs-progs: extend the extent cache for the device extent - Btrfs-progs: use rb-tree instead of extent cache tree for fs/file roots - Btrfs-progs: introduce common insert/search/delete functions for rb-tree - Btrfs-progs: cleanup similar code in open_ctree_* and close_ctree - Btrfs-progs: Don't free the devices when close the ctree - Btrfs-progs: don't close the file descriptor 0 when closing a device - Btrfs-progs: fix missing recow roots when making btrfs filesystem - Add fix for passing super_nr while opening ctree OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=140
2013-09-16 17:51:02 +02:00
%define tar_version v0.20-rc1-358-g194aa4a
Summary: Utilities for the Btrfs filesystem
License: GPL-2.0
Group: System/Filesystems
#Git-Web: http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git
#Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs
# git archive --format=tar --prefix=btrfs-progs-`git describe --tags --match "v*"`/ HEAD > %D/btrfs-progs-`git describe --tags --match "v*"`.tar
Source: btrfs-progs-%{tar_version}.tar.bz2
Source1: boot-btrfs.sh
Source4: setup-btrfs.sh
Source2: btrfs-dev-clear-sb
Patch10: 0010-Btrfs-progs-make-btrfsck-a-hardlink-at-install-time.patch
Patch12: 0012-libbtrfs-Set-SONAME-to-libbtrfs.so.0-instead-of-libb.patch
Patch40: 0040-btrfs-progs-fix-loop-device-mount-checks.patch
Patch1: btrfs-progs-mkfs-default-extref.diff
Patch1000: local-version-override.patch
Patch1001: btrfs-progs-use-IEEE1541-suffixes-for-sizes.patch
Patch1002: btrfs-progs-add-man-page-for-btrfs-convert.patch
- update to upstream master (194aa4a1) - btrfs-restore: deal with NULL returns from read_node_slot - btrfs-restore: use the correct leafsize when reading the FS location - btrfs-find-root: Add options to control generation and level - btrfsck: fix incorrect casting on items in the corrupt_blocks tree - Btrfs-progs: fix closing of devices - Btrfs-progs: enhance btrfs-image to restore image onto multiple disks - Btrfs-progs: cleanup btrfs-image usage - Btrfs-progs: delete fs_devices itself from fs_uuid list before freeing - Btrfs-progs: skip open devices which is missing - Btrfs-progs: fix misuse of skinny metadata in btrfs-image - Btrfs-progs: recover raid0/raid10/raid5/raid6 metadata chunk - Btrfs-progs: Add chunk rebuild function for RAID1/SINGLE/DUP - Btrfs-progs: introduce list_{first, next}_entry/list_splice_tail{_init} - Btrfs-progs: Add chunk recover function - using old chunk items - Btrfs-progs: Add block group check funtion - Btrfs-progs: extend the extent cache for the device extent - Btrfs-progs: use rb-tree instead of extent cache tree for fs/file roots - Btrfs-progs: introduce common insert/search/delete functions for rb-tree - Btrfs-progs: cleanup similar code in open_ctree_* and close_ctree - Btrfs-progs: Don't free the devices when close the ctree - Btrfs-progs: don't close the file descriptor 0 when closing a device - Btrfs-progs: fix missing recow roots when making btrfs filesystem - Add fix for passing super_nr while opening ctree OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=140
2013-09-16 17:51:02 +02:00
Patch1003: btrfs-progs-restore-passing-of-super_bytenr-to-device-scan
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libblkid-devel
BuildRequires: libext2fs-devel
BuildRequires: libuuid-devel
BuildRequires: lzo-devel
BuildRequires: udev
BuildRequires: zlib-devel
# for /bin/true
Requires: coreutils
Supplements: filesystem(btrfs)
%description
Utilities needed to create and maintain btrfs file systems under Linux.
%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}
%description -n libbtrfs-devel
This package contains the libraries and headers files for developers to
build applications to interface with btrfs.
%prep
%setup -q -n btrfs-progs-%{tar_version}
%patch10 -p1
%patch12 -p1
%patch40 -p1
%patch1 -p1
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
- update to upstream master (194aa4a1) - btrfs-restore: deal with NULL returns from read_node_slot - btrfs-restore: use the correct leafsize when reading the FS location - btrfs-find-root: Add options to control generation and level - btrfsck: fix incorrect casting on items in the corrupt_blocks tree - Btrfs-progs: fix closing of devices - Btrfs-progs: enhance btrfs-image to restore image onto multiple disks - Btrfs-progs: cleanup btrfs-image usage - Btrfs-progs: delete fs_devices itself from fs_uuid list before freeing - Btrfs-progs: skip open devices which is missing - Btrfs-progs: fix misuse of skinny metadata in btrfs-image - Btrfs-progs: recover raid0/raid10/raid5/raid6 metadata chunk - Btrfs-progs: Add chunk rebuild function for RAID1/SINGLE/DUP - Btrfs-progs: introduce list_{first, next}_entry/list_splice_tail{_init} - Btrfs-progs: Add chunk recover function - using old chunk items - Btrfs-progs: Add block group check funtion - Btrfs-progs: extend the extent cache for the device extent - Btrfs-progs: use rb-tree instead of extent cache tree for fs/file roots - Btrfs-progs: introduce common insert/search/delete functions for rb-tree - Btrfs-progs: cleanup similar code in open_ctree_* and close_ctree - Btrfs-progs: Don't free the devices when close the ctree - Btrfs-progs: don't close the file descriptor 0 when closing a device - Btrfs-progs: fix missing recow roots when making btrfs filesystem - Add fix for passing super_nr while opening ctree OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=140
2013-09-16 17:51:02 +02:00
%patch1003 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
btrfs-zero-log btrfs-select-super btrfs-image btrfstune \
btrfs-find-root
%install
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_sbindir}
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir}
# move some utilities out of /usr/sbin
mv ${RPM_BUILD_ROOT}/%{_sbindir}/btrfs-map-logical ${RPM_BUILD_ROOT}/%{_bindir}
# mkinitrd rescue utilities
install -m 0755 btrfs-zero-log ${RPM_BUILD_ROOT}/%{_sbindir}
install -m 0755 btrfs-select-super ${RPM_BUILD_ROOT}/%{_sbindir}
install -m 0755 btrfs-image ${RPM_BUILD_ROOT}/%{_sbindir}
install -m 0755 btrfstune ${RPM_BUILD_ROOT}/%{_sbindir}
install -m 0755 btrfs-find-root ${RPM_BUILD_ROOT}/%{_sbindir}
#UsrMerge
install -m 0755 -d ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-zero-log ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-convert ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-select-super ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-image ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfstune ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfsck ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-find-root ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-debug-tree ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/btrfs-show-super ${RPM_BUILD_ROOT}/sbin
ln -s %{_sbindir}/mkfs.btrfs ${RPM_BUILD_ROOT}/sbin
#EndUsrMerge
# command line options are not compatible (bnc#599224)
echo -e '#!/bin/sh\nexit 0' > ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs
chmod +x ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs
#UsrMerge
ln -s %{_sbindir}/fsck.btrfs ${RPM_BUILD_ROOT}/sbin
#EndUsrMerge
install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
install -m 0755 %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
install -m 0755 %{S:4} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
install -m 0755 %{S:2} ${RPM_BUILD_ROOT}/usr/sbin/
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la
# don't install .a for now
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a
%post -n libbtrfs0 -p /sbin/ldconfig
%postun -n libbtrfs0 -p /sbin/ldconfig
%files
%defattr(-, root, root)
/sbin/fsck.btrfs
# mkinitrd utils
#UsrMerge
/sbin/btrfs
/sbin/btrfs-zero-log
/sbin/btrfs-convert
/sbin/btrfs-select-super
/sbin/btrfs-image
/sbin/btrfstune
/sbin/btrfsck
/sbin/btrfs-find-root
/sbin/mkfs.btrfs
/sbin/btrfs-debug-tree
/sbin/btrfs-show-super
#EndUsrMerge
%{_sbindir}/btrfs
%{_sbindir}/btrfs-zero-log
%{_sbindir}/btrfs-convert
%{_sbindir}/btrfs-select-super
%{_sbindir}/btrfs-image
%{_sbindir}/btrfstune
%{_sbindir}/btrfsck
%{_sbindir}/btrfs-find-root
%{_sbindir}/fsck.btrfs
%{_sbindir}/mkfs.btrfs
%{_sbindir}/btrfs-debug-tree
%{_sbindir}/btrfs-show-super
/usr/sbin/btrfs-dev-clear-sb
/lib/mkinitrd/scripts/boot-btrfs.sh
/lib/mkinitrd/scripts/setup-btrfs.sh
# other
/usr/bin/btrfs-map-logical
/usr/sbin/btrfs-dev-clear-sb
%_mandir/man8/btrfs-image.8.gz
%_mandir/man8/btrfsck.8.gz
%_mandir/man8/mkfs.btrfs.8.gz
%_mandir/man8/btrfs.8.gz
%_mandir/man8/btrfs-convert.8.gz
%files -n libbtrfs0
%defattr(-, root, root)
%{_libdir}/libbtrfs.so.*
%files -n libbtrfs-devel
%defattr(-, root, root)
%dir %{_includedir}/btrfs
%{_includedir}/btrfs/*
%{_libdir}/libbtrfs.so
%changelog