endif
CONFIGURE = configure include/builddefs include/platform_defs.h
-
-LT_LSRCFILES = config.guess config.sub ltmain.sh ltconfig aclocal.m4
-LSRCFILES = configure configure.in Makepkgs install-sh README VERSION \
- $(LT_LSRCFILES)
+LSRCFILES = configure configure.in Makepkgs install-sh README VERSION
LDIRT = config.log config.status config.cache confdefs.h conftest* \
- Logs/* built .census install.* install-dev.* *.gz libtool
+ Logs/* built .census install.* install-dev.* *.gz
SUBDIRS = include libxfs libhandle libdisk \
bmap db freeze fsck growfs logprint mkfile mkfs repair rtcp \
# build RPM packages - manual clean before starting
echo "== clean, log is $LOGDIR/clean"
if $verbose ; then
- $MAKE clean 2>&1 | tee $LOGDIR/clean
+ $MAKE distclean 2>&1 | tee $LOGDIR/clean
else
- $MAKE clean > $LOGDIR/clean 2>&1
+ $MAKE distclean > $LOGDIR/clean 2>&1
fi
if [ $? -ne 0 ] ; then
- echo \"$MAKE clean\" failed, see log in $LOGDIR/clean
+ echo \"$MAKE distclean\" failed, see log in $LOGDIR/clean
tail $LOGDIR/clean
exit 1
fi
PKG_MAJOR=1
PKG_MINOR=3
PKG_REVISION=1
-PKG_BUILD=pre1
+PKG_BUILD=0
pkg_name="xfsprogs"
AC_SUBST(pkg_name)
-# For libtool
-AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-AC_SUBST(enable_shared)
-
-
#
# Note: the following environment variables may be set to override the
# defaults (to change paths and/or executables, build parameters, etc):
echo=$ECHO
AC_SUBST(echo)
+dnl ensure libtool is installed
+AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin)
+if test "$LIBTOOL" = ""; then
+ echo
+ echo 'FATAL ERROR: libtool does not seem to be installed.'
+ echo $pkg_name cannot be built without a working libtool installation.
+ exit 1
+fi
+libtool=$LIBTOOL
+AC_SUBST(libtool)
+
+dnl libtool to build libraries static only?
+AC_ARG_ENABLE(enable_shared,
+ [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes].],
+ ,
+ enable_shared=yes)
+AC_SUBST(enable_shared)
+
dnl Checks for UUID header and library.
AC_CHECK_HEADER(uuid/uuid.h,, [
echo
dnl output files
dnl
-#For libtool, from section 5.4.2 of the libtool manual. Just in
-# case we ever need them.
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
-AC_SUBST(LTLIBOBJS)
-LTALLOCA=`echo "$ALLOCA" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
-AC_SUBST(LTALLOCA)
-
-
AC_OUTPUT( \
dnl Build definitions for use in Makefiles
include/builddefs \
include $(TOPDIR)/include/builddefs
LSRCFILES = changelog control copyright rules
+DEV_DOC_DIR = $(PKG_DOC_DIR)/../xfslibs-dev
-default install install-dev:
+default:
include $(BUILDRULES)
+
+install: default
+ $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
+ $(INSTALL) -m 644 changelog $(PKG_DOC_DIR)/changelog.Debian
+
+install-dev: default
+ $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
+ $(INSTALL) -m 755 -d $(DEV_DOC_DIR)
+ $(INSTALL) -m 644 copyright $(DEV_DOC_DIR)
+ $(INSTALL) -m 644 changelog $(DEV_DOC_DIR)/changelog.Debian
+xfsprogs (1.3.1-0) unstable; urgency=low
+
+ * Reworked package slightly so that its not Debian native
+ * Debian-specific changes now documented in changelog.Debian.gz
+ * New upstream release (see /usr/share/doc/xfsprogs/changelog.gz)
+
+ -- Nathan Scott <nathans@debian.org> Sat, 15 Jul 2001 16:34:43 +1000
+
xfsprogs (1.3.0) unstable; urgency=low
* Reworked Makefiles to use libtool
$(pkgtmp) $(MAKE) -C . install
$(pkgdev) $(MAKE) -C . install-dev
$(pkgtmp) $(MAKE) -C build src-manifest
- $(pkgdev) ./install-sh -m 755 -d $(doctmp)
- $(pkgdev) ./install-sh -m 755 -d $(docdev)
- $(pkgdev) ./install-sh -m 644 debian/copyright $(docdev)
- $(pkgdev) ./install-sh -m 644 debian/changelog $(docdev)
@echo "== dpkg-buildpackage: debstd" 1>&2
- # dev pkg with .so symlinks to base pkg confuses debstd...
- $(stdenv) debstd -m | grep -v 'Dangling symlink'
+ # Note: dev pkg with .so symlinks to base pkg confuses debstd;
+ # so the .so 'Dangling symlink' message below is benign.
+ $(stdenv) debstd -m
dpkg-gencontrol -isp -p$(package) -P$(dirtmp)
dpkg-gencontrol -isp -p$(develop) -P$(dirdev)
chown -R root.root $(dirtmp) $(dirdev)
-xfsprogs-1.3.1 (12 Jul 2001)
+xfsprogs-1.3.1 (15 Jul 2001)
- updated xfs_types.h file from the kernel changes needed for
an xfsdump fix.
+ - tidy up various aspects of the libtool rework
+ - XVM stripe unit/width extraction
+ - fix an endian bug in xfs_db "write" command
+ - fix a build problem with liblvm.a installed
+ - fix bug in xfs_growfs mount option parsing with external log
+ - make use of BLKSZSET ioctl conditional via the Makefile
xfsprogs-1.3.0 (11 Jul 2001)
- reworked Makefiles to use libtool
install: default
$(INSTALL) -m 755 -d $(PKG_DOC_DIR)
-ifneq ($(PKG_DISTRIBUTION), debian)
+ $(INSTALL) -m 644 PORTING CHANGES.gz CREDITS $(README) $(PKG_DOC_DIR)
+ifeq ($(PKG_DISTRIBUTION), debian)
+ $(INSTALL) -S CHANGES.gz $(PKG_DOC_DIR)/changelog.gz
+else
$(INSTALL) -m 644 COPYING $(PKG_DOC_DIR)
endif
- $(INSTALL) -m 644 PORTING CHANGES.gz CREDITS $(README) $(PKG_DOC_DIR)
+
install-dev:
MAKEDEPEND = @makedepend@
LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
ENABLE_SHARED = @enable_shared@
#
} sv_type_t;
extern void get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *);
+extern int get_driver_block_major (const char *);
#endif /* __VOLUME_H__ */
return;
/* ... add new device drivers here */
}
+
+/*
+ * General purpose routine which dredges through procfs trying to
+ * match up device driver names with the associated major numbers
+ * being used in the running kernel.
+ */
+int
+get_driver_block_major(const char *driver)
+{
+ FILE *f;
+ char buf[64], puf[64];
+ int major = -1;
+
+#define PROC_DEVICES "/proc/devices"
+ if ((f = fopen(PROC_DEVICES, "r")) == NULL)
+ return major;
+ while (fgets(buf, sizeof(buf), f)) /* skip to block dev section */
+ if (strcmp("Block devices:\n", buf) == 0)
+ break;
+ while (fgets(buf, sizeof(buf), f))
+ if ((sscanf(buf, "%u %s\n", &major, puf) == 2) &&
+ (strcmp(puf, driver) == 0))
+ break;
+ fclose(f);
+ return major;
+}
#include <sys/stat.h>
#include <volume.h>
-#if HAVE_LIBLVM
- #include "lvm_user.h"
+#include "lvm_user.h"
+#if HAVE_LIBLVM
char *cmd; /* Not used. liblvm is broken */
int opt_d; /* Same thing */
#endif
+int
+mnt_is_lvm_subvol(dev_t dev)
+{
+ if (dev >> 8 == LVM_BLK_MAJOR)
+ return 1;
+ return 0;
+}
int
lvm_get_subvol_stripe(
struct stat64 *sb)
{
#if HAVE_LIBLVM
- if (sb->st_rdev >> 8 == LVM_BLK_MAJOR) {
+ if (mnt_is_lvm_subvol(sb->st_rdev)) {
lv_t *lv;
char *vgname;
#include <sys/stat.h>
#include "md.h"
+int
+mnt_is_md_subvol(dev_t dev)
+{
+ if (dev >> 8 == MD_MAJOR)
+ return 1;
+ return 0;
+}
+
int
md_get_subvol_stripe(
char *dfile,
int *swidth,
struct stat64 *sb)
{
- if (sb->st_rdev >> 8 == MD_MAJOR) {
+ if (mnt_is_md_subvol(sb->st_rdev)) {
struct md_array_info_s md;
int fd;
#include <volume.h>
#include "xvm.h"
-static int
+int
mnt_is_xvm_subvol(dev_t dev)
{
- /* TODO - DeanJ? - for now, always return false */
+ if (major(dev) == get_driver_block_major("xvm"))
+ return 1;
return 0;
}
int *swidth,
struct stat64 *sb)
{
- if (!mnt_is_xvm_subvol(sb->st_dev))
+ int fd;
+ xvm_getdev_t getdev;
+ xvm_subvol_stripe_t subvol_stripe;
+
+ if (!mnt_is_xvm_subvol(sb->st_rdev))
return 0;
- /* TODO - DeanJ? - for now, always return false */
+ /*
+ * This will actually open the data subvolume.
+ */
+ if ((fd = open(dev, O_RDONLY)) < 0)
+ return 0;
- return 0;
+ /*
+ * Go and get the the information for the correct
+ * subvolume.
+ */
+ if (ioctl(fd, DIOCGETVOLDEV, &getdev) < 0) {
+ close(fd);
+ return 0;
+ }
+ if ( (type == SVTYPE_RT) && (getdev.rt_subvol_dev) )
+ subvol_stripe.dev = getdev.rt_subvol_dev;
+ else if ( (type == SVTYPE_DATA) && (getdev.data_subvol_dev) )
+ subvol_stripe.dev = getdev.data_subvol_dev;
+ else {
+ close(fd);
+ return 0;
+ }
+
+ if (ioctl(fd, DIOCGETVOLSTRIPE, &subvol_stripe) < 0) {
+ close(fd);
+ return 0;
+ }
+
+ *sunit = subvol_stripe.unit_size;
+ *swidth = *sunit * subvol_stripe.width_size;
+ close(fd);
+ return 1;
}
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
+#define _DIOC_(x) (('d'<<8) | x)
+#define DIOCGETVOLDEV _DIOC_(36) /* subvolume devices */
+#define DIOCGETVOLSTRIPE _DIOC_(47) /* subvolume stripe info */
+
/*
- * Header for XVM support in libdisk
+ * Structure returned by the DIOCGETVOLDEV ioctl to list the
+ * subvolume device nodes in a volume. These are external device
+ * numbers.
*/
+#define XVM_GETDEV_VERS 1
+typedef struct {
+ __uint32_t version;
+ dev_t data_subvol_dev;
+
+ dev_t log_subvol_dev;
+ dev_t rt_subvol_dev;
+
+ dev_t sp_subvol_dev;
+} xvm_getdev_t;
- /* TODO - DeanJ? - empty for now */
+/*
+ * Structure returned by the DIOCGETVOLSTRIPE ioctl to describe
+ * the subvolume stripe units and width.
+ */
+#define XVM_SUBVOL_GEOMETRY_VERS 1
+typedef struct xvm_subvol_stripe_s {
+ __uint32_t version;
+ __uint32_t unit_size; /* in blocks */
+ __uint32_t width_size; /* in blocks */
+ __uint32_t pad1; /* padding */
+ dev_t dev;
+} xvm_subvol_stripe_t;
xfs_dir2.c xfs_dir2_leaf.c xfs_attr_leaf.c xfs_dir2_block.c \
xfs_dir2_node.c xfs_dir2_data.c xfs_dir2_sf.c xfs_bmap.c \
xfs_mount.c xfs_trans.c
+LCFLAGS += -DHAVE_BLKBSZSET=1
#
# Tracing flags:
#include <sys/ioctl.h>
#include <sys/mount.h>
-#ifndef BLKBSZSET
-#define BLKBSZSET _IO(0x12,110) /* set device block size */
-#endif
-
#define findrawpath(x) x
#define findblockpath(x) x
dev_t dev;
int d;
struct stat statb;
- int blocksize = 512; /* bytes */
if ((fd = open(path,
(readonly ? O_RDONLY : O_RDWR) |
exit(1);
}
- /* Set device blocksize to 512 bytes */
+#ifdef HAVE_BLKBSZSET
+ /*
+ * Set device blocksize to 512 bytes
+ *
+ * See bug #801063, but we no longer have this ioctl in the kernel -
+ * it will be needed again though when the fs blocksize != pagesize.
+ */
+#ifndef BLKBSZSET
+#define BLKBSZSET _IO(0x12,110) /* set device block size */
+#endif
if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK) {
+ int blocksize = 512; /* bytes */
if (ioctl(fd, BLKBSZSET, &blocksize) < 0) {
fprintf(stderr, "%s: warning - cannot set blocksize on "
"block device %s: %s\n",
progname, path, strerror(errno));
}
}
+#endif
/* get the device number from the stat buf - unless
* we're not opening a real device, in which case