Compare commits

..

No commits in common. "master" and "xfsprogs-3_0_1-9_fc12" have entirely different histories.

10 changed files with 770 additions and 185 deletions

1
.cvsignore Normal file
View File

@ -0,0 +1 @@
xfsprogs-3.0.1.tar.gz

39
.gitignore vendored
View File

@ -1,39 +0,0 @@
xfsprogs-3.1.2.tar.gz
/xfsprogs-3.1.3.tar.gz
/xfsprogs-3.1.4.tar.gz
/xfsprogs-3.1.5.tar.gz
/xfsprogs-3.1.6.tar.gz
/xfsprogs-3.1.7.tar.gz
/xfsprogs-3.1.8.tar.gz
/xfsprogs-3.1.9.tar.gz
/xfsprogs-3.1.10.tar.gz
/xfsprogs-3.1.11.tar.gz
/xfsprogs-3.2.0-alpha1.tar.gz
/xfsprogs-3.2.0-alpha2.tar.gz
/xfsprogs-3.2.0-rc2.tar.gz
/xfsprogs-3.2.0-rc3.tar.gz
/xfsprogs-3.2.0.tar.gz
/xfsprogs-3.2.1.tar.gz
/xfsprogs-3.2.2.tar.gz
/xfsprogs-3.2.3.tar.gz
/xfsprogs-3.2.4.tar.gz
/xfsprogs-4.2.0.tar.gz
/xfsprogs-4.3.0.tar.gz
/xfsprogs-4.5.0.tar.gz
/xfsprogs-4.7.0.tar.gz
/xfsprogs-4.8.0.tar.gz
/xfsprogs-4.9.0.tar.xz
/xfsprogs-4.10.0.tar.xz
/xfsprogs-4.11.0.tar.xz
/xfsprogs-4.12.0.tar.xz
/xfsprogs-4.13.1.tar.xz
/xfsprogs-4.14.0.tar.xz
/xfsprogs-4.15.0.tar.xz
/xfsprogs-4.15.1.tar.xz
/xfsprogs-4.16.0.tar.xz
/xfsprogs-4.17.0.tar.xz
/xfsprogs-4.18.0.tar.xz
/xfsprogs-4.19.0.tar.xz
/xfsprogs-4.20.0.tar.xz
/xfsprogs-5.0.0.tar.xz
/xfsprogs-5.1.0.tar.xz

View File

@ -4,7 +4,7 @@ NAME := xfsprogs
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))

View File

@ -1 +1 @@
SHA512 (xfsprogs-5.1.0.tar.xz) = ca5959edb299be8574b2ca51e907a418fab796ae92f588075a2aab0c2a3cf8dae49e2b68679c65c361201223e8f8ac29b1e5618eb1e519496c3aca9218620881
d7f879a21692d4f7abc16a20479b0829 xfsprogs-3.0.1.tar.gz

View File

