DESTDIR support is broken (patch)

Ivan Shmakov oneingray at gmail.com
Fri May 23 04:25:06 UTC 2008


>>>>> Julien ÉLIE <julien at trigofacile.com> writes:

 > Hi Ivan, Thanks for your patch.  DESTDIR was indeed broken.

 >> + $(LN_S) $(MAN8)/docheckgroups.8 $D$(MAN5)/localgroups.5
 >> + $(LN_S) $(MAN8)/perl-nocem.8 $D$(MAN5)/nocem.ctl.5

 > I think $D is missing in the first occurrence of the last two lines.

	With the code above, the symbolic links will be dangling after $
	make install, but will become valid as soon as the tree is
	copied to the actual installation location.  On the other hand,
	would `$D' be added to the first arguments of $(LN_S), the
	symbolic links would be valid after $ make install, but will
	become dangling upon the actual installation.

 > As for Makefile, shouldn't it be updated too?  I suggest that:

 > --- Makefile    (révision 7829)
 > +++ Makefile    (copie de travail)
 > @@ -109,7 +109,7 @@
 >             echo '' ; \
 >             cd $$D && $(MAKE) install || exit 1 ; cd .. ; \
 >         done
 > -       $(PATHBIN)/innupgrade $(PATHETC)
 > +       $(D)$(PATHBIN)/innupgrade $(D)$(PATHETC)

 >  install-root:
 >         @chmod +x support/install-sh
 > @@ -119,14 +119,14 @@
 >  ##  Install a certificate for TLS/SSL support.
 >  cert:
 >         $(SSLBIN) req -new -x509 -nodes \
 > -           -out $(PATHLIB)/cert.pem -days 366 \
 > -           -keyout $(PATHLIB)/key.pem
 > -       chown $(RUNASUSER) $(PATHLIB)/cert.pem
 > -       chgrp $(RUNASGROUP) $(PATHLIB)/cert.pem
 > -       chmod 640 $(PATHLIB)/cert.pem
 > -       chown $(RUNASUSER) $(PATHLIB)/key.pem
 > -       chgrp $(RUNASGROUP) $(PATHLIB)/key.pem
 > -       chmod 600 $(PATHLIB)/key.pem
 > +           -out $(D)$(PATHLIB)/cert.pem -days 366 \
 > +           -keyout $(D)$(PATHLIB)/key.pem
 > +       chown $(RUNASUSER) $(D)$(PATHLIB)/cert.pem
 > +       chgrp $(RUNASGROUP) $(D)$(PATHLIB)/cert.pem
 > +       chmod 640 $(D)$(PATHLIB)/cert.pem
 > +       chown $(RUNASUSER) $(D)$(PATHLIB)/key.pem
 > +       chgrp $(RUNASGROUP) $(D)$(PATHLIB)/key.pem
 > +       chmod 600 $(D)$(PATHLIB)/key.pem

	This part looks fine at the first glance.

 > But perhaps it should be:

 >     test -z "$D" && $(PATHBIN)/innupgrade $(PATHETC)

 > for innupgrade, like what you suggest for makedbz, shouldn't it?

	Yes.  Or a copy of `inn.conf' could be prepared with all the
	paths specified relative to $D.  (And there may be other files
	to make mangled copies of.)



More information about the inn-workers mailing list