Re: trying to create FC4 rpm of rdup-0.2.13
Vitaly Lipatov <lav-u2l5PoMzF/[email protected]> Wed, 28 Jun 2006 00:31:03 +0400
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Organization | ALT Linux Team |
| Message-ID | <[email protected]> |
Dear Graham!
On Tuesday 27 June 2006 23:56, Graham King wrote:
> I'm trying to create an RPM package for my Fedora Core 4
> machine of rdup-0.2.13, based on Vitaly Lipatov's work at
> ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/i586
>/SRPMS.classic/rdup-0.2.13-alt0.1.src.rpm
>
> Using the slightly modified spec file, attached, rpmbuild now
> gets as far as the %build section, failing with:
> gcc -Wall -W -Werror -O2 -g -pipe
remove -Werror option.
> -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -m32 -march=3Di386
> -mtune=3Dpentium4 -fasynchronous-unwind-tables -DHAVE_CONFIG_H
> -Os -D_FILE_OFFSET_BITS=3D64 -D_LARGE_FILES -Wpointer-arith
> -Wstrict-prototypes -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -c rdup.c
> cc1: warnings being treated as errors
> rdup.c: In function 'main':
> rdup.c:288: warning: ignoring return value of
> 'ftruncate', declared with attribute warn_unused_result
> make: *** [rdup.o] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.16255
> (%build)
Or appy the patch:
--- rdup.c.orig 2006-06-28 00:29:21 +0400
+++ rdup.c 2006-06-28 00:29:25 +0400
@@ -285,7 +285,7 @@
g_tree_foreach(backup, gfunc_backup, NULL);
/* write new filelist */
- ftruncate(fileno(fplist), 0);
+ i =3D ftruncate(fileno(fplist), 0);
g_tree_foreach(backup, gfunc_write, fplist);
fclose(fplist);
/* re-touch the timestamp file */
>
> Finally, I've tracked this down to the default CFLAGS of FC4's
> rpmbuild, which include -Wp,-D_FORTIFY_SOURCE=3D2
>
> Being neither a C programmer nor an rpm expert, I'm now
> seeking the answer to either of these questions:
>
> 1) How to patch rdup so that it compiles with
> -Wp,-D_FORTIFY_SOURCE=3D2 ? or
You do not need to change default CFLAGS
> 2) An efficient way to remove that CFLAG from %configure,
> using the spec file (in other words, without requiring a
> change to any rpmrc file)?
you can add before configure in spec:
export CFLAGS=3D"you own flags"
--=20
Lav
=F7=C9=D4=C1=CC=C9=CA =EC=C9=D0=C1=D4=CF=D7
=F3=C1=CE=CB=D4-=F0=C5=D4=C5=D2=C2=D5=D2=C7
GNU! ALT Linux Team! WINE! LaTeX! LyX! http://freesource.info