Package: sash Version: 3.7-9 Severity: important Tags: patch User: debian-...@lists.debian.org Usertags: kfreebsd
sash FTBFS on GNU/kFreeBSD, mostly due to a Linux specific build configuration: make[1]: Entering directory `/home/abe/debian/sash-3.7' cc -O3 -Wall -Wmissing-prototypes -g -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT _TYPE='"ext3"' -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -c sash .c cc -O3 -Wall -Wmissing-prototypes -g -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT _TYPE='"ext3"' -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -c cmds .c cmds.c:21:22: error: linux/fs.h: No such file or directory cmds.c: In function ‘do_mount’: cmds.c:518: error: ‘MS_MGC_VAL’ undeclared (first use in this function) cmds.c:518: error: (Each undeclared identifier is reported only once cmds.c:518: error: for each function it appears in.) cmds.c:544: error: ‘MS_RDONLY’ undeclared (first use in this function) cmds.c:548: error: ‘MS_REMOUNT’ undeclared (first use in this function) cmds.c:552: error: ‘MS_NOSUID’ undeclared (first use in this function) cmds.c:556: error: ‘MS_NOEXEC’ undeclared (first use in this function) cmds.c:588: warning: passing argument 3 of ‘mount’ makes integer from pointer without a cast /usr/include/sys/mount.h:326: note: expected ‘int’ but argument is of type ‘const char *’ cmds.c:588: warning: passing argument 4 of ‘mount’ makes pointer from integer without a cast /usr/include/sys/mount.h:326: note: expected ‘void *’ but argument is of type ‘int’ cmds.c:588: error: too many arguments to function ‘mount’ cmds.c: In function ‘do_umount’: cmds.c:637: warning: implicit declaration of function ‘umount’ make[1]: *** [cmds.o] Error 1 make[1]: Leaving directory `/home/abe/debian/sash-3.7' dh_auto_build: make -j1 returned exit code 2 make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 The following patch should fix the build under GNU/kFreeBSD without affecting the build under Linux. It may even fix the FTBFS on GNU/Hurd (see https://buildd.debian.org/sash), too. diff -ru sash-3.7/cmds.c sash-3.7+kbsd/cmds.c --- sash-3.7/cmds.c 2010-01-16 19:13:42.000000000 +0100 +++ sash-3.7+kbsd/cmds.c 2010-01-16 19:14:36.000000000 +0100 @@ -19,6 +19,10 @@ #if HAVE_LINUX_MOUNT #include <linux/fs.h> +#elif HAVE_BSD_MOUNT +#include <ufs/ufs/ufsmount.h> +#include <fs/cd9660/cd9660_mount.h> +#include <fs/msdosfs/msdosfsmount.h> #endif @@ -591,26 +595,16 @@ #elif HAVE_BSD_MOUNT { struct ufs_args ufs; - struct adosfs_args adosfs; struct iso_args iso; - struct mfs_args mfs; struct msdosfs_args msdosfs; void * args; if(!strcmp(type, "ffs") || !strcmp(type, "ufs")) { ufs.fspec = (char*) argv[0]; args = &ufs; - } else if(!strcmp(type, "adosfs")) { - adosfs.fspec = (char*) argv[0]; - adosfs.uid = 0; - adosfs.gid = 0; - args = &adosfs; } else if(!strcmp(type, "cd9660")) { iso.fspec = (char*) argv[0]; args = &iso; - } else if(!strcmp(type, "mfs")) { - mfs.fspec = (char*) argv[0]; - args = &mfs; } else if(!strcmp(type, "msdos")) { msdosfs.fspec = (char*) argv[0]; msdosfs.uid = 0; diff -ru sash-3.7/debian/control sash-3.7+kbsd/debian/control --- sash-3.7/debian/control 2010-01-16 19:13:42.000000000 +0100 +++ sash-3.7+kbsd/debian/control 2010-01-16 19:18:43.000000000 +0100 @@ -3,7 +3,9 @@ Priority: optional Maintainer: Tollef Fog Heen <tfh...@debian.org> Standards-Version: 3.8.0 -Build-Depends: zlib1g-dev (>= 1:1.2.2-7), debhelper (>= 7), e2fslibs-dev +Build-Depends: zlib1g-dev (>= 1:1.2.2-7), debhelper (>= 7), + e2fslibs-dev [!kfreebsd-amd64 !kfreebsd-i386], + kfreebsd-kernel-headers [kfreebsd-amd64 kfreebsd-i386] Package: sash Architecture: any diff -ru sash-3.7/Makefile sash-3.7+kbsd/Makefile --- sash-3.7/Makefile 2010-01-16 19:13:42.000000000 +0100 +++ sash-3.7+kbsd/Makefile 2010-01-16 19:48:52.000000000 +0100 @@ -9,9 +9,16 @@ # HAVE_GZIP = 1 HAVE_LINUX_ATTR = 1 +ifeq (, $(filter Linux,$(shell uname -s))) HAVE_LINUX_MOUNT = 1 HAVE_BSD_MOUNT = 0 MOUNT_TYPE = '"ext3"' +endif +ifeq (, $(filter kFreeBSD,$(shell uname -s))) +HAVE_LINUX_MOUNT = 0 +HAVE_BSD_MOUNT = 1 +MOUNT_TYPE = '"ufs"' +endif DEFS = -DHAVE_GZIP=$(HAVE_GZIP) \ -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \ -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (990, 'unstable'), (600, 'testing'), (110, 'experimental') Architecture: kfreebsd-i386 (i686) Kernel: kFreeBSD 8.0-1-686-smp Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash sash depends on no packages. sash recommends no packages. Versions of packages sash suggests: pn doc-debian <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org