#
PKG_MAJOR=1
PKG_MINOR=3
-PKG_REVISION=7
+PKG_REVISION=8
PKG_BUILD=0
libuuid="/usr/lib/libuuid.a")
AC_SUBST(libuuid)
-dnl Note - the plan is for liblvm to go away soon...
-dnl Checks for LVM library
-AC_MSG_CHECKING([for liblvm.a])
-liblvm=""
-for dir in /usr/local/lib /usr/lib /lib; do
- if test -f $dir/liblvm.a; then
- liblvm=$dir/liblvm.a
- fi
-done
-if test -n "$liblvm"; then
- AC_MSG_RESULT(yes)
- have_liblvm=1
-else
- AC_MSG_RESULT(no)
- have_liblvm=0
-fi
-AC_SUBST(liblvm)
-AC_SUBST(have_liblvm)
-
dnl Check if we have a type for the pointer's size integer (__psint_t)
AC_MSG_CHECKING([for __psint_t ])
AC_TRY_COMPILE(
BOOT_DOC_DIR = $(PKG_DOC_DIR)/../xfsprogs-bf
BOOT_MAN_DIR = $(PKG_MAN_DIR)/man8
BOOT_MKFS_BIN = $(TOPDIR)/mkfs/mkfs.xfs-xfsprogs-bf
-BOOT_MKFS_MAN = $(TOPDIR)/man/man8/mkfs.xfs.8.gz
+BOOT_MKFS_MAN = $(TOPDIR)/man/man8/mkfs.xfs.8
default:
$(INSTALL) -m 644 copyright $(BOOT_DOC_DIR)
$(INSTALL) -m 644 changelog $(BOOT_DOC_DIR)/changelog.Debian
$(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_SBIN_DIR)/mkfs.xfs
- $(INSTALL) -m 644 $(BOOT_MKFS_MAN) $(BOOT_MAN_DIR)/mkfs.xfs.8.gz
+ $(INSTALL) -m 644 $(BOOT_MKFS_MAN) $(BOOT_MAN_DIR)/mkfs.xfs.8
endif
+xfsprogs (1.3.8-0) unstable; urgency=low
+
+ * New upstream release
+ * Fix inclusion of mkfs man page in boot floppies package (closes: #112634)
+
+ -- Nathan Scott <nathans@debian.org> Wed, 19 Sep 2001 14:49:30 +1000
+
xfsprogs (1.3.7-0) unstable; urgency=low
* New upstream release
+xfsprogs-1.3.8 (19 September 2001)
+ - rewrote the LVM support used by mkfs.xfs to call external
+ lvdisplay program to get volume geometry (mkp@mkp.net)
+ - fix bug in LVM driver wrapper where it would not have been
+ used at all, ever (since 1.3.0), due to idiot programmer
+ error (*blush*) -- also thanks to mkp for the bug fix
+
xfsprogs-1.3.7 (10 September 2001)
- enable preallocation in xfs_mkfile [missed during port?]
- fix xfs_db core dump when reporting freespace
LIBDISK = $(TOPDIR)/libdisk/libdisk.la
LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
-LIBLVM = @liblvm@
-USELVM = -DHAVE_LIBLVM=@have_liblvm@
DK_INC_DIR = @dk_inc_dir@
PKG_NAME = @pkg_name@
LT_REVISION = 0
LT_AGE = 0
-LCFLAGS = $(USELVM)
CFILES = fstype.c pttype.c md.c xvm.c lvm.c drivers.c mountinfo.c
-HFILES = fstype.h pttype.h md.h xvm.h lvm.h lvm_user.h liblvm.h
+HFILES = fstype.h pttype.h md.h xvm.h
default: $(LTLIBRARY)
exit(1);
}
- if ( md_get_subvol_stripe(dev, type, sunit, swidth, &sb));
+ if ( md_get_subvol_stripe(dev, type, sunit, swidth, &sb))
return;
- if (lvm_get_subvol_stripe(dev, type, sunit, swidth, &sb));
+ if (lvm_get_subvol_stripe(dev, type, sunit, swidth, &sb))
return;
- if (xvm_get_subvol_stripe(dev, type, sunit, swidth, &sb));
+ if (xvm_get_subvol_stripe(dev, type, sunit, swidth, &sb))
return;
/* ... add new device drivers here */
}
#include <stdio.h>
#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
#include <sys/stat.h>
+#include <sys/types.h>
+#include <linux/major.h>
#include <volume.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)
{
int *swidth,
struct stat64 *sb)
{
-#if HAVE_LIBLVM
- if (mnt_is_lvm_subvol(sb->st_rdev)) {
- lv_t *lv;
- char *vgname;
-
- /* Find volume group */
- if (! (vgname = vg_name_of_lv(dfile))) {
- fprintf(stderr, "Can't find volume group for %s\n",
- dfile);
- exit(1);
- }
-
- /* Logical volume */
- if (! lvm_tab_lv_check_exist(dfile)) {
- fprintf(stderr, "Logical volume %s doesn't exist!\n",
- dfile);
- exit(1);
- }
-
- /* Get status */
- if (lv_status_byname(vgname, dfile, &lv) < 0 || lv == NULL) {
- fprintf(stderr, "Could not get status info from %s\n",
- dfile);
- exit(1);
- }
-
- /* Check that data is consistent */
- if (lv_check_consistency(lv) < 0) {
- fprintf(stderr, "Logical volume %s is inconsistent\n",
- dfile);
- exit(1);
- }
-
- /* Update sizes */
- *sunit = lv->lv_stripesize;
- *swidth = lv->lv_stripes * lv->lv_stripesize;
-
- return 1;
+ int lvpipe[2], stripes = 0, stripesize = 0;
+ char *largv[3], buf[1024];
+ FILE *stream;
+
+ if (!mnt_is_lvm_subvol(sb->st_rdev))
+ return 0;
+
+ /* Quest for lvdisplay */
+ if (!access("/usr/local/sbin/lvdisplay", R_OK|X_OK))
+ largv[0] = "/usr/local/sbin/lvdisplay";
+ else if (!access("/usr/sbin/lvdisplay", R_OK|X_OK))
+ largv[0] = "/usr/sbin/lvdisplay";
+ else if (!access("/sbin/lvdisplay", R_OK|X_OK))
+ largv[0] = "/sbin/lvdisplay";
+ else {
+ fprintf(stderr,
+ "Warning - LVM device, but no lvdisplay(8) found\n");
+ return 0;
}
-#endif /* HAVE_LIBLVM */
- return 0;
+
+ largv[1] = dfile;
+ largv[2] = NULL;
+
+ /* Open pipe */
+ if (pipe(lvpipe) < 0) {
+ fprintf(stderr, "Could not open pipe\n");
+ exit(1);
+ }
+
+ /* Spawn lvdisplay */
+ switch (fork()) {
+ case 0:
+ /* Plumbing */
+ close(lvpipe[0]);
+
+ if (lvpipe[1] != STDOUT_FILENO)
+ dup2(lvpipe[1], STDOUT_FILENO);
+
+ execv(largv[0], largv);
+
+ fprintf(stderr, "\nFailed to execute %s\n", largv[0]);
+ exit(1);
+
+ case -1:
+ fprintf(stderr, "Failed forking lvdisplay process\n");
+ exit(1);
+
+ default:
+ break;
+ }
+
+ close(lvpipe[1]);
+ stream = fdopen(lvpipe[0], "r");
+
+ /* Scan stream for keywords */
+ while (fgets(buf, 1023, stream) != NULL) {
+
+ if (!strncmp(buf, "Stripes", 7))
+ sscanf(buf, "Stripes %d", &stripes);
+
+ if (!strncmp(buf, "Stripe size", 11))
+ sscanf(buf, "Stripe size (KByte) %d", &stripesize);
+ }
+
+ /* Update sizes */
+ *sunit = stripesize << 1;
+ *swidth = (stripes * stripesize) << 1;
+
+ fclose(stream);
+
+ return 1;
}
HFILES = xfs_mkfs.h proto.h
CFILES = $(HFILES:.h=.c)
-# Note: ordering for libdisk and liblvm is important - we must
-# now present liblvm to ld twice :( -> libdisk works around the
-# liblvm unresolved symbol problem, but also calls into liblvm.
-LLDLIBS = $(LIBXFS) $(LIBUUID) $(LIBLVM) $(LIBDISK) $(LIBLVM)
+LLDLIBS = $(LIBXFS) $(LIBUUID) $(LIBDISK)
LTDEPENDENCIES = $(LIBXFS) $(LIBDISK)
LLDFLAGS = -static