Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] cannot build rpm on SMP machine

2012-05-06 by Kouhei Sutou

Hi,

In <4FA5F85B.4060406@...>
  "Re: [milter-greylist] cannot build rpm on SMP machine" on Sat, 05 May 2012 23:04:43 -0500,
  Thomas Cameron <thomas.cameron@...> wrote:

> I also get:
> 
> flex -oconf_lex.c conf_lex.l
> bison -y -p`echo dump_yacc.c|sed 's/^\([^_]\{1,\}_\).*$/\1/'` dump_yacc.y
> milter-greylist.c:2493: warning: 'last' may be used uninitialized in 
> this function
> mv y.tab.c dump_yacc.c
> flex -odump_lex.c dump_lex.l
> gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall 
> -DHAVE_DATA_CALLBACK -DCONFFILE=\"/etc/mail/greylist.conf\" 
> -DDUMPFILE=\"/var/milter-greylist/greylist.db\" -D_BSD_SOURCE -I. -I. 
>   -c -o conf.o conf.c
> mv y.tab.c conf_yacc.c
> mv: cannot stat `y.tab.c': No such file or directory
> make: *** [conf_yacc.c] Error 1
> make: *** Waiting for unfinished jobs....
> error: Bad exit status from /var/tmp/rpm-tmp.nRIRgr (%build)

Here is a patch against milter-greylist itself to support
"make -j":

--
--- Makefile.in.~1.69.~	2012-05-06 15:21:14.000000000 +0900
+++ Makefile.in	2012-05-06 15:54:38.921097972 +0900
@@ -148,8 +148,14 @@ realclean:	clean
 .l.c:
 	${LEX} -o$@ $<
 .y.c:
-	${YACC} -p`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'` $<
-	${MV} y.tab.c $@
+	prefix=`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'`; \
+	${RM} -Rf $${prefix} && \
+	${INSTALL} -d $${prefix} && \
+	(cd $${prefix} && \
+	 ${YACC} -p$${prefix} ../$< && \
+	 ${MV} y.tab.c ../$@); \
+	${RM} -Rf $${prefix}; \
+	${TEST} -f $@
 
 # This is a target for debugging
 start:	milter-greylist
--

This is another solution.

> But now when I try to build it, I get:
> 
> test -f 
> /home/tcameron/rpmbuild/BUILDROOT/milter-greylist-4.3.9-1.x86_64/etc/mail/greylist.conf 
> -o 	\
> 		-f 
> /home/tcameron/rpmbuild/BUILDROOT/milter-greylist-4.3.9-1.x86_64/etc/mail/greylist.except 
> || 	\
> 	     /usr/bin/install -c -m 644 ./greylist.conf 
> /home/tcameron/rpmbuild/BUILDROOT/milter-greylist-4.3.9-1.x86_64/etc/mail/greylist.conf
> /usr/bin/install -c -d -m 755 -o root 
> /home/tcameron/rpmbuild/BUILDROOT/milter-greylist-4.3.9-1.x86_64`dirname 
> /var/milter-greylist/greylist.db`
> /usr/bin/install: cannot change owner and permissions of 
> `/home/tcameron/rpmbuild/BUILDROOT/milter-greylist-4.3.9-1.x86_64/var/milter-greylist': 
> Operation not permitted

You can avoid the problem by passing "USER=$USER" to
"%{__make} install".

  https://github.com/kou/rpms/blob/milter-greylist-4.2.7/specs/milter-greylist/milter-greylist.spec#L46


Thanks,
--
kou

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.