Package: raidutils Version: 0.0.6-8 Severity: serious Tags: patch Justification: no longer builds from source User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jaunty ubuntu-patch
Hi, raidutils FTBFS with gcc4.3: i486-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -O3 -DMESSAGES -D_DPT_ACTIVE_ALIGNMENT -Dtrue=1 -Dfalse=0 -DHORIZONTAL -DNEW_RSC_MGR -DNEW_RSC_HDR -D_DPT_FLASH -DNEW_LOGGER -DI_WANT_SNI_DEBUG -D__UNIX__ -I../include -Wall -g -O2 -MT libraidutil_la-lockunix.lo -MD -MP -MF .deps/libraidutil_la-lockunix.Tpo -c lockunix.c -fPIC -DPIC -o .libs/libraidutil_la-lockunix.o lockunix.c: In function 'MkLock': lockunix.c:91: warning: ignoring return value of 'write', declared with attribute warn_unused_result lockunix.c:102: warning: ignoring return value of 'read', declared with attribute warn_unused_result lockunix.c: In function 'ChLock': lockunix.c:157: warning: ignoring return value of 'write', declared with attribute warn_unused_result lockunix.c: In function 'IsLock': lockunix.c:185: warning: ignoring return value of 'read', declared with attribute warn_unused_result In function 'open', inlined from 'ChLock' at lockunix.c:155: /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments In function 'open', inlined from 'MkLock' at lockunix.c:85: /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments make[3]: *** [libraidutil_la-lockunix.lo] Error 1 *** /tmp/tmpagDhye In Ubuntu, we've applied the attached patch to achieve the following: * debian/patches/fix_FTBFS_gcc_4.3.patch: fix FTBFS in gcc 4.3 because of calls of open function without rights. Defaulted to 0644. (LP: #334551) * debian/control: added dependency on quilt * debian/rules: included call of quilt makefile and patch and unpatch target We thought you might be interested in doing the same. -- System Information: Debian Release: 5.0 APT prefers jaunty-updates APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.27-11-generic (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash
--- raidutils-0.0.6.orig/debian/patches/fix_FTBFS_gcc_4.3.patch +++ raidutils-0.0.6/debian/patches/fix_FTBFS_gcc_4.3.patch @@ -0,0 +1,26 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/raidutils/+bug/334551 +# Description: Fix a FTBFS with gcc 4.3. By default, the default rights are 644 +# +Index: raidutils-0.0.6/lib/lockunix.c +=================================================================== +--- raidutils-0.0.6.orig/lib/lockunix.c 2009-02-25 20:52:06.000000000 +0000 ++++ raidutils-0.0.6/lib/lockunix.c 2009-02-25 20:52:54.000000000 +0000 +@@ -82,7 +82,7 @@ + return (-1); + } + sprintf (templateBuffer, Template, Name); +- if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL)) < 0) { ++ if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL, 0644)) < 0) { + free (templateBuffer); + free (lock); + return (-1); +@@ -152,7 +152,7 @@ + + if (lock != (char *)NULL) { + sprintf (lock, Lock, Name); +- if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC)) >= 0) { ++ if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0) { + sprintf (buffer, "%d\n", pid); + write (fd, buffer, strlen(buffer)); + close (fd);