tags 394988 +patch thanks On Tue, 24 Oct 2006 16:59:28 +0300, "era eriksson" <[EMAIL PROTECTED]> said: > On Tue, 24 Oct 2006 11:33:42 +0300, "era eriksson" <[EMAIL PROTECTED]> said: > > The shipped cgi-bin utilities will no longer work after you made the > > chroot option the default. One either has to disable the chroot option > > (which is of course a bit of a security risk) or compile these binaries > > statically (I think this should be a one-line fix against > > cgi-bin/Makefile.in). I think the latter would make more sense > > Actually it seems that the previous maintainer disbled this by removing > all occurrences of $(STATIC) in the main Makefile.in. Reverting that > IMHO slightly radical patch would make it a snap; if users want to > compile non-static, then it's just a matter of overriding the STATIC > flag.
Sorry, that's STATICFLAG actually. Attached is a patch which reverts the change against upstream cgi-src/Makefile.in This would still require some changes to debian/rules to make it convenient to control from there whether the cgi-src stuff should be compiled statically or not. I think with the chroot option it's sensible to ship statically compiled cgi binaries by default, but it would be nice if there was a simple way to override that. (Sorry for this monologue ... humor me. I was like -><- this close to forgetting to attach the actual patch.) /* era */ -- If this were a real .signature, it would suck less. Well, maybe not.
--- thttpd-2.23beta1/cgi-src/Makefile.in +++ thttpd-2.23beta1.orig/cgi-src/Makefile.in @@ -35,7 +35,7 @@ DEFS = @DEFS@ INCLS = -I.. CFLAGS = $(CCOPT) $(DEFS) $(INCLS) -LDFLAGS = @LDFLAGS@ +LDFLAGS = @LDFLAGS@ @V_STATICFLAG@ LIBS = @LIBS@ NETLIBS = @V_NETLIBS@ INSTALL = @INSTALL@ @@ -51,15 +51,15 @@ all: redirect ssi phf redirect: redirect.o - $(CC) $(LDFLAGS) redirect.o $(LIBS) -o redirect + $(CC) $(LDFLAGS) $(STATICFLAG) redirect.o $(LIBS) -o redirect ssi: ssi.o ../match.o - $(CC) $(LDFLAGS) ssi.o ../match.o $(LIBS) -o ssi + $(CC) $(LDFLAGS) $(STATICFLAG) ssi.o ../match.o $(LIBS) -o ssi ssi.o: ../match.h phf: phf.o - $(CC) $(LDFLAGS) phf.o $(LIBS) -o phf + $(CC) $(LDFLAGS) $(STATICFLAG) phf.o $(LIBS) -o phf strerror.o: @rm -f strerror.o