@ -0,0 +1,267 @@
From: Eric Sandeen <sandeen@redhat.com>
Date: Mon, 18 May 2009 16:11:44 +0000 (-0500)
Subject: xfs_io: add fallocate command
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=c0b5232a5eded15dc55abdad184811a21eab62b7
xfs_io: add fallocate command
Based on Dave's earlier patch, but now we have an fallocate
glibc call... this also adds autoconf magic and a manpage
update.
(hopefully not too #ifdef-heavy....)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
diff --git a/configure.in b/configure.in
index 3fbd44e..8f5782a 100644
--- a/configure.in
+++ b/configure.in
@@ -66,6 +66,7 @@ AC_HAVE_MINCORE
AC_HAVE_SENDFILE
AC_HAVE_GETMNTENT
AC_HAVE_GETMNTINFO
+AC_HAVE_FALLOCATE
AC_TYPE_PSINT
AC_TYPE_PSUNSIGNED
diff --git a/include/builddefs.in b/include/builddefs.in
index c8f5c08..d6bf5c0 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -94,6 +94,7 @@ HAVE_MINCORE = @have_mincore@
HAVE_SENDFILE = @have_sendfile@
HAVE_GETMNTENT = @have_getmntent@
HAVE_GETMNTINFO = @have_getmntinfo@
+HAVE_FALLOCATE = @have_fallocate@
GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
diff --git a/io/Makefile b/io/Makefile
index 6f10e8d..1a51879 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -59,6 +59,10 @@ ifeq ($(ENABLE_EDITLINE),yes)
LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
endif
+ifeq ($(HAVE_FALLOCATE),yes)
+LCFLAGS += -DHAVE_FALLOCATE
+endif
+
default: $(LTCOMMAND)
include $(BUILDRULES)
diff --git a/io/prealloc.c b/io/prealloc.c
index 6a2563e..7d9bd2f 100644
--- a/io/prealloc.c
+++ b/io/prealloc.c
@@ -16,6 +16,9 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if defined(HAVE_FALLOCATE)
+#include <linux/falloc.h>
+#endif
#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
@@ -26,6 +29,9 @@ static cmdinfo_t allocsp_cmd;
static cmdinfo_t freesp_cmd;
static cmdinfo_t resvsp_cmd;
static cmdinfo_t unresvsp_cmd;
+#if defined(HAVE_FALLOCATE)
+static cmdinfo_t falloc_cmd;
+#endif
static int
offset_length(
@@ -119,6 +125,40 @@ unresvsp_f(
return 0;
}
+#if defined (HAVE_FALLOCATE)
+static int
+fallocate_f(
+ int argc,
+ char **argv)
+{
+ xfs_flock64_t segment;
+ int mode = 0;
+ int c;
+
+ while ((c = getopt(argc, argv, "k")) != EOF) {
+ switch (c) {
+ case 'k':
+ mode = FALLOC_FL_KEEP_SIZE;
+ break;
+ default:
+ command_usage(&falloc_cmd);
+ }
+ }
+ if (optind != argc - 2)
+ return command_usage(&falloc_cmd);
+
+ if (!offset_length(argv[optind], argv[optind+1], &segment))
+ return 0;
+
+ if (fallocate(file->fd, mode,
+ segment.l_start, segment.l_len)) {
+ perror("fallocate");
+ return 0;
+ }
+ return 0;
+}
+#endif
+
void
prealloc_init(void)
{
@@ -160,4 +200,17 @@ prealloc_init(void)
add_command(&freesp_cmd);
add_command(&resvsp_cmd);
add_command(&unresvsp_cmd);
+
+#if defined (HAVE_FALLOCATE)
+ falloc_cmd.name = _("falloc");
+ falloc_cmd.cfunc = fallocate_f;
+ falloc_cmd.argmin = 2;
+ falloc_cmd.argmax = -1;
+ falloc_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
+ falloc_cmd.args = _("[-k] off len");
+ falloc_cmd.oneline =
+ _("allocates space associated with part of a file via fallocate");
+
+ add_command(&falloc_cmd);
+#endif
}
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 5156ced..1ac4666 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -98,3 +98,21 @@ AC_DEFUN([AC_HAVE_GETMNTINFO],
AC_MSG_RESULT(no))
AC_SUBST(have_getmntinfo)
])
+
+#
+# Check if we have a fallocate libc call (Linux)
+#
+AC_DEFUN([AC_HAVE_FALLOCATE],
+ [ AC_MSG_CHECKING([for fallocate])
+ AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h>
+ ], [
+ fallocate(0, 0, 0, 0);
+ ], have_fallocate=yes
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+ AC_SUBST(have_fallocate)
+ ])
diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
index 23bef94..6fc6bad 100644
--- a/man/man8/xfs_io.8
+++ b/man/man8/xfs_io.8
@@ -295,6 +295,20 @@ system call described in the
.BR xfsctl (3)
manual page.
.TP
+.BI "falloc [ \-k ]" " offset length"
+Allocates reserved, unwritten space for part of a file using the
+fallocate routine as described in the
+.BR fallocate (3)
+manual page.
+.RS 1.0i
+.PD 0
+.TP 0.4i
+.B \-k
+will set the FALLOC_FL_KEEP_SIZE flag as described in
+.BR fallocate (3).
+.PD
+.RE
+.TP
.BI truncate " offset"
Truncates the current file at the given offset using
.BR ftruncate (2).
--- a/configure 2009-05-01 17:12:06.000000000 -0500
+++ b/configure 2009-06-15 14:17:39.378265990 -0500
@@ -788,6 +788,7 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
have_zipped_manpages
+have_fallocate
have_getmntinfo
have_getmntent
have_sendfile
@@ -13979,6 +13980,65 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: checking for fallocate" >&5
+$as_echo_n "checking for fallocate... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h>
+
+int
+main ()
+{
+
+ fallocate(0, 0, 0, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ have_fallocate=yes
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:$LINENO: checking for __psint_t " >&5

View File

@ -0,0 +1,33 @@
Not yet upstream but planned to be so.
Index: xfsprogs-2.10.2/mkfs/xfs_mkfs.c
===================================================================
--- xfsprogs-2.10.2.orig/mkfs/xfs_mkfs.c
+++ xfsprogs-2.10.2/mkfs/xfs_mkfs.c
@@ -733,7 +733,7 @@ main(
nodsflag = norsflag = 0;
force_overwrite = 0;
worst_freelist = 0;
- lazy_sb_counters = 0;
+ lazy_sb_counters = 1;
memset(&fsx, 0, sizeof(fsx));
memset(&xi, 0, sizeof(xi));
Index: xfsprogs-2.10.2/man/man8/mkfs.xfs.8
===================================================================
--- xfsprogs-2.10.2.orig/man/man8/mkfs.xfs.8
+++ xfsprogs-2.10.2/man/man8/mkfs.xfs.8
@@ -455,9 +455,10 @@ counter values without needed to keep th
This gives significant improvements in performance on some configurations.
The default
.I value
-is 0 (off) so you must specify
-.B lazy-count=1
-if you want to make use of this feature.
+is 1 (on) so you must specify
+.B lazy-count=0
+if you want to disable this feature for older kernels which don't support
+it.
.RE
.TP
.BI \-n " naming_options"

View File

@ -0,0 +1,84 @@
From: Eric Sandeen <sandeen@sandeen.net>
Date: Thu, 2 Jul 2009 05:29:36 +0000 (-0500)
Subject: xfs_repair: fix agcount*agblocks overflows
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=003e8e41124707f55b20b376a6359dc7f6292991
xfs_repair: fix agcount*agblocks overflows
The last test in verify_ag_bno() may overflow:
return (agbno >= (sbp->sb_dblocks -
((sbp->sb_agcount - 1) * sbp->sb_agblocks)));
because sb_agcount & sb_agblocks are 32-bit integers; this
may then miss corrupt agbnos for the last ag, which can in
turn lead to out of bounds memory accesses later, for example
when the block nr is used to offset in set_agbno_state():
addr = ba_bmap[(agno)] + (ag_blockno)/XR_BB_NUM;
Similar problems in mk_incore_fstree
Reported-by: Jesse Stroik <jstroik@ssec.wisc.edu>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
---
From: Eric Sandeen <sandeen@sandeen.net>
Date: Mon, 6 Jul 2009 19:53:35 +0000 (-0500)
Subject: xfs_metadump: agcount*agblocks overflow
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=66be354ed0dfb73566f504ac7301fab7915e9475
xfs_metadump: agcount*agblocks overflow
Found another potential overflow in xfs_metadump,
similar to those just fixed in repair.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
---
diff --git a/repair/dinode.c b/repair/dinode.c
index fdf52db..84e1d05 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -319,7 +319,8 @@ verify_ag_bno(xfs_sb_t *sbp,
return (agbno >= sbp->sb_agblocks);
if (agno == (sbp->sb_agcount - 1))
return (agbno >= (sbp->sb_dblocks -
- ((sbp->sb_agcount - 1) * sbp->sb_agblocks)));
+ ((xfs_drfsbno_t)(sbp->sb_agcount - 1) *
+ sbp->sb_agblocks)));
return 1;
}
diff --git a/repair/phase5.c b/repair/phase5.c
index 2c243b6..26f5aa2 100644
--- a/repair/phase5.c
+++ b/repair/phase5.c
@@ -113,7 +113,8 @@ mk_incore_fstree(xfs_mount_t *mp, xfs_agnumber_t agno)
ag_end = mp->m_sb.sb_agblocks;
else
ag_end = mp->m_sb.sb_dblocks -
- mp->m_sb.sb_agblocks * (mp->m_sb.sb_agcount - 1);
+ (xfs_drfsbno_t)mp->m_sb.sb_agblocks *
+ (mp->m_sb.sb_agcount - 1);
/*
* ok, now find the number of extents, keep track of the
diff --git a/db/metadump.c b/db/metadump.c
index 19aed4f..ef6e571 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -222,7 +222,8 @@ valid_bno(
return 1;
if (agno == (mp->m_sb.sb_agcount - 1) && agbno > 0 &&
agbno <= (mp->m_sb.sb_dblocks -
- (mp->m_sb.sb_agcount - 1) * mp->m_sb.sb_agblocks))
+ (xfs_drfsbno_t)(mp->m_sb.sb_agcount - 1) *
+ mp->m_sb.sb_agblocks))
return 1;
return 0;

View File

@ -0,0 +1,55 @@
[PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
It looks like libxcmd wasn't ever being built with -DENABLE_READLINE
even when it was asked for by configure --enable-readline=yes
so xfs_io & xfs_quota didn't get the functionality.
This seems to fix it up for me (fixes editline too while we're
at it).
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: xfsprogs-3.0.1/libxcmd/Makefile
===================================================================
--- xfsprogs-3.0.1.orig/libxcmd/Makefile
+++ xfsprogs-3.0.1/libxcmd/Makefile
@@ -20,6 +20,14 @@ ifeq ($(HAVE_GETMNTINFO),yes)
LCFLAGS += -DHAVE_GETMNTINFO
endif
+ifeq ($(ENABLE_READLINE),yes)
+LCFLAGS += -DENABLE_READLINE
+endif
+
+ifeq ($(ENABLE_EDITLINE),yes)
+LCFLAGS += -DENABLE_EDITLINE
+endif
+
default: $(LTLIBRARY)
include $(BUILDRULES)
Index: xfsprogs-3.0.1/growfs/Makefile
===================================================================
--- xfsprogs-3.0.1.orig/growfs/Makefile
+++ xfsprogs-3.0.1/growfs/Makefile
@@ -10,6 +10,14 @@ LTCOMMAND = xfs_growfs
CFILES = xfs_growfs.c
LLDLIBS = $(LIBXFS) $(LIBXCMD) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
+ifeq ($(ENABLE_READLINE),yes)
+LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
+endif
+
+ifeq ($(ENABLE_EDITLINE),yes)
+LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
+endif
+
LTDEPENDENCIES = $(LIBXFS) $(LIBXCMD)
LLDFLAGS = -static
LSRCFILES = xfs_info.sh

24
xfsprogs-wrapper.h Normal file
View File

@ -0,0 +1,24 @@
/* This file is here to prevent a file conflict on multiarch systems. A
* conflict will occur because platform_defs.h has arch-specific definitions.
*
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */
#if defined(__i386__)
#include "platform_defs-i386.h"
#elif defined(__x86_64__)
#include "platform_defs-x86_64.h"
#elif defined(__powerpc64__)
#include "platform_defs-ppc64.h"
#elif defined(__powerpc__)
#include "platform_defs-ppc.h"
#elif defined(__s390x__)
#include "platform_defs-s390x.h"
#elif defined(__s390__)
#include "platform_defs-s390.h"
#elif defined(__sparc__) && defined(__arch64__)
#include "platform_defs-sparc64.h"
#elif defined(__sparc__)
#include "platform_defs-sparc.h"
#else
#error "This xfsprogs-devel package does not work your architecture?"
#endif

View File

@ -1,21 +1,28 @@
Summary: Utilities for managing the XFS filesystem
Name: xfsprogs
Version: 5.1.0
Release: 2%{?dist}
Version: 3.0.1
Release: 9%{?dist}
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
# in source, with no mention of version.
# doc/COPYING file specifies what is GPL and what is LGPL
# but no mention of versions in the source.
License: GPL+ and LGPLv2+
URL: https://xfs.wiki.kernel.org
Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz
Requires: util-linux
BuildRequires: gcc
BuildRequires: libtool, gettext, libattr-devel, libuuid-devel
BuildRequires: readline-devel, libblkid-devel >= 2.17-0.1.git5e51568
Buildrequires: lvm2-devel, libicu-devel >= 4.6
Group: System Environment/Base
URL: http://oss.sgi.com/projects/xfs/
Source0: ftp://oss.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
Source1: xfsprogs-wrapper.h
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool, gettext, libuuid-devel, readline-devel
Provides: xfs-cmds
Obsoletes: xfs-cmds <= %{version}
Provides: xfsprogs-qa-devel
Obsoletes: xfsprogs-qa-devel <= %{version}
Conflicts: xfsdump < 3.0.1
Suggests: xfsprogs-xfs_scrub
# These are upstream
Patch0: xfsprogs-3.0.1-readline.patch
Patch1: xfsprogs-3.0.1-fallocate.patch
Patch2: xfsprogs-3.0.1-overflows.patch
# This one, not yet
Patch3: xfsprogs-3.0.1-mkfs-lazy-count-default.patch
%description
A set of commands to use the XFS filesystem, including mkfs.xfs.
@ -27,222 +34,375 @@ variable block sizes, is extent based, and makes extensive use of
Btrees (directories, extents, free space) to aid both performance
and scalability.
This implementation is on-disk compatible with the IRIX version
of XFS.
Refer to the documentation at http://oss.sgi.com/projects/xfs/
for complete details. This implementation is on-disk compatible
with the IRIX version of XFS.
%package devel
Summary: XFS filesystem-specific headers
Requires: xfsprogs = %{version}-%{release}, libuuid-devel
Summary: XFS filesystem-specific static libraries and headers
Group: Development/Libraries
Requires: xfsprogs = %{version}-%{release}
%description devel
xfsprogs-devel contains the header files needed to develop XFS
filesystem-specific programs.
xfsprogs-devel contains the libraries and header files needed to
develop XFS filesystem-specific programs.
You should install xfsprogs-devel if you want to develop XFS
filesystem-specific programs, If you install xfsprogs-devel, you'll
also want to install xfsprogs.
%package xfs_scrub
Summary: XFS filesystem online scrubbing utilities
Requires: xfsprogs = %{version}-%{release}, python3
%package qa-devel
Summary: XFS QA filesystem-specific static libraries and headers
Group: Development/Libraries
Requires: xfsprogs = %{version}-%{release}
Requires: xfsprogs-devel = %{version}-%{release}
%description xfs_scrub
xfs_scrub attempts to check and repair all metadata in a mounted XFS filesystem.
WARNING! This program is EXPERIMENTAL, which means that its behavior and
interface could change at any time!
%description qa-devel
xfsprogs-qa-devel contains headers and libraries needed to build
the xfstests QA suite.
You should install xfsprogs-qa-devel only if you are interested
in building or running the xfstests QA suite.
%prep
%setup -q
%build
export tagname=CC
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
export tagname=CC DEBUG=-DNDEBUG
# xfsprogs abuses libexecdir
%configure \
--enable-readline=yes \
--enable-blkid=yes \
--enable-lto=no
--sbindir=/sbin \
--libdir=/%{_lib} \
--libexecdir=%{_libdir} \
--bindir=%{_sbindir} \
--enable-readline=yes
make %{?_smp_mflags}
%install
make DIST_ROOT=$RPM_BUILD_ROOT install install-dev \
PKG_ROOT_SBIN_DIR=%{_sbindir} PKG_ROOT_LIB_DIR=%{_libdir}
rm -rf $RPM_BUILD_ROOT
make DIST_ROOT=$RPM_BUILD_ROOT install install-dev install-qa
# nuke .la files, etc
rm -f $RPM_BUILD_ROOT/{%{_lib}/*.{la,a,so},%{_libdir}/*.{la,a}}
rm -f $RPM_BUILD_ROOT/{%{_lib}/*.{la,a,so},%{_libdir}/*.la}
# fix up symlink to be correct
rm -f $RPM_BUILD_ROOT/%{_libdir}/libhandle.so
ln -s ../../%{_lib}/libhandle.so.1 $RPM_BUILD_ROOT/%{_libdir}/libhandle.so
chmod 0755 $RPM_BUILD_ROOT/%{_lib}/libhandle.so.*.*.*
# remove non-versioned docs location
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xfsprogs/
# ugly hack to allow parallel install of 32-bit and 64-bit -devel packages:
%define multilib_arches %{ix86} x86_64 ppc ppc64 s390 s390x %{sparc}
%ifarch %{multilib_arches}
mv -f $RPM_BUILD_ROOT%{_includedir}/xfs/platform_defs.h \
$RPM_BUILD_ROOT%{_includedir}/xfs/platform_defs-%{_arch}.h
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/xfs/platform_defs.h
%endif
%find_lang %{name}
%ldconfig_scriptlets
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%doc doc/CHANGES README
%{_libdir}/*.so.*
%dir %{_usr}/%{_lib}/xfsprogs
%{_usr}/%{_lib}/xfsprogs/*
%{_mandir}/man5/*
%defattr(-,root,root)
%doc doc/CHANGES doc/COPYING doc/CREDITS doc/PORTING README
/sbin/fsck.xfs
/sbin/mkfs.xfs
/sbin/xfs_repair
/%{_lib}/*.so.*
%{_mandir}/man8/*
%{_mandir}/man5/*
%{_sbindir}/*
%{_unitdir}/*
%exclude %{_sbindir}/xfs_scrub*
%exclude %{_mandir}/man8/xfs_scrub*
%exclude %{_usr}/%{_lib}/xfsprogs/xfs_scrub*
%exclude %{_mandir}/man8/xfs_scrub_all*
%exclude %{_unitdir}/xfs_scrub*
%files xfs_scrub
%{_sbindir}/xfs_scrub*
%{_mandir}/man8/xfs_scrub*
%{_usr}/%{_lib}/xfsprogs/xfs_scrub*
%{_mandir}/man8/xfs_scrub_all*
%{_unitdir}/xfs_scrub*
%files devel
%{_mandir}/man2/*
%defattr(-,root,root)
%{_mandir}/man3/*
%dir %{_includedir}/xfs
%{_includedir}/xfs/handle.h
%{_includedir}/xfs/jdm.h
%{_includedir}/xfs/linux.h
%ifarch %{multilib_arches}
%{_includedir}/xfs/platform_defs-%{_arch}.h
%endif
%{_includedir}/xfs/platform_defs.h
%{_includedir}/xfs/xfs.h
%{_includedir}/xfs/xfs_arch.h
%{_includedir}/xfs/xfs_fs.h
%{_includedir}/xfs/xfs_types.h
%{_includedir}/xfs/xfs_format.h
%{_includedir}/xfs/xfs_da_format.h
%{_includedir}/xfs/xfs_log_format.h
%{_includedir}/xfs/xqm.h
%{_libdir}/*.a
%{_libdir}/*.so
%files qa-devel
%defattr(-,root,root)
%{_includedir}/xfs/bitops.h
%{_includedir}/xfs/cache.h
%{_includedir}/xfs/kmem.h
%{_includedir}/xfs/libxfs.h
%{_includedir}/xfs/libxlog.h
%{_includedir}/xfs/list.h
%{_includedir}/xfs/parent.h
%{_includedir}/xfs/swab.h
%{_includedir}/xfs/xfs_ag.h
%{_includedir}/xfs/xfs_alloc.h
%{_includedir}/xfs/xfs_alloc_btree.h
%{_includedir}/xfs/xfs_arch.h
%{_includedir}/xfs/xfs_attr_leaf.h
%{_includedir}/xfs/xfs_attr_sf.h
%{_includedir}/xfs/xfs_bit.h
%{_includedir}/xfs/xfs_bmap.h
%{_includedir}/xfs/xfs_bmap_btree.h
%{_includedir}/xfs/xfs_btree.h
%{_includedir}/xfs/xfs_btree_trace.h
%{_includedir}/xfs/xfs_buf_item.h
%{_includedir}/xfs/xfs_da_btree.h
%{_includedir}/xfs/xfs_dfrag.h
%{_includedir}/xfs/xfs_dinode.h
%{_includedir}/xfs/xfs_dir2.h
%{_includedir}/xfs/xfs_dir2_block.h
%{_includedir}/xfs/xfs_dir2_data.h
%{_includedir}/xfs/xfs_dir2_leaf.h
%{_includedir}/xfs/xfs_dir2_node.h
%{_includedir}/xfs/xfs_dir2_sf.h
%{_includedir}/xfs/xfs_dir_leaf.h
%{_includedir}/xfs/xfs_dir_sf.h
%{_includedir}/xfs/xfs_extfree_item.h
%{_includedir}/xfs/xfs_ialloc.h
%{_includedir}/xfs/xfs_ialloc_btree.h
%{_includedir}/xfs/xfs_imap.h
%{_includedir}/xfs/xfs_inode.h
%{_includedir}/xfs/xfs_inode_item.h
%{_includedir}/xfs/xfs_inum.h
%{_includedir}/xfs/xfs_log.h
%{_includedir}/xfs/xfs_log_priv.h
%{_includedir}/xfs/xfs_log_recover.h
%{_includedir}/xfs/xfs_metadump.h
%{_includedir}/xfs/xfs_mount.h
%{_includedir}/xfs/xfs_quota.h
%{_includedir}/xfs/xfs_rtalloc.h
%{_includedir}/xfs/xfs_sb.h
%{_includedir}/xfs/xfs_trans.h
%{_includedir}/xfs/xfs_trans_space.h
%{_includedir}/xfs/xfs_types.h
%changelog
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jun 30 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-9
- Fix block overflows in xfs_repair and xfs_metadump
* Fri Jul 19 2019 Eric Sandeen <sandeen@redhat.com> 5.1.0-1
* Tue Jun 30 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-8
- Fix up build-requires after e2fsprogs splitup
* Thu Jun 18 2009 Dennis Gilmore <dennis@ausil.us> 3.0.1-7
- update sparc multilib handling
* Mon Jun 15 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-6
- Make lazy superblock counters the default
* Mon Jun 15 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-5
- Add fallocate command to config script & fix for 32-bit
* Mon Jun 15 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-4
- Add fallocate command to xfs_io
* Fri May 15 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-3
- Fix and re-enable readline
* Tue May 05 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-2
- Conflict with xfsdump < 3.0.1 since files moved between them
* Tue May 05 2009 Eric Sandeen <sandeen@redhat.com> 3.0.1-1
- New upstream release
* Wed May 08 2019 Eric Sandeen <sandeen@redhat.com> 5.0.0-2
- Create new xfs_scrub subpackage (#1666839)
* Sat Apr 18 2009 Eric Sandeen <sandeen@redhat.com> 3.0.0-4
- Fix build for non-multilib arches, oops.
* Fri May 03 2019 Eric Sandeen <sandeen@redhat.com> 5.0.0-1
* Sat Apr 18 2009 Eric Sandeen <sandeen@redhat.com> 3.0.0-3
- Create new xfsprogs-qa-devel subpackage
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Feb 04 2009 Eric Sandeen <sandeen@redhat.com> 3.0.0-1
- New upstream release
* Fri Feb 22 2019 Eric Sandeen <sandeen@redhat.com> 4.20.0-1
- New upstream release
* Thu Jan 08 2009 Eric Sandeen <sandeen@redhat.com> 2.10.2-3
- Fix perms of libhandle.so in specfile, not makefile
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.19.0-4
- Rebuild for readline 8.0
* Wed Jan 07 2009 Eric Sandeen <sandeen@redhat.com> 2.10.2-2
- Fix perms of libhandle.so so that it's properly stripped
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.19.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Dec 07 2008 Eric Sandeen <sandeen@redhat.com> 2.10.2-1
- New upstream release, bugfix only.
* Wed Jan 23 2019 Pete Walter <pwalter@fedoraproject.org> - 4.19.0-2
- Rebuild for ICU 63
* Wed Nov 26 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-4
- Add protection from borken sys_ustat
- Add final upstream versions of gfs2 & parallel build patches
* Tue Nov 13 2018 Eric Sandeen <sandeen@redhat.com> 4.19.0-1
- New upstream release
* Wed Nov 12 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-2
- Recognize gfs/gfs2 in libdisk
- Enable parallel builds
* Fri Aug 24 2018 Eric Sandeen <sandeen@redhat.com> 4.18.0-1
- New upstream release
* Fri Sep 05 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-1
- Update to xfsprogs 2.10.1
- Add ASCII case-insensitive support to xfsprogs.
- xfs_repair fixes
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.17.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 04 2008 Dennis Gilmore <dennis@ausil.us> 2.9.8-3
- sparc32 is built using the sparcv9 variant
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 4.17.0-2
- Rebuild for ICU 62
* Wed Jun 04 2008 Eric Sandeen <sandeen@redhat.com> 2.9.8-2
- Tidy up multilib hack for non-multilib arches & add sparc (#448452)
* Thu Jun 28 2018 Eric Sandeen <sandeen@redhat.com> 4.17.0-1
- New upstream release
* Wed Apr 23 2008 Eric Sandeen <sandeen@redhat.com> 2.9.8-1
- Update to xfsprogs 2.9.8
- Add support for sb_features2 in wrong location
- Add -c option to xfs_admin to turn lazy-counters on/off
- Added support for mdp in libdisk/mkfs.xfs
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 4.16.0-2
- Rebuild for ICU 61.1
* Sun Mar 02 2008 Eric Sandeen <sandeen@redhat.com> 2.9.7-1
- Update to xfsprogs 2.9.7
- Lazy sb counters back off by default; other misc fixes
* Thu Apr 26 2018 Eric Sandeen <sandeen@redhat.com> 4.16.0-1
- New upstream release
- Clean up specfile
* Wed Feb 06 2008 Eric Sandeen <sandeen@redhat.com> 2.9.6-1
- Update to xfsprogs 2.9.6 - fixes mkfs sizing problem.
- Trim down BuildRequires to what's actually required now
* Mon Feb 26 2018 Eric Sandeen <sandeen@redhat.com> 4.15.1-1
- New upstream release
- Update Polish translation
* Mon Jan 21 2008 Eric Sandeen <sandeen@redhat.com> 2.9.5-1
- Update to xfsprogs 2.9.5
- Contains more optimal mkfs defaults
- specfile cleanup, & don't restate config defaults
* Mon Feb 26 2018 Eric Sandeen <sandeen@redhat.com> 4.15.0-2
- BuildRequires: gcc
* Tue Oct 23 2007 Eric Sandeen <sandeen@redhat.com> 2.9.4-4
- Add arm to multilib header wrapper
* Sat Feb 24 2018 Eric Sandeen <sandeen@redhat.com> 4.15.0-1
- New upstream release
- Adds new xfs_scrub utility and services
* Tue Oct 02 2007 Eric Sandeen <sandeen@redhat.com> 2.9.4-3
- mkfs.xfs: Fix wiping old AG headers and purge whack buffers
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Oct 01 2007 Eric Sandeen <sandeen@redhat.com> 2.9.4-2
- Add alpha to the multilib wrapper (#310411)
* Mon Nov 27 2017 Eric Sandeen <sandeen@redhat.com> 4.14.0-1
- New upstream release
* Mon Sep 10 2007 Eric Sandeen <sandeen@redhat.com> 2.9.4-1
- Update to xfsprogs 2.9.4
* Wed Sep 27 2017 Eric Sandeen <sandeen@redhat.com> 4.13.1-1
- New upstream release
- Trim ancient changelog
* Fri Aug 24 2007 Eric Sandeen <sandeen@redhat.com> 2.9.3-3
- Add gawk to buildrequires
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Aug 16 2007 Eric Sandeen <sandeen@redhat.com> 2.9.3-2
- Update license tag
* Sun Jul 30 2017 Florian Weimer <fweimer@redhat.com> - 4.12.0-3
- Rebuild with binutils fix for ppc64le (#1475636)
* Thu Jul 26 2007 Eric Sandeen <sandeen@redhat.com> 2.9.3-1
- Upgrade to xfsprogs 2.9.2, quota, xfs_repair, and filestreams changes
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jul 6 2007 Eric Sandeen <sandeen@redhat.com> 2.8.21-1
- Upgrade to xfsprogs 2.8.21, lazy sb counters enabled,
xfs_quota fix (#236746)
* Mon Jul 24 2017 Eric Sandeen <sandeen@redhat.com> 4.12.0-1
- New upstream release
* Thu May 31 2007 Eric Sandeen <sandeen@redhat.com> 2.8.20-2
- Fix ppc64 build... again
* Fri May 05 2017 Eric Sandeen <sandeen@redhat.com> 4.11.0-1
- New upstream release
* Fri May 25 2007 Eric Sandeen <sandeen@redhat.com> 2.8.20-1
- Upgrade to xfsprogs 2.8.20, several xfs_repair fixes
* Sun Feb 26 2017 Eric Sandeen <sandeen@redhat.com> 4.10.0-1
- New upstream release
* Tue Mar 06 2007 Miroslav Lichvar <mlichvar@redhat.com> 2.8.18-3
- Remove libtermcap-devel from BuildRequires
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 14 2007 Miroslav Lichvar <mlichvar@redhat.com> 2.8.18-2
- Disable readline support for now (#223781)
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.9.0-2
- Rebuild for readline 7.x
* Sun Feb 04 2007 Jarod Wilson <jwilson@redhat.com> 2.8.18-1
- Post-facto changelog addition to note bump to 2.8.18
* Thu Jan 05 2017 Eric Sandeen <sandeen@redhat.com> 4.9.0-1
- New upstream release
* Wed Sep 27 2006 Russell Cattelan <cattelan@thebarn.com> 2.8.11-3
- bump build version to 3 for a new brew build
* Tue Oct 18 2016 Eric Sandeen <sandeen@redhat.com> 4.8.0-1
- New upstream release
* Tue Sep 26 2006 Russell Cattelan <cattelan@thebarn.com> 2.8.11-2
- add ppc64 build patch
* Tue Sep 06 2016 Eric Sandeen <sandeen@redhat.com> 4.7.0-2
- Add libattr-devel build dependency to fix xfs_fsr
* Thu Sep 21 2006 Russell Cattelan <cattelan@redhat.com> 2.8.11-1
- Upgrade to xfsprogs 2.8.11 Need to pick up important repair fixes
* Sun Sep 04 2016 Eric Sandeen <sandeen@redhat.com> 4.7.0-1
- New upstream release
* Tue Jul 18 2006 Jeremy Katz <katzj@redhat.com> - 2.8.4-3
- exclude arch ppc64 for now (#199315)
* Tue Mar 15 2016 Eric Sandeen <sandeen@redhat.com> 4.5.0-1
- New upstream release
* Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com> - 2.8.4-2
- rebuild
* Thu Mar 10 2016 Eric Sandeen <sandeen@redhat.com> 4.3.0-3
- Fix build w/ new kernels which have [sg]etxattr promotion
* Tue Jul 04 2006 Robert Scheck <redhat@linuxnetz.de> 2.8.4-1
- Upgrade to 2.8.4 (#196599 #c2)
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Jun 25 2006 Robert Scheck <redhat@linuxnetz.de> 2.8.3-1
- Upgrade to 2.8.3 (#196599)
- Applied Russell Coker's suggested patch to improve the
performance for SELinux machines significantly (#120622)
* Mon Nov 30 2015 Eric Sandeen <sandeen@redhat.com> 4.3.0-1
- New upstream release
* Sun Jun 25 2006 Robert Scheck <redhat@linuxnetz.de> 2.7.11-2
- Fixed multilib conflict of xfs/platform_defs.h (#192755)
* Wed Sep 09 2015 Eric Sandeen <sandeen@redhat.com> 4.2.0-1
- New upstream release
* Sun Mar 12 2006 Robert Scheck <redhat@linuxnetz.de> 2.7.11-1
- Upgrade to 2.7.11 and spec file cleanup (#185234)
* Thu Jul 30 2015 Eric Sandeen <sandeen@redhat.com> 3.2.4-1
- New upstream release
- Addresses CVE-2012-2150 for xfs_metadump
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.7.3-1.2.1
- bump again for double-long bug on ppc(64)
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.7.3-1.2
- rebuilt for new gcc4.1 snapshot and glibc changes
* Wed Jun 10 2015 Eric Sandeen <sandeen@redhat.com> 3.2.3-1
- New upstream release
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Mon Oct 31 2005 Robert Scheck <redhat@linuxnetz.de> 2.7.3-1
- Upgrade to 2.7.3 and enabled termcap support (#154323)
* Wed Sep 28 2005 Florian La Roche <laroche@redhat.com>
- fixup building with current rpm
* Wed Apr 20 2005 Dave Jones <davej@redhat.com>
- Disable debug. (#151438)
- Rebuild with gcc4
* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> - 2.6.13-3
- Rebuilt for new readline.
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Wed May 5 2004 Jeremy Katz <katzj@redhat.com> - 2.6.13-1
- update to 2.6.13 per request of upstream
- fixes mount by label of xfs on former raid partition (#122043)
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Thu Jan 8 2004 Jeremy Katz <katzj@redhat.com> 2.6.0-2
- add defattr (reported by Matthias)
* Tue Dec 23 2003 Elliot Lee <sopwith@redhat.com> 2.6.0-3
- Fix tyops in dependencies
* Mon Dec 22 2003 Jeremy Katz <katzj@redhat.com> 2.6.0-1
- build for Fedora Core
- switch to more explicit file lists, nuke .la files
* Tue Dec 16 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de> 2.6.0
- Update to 2.6.0.
* Sat Sep 13 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de>
- Sync with XFS 1.3.0.
- Update to 2.5.6.
* Thu Apr 10 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de> 2.3.9-0_2.90at
- Rebuilt for Red Hat 9.