]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
remove rules to tidy up tmp libtool files - we use the installed version now.
authorNathan Scott <nathans@sgi.com>
Mon, 16 Jul 2001 07:33:50 +0000 (07:33 +0000)
committerNathan Scott <nathans@sgi.com>
Mon, 16 Jul 2001 07:33:50 +0000 (07:33 +0000)
18 files changed:
Makefile
Makepkgs
VERSION
configure.in
debian/Makefile
debian/changelog
debian/rules
doc/CHANGES
doc/Makefile
include/builddefs.in
include/volume.h
libdisk/drivers.c
libdisk/lvm.c
libdisk/md.c
libdisk/xvm.c
libdisk/xvm.h
libxfs/Makefile
libxfs/init.c

index 3c66cc4122b051d0af9fe306c1049d4afe8f0aeb..0b7cf24e4a5da578adfe334294851e147e788b06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,10 @@ include $(TOPDIR)/include/builddefs
 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 \
index 731cfb0ac61166cfa9ada43c7a8ac8365890d59a..103c1f3f4d73f8de19a0a15f6c0cd7c870ee027e 100755 (executable)
--- a/Makepkgs
+++ b/Makepkgs
@@ -52,12 +52,12 @@ fi
 # 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
diff --git a/VERSION b/VERSION
index caad6d580360a3449bfa061b0ed37a34baffc908..e70cad31bd101cd2911e6891a84f4b6fbb2103ac 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -4,4 +4,4 @@
 PKG_MAJOR=1
 PKG_MINOR=3
 PKG_REVISION=1
-PKG_BUILD=pre1
+PKG_BUILD=0
index e5a8af917cd598b1e06d4c0819d9ca9eb4986129..534ec784152ae8a8ff033d848a3b5ce0761a1379 100644 (file)
@@ -3,12 +3,6 @@ AC_INIT(include/libxfs.h)
 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):
@@ -108,6 +102,24 @@ test -z "$ECHO" && AC_PATH_PROG(ECHO, echo, /bin/echo)
 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
@@ -251,14 +263,6 @@ dnl
 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 \
index 59870426b467946c0b45909139949167b20e0ec7..f5faadd108a0cc45b37fc1b7df3aa2fef1b8c3a0 100644 (file)
@@ -34,7 +34,18 @@ TOPDIR = ..
 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
index 9370fa0664ad740ce0259b61e2c68b4dd2afa337..5cdb55352d50382914cb237ae05dcee1bbdf89f9 100644 (file)
@@ -1,3 +1,11 @@
+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
index 1c0a72cc400bce6ad8ceea95b9671d008cd014e5..676dacecb00e615737db86e086e32a3e568b04a3 100755 (executable)
@@ -44,13 +44,10 @@ binary-arch: checkroot built
        $(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)
index ef4cd1a33f110dbe9c38ea1650d1fc3ddfd60943..2871928a89cfb92aeae7d139671f3fd5c620559f 100644 (file)
@@ -1,6 +1,12 @@
-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
index 0e09ea786a028d7dc0d9634f5514f7e61060cf3b..aa90960cfc579d73bead8a2abbf69f08c6724db2 100644 (file)
@@ -46,8 +46,11 @@ CHANGES.gz:
 
 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:
index 00bfc649db3a32bf508f0d0dc0f25e14a423ce8f..56502c49132b41b14ab610f0edbb7162554db00d 100644 (file)
@@ -77,7 +77,6 @@ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
 MAKEDEPEND = @makedepend@
 
 LIBTOOL        = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 ENABLE_SHARED = @enable_shared@
 
 #
index eef50414719361b525715c0679dbe7f13cb8ae2f..de532c47dd7b9a157ce5cf56af9b68de22f3e90a 100644 (file)
@@ -61,5 +61,6 @@ typedef enum sv_type_e {
 } 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__ */
index 791809e92a88be3e189a8e463da2b5585e472865..06f290c82450a4dcf162818a792bf30b2dba4152 100644 (file)
@@ -61,3 +61,29 @@ get_subvol_stripe_wrapper(char *dev, sv_type_t type, int *sunit, int *swidth)
                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;
+}
index 12b10d869f248818ed3e24e7f184c16d29dbcdf4..f419000a5a61935c0718355630f1826579ff8f8d 100644 (file)
 #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(
@@ -52,7 +59,7 @@ 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;
 
index 7e7a2981fbe7e8a656e8a4d44413e5104f4d1050..12e596d6107044af83eb027896d729c08bea026f 100644 (file)
 #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,
@@ -44,7 +52,7 @@ md_get_subvol_stripe(
        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;
 
index 6891811f4f49e2c251434428344ace77991fd2b4..f53df83e0f055b67fb70197ec329a2b1ab79e0ca 100644 (file)
 #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;
 }
 
@@ -62,10 +63,43 @@ xvm_get_subvol_stripe(
        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;
 }
index e0f0281f29799c3c84c3155802745ac9fbc56b82..db4f15cd7df8a60644e244f2705fcedd54e445fd 100644 (file)
  * 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;
 
index e1cbf3bec0e0037e6f8e814eb300751be96d2508..d38da10079703cc986f838430a042e5fa8e177ef 100644 (file)
@@ -46,6 +46,7 @@ CFILES = init.c logitem.c rdwr.c trans.c util.c \
        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:
index 1c0ea142b8f4d7fd01fea4867bbe1e6661e38f0c..84dcd26f6ffeed1bbb5e643f24eb5e2baf147d41 100644 (file)
 #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
 
@@ -194,7 +190,6 @@ libxfs_device_open(char *path, int creat, int readonly, int setblksize)
        dev_t           dev;
        int             d;
        struct stat     statb;
-       int             blocksize = 512; /* bytes */
 
        if ((fd = open(path,
                        (readonly ? O_RDONLY : O_RDWR) |
@@ -211,14 +206,25 @@ libxfs_device_open(char *path, int creat, int readonly, int setblksize)
                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