Whamcloud - gitweb
Fix Debian rules files to support building non-Linux archs
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 14 Aug 2007 09:25:45 +0000 (11:25 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 16 Dec 2007 01:59:29 +0000 (20:59 -0500)
Addresses-Debian-Bug: #437720

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian/control
debian/rules
resize/online.c

index 448be70..0bf778a 100644 (file)
@@ -2,7 +2,7 @@ Source: e2fsprogs
 Section: admin
 Priority: required
 Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
-Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, libsepol1-dev, libdevmapper-dev, libselinux1-dev, debhelper (>= 4)
+Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4)
 Standards-Version: 3.7.3.0
 
 Package: e2fsck-static
index 49237b8..3e10091 100755 (executable)
@@ -14,6 +14,7 @@ export LC_ALL=C
 # from having to guess our platform (since we know it already)
 DEB_HOST_ARCH   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_BUILD_ARCH   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_OS   ?= $(shell dpkg-architecture -qDEB_HOST_OS)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
@@ -82,6 +83,10 @@ else
 CCOPTS += -D__NO_STRING_INLINES
 endif
 
+ifeq (${DEB_HOST_ARCH_OS},linux)
+DEVMAPPER = --enable-blkid-devmapper
+endif
+
 BF_CCOPTS = -Os -fomit-frame-pointer
 
 COMMON_CONF_FLAGS =  \
@@ -89,7 +94,7 @@ COMMON_CONF_FLAGS =  \
                 --infodir=/usr/share/info --enable-fsck
 
 STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression \
-               --enable-blkid-devmapper
+               ${DEVMAPPER}
 
 BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
        --disable-nls --disable-swapfs --disable-imager \
index 36b3185..fc1f7a2 100644 (file)
@@ -21,6 +21,7 @@ extern char *program_name;
 errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt, 
                           blk_t *new_size, int flags EXT2FS_ATTR((unused)))
 {
+#ifdef __linux__
        struct ext2_new_group_input input;
        struct ext2_super_block *sb = fs->super;
        unsigned long           new_desc_blocks;
@@ -158,4 +159,9 @@ errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
        close(fd);
 
        return 0;
+#else
+       printf(_("Filesystem at %s is mounted on %s, and on-line resizing is"
+                "not supported on this system.\n"), fs->device_name, mtpt);
+       exit(1);
+#endif
 }