* 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>
|
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
|
--- xfs-cmds-build.orig/xfsprogs/libdisk/fstype.c
|
||||||
+++ xfsprogs-2.10.1/libdisk/fstype.c 2008-11-12 10:41:38.996064522 -0600
|
+++ xfs-cmds-build/xfsprogs/libdisk/fstype.c
|
||||||
@@ -68,6 +68,7 @@ swapped(unsigned short a) {
|
@@ -68,6 +68,7 @@ swapped(unsigned short a) {
|
||||||
Added jfs - Christoph Hellwig
|
Added jfs - Christoph Hellwig
|
||||||
Added sysv - Tim Launchbury
|
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
|
/* perhaps the user tries to mount the swap space
|
||||||
on a new disk; warn her before she does mkfs on it */
|
on a new disk; warn her before she does mkfs on it */
|
||||||
int pagesize = getpagesize();
|
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
|
--- xfs-cmds-build.orig/xfsprogs/libdisk/fstype.h
|
||||||
+++ xfsprogs-2.10.1/libdisk/fstype.h 2008-11-12 10:41:38.997064279 -0600
|
+++ xfs-cmds-build/xfsprogs/libdisk/fstype.h
|
||||||
@@ -242,6 +242,56 @@ struct ocfs_volume_label {
|
@@ -242,6 +242,56 @@ struct ocfs_volume_label {
|
||||||
#define ocfslabellen(o) assemble2le(o.label_len)
|
#define ocfslabellen(o) assemble2le(o.label_len)
|
||||||
#define OCFS_MAGIC "OracleCFS"
|
#define OCFS_MAGIC "OracleCFS"
|
||||||
@ -115,3 +115,6 @@ Index: xfsprogs-2.10.1/libdisk/fstype.h
|
|||||||
+assemble4be(char *p) {
|
+assemble4be(char *p) {
|
||||||
+ return (p[3] | (p[2] << 8) | (p[1] << 16) | (p[0] << 24));
|
+ 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
|
I got tired of waiting for xfsprogs to build
|
||||||
serially...
|
serially...
|
||||||
|
|
||||||
On a 16p altix, make -j16 (excluding the configure
|
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
|
I tossed this into an rpm and did a fedora scratch
|
||||||
build on all arches, they all passed - some of them,
|
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>
|
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
|
--- xfs-cmds.orig/xfsprogs/Makefile
|
||||||
+++ xfsprogs-2.10.1/Makefile 2008-11-12 10:41:03.159001661 -0600
|
+++ xfs-cmds/xfsprogs/Makefile
|
||||||
@@ -15,23 +15,28 @@ LSRCFILES = configure configure.in Makep
|
@@ -15,24 +15,36 @@ LSRCFILES = configure configure.in Makep
|
||||||
LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
|
LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
|
||||||
Logs/* built .census install.* install-dev.* *.gz
|
Logs/* built .census install.* install-dev.* *.gz
|
||||||
|
|
||||||
-SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk \
|
-SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk \
|
||||||
- copy db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
|
- 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
|
+LIB_SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk
|
||||||
+TOOL_SUBDIRS = copy db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
|
+TOOL_SUBDIRS = copy db fsck growfs io logprint mkfs quota \
|
||||||
m4 man doc po debian build
|
+ mdrestore repair rtcp m4 man doc po debian build
|
||||||
|
|
||||||
|
-default: $(CONFIGURE)
|
||||||
+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
|
+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
|
||||||
+
|
+
|
||||||
default: $(CONFIGURE)
|
+default: include/builddefs include/platform_defs.h
|
||||||
ifeq ($(HAVE_BUILDDEFS), no)
|
ifeq ($(HAVE_BUILDDEFS), no)
|
||||||
$(MAKE) -C . $@
|
$(MAKE) -C . $@
|
||||||
else
|
else
|
||||||
@ -39,7 +42,15 @@ Index: xfsprogs-2.10.1/Makefile
|
|||||||
+ $(MAKE) $(SUBDIRS)
|
+ $(MAKE) $(SUBDIRS)
|
||||||
endif
|
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)
|
ifeq ($(HAVE_BUILDDEFS), yes)
|
||||||
include $(BUILDRULES)
|
include $(BUILDRULES)
|
||||||
@ -47,11 +58,22 @@ Index: xfsprogs-2.10.1/Makefile
|
|||||||
clean: # if configure hasn't run, nothing to clean
|
clean: # if configure hasn't run, nothing to clean
|
||||||
endif
|
endif
|
||||||
|
|
||||||
+.NOTPARALLEL: $(CONFIGURE)
|
-$(CONFIGURE):
|
||||||
$(CONFIGURE):
|
+include/builddefs:
|
||||||
autoconf
|
autoconf
|
||||||
./configure \
|
./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.m4::
|
||||||
aclocal --acdir=`pwd`/m4 --output=$@
|
aclocal --acdir=`pwd`/m4 --output=$@
|
||||||
|
|
||||||
@ -62,50 +84,45 @@ Index: xfsprogs-2.10.1/Makefile
|
|||||||
$(INSTALL) -m 644 README $(PKG_DOC_DIR)
|
$(INSTALL) -m 644 README $(PKG_DOC_DIR)
|
||||||
|
|
||||||
-install-dev: default
|
-install-dev: default
|
||||||
|
- $(SUBDIRS_MAKERULE)
|
||||||
+install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
|
+install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
|
||||||
$(SUBDIRS_MAKERULE)
|
+
|
||||||
|
|
||||||
+%-install:
|
+%-install:
|
||||||
+ $(MAKE) -C $* install
|
+ $(MAKE) -C $* install
|
||||||
+
|
+
|
||||||
+%-install-dev:
|
+%-install-dev:
|
||||||
+ $(MAKE) -C $* install-dev
|
+ $(MAKE) -C $* install-dev
|
||||||
+
|
|
||||||
realclean distclean: clean
|
realclean distclean: clean
|
||||||
rm -f $(LDIRT) $(CONFIGURE)
|
rm -f $(LDIRT) $(CONFIGURE)
|
||||||
rm -rf autom4te.cache Logs
|
Index: xfs-cmds/xfsprogs/include/buildrules
|
||||||
Index: xfsprogs-2.10.1/include/buildrules
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xfsprogs-2.10.1.orig/include/buildrules 2008-09-04 21:37:53.000000000 -0500
|
--- xfs-cmds.orig/xfsprogs/include/buildrules
|
||||||
+++ xfsprogs-2.10.1/include/buildrules 2008-11-12 10:39:11.683063452 -0600
|
+++ xfs-cmds/xfsprogs/include/buildrules
|
||||||
@@ -6,18 +6,22 @@ _BUILDRULES_INCLUDED_ = 1
|
@@ -6,16 +6,19 @@ _BUILDRULES_INCLUDED_ = 1
|
||||||
|
|
||||||
include $(TOPDIR)/include/builddefs
|
include $(TOPDIR)/include/builddefs
|
||||||
|
|
||||||
-clean clobber : $(SUBDIRS)
|
-clean clobber : $(SUBDIRS)
|
||||||
+clean clobber: $(addsuffix -clean,$(SUBDIRS))
|
+clean clobber : $(addsuffix -clean,$(SUBDIRS))
|
||||||
rm -f $(DIRT)
|
rm -f $(DIRT)
|
||||||
@rm -fr .libs
|
@rm -fr .libs
|
||||||
- $(SUBDIRS_MAKERULE)
|
- $(SUBDIRS_MAKERULE)
|
||||||
+%-clean::
|
+%-clean:
|
||||||
+ $(MAKE) -C $* clean
|
+ $(MAKE) -C $* clean
|
||||||
|
|
||||||
# Never blow away subdirs
|
# Never blow away subdirs
|
||||||
ifdef SUBDIRS
|
ifdef SUBDIRS
|
||||||
.PRECIOUS: $(SUBDIRS)
|
.PRECIOUS: $(SUBDIRS)
|
||||||
-$(SUBDIRS):
|
|
||||||
- $(SUBDIRS_MAKERULE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
+.PHONY: $(SUBDIRS)
|
+.PHONY: $(SUBDIRS)
|
||||||
+
|
+
|
||||||
+$(SUBDIRS):
|
$(SUBDIRS):
|
||||||
|
- $(SUBDIRS_MAKERULE)
|
||||||
+ $(MAKE) -C $@
|
+ $(MAKE) -C $@
|
||||||
+
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Standard targets
|
@@ -69,11 +72,13 @@ ifdef LTLIBRARY
|
||||||
#
|
|
||||||
@@ -69,11 +73,13 @@ ifdef LTLIBRARY
|
|
||||||
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
|
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -121,10 +138,10 @@ Index: xfsprogs-2.10.1/include/buildrules
|
|||||||
# Include dep, but only if it exists
|
# Include dep, but only if it exists
|
||||||
ifeq ($(shell test -f .dep && echo .dep), .dep)
|
ifeq ($(shell test -f .dep && echo .dep), .dep)
|
||||||
include .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
|
--- xfs-cmds.orig/xfsprogs/include/buildmacros
|
||||||
+++ xfsprogs-2.10.1/include/buildmacros 2008-11-12 10:39:11.706064211 -0600
|
+++ xfs-cmds/xfsprogs/include/buildmacros
|
||||||
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \
|
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \
|
||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
@ -140,10 +157,10 @@ Index: xfsprogs-2.10.1/include/buildmacros
|
|||||||
MAN_MAKERULE = \
|
MAN_MAKERULE = \
|
||||||
@for f in *.[12345678] ""; do \
|
@for f in *.[12345678] ""; do \
|
||||||
if test ! -z "$$f"; then \
|
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
|
--- xfs-cmds.orig/xfsprogs/man/Makefile
|
||||||
+++ xfsprogs-2.10.1/man/Makefile 2008-11-12 10:39:11.714001250 -0600
|
+++ xfs-cmds/xfsprogs/man/Makefile
|
||||||
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs
|
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs
|
||||||
|
|
||||||
SUBDIRS = man3 man5 man8
|
SUBDIRS = man3 man5 man8
|
||||||
@ -163,3 +180,10 @@ Index: xfsprogs-2.10.1/man/Makefile
|
|||||||
+ $(MAKE) -C $* install-dev
|
+ $(MAKE) -C $* install-dev
|
||||||
|
|
||||||
include $(BUILDRULES)
|
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
|
Summary: Utilities for managing the XFS filesystem
|
||||||
Name: xfsprogs
|
Name: xfsprogs
|
||||||
Version: 2.10.1
|
Version: 2.10.1
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}.ers1
|
||||||
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
||||||
# in source, with no mention of version.
|
# in source, with no mention of version.
|
||||||
# doc/COPYING file specifies what is GPL and what is LGPL
|
# doc/COPYING file specifies what is GPL and what is LGPL
|
||||||
@ -9,17 +9,18 @@ Release: 2%{?dist}
|
|||||||
License: GPL+ and LGPLv2+
|
License: GPL+ and LGPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://oss.sgi.com/projects/xfs/
|
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
|
Source1: xfsprogs-wrapper.h
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: libtool, gettext
|
BuildRequires: libtool, gettext
|
||||||
BuildRequires: /usr/include/uuid/uuid.h
|
BuildRequires: e2fsprogs-devel
|
||||||
Provides: xfs-cmds
|
Provides: xfs-cmds
|
||||||
Obsoletes: xfs-cmds <= %{version}
|
Obsoletes: xfs-cmds <= %{version}
|
||||||
Conflicts: xfsdump < 2.0.0
|
Conflicts: xfsdump < 2.0.0
|
||||||
|
|
||||||
Patch0: xfsprogs-parallel-build.patch
|
Patch0: xfsprogs-2.10.1-parallel-build.patch
|
||||||
Patch1: xfsprogs-libdisk-gfs2.patch
|
Patch1: xfsprogs-libdisk-gfs2.patch
|
||||||
|
Patch2: xfsprogs-2.10.1-ustat.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
||||||
@ -50,8 +51,9 @@ also want to install xfsprogs.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p2
|
||||||
%patch1 -p1
|
%patch1 -p2
|
||||||
|
%patch2 -p2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# xfsprogs abuses libexecdir
|
# xfsprogs abuses libexecdir
|
||||||
@ -115,6 +117,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Nov 12 2008 Eric Sandeen <sandeen@redhat.com> 2.10.1-2
|
||||||
- Recognize gfs/gfs2 in libdisk
|
- Recognize gfs/gfs2 in libdisk
|
||||||
- Enable parallel builds
|
- Enable parallel builds
|
||||||
|
Loading…
Reference in New Issue
Block a user