File xfsprogs.spec of Package xfsprogs

# spec file for package xfsprogs
# Copyright (c) 2017 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

%define _dracutmodulesdir %{_libexecdir}/dracut/modules.d

Name:           xfsprogs
Version:        4.9.0
Release:        0
Summary:        Utilities for managing the XFS file system
License:        GPL-2.0+
Group:          System/Filesystems
Source2:        %{name}.keyring
Source4:        dracut-fsck-help.txt
Patch0:         xfsprogs-docdir.diff
Patch1:         fsr-fix-uninitialized-fs-usage-after-timeout.patch
Patch2:         xfs_repair-clear-pthread_t-when-pthread_create-fails.patch
Patch3:         xfs_repair-add-prefetch-trace-calls-to-debug-thread-creation-failures.patch
Patch4:         xfs_repair-fix-thread-creation-failure-recovery.patch
BuildRequires:  libblkid-devel
BuildRequires:  readline-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libuuid-devel
%if 0%{?suse_version} >= 1010
# hint for ZYPP
Supplements:    filesystem(xfs)
%if 0%{?suse_version} >= 1310
BuildRequires:  suse-module-tools
BuildRequires:  xz
Requires(post): coreutils

A set of commands to use the XFS file system, including mkfs.xfs.

XFS is a high performance journaling file system which originated on
the SGI IRIX platform.	It is completely multithreaded. It can support
large files and large file systems, extended attributes, and variable
block sizes.It is extent based and makes extensive use of Btrees
(directories, extents, and free space) to aid both performance and

Refer to the documentation at for
complete details.  This implementation is on-disk compatible with the
IRIX version of XFS.

%package      devel
Summary:        XFS Filesystem-specific Static Libraries and Headers
Group:          Development/Libraries/C and C++
Requires:       xfsprogs = %{version}

%description devel
xfsprogs-devel contains the libraries and header files needed to
develop XFS file system-specific programs.

You should install xfsprogs-devel if you want to develop XFS file
system-specific programs.  If you install xfsprogs-devel, you will also
want to install xfsprogs.

%setup -q
%if 0%{?suse_version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

export OPTIMIZER="-fPIC"
export LIBUUID=%{_libdir}/libuuid.a
%configure --enable-readline=yes
make %{?_smp_mflags} V=1

sed -e "s|@@PATH_TO_HELP@@|$PATH_TO_HELP|" %{SOURCE3} >

export DIST_ROOT=%{buildroot}
make install
make install-dev
# Move libhandle to usr, libhandle.{a,la} are symlinks to usr/lib* already so
# remove them first.
rm %{buildroot}/%{_lib}/libhandle.a
rm %{buildroot}/%{_lib}/
mv %{buildroot}/%{_lib}/* %{buildroot}%{_libdir}
%find_lang %{name}
install -m 0755 -d %{buildroot}/%{_dracutmodulesdir}/95suse-xfs/
install -m 0755 %{buildroot}/%{_dracutmodulesdir}/95suse-xfs/
install -m 0644 %{SOURCE4} %{buildroot}/%{_dracutmodulesdir}/95suse-xfs/

%if 0%{?suse_version} >= 1310


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
# this is only used by xfs cmds, therefore no urgent need for a shlib package
%doc %{_mandir}/man[58]/*
%doc %{_defaultdocdir}/%{name}
%dir %{_libexecdir}/dracut
%dir %{_libexecdir}/dracut/modules.d
%dir %{_dracutmodulesdir}/95suse-xfs/

%files devel