+++ /dev/null
---- xfsprogs-3.0.0/include/linux.h~ 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0/include/linux.h 2009-03-19 16:19:35.000000000 +0100
-@@ -25,6 +25,10 @@
- #include <malloc.h>
- #include <getopt.h>
- #include <endian.h>
-+#ifdef __dietlibc__
-+#include <libgen.h>
-+#include <xfs/xfs_types.h>
-+#endif
-
- static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
- {
-diff -ur xfsprogs-3.0.0/include/project.h xfsprogs-3.0.0-diet/include/project.h
---- xfsprogs-3.0.0/include/project.h 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/include/project.h 2009-03-19 12:55:05.000000000 +0100
-@@ -19,6 +19,9 @@
- #define __PROJECT_H__
-
- #include <xfs/xfs.h>
-+#ifdef __dietlibc__
-+#include <xfs/xfs_types.h>
-+#endif
-
- #if !defined(__sgi__)
- typedef __uint32_t prid_t;
-diff -ur xfsprogs-3.0.0/include/xfs_ialloc_btree.h xfsprogs-3.0.0-diet/include/xfs_ialloc_btree.h
---- xfsprogs-3.0.0/include/xfs_ialloc_btree.h 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/include/xfs_ialloc_btree.h 2009-03-19 12:49:55.000000000 +0100
-@@ -18,6 +18,9 @@
- #ifndef __XFS_IALLOC_BTREE_H__
- #define __XFS_IALLOC_BTREE_H__
-
-+#ifdef __dietlibc__
-+#define NBBY CHAR_BIT
-+#endif
- /*
- * Inode map on-disk structures
- */
-diff -ur xfsprogs-3.0.0/include/xfs_types.h xfsprogs-3.0.0-diet/include/xfs_types.h
---- xfsprogs-3.0.0/include/xfs_types.h 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/include/xfs_types.h 2009-03-19 12:40:08.000000000 +0100
-@@ -28,18 +28,6 @@
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
-
--/*
-- * Additional type declarations for XFS
-- */
--typedef signed char __int8_t;
--typedef unsigned char __uint8_t;
--typedef signed short int __int16_t;
--typedef unsigned short int __uint16_t;
--typedef signed int __int32_t;
--typedef unsigned int __uint32_t;
--typedef signed long long int __int64_t;
--typedef unsigned long long int __uint64_t;
--
- typedef enum { B_FALSE,B_TRUE } boolean_t;
- typedef __uint32_t prid_t; /* project ID */
- typedef __uint32_t inst_t; /* an instruction */
-@@ -64,6 +52,20 @@
-
- #endif /* __KERNEL__ */
-
-+#if defined(__dietlibc__) || defined(__KERNEL__)
-+/*
-+ * Additional type declarations for XFS
-+ */
-+typedef signed char __int8_t;
-+typedef unsigned char __uint8_t;
-+typedef signed short int __int16_t;
-+typedef unsigned short int __uint16_t;
-+typedef signed int __int32_t;
-+typedef unsigned int __uint32_t;
-+typedef signed long long int __int64_t;
-+typedef unsigned long long int __uint64_t;
-+#endif
-+
- typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
- typedef __uint32_t xfs_extlen_t; /* extent length in blocks */
- typedef __uint32_t xfs_agnumber_t; /* allocation group number */
---- xfsprogs-3.0.0/libdisk/evms.h~ 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0/libdisk/evms.h 2009-03-19 21:52:18.000000000 +0100
-@@ -15,6 +15,9 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-+#ifdef __dietlibc__
-+#include <xfs/platform_defs.h>
-+#endif
-
- #define EVMS_MAJOR 117
- #define EVMS_GET_VOL_STRIPE_INFO \
-diff -ur xfsprogs-3.0.0/libdisk/xvm.h xfsprogs-3.0.0-diet/libdisk/xvm.h
---- xfsprogs-3.0.0/libdisk/xvm.h 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/libdisk/xvm.h 2009-03-19 12:56:54.000000000 +0100
-@@ -15,6 +15,10 @@
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-+#ifdef __dietlibc__
-+#include <xfs/platform_defs.h>
-+#include <xfs/xfs_types.h>
-+#endif
-
- #define _DIOC_(x) (('d'<<8) | x)
- #define DIOCGETVOLDEV _DIOC_(36) /* subvolume devices */
-diff -ur xfsprogs-3.0.0/libhandle/handle.c xfsprogs-3.0.0-diet/libhandle/handle.c
---- xfsprogs-3.0.0/libhandle/handle.c 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/libhandle/handle.c 2009-03-19 12:56:03.000000000 +0100
-@@ -17,6 +17,10 @@
- #include <xfs/xfs.h>
- #include <xfs/handle.h>
- #include <xfs/parent.h>
-+#ifdef __dietlibc__
-+#include <xfs/xfs_types.h>
-+#include <linux/limits.h>
-+#endif
-
- /* just pick a value we know is more than big enough */
- #define MAXHANSIZ 64
-diff -ur xfsprogs-3.0.0/libhandle/jdm.c xfsprogs-3.0.0-diet/libhandle/jdm.c
---- xfsprogs-3.0.0/libhandle/jdm.c 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/libhandle/jdm.c 2009-03-19 12:56:28.000000000 +0100
-@@ -17,6 +17,10 @@
- #include <xfs/handle.h>
- #include <xfs/jdm.h>
- #include <xfs/parent.h>
-+#ifdef __dietlibc__
-+#include <xfs/xfs_types.h>
-+#include <linux/limits.h>
-+#endif
-
- /* internal fshandle - typecast to a void for external use */
- #define FSHANDLE_SZ 8
-diff -ur xfsprogs-3.0.0/libxfs/linux.c xfsprogs-3.0.0-diet/libxfs/linux.c
---- xfsprogs-3.0.0/libxfs/linux.c 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0-diet/libxfs/linux.c 2009-03-19 13:30:12.000000000 +0100
-@@ -21,7 +21,12 @@
- #include <mntent.h>
- #include <sys/stat.h>
- #undef ustat
-+#ifdef __dietlibc__
-+#include <ustat.h>
-+#include <sys/types.h>
-+#else
- #include <sys/ustat.h>
-+#endif
- #include <sys/mount.h>
- #include <sys/ioctl.h>
- #include <sys/sysinfo.h>
-diff -ur xfsprogs-3.0.0/repair/prefetch.c xfsprogs-3.0.0-diet/repair/prefetch.c
---- xfsprogs-3.0.0/repair/prefetch.c 2009-02-04 23:29:26.000000000 +0100
-+++ xfsprogs-3.0.0-diet/repair/prefetch.c 2009-03-19 16:00:01.000000000 +0100
-@@ -735,7 +735,11 @@
- {
- mp = pmp;
- mp_fd = libxfs_device_to_fd(mp->m_dev);
-+#ifdef __dietlibc__
-+ pf_max_bytes = sysconf(_SC_PAGESIZE) << 7;
-+#else
- pf_max_bytes = sysconf(_SC_PAGE_SIZE) << 7;
-+#endif
- pf_max_bbs = pf_max_bytes >> BBSHIFT;
- pf_max_fsbs = pf_max_bytes >> mp->m_sb.sb_blocklog;
- pf_batch_bytes = DEF_BATCH_BYTES;
---- xfsprogs-3.0.0/include/platform_defs.h.in~ 2009-02-04 23:29:25.000000000 +0100
-+++ xfsprogs-3.0.0/include/platform_defs.h.in 2009-03-19 21:48:13.000000000 +0100
-@@ -169,4 +169,14 @@
- #define __arch_pack
- #endif
-
-+#if defined(__dietlibc__) && defined(__NO_STAT64)
-+#define lstat64 lstat
-+#define fstat64 fstat
-+#define stat64 stat
-+#define pread64 pread
-+#define pwrite64 pwrite
-+#define lseek64 lseek
-+#define ftruncate64 ftruncate
-+#endif
-+
- #endif /* __XFS_PLATFORM_DEFS_H__ */
mdrestore repair rtcp m4 man doc po debian
+--- xfsprogs-3.2.0/libxfs/Makefile~ 2014-01-28 07:19:44.000000000 +0100
++++ xfsprogs-3.2.0/libxfs/Makefile 2014-05-17 20:01:36.257560519 +0200
+@@ -56,7 +56,7 @@
+
+ FCFLAGS = -I.
+
+-LTLIBS = $(LIBPTHREAD) $(LIBRT)
++LTLIBS = $(LIBPTHREAD) $(LIBRT) $(LIBUUID)
+
+ # don't try linking xfs_repair with a debug libxfs.
+ DEBUG = -DNDEBUG
+++ /dev/null
-commit cbd7508db4c9597889ad98d5f027542002e0e57c
-Author: Eric Sandeen <sandeen@redhat.com>
-Date: Thu Aug 15 02:26:40 2013 +0000
-
- xfs_repair: zero out unused parts of superblocks
-
- Prior to:
- 1375cb65 xfs: growfs: don't read garbage for new secondary superblocks
-
- we ran the risk of allowing garbage in secondary superblocks
- beyond the in-use sb fields. With kernels 3.10 and beyond, the
- verifiers will kick these out as invalid, but xfs_repair does
- not detect or repair this condition.
-
- There is superblock stale-data zeroing code, but it is under a
- narrow conditional - the bug addressed in the above commit did not
- meet that conditional. So change this to check unconditionally.
-
- Further, the checking code was looking at the in-memory
- superblock buffer, which was zeroed prior to population, and
- would therefore never possibly show any stale data beyond the
- last up-rev superblock field.
-
- So instead, check the disk buffer for this garbage condition.
-
- If we detect garbage, we must zero out both the in-memory sb
- and the disk buffer; the former may contain unused data
- in up-rev sb fields which will be written back out; the latter
- may contain garbage beyond all fields, which won't be updated
- when we translate the in-memory sb back to disk.
-
- The V4 superblock case was zeroing out the sb_bad_features2
- field; we also fix that to leave that field alone.
-
- Lastly, use offsetof() instead of the tortured (__psint_t)
- casts & pointer math.
-
- Reported-by: Michael Maier <m1278468@allmail.net>
- Signed-off-by: Eric Sandeen <sandeen@redhat.com>
- Reviewed-by: Rich Johnston <rjohnston@sgi.com>
- Signed-off-by: Rich Johnston <rjohnston@sgi.com>
-
-diff --git a/repair/agheader.c b/repair/agheader.c
-index b0f38ba..53e47b6 100644
---- a/repair/agheader.c
-+++ b/repair/agheader.c
-@@ -256,60 +256,63 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
- rval = do_bzero = 0;
-
- /*
-- * mkfs's that stamped a feature bit besides the ones in the mask
-- * (e.g. were pre-6.5 beta) could leave garbage in the secondary
-- * superblock sectors. Anything stamping the shared fs bit or better
-- * into the secondaries is ok and should generate clean secondary
-- * superblock sectors. so only run the zero check on the
-- * potentially garbaged secondaries.
-+ * Check for garbage beyond the last valid field.
-+ * Use field addresses instead so this code will still
-+ * work against older filesystems when the superblock
-+ * gets rev'ed again with new fields appended.
-+ *
-+ * size is the size of data which is valid for this sb.
- */
-- if (pre_65_beta ||
-- (sb->sb_versionnum & XR_GOOD_SECSB_VNMASK) == 0 ||
-- sb->sb_versionnum < XFS_SB_VERSION_4) {
-- /*
-- * Check for garbage beyond the last field.
-- * Use field addresses instead so this code will still
-- * work against older filesystems when the superblock
-- * gets rev'ed again with new fields appended.
-- */
-- if (xfs_sb_version_hasmorebits(sb))
-- size = (__psint_t)&sb->sb_features2
-- + sizeof(sb->sb_features2) - (__psint_t)sb;
-- else if (xfs_sb_version_haslogv2(sb))
-- size = (__psint_t)&sb->sb_logsunit
-- + sizeof(sb->sb_logsunit) - (__psint_t)sb;
-- else if (xfs_sb_version_hassector(sb))
-- size = (__psint_t)&sb->sb_logsectsize
-- + sizeof(sb->sb_logsectsize) - (__psint_t)sb;
-- else if (xfs_sb_version_hasdirv2(sb))
-- size = (__psint_t)&sb->sb_dirblklog
-- + sizeof(sb->sb_dirblklog) - (__psint_t)sb;
-- else
-- size = (__psint_t)&sb->sb_width
-- + sizeof(sb->sb_width) - (__psint_t)sb;
-- for (ip = (char *)((__psint_t)sb + size);
-- ip < (char *)((__psint_t)sb + mp->m_sb.sb_sectsize);
-- ip++) {
-- if (*ip) {
-- do_bzero = 1;
-- break;
-- }
-- }
--
-- if (do_bzero) {
-- rval |= XR_AG_SB_SEC;
-- if (!no_modify) {
-- do_warn(
-- _("zeroing unused portion of %s superblock (AG #%u)\n"),
-- !i ? _("primary") : _("secondary"), i);
-- memset((void *)((__psint_t)sb + size), 0,
-- mp->m_sb.sb_sectsize - size);
-- } else
-- do_warn(
-- _("would zero unused portion of %s superblock (AG #%u)\n"),
-- !i ? _("primary") : _("secondary"), i);
-+
-+
-+
-+ if (xfs_sb_version_hasmorebits(sb))
-+ size = offsetof(xfs_sb_t, sb_bad_features2)
-+ + sizeof(sb->sb_bad_features2);
-+ else if (xfs_sb_version_haslogv2(sb))
-+ size = offsetof(xfs_sb_t, sb_logsunit)
-+ + sizeof(sb->sb_logsunit);
-+ else if (xfs_sb_version_hassector(sb))
-+ size = offsetof(xfs_sb_t, sb_logsectsize)
-+ + sizeof(sb->sb_logsectsize);
-+ else if (xfs_sb_version_hasdirv2(sb))
-+ size = offsetof(xfs_sb_t, sb_dirblklog)
-+ + sizeof(sb->sb_dirblklog);
-+ else
-+ size = offsetof(xfs_sb_t, sb_width)
-+ + sizeof(sb->sb_width);
-+
-+ /* Check the buffer we read from disk for garbage outside size */
-+ for (ip = XFS_BUF_PTR(sbuf) + size;
-+ ip < XFS_BUF_PTR(sbuf) + mp->m_sb.sb_sectsize;
-+ ip++) {
-+ if (*ip) {
-+ do_bzero = 1;
-+ break;
- }
- }
-+ if (do_bzero) {
-+ rval |= XR_AG_SB_SEC;
-+ if (!no_modify) {
-+ do_warn(
-+ _("zeroing unused portion of %s superblock (AG #%u)\n"),
-+ !i ? _("primary") : _("secondary"), i);
-+ /*
-+ * zero both the in-memory sb and the disk buffer,
-+ * because the former was read from disk and
-+ * may contain newer version fields that shouldn't
-+ * be set, and the latter is never updated past
-+ * the last field - just zap them both.
-+ */
-+ memset((void *)((__psint_t)sb + size), 0,
-+ mp->m_sb.sb_sectsize - size);
-+ memset(XFS_BUF_PTR(sbuf) + size, 0,
-+ mp->m_sb.sb_sectsize - size);
-+ } else
-+ do_warn(
-+ _("would zero unused portion of %s superblock (AG #%u)\n"),
-+ !i ? _("primary") : _("secondary"), i);
-+ }
-
- /*
- * now look for the fields we can manipulate directly.
Summary: Tools for the XFS filesystem
Summary(pl.UTF-8): Narzędzia do systemu plików XFS
Name: xfsprogs
-Version: 3.1.11
-Release: 4
+Version: 3.2.0
+Release: 1
License: LGPL v2.1 (libhandle), GPL v2 (the rest)
Group: Applications/System
Source0: ftp://linux-xfs.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
-# Source0-md5: de9f1f45026c2f4e0776058d429ff4b6
+# Source0-md5: 400047b2f6af87c0345b8f0cc00c13db
Source1: xfs_lsprojid
Patch0: %{name}-miscfix-v2.patch
Patch2: %{name}-sharedlibs.patch
Patch3: %{name}-pl.po-update.patch
Patch4: %{name}-dynamic_exe.patch
-Patch5: %{name}-diet.patch
+
Patch6: %{name}-repair-tcmalloc.patch
Patch7: %{name}-noquotasync.patch
-Patch8: %{name}-sb.patch
URL: http://www.xfs.org/
BuildRequires: autoconf
BuildRequires: automake
%define _bindir /usr/sbin
%define _libdir /%{_lib}
%define _libexecdir /usr/%{_lib}
-# for some reason known only to rpm there must be "\\|" not "\|" here
-%define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
-%define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch}
%description
A set of commands to use the XFS filesystem, including mkfs.xfs.
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
+
%{?with_tcmalloc:%patch6 -p1}
%patch7 -p1
-%patch8 -p1
%build
%{__aclocal} -I m4