2009-03-01 04:28:54 +01:00
|
|
|
#
|
2011-03-15 10:25:29 +01:00
|
|
|
# spec file for package btrfsprogs
|
2009-03-01 04:28:54 +01:00
|
|
|
#
|
2013-06-17 12:35:39 +02:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-03-01 04:28:54 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2011-03-15 10:25:29 +01:00
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
Name: btrfsprogs
|
2011-07-13 16:48:36 +02:00
|
|
|
Url: http://btrfs.wiki.kernel.org/index.php/Main_Page
|
2013-07-04 15:43:42 +02:00
|
|
|
Version: 0.20
|
2012-02-13 13:37:55 +01:00
|
|
|
Release: 0
|
2013-09-16 17:51:02 +02:00
|
|
|
%define tar_version v0.20-rc1-358-g194aa4a
|
2011-08-04 21:28:53 +02:00
|
|
|
Summary: Utilities for the Btrfs filesystem
|
2012-02-13 13:37:55 +01:00
|
|
|
License: GPL-2.0
|
2009-03-01 04:28:54 +01:00
|
|
|
Group: System/Filesystems
|
2013-06-17 12:35:39 +02:00
|
|
|
#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
|
2013-07-04 15:43:42 +02:00
|
|
|
# git archive --format=tar --prefix=btrfs-progs-`git describe --tags --match "v*"`/ HEAD > %D/btrfs-progs-`git describe --tags --match "v*"`.tar
|
2010-12-16 20:56:57 +01:00
|
|
|
Source: btrfs-progs-%{tar_version}.tar.bz2
|
2011-11-09 15:49:06 +01:00
|
|
|
Source1: boot-btrfs.sh
|
2013-07-04 15:43:42 +02:00
|
|
|
Source4: setup-btrfs.sh
|
2012-03-05 16:09:24 +01:00
|
|
|
Source2: btrfs-dev-clear-sb
|
2013-07-04 15:43:42 +02:00
|
|
|
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
|
2013-08-09 14:09:44 +02:00
|
|
|
Patch40: 0040-btrfs-progs-fix-loop-device-mount-checks.patch
|
2013-09-08 11:30:02 +02:00
|
|
|
Patch1: btrfs-progs-mkfs-default-extref.diff
|
2011-08-30 21:33:08 +02:00
|
|
|
Patch1000: local-version-override.patch
|
2013-07-04 15:43:42 +02:00
|
|
|
Patch1001: btrfs-progs-use-IEEE1541-suffixes-for-sizes.patch
|
2013-07-04 16:37:50 +02:00
|
|
|
Patch1002: btrfs-progs-add-man-page-for-btrfs-convert.patch
|
2013-09-16 17:51:02 +02:00
|
|
|
Patch1003: btrfs-progs-restore-passing-of-super_bytenr-to-device-scan
|
2011-07-28 19:55:26 +02:00
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-02-13 13:37:55 +01:00
|
|
|
BuildRequires: libacl-devel
|
2013-06-17 12:35:39 +02:00
|
|
|
BuildRequires: libattr-devel
|
2013-07-04 15:43:42 +02:00
|
|
|
BuildRequires: libblkid-devel
|
2012-02-13 13:37:55 +01:00
|
|
|
BuildRequires: libext2fs-devel
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: lzo-devel
|
2013-07-04 15:43:42 +02:00
|
|
|
BuildRequires: udev
|
2012-02-13 13:37:55 +01:00
|
|
|
BuildRequires: zlib-devel
|
2011-03-14 19:24:28 +01:00
|
|
|
# for /bin/true
|
|
|
|
Requires: coreutils
|
2013-06-17 12:35:39 +02:00
|
|
|
Supplements: filesystem(btrfs)
|
2009-03-01 04:28:54 +01:00
|
|
|
|
|
|
|
%description
|
2011-07-13 16:48:36 +02:00
|
|
|
Utilities needed to create and maintain btrfs file systems under Linux.
|
|
|
|
|
2013-07-04 15:43:42 +02:00
|
|
|
%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++
|
2013-07-04 16:37:50 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2013-07-04 15:43:42 +02:00
|
|
|
|
|
|
|
%description -n libbtrfs-devel
|
|
|
|
This package contains the libraries and headers files for developers to
|
|
|
|
build applications to interface with btrfs.
|
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
%prep
|
2010-12-16 20:56:57 +01:00
|
|
|
%setup -q -n btrfs-progs-%{tar_version}
|
2013-07-04 15:43:42 +02:00
|
|
|
%patch10 -p1
|
|
|
|
%patch12 -p1
|
2013-08-09 14:09:44 +02:00
|
|
|
%patch40 -p1
|
2013-09-08 11:30:02 +02:00
|
|
|
%patch1 -p1
|
2011-08-04 21:55:32 +02:00
|
|
|
%patch1000 -p1
|
2013-07-04 15:43:42 +02:00
|
|
|
%patch1001 -p1
|
2013-07-04 16:37:50 +02:00
|
|
|
%patch1002 -p1
|
2013-09-16 17:51:02 +02:00
|
|
|
%patch1003 -p1
|
2011-07-28 19:55:26 +02:00
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
%build
|
2012-03-05 16:09:24 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
|
2011-11-09 15:49:06 +01:00
|
|
|
btrfs-zero-log btrfs-select-super btrfs-image btrfstune \
|
2013-07-04 15:43:42 +02:00
|
|
|
btrfs-find-root
|
2012-03-05 16:09:24 +01:00
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
%install
|
2013-07-04 15:43:42 +02:00
|
|
|
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
|
2012-03-12 14:25:53 +01:00
|
|
|
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_sbindir}
|
2011-11-09 15:49:06 +01:00
|
|
|
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir}
|
2012-03-12 14:25:53 +01:00
|
|
|
# move some utilities out of /usr/sbin
|
2012-04-06 13:43:24 +02:00
|
|
|
mv ${RPM_BUILD_ROOT}/%{_sbindir}/btrfs-map-logical ${RPM_BUILD_ROOT}/%{_bindir}
|
2011-11-09 15:49:06 +01:00
|
|
|
# mkinitrd rescue utilities
|
2012-03-12 14:25:53 +01:00
|
|
|
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
|
2012-04-06 13:43:24 +02:00
|
|
|
ln -s %{_sbindir}/btrfs-debug-tree ${RPM_BUILD_ROOT}/sbin
|
2013-07-04 15:43:42 +02:00
|
|
|
ln -s %{_sbindir}/btrfs-show-super ${RPM_BUILD_ROOT}/sbin
|
2012-03-12 14:25:53 +01:00
|
|
|
ln -s %{_sbindir}/mkfs.btrfs ${RPM_BUILD_ROOT}/sbin
|
|
|
|
#EndUsrMerge
|
2010-12-16 20:56:57 +01:00
|
|
|
# command line options are not compatible (bnc#599224)
|
2013-07-26 23:25:13 +02:00
|
|
|
echo -e '#!/bin/sh\nexit 0' > ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs
|
|
|
|
chmod +x ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs
|
2012-03-12 14:25:53 +01:00
|
|
|
#UsrMerge
|
|
|
|
ln -s %{_sbindir}/fsck.btrfs ${RPM_BUILD_ROOT}/sbin
|
|
|
|
#EndUsrMerge
|
2011-11-09 15:49:06 +01:00
|
|
|
install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
2012-03-05 16:09:24 +01:00
|
|
|
install -m 0755 %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
2013-07-04 15:43:42 +02:00
|
|
|
install -m 0755 %{S:4} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
2012-03-05 16:09:24 +01:00
|
|
|
install -m 0755 %{S:2} ${RPM_BUILD_ROOT}/usr/sbin/
|
2013-07-04 15:43:42 +02:00
|
|
|
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
|
2010-12-16 20:56:57 +01:00
|
|
|
|
2009-03-01 04:28:54 +01:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2011-11-09 15:49:06 +01:00
|
|
|
/sbin/fsck.btrfs
|
|
|
|
# mkinitrd utils
|
2012-03-12 14:25:53 +01:00
|
|
|
#UsrMerge
|
2010-12-16 20:56:57 +01:00
|
|
|
/sbin/btrfs
|
2011-11-09 15:49:06 +01:00
|
|
|
/sbin/btrfs-zero-log
|
2010-01-29 17:42:56 +01:00
|
|
|
/sbin/btrfs-convert
|
2011-11-09 15:49:06 +01:00
|
|
|
/sbin/btrfs-select-super
|
|
|
|
/sbin/btrfs-image
|
|
|
|
/sbin/btrfstune
|
2009-07-28 00:08:56 +02:00
|
|
|
/sbin/btrfsck
|
2011-11-09 15:49:06 +01:00
|
|
|
/sbin/btrfs-find-root
|
2009-07-28 00:08:56 +02:00
|
|
|
/sbin/mkfs.btrfs
|
2012-04-06 13:43:24 +02:00
|
|
|
/sbin/btrfs-debug-tree
|
2013-07-04 15:43:42 +02:00
|
|
|
/sbin/btrfs-show-super
|
2012-03-12 14:25:53 +01:00
|
|
|
#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
|
2012-04-06 13:43:24 +02:00
|
|
|
%{_sbindir}/btrfs-debug-tree
|
2013-07-04 15:43:42 +02:00
|
|
|
%{_sbindir}/btrfs-show-super
|
2012-03-05 16:09:24 +01:00
|
|
|
/usr/sbin/btrfs-dev-clear-sb
|
2011-11-09 15:49:06 +01:00
|
|
|
/lib/mkinitrd/scripts/boot-btrfs.sh
|
2013-07-04 15:43:42 +02:00
|
|
|
/lib/mkinitrd/scripts/setup-btrfs.sh
|
2011-11-09 15:49:06 +01:00
|
|
|
# other
|
|
|
|
/usr/bin/btrfs-map-logical
|
2013-07-04 15:43:42 +02:00
|
|
|
/usr/sbin/btrfs-dev-clear-sb
|
2009-07-21 12:23:25 +02:00
|
|
|
%_mandir/man8/btrfs-image.8.gz
|
|
|
|
%_mandir/man8/btrfsck.8.gz
|
|
|
|
%_mandir/man8/mkfs.btrfs.8.gz
|
2010-12-16 20:56:57 +01:00
|
|
|
%_mandir/man8/btrfs.8.gz
|
2013-07-04 16:37:50 +02:00
|
|
|
%_mandir/man8/btrfs-convert.8.gz
|
2013-07-04 15:43:42 +02:00
|
|
|
|
|
|
|
%files -n libbtrfs0
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/libbtrfs.so.*
|
|
|
|
|
|
|
|
%files -n libbtrfs-devel
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%dir %{_includedir}/btrfs
|
|
|
|
%{_includedir}/btrfs/*
|
|
|
|
%{_libdir}/libbtrfs.so
|
2009-03-01 04:28:54 +01:00
|
|
|
|
|
|
|
%changelog
|