* Wed Nov 26 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-3
- Add protection from borken sys_ustat - Add final upstream versions of gfs2 & parallel build patches
This commit is contained in:
parent
4f538d20b3
commit
01d43a1f93
@ -3,10 +3,10 @@ Recognize gfs & gfs2 disk formats.
|
||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||
---
|
||||
|
||||
Index: xfsprogs-2.10.1/libdisk/fstype.c
|
||||
Index: xfs-cmds-build/xfsprogs/libdisk/fstype.c
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/libdisk/fstype.c 2007-09-10 21:01:17.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/libdisk/fstype.c 2008-11-12 10:41:38.996064522 -0600
|
||||
--- xfs-cmds-build.orig/xfsprogs/libdisk/fstype.c
|
||||
+++ xfs-cmds-build/xfsprogs/libdisk/fstype.c
|
||||
@@ -68,6 +68,7 @@ swapped(unsigned short a) {
|
||||
Added jfs - Christoph Hellwig
|
||||
Added sysv - Tim Launchbury
|
||||
@ -45,10 +45,10 @@ Index: xfsprogs-2.10.1/libdisk/fstype.c
|
||||
/* perhaps the user tries to mount the swap space
|
||||
on a new disk; warn her before she does mkfs on it */
|
||||
int pagesize = getpagesize();
|
||||
Index: xfsprogs-2.10.1/libdisk/fstype.h
|
||||
Index: xfs-cmds-build/xfsprogs/libdisk/fstype.h
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/libdisk/fstype.h 2007-09-10 21:01:17.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/libdisk/fstype.h 2008-11-12 10:41:38.997064279 -0600
|
||||
--- xfs-cmds-build.orig/xfsprogs/libdisk/fstype.h
|
||||
+++ xfs-cmds-build/xfsprogs/libdisk/fstype.h
|
||||
@@ -242,6 +242,56 @@ struct ocfs_volume_label {
|
||||
#define ocfslabellen(o) assemble2le(o.label_len)
|
||||
#define OCFS_MAGIC "OracleCFS"
|
||||
@ -115,3 +115,6 @@ Index: xfsprogs-2.10.1/libdisk/fstype.h
|
||||
+assemble4be(char *p) {
|
||||
+ return (p[3] | (p[2] << 8) | (p[1] << 16) | (p[0] << 24));
|
||||
+}
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
(oops, cvs version...)
|
||||
|
||||
w parallel builds of the xfsprogs package
|
||||
|
||||
I got tired of waiting for xfsprogs to build
|
||||
serially...
|
||||
|
||||
On a 16p altix, make -j16 (excluding the configure
|
||||
phase) went from 2m16s to 33s.
|
||||
phase) went from 2m16s to 15s.
|
||||
|
||||
I tossed this into an rpm and did a fedora scratch
|
||||
build on all arches, they all passed - some of them,
|
||||
@ -15,23 +16,25 @@ So this has had reasonable testing.
|
||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||
---
|
||||
|
||||
Index: xfsprogs-2.10.1/Makefile
|
||||
Index: xfs-cmds/xfsprogs/Makefile
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/Makefile 2007-09-10 21:01:13.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/Makefile 2008-11-12 10:41:03.159001661 -0600
|
||||
@@ -15,23 +15,28 @@ LSRCFILES = configure configure.in Makep
|
||||
--- xfs-cmds.orig/xfsprogs/Makefile
|
||||
+++ xfs-cmds/xfsprogs/Makefile
|
||||
@@ -15,24 +15,36 @@ LSRCFILES = configure configure.in Makep
|
||||
LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
|
||||
Logs/* built .census install.* install-dev.* *.gz
|
||||
|
||||
-SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk \
|
||||
- copy db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
|
||||
- m4 man doc po debian build
|
||||
+LIB_SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk
|
||||
+TOOL_SUBDIRS = copy db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
|
||||
m4 man doc po debian build
|
||||
+TOOL_SUBDIRS = copy db fsck growfs io logprint mkfs quota \
|
||||
+ mdrestore repair rtcp m4 man doc po debian build
|
||||
|
||||
-default: $(CONFIGURE)
|
||||
+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
|
||||
+
|
||||
default: $(CONFIGURE)
|
||||
+default: include/builddefs include/platform_defs.h
|
||||
ifeq ($(HAVE_BUILDDEFS), no)
|
||||
$(MAKE) -C . $@
|
||||
else
|
||||
@ -39,7 +42,15 @@ Index: xfsprogs-2.10.1/Makefile
|
||||
+ $(MAKE) $(SUBDIRS)
|
||||
endif
|
||||
|
||||
+$(TOOL_SUBDIRS) : $(LIB_SUBDIRS)
|
||||
+# tool/lib dependencies
|
||||
+libxcmd: include
|
||||
+copy mdrestore: libxfs
|
||||
+db logprint: libxfs libxlog
|
||||
+growfs: libxfs libxcmd
|
||||
+io: libxcmd libhandle
|
||||
+mkfs: libxfs libdisk
|
||||
+quota: libxcmd
|
||||
+repair: libxfs libxlog
|
||||
+
|
||||
ifeq ($(HAVE_BUILDDEFS), yes)
|
||||
include $(BUILDRULES)
|
||||
@ -47,11 +58,22 @@ Index: xfsprogs-2.10.1/Makefile
|
||||
clean: # if configure hasn't run, nothing to clean
|
||||
endif
|
||||
|
||||
+.NOTPARALLEL: $(CONFIGURE)
|
||||
$(CONFIGURE):
|
||||
-$(CONFIGURE):
|
||||
+include/builddefs:
|
||||
autoconf
|
||||
./configure \
|
||||
@@ -51,14 +56,19 @@ $(CONFIGURE):
|
||||
--prefix=/ \
|
||||
@@ -48,16 +60,27 @@ $(CONFIGURE):
|
||||
$$LOCAL_CONFIGURE_OPTIONS
|
||||
touch .census
|
||||
|
||||
+include/platform_defs.h: include/builddefs
|
||||
+## Recover from the removal of $@
|
||||
+ @if test -f $@; then :; else \
|
||||
+ rm -f include/builddefs; \
|
||||
+ $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
|
||||
+ fi
|
||||
+
|
||||
aclocal.m4::
|
||||
aclocal --acdir=`pwd`/m4 --output=$@
|
||||
|
||||
@ -62,50 +84,45 @@ Index: xfsprogs-2.10.1/Makefile
|
||||
$(INSTALL) -m 644 README $(PKG_DOC_DIR)
|
||||
|
||||
-install-dev: default
|
||||
- $(SUBDIRS_MAKERULE)
|
||||
+install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
|
||||
$(SUBDIRS_MAKERULE)
|
||||
|
||||
+
|
||||
+%-install:
|
||||
+ $(MAKE) -C $* install
|
||||
+
|
||||
+%-install-dev:
|
||||
+ $(MAKE) -C $* install-dev
|
||||
+
|
||||
|
||||
realclean distclean: clean
|
||||
rm -f $(LDIRT) $(CONFIGURE)
|
||||
rm -rf autom4te.cache Logs
|
||||
Index: xfsprogs-2.10.1/include/buildrules
|
||||
Index: xfs-cmds/xfsprogs/include/buildrules
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/include/buildrules 2008-09-04 21:37:53.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/include/buildrules 2008-11-12 10:39:11.683063452 -0600
|
||||
@@ -6,18 +6,22 @@ _BUILDRULES_INCLUDED_ = 1
|
||||
--- xfs-cmds.orig/xfsprogs/include/buildrules
|
||||
+++ xfs-cmds/xfsprogs/include/buildrules
|
||||
@@ -6,16 +6,19 @@ _BUILDRULES_INCLUDED_ = 1
|
||||
|
||||
include $(TOPDIR)/include/builddefs
|
||||
|
||||
-clean clobber : $(SUBDIRS)
|
||||
+clean clobber: $(addsuffix -clean,$(SUBDIRS))
|
||||
+clean clobber : $(addsuffix -clean,$(SUBDIRS))
|
||||
rm -f $(DIRT)
|
||||
@rm -fr .libs
|
||||
- $(SUBDIRS_MAKERULE)
|
||||
+%-clean::
|
||||
+%-clean:
|
||||
+ $(MAKE) -C $* clean
|
||||
|
||||
# Never blow away subdirs
|
||||
ifdef SUBDIRS
|
||||
.PRECIOUS: $(SUBDIRS)
|
||||
-$(SUBDIRS):
|
||||
- $(SUBDIRS_MAKERULE)
|
||||
endif
|
||||
|
||||
+.PHONY: $(SUBDIRS)
|
||||
+
|
||||
+$(SUBDIRS):
|
||||
$(SUBDIRS):
|
||||
- $(SUBDIRS_MAKERULE)
|
||||
+ $(MAKE) -C $@
|
||||
+
|
||||
endif
|
||||
|
||||
#
|
||||
# Standard targets
|
||||
#
|
||||
@@ -69,11 +73,13 @@ ifdef LTLIBRARY
|
||||
@@ -69,11 +72,13 @@ ifdef LTLIBRARY
|
||||
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
|
||||
endif
|
||||
|
||||
@ -121,10 +138,10 @@ Index: xfsprogs-2.10.1/include/buildrules
|
||||
# Include dep, but only if it exists
|
||||
ifeq ($(shell test -f .dep && echo .dep), .dep)
|
||||
include .dep
|
||||
Index: xfsprogs-2.10.1/include/buildmacros
|
||||
Index: xfs-cmds/xfsprogs/include/buildmacros
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/include/buildmacros 2007-09-10 21:01:15.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/include/buildmacros 2008-11-12 10:39:11.706064211 -0600
|
||||
--- xfs-cmds.orig/xfsprogs/include/buildmacros
|
||||
+++ xfs-cmds/xfsprogs/include/buildmacros
|
||||
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \
|
||||
done
|
||||
endif
|
||||
@ -140,10 +157,10 @@ Index: xfsprogs-2.10.1/include/buildmacros
|
||||
MAN_MAKERULE = \
|
||||
@for f in *.[12345678] ""; do \
|
||||
if test ! -z "$$f"; then \
|
||||
Index: xfsprogs-2.10.1/man/Makefile
|
||||
Index: xfs-cmds/xfsprogs/man/Makefile
|
||||
===================================================================
|
||||
--- xfsprogs-2.10.1.orig/man/Makefile 2007-09-10 21:01:19.000000000 -0500
|
||||
+++ xfsprogs-2.10.1/man/Makefile 2008-11-12 10:39:11.714001250 -0600
|
||||
--- xfs-cmds.orig/xfsprogs/man/Makefile
|
||||
+++ xfs-cmds/xfsprogs/man/Makefile
|
||||
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs
|
||||
|
||||
SUBDIRS = man3 man5 man8
|
||||
@ -163,3 +180,10 @@ Index: xfsprogs-2.10.1/man/Makefile
|
||||
+ $(MAKE) -C $* install-dev
|
||||
|
||||
include $(BUILDRULES)
|
||||
|
||||
_______________________________________________
|
||||
xfs mailing list
|
||||
xfs@oss.sgi.com
|
||||
http://oss.sgi.com/mailman/listinfo/xfs
|
||||
|
||||
|
49
xfsprogs-2.10.1-ustat.patch
Normal file
49
xfsprogs-2.10.1-ustat.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Linux kernels (at least up until 2.6.27) are lacking compat sys_ustat
|
||||
handlers on some platforms (notably PPC) so that if called from 32 bits
|
||||
on a 64-bit kernel, the kernel will copy out too much (32 bytes onto a
|
||||
20-byte structure):
|
||||
|
||||
[root@xero xfstests]# xfs_logprint /dev/loop0
|
||||
xfs_logprint:
|
||||
*** stack smashing detected ***: xfs_logprint terminated
|
||||
Aborted
|
||||
|
||||
This will be fixed upstream, but for the benefit of older kernels we
|
||||
may want to guard against this by padding the structure we pass into
|
||||
the syscall. We don't care about the values anyway, just the return
|
||||
value.
|
||||
|
||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||
---
|
||||
|
||||
Index: xfs-cmds/xfsprogs/libxfs/linux.c
|
||||
===================================================================
|
||||
--- xfs-cmds.orig/xfsprogs/libxfs/linux.c
|
||||
+++ xfs-cmds/xfsprogs/libxfs/linux.c
|
||||
@@ -49,7 +49,8 @@ static int max_block_alignment;
|
||||
int
|
||||
platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
|
||||
{
|
||||
- struct ustat ust;
|
||||
+ /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
|
||||
+ struct ustat ust[2];
|
||||
struct stat64 st;
|
||||
|
||||
if (!s) {
|
||||
@@ -60,7 +61,7 @@ platform_check_ismounted(char *name, cha
|
||||
s = &st;
|
||||
}
|
||||
|
||||
- if (ustat(s->st_rdev, &ust) >= 0) {
|
||||
+ if (ustat(s->st_rdev, ust) >= 0) {
|
||||
if (verbose)
|
||||
fprintf(stderr,
|
||||
_("%s: %s contains a mounted filesystem\n"),
|
||||
|
||||
|
||||
_______________________________________________
|
||||
xfs mailing list
|
||||
xfs@oss.sgi.com
|
||||
http://oss.sgi.com/mailman/listinfo/xfs
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Utilities for managing the XFS filesystem
|
||||
Name: xfsprogs
|
||||
Version: 2.10.1
|
||||
Release: 2%{?dist}
|
||||
Release: 2%{?dist}.ers1
|
||||
# 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
|
||||
@ -9,17 +9,18 @@ Release: 2%{?dist}
|
||||
License: GPL+ and LGPLv2+
|
||||
Group: System Environment/Base
|
||||
URL: http://oss.sgi.com/projects/xfs/
|
||||
Source0: ftp://oss.sgi.com/projects/xfs/download/cmd_tars/%{name}_%{version}-1.tar.gz
|
||||
Source0: ftp://oss.sgi.com/projects/xfs/cmd_tars/%{name}_%{version}-1.tar.gz
|
||||
Source1: xfsprogs-wrapper.h
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libtool, gettext
|
||||
BuildRequires: /usr/include/uuid/uuid.h
|
||||
BuildRequires: e2fsprogs-devel
|
||||
Provides: xfs-cmds
|
||||
Obsoletes: xfs-cmds <= %{version}
|
||||
Conflicts: xfsdump < 2.0.0
|
||||
|
||||
Patch0: xfsprogs-parallel-build.patch
|
||||
Patch0: xfsprogs-2.10.1-parallel-build.patch
|
||||
Patch1: xfsprogs-libdisk-gfs2.patch
|
||||
Patch2: xfsprogs-2.10.1-ustat.patch
|
||||
|
||||
%description
|
||||
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
||||
@ -50,8 +51,9 @@ also want to install xfsprogs.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch0 -p2
|
||||
%patch1 -p2
|
||||
%patch2 -p2
|
||||
|
||||
%build
|
||||
# xfsprogs abuses libexecdir
|
||||
@ -115,6 +117,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/*.so
|
||||
|
||||
%changelog
|
||||
* Wed Nov 26 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-3
|
||||
- Add protection from borken sys_ustat
|
||||
- Add final upstream versions of gfs2 & parallel build patches
|
||||
|
||||
* Wed Nov 12 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-2
|
||||
- Recognize gfs/gfs2 in libdisk
|
||||
- Enable parallel builds
|
||||
|
Loading…
Reference in New Issue
Block a user