[Parted-maintainers] Bug#297580: #297580: parted: FTBFS on hurd-i386: _IOT__IOTBASE_format_data_t undeclared

Michael Banck Michael Banck <mbanck@debian.org>, 297580@bugs.debian.org
Tue, 15 Mar 2005 14:18:50 +0100


tags 297580 +patch
thanks

The following patch does two things:

1. It makes s390.dpatch only get applied on s390, as this patch is bad
and introduces an unguarded call to a Linux syscall, resulting in the
FTBFS error reported.

2. It adds hurd-i386 (or rather, `gnu' as DEB_BUILD_GNU_SYSTEM, which is
less specific) to the list of arches having --disable-Werror, as there
is one compile warning:

i386-gnu-gcc -DHAVE_CONFIG_H -I. -I../../libparted -I.. -I../../include
-g -O2 -D_REENTRANT -D_FILE_OFFSET_BITS=64
-DLOCALEDIR=\"/usr/share/locale\" -DLOCALEDIR=\"/usr/share/locale\"
-D_GNU_SOURCE=1 -W -Wall -Wno-unused -Wno-switch -Wno-format -MT gnu.lo
-MD -MP -MF .deps/gnu.Tpo -c ../../libparted/gnu.c  -fPIC -DPIC -o
.libs/gnu.o
../../libparted/gnu.c: In function `gnu_new':
../../libparted/gnu.c:228: warning: `ispath' might be used uninitialized
in this function



cheers,

Michael


  * Build with --disable-Werror on hurd-i386 due to warnings in Hurd-specific
    code.
  * Move s390.dpatch into 00list.s390 to prevent it being built on hurd-i386.
    (Closes: #297580)

diff -Naur parted-1.6.21.orig/debian/patches/00list parted-1.6.21/debian/patches/00list
--- parted-1.6.21.orig/debian/patches/00list	2005-03-15 12:26:13.000000000 +0100
+++ parted-1.6.21/debian/patches/00list	2005-03-15 12:27:45.000000000 +0100
@@ -5,7 +5,6 @@
 hfs
 errors-to-stderr
 devfs
-s390
 # Will also stay debian specific, but depends on some of the above :/
 lvm2
 # Patch which may be obsolet.
diff -Naur parted-1.6.21.orig/debian/patches/00list.s390 parted-1.6.21/debian/patches/00list.s390
--- parted-1.6.21.orig/debian/patches/00list.s390	1970-01-01 01:00:00.000000000 +0100
+++ parted-1.6.21/debian/patches/00list.s390	2005-03-15 12:27:58.000000000 +0100
@@ -0,0 +1 @@
+s390
diff -Naur parted-1.6.21.orig/debian/rules parted-1.6.21/debian/rules
--- parted-1.6.21.orig/debian/rules	2005-03-15 12:26:13.000000000 +0100
+++ parted-1.6.21/debian/rules	2005-03-15 13:34:11.000000000 +0100
@@ -84,6 +84,10 @@
 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 endif
 
+ifeq (, $(DEB_BUILD_GNU_SYSTEM))
+DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+endif
+
 ifeq (, $(ARCH))
 ARCH = $(DEB_BUILD_ARCH)
 endif
@@ -105,10 +109,12 @@
 # This is a workaround for a m68k compiler bug ...
 ifeq (m68k, $(DEB_BUILD_ARCH))
   CONFFLAGS += --disable-Werror
-else
+endif
 ifeq (s390, $(DEB_BUILD_ARCH))
   CONFFLAGS += --disable-Werror
 endif
+ifeq (gnu, $(DEB_BUILD_GNU_SYSTEM))
+  CONFFLAGS += --disable-Werror
 endif
 
 # This builds a substitution list for sed based on the SUBSTS variable