[Openswan dev] paths of files in lib/ipsec/_*

Paul Wouters paul at xelerance.com
Sun Sep 12 14:40:22 EDT 2010


On Sun, 12 Sep 2010, Stefan Miklosovic wrote:

> I was compiling openswan and noticed there is no
> ./configure script, so I had to rewrite Makefile.inc for
> my needs.

That should never be neccessary. You can set any environment variable
that's in the Makefile.inc (eg export  FINALCONFDDIR=/usr/local/etc)

> Ok, I did it, everything is compiled well. But
> I noticed when I was about starting it in /etc/rc.d/rc.ipsec
> that there are some paths in lib/ipsec/_* files for which
> paths to files are not changed. Some paths are modified
> as I change it in Makefile.inc but some are not.
> 
> For example
> (file_in_lib/ipsec:string)
> 
> _plutoload:info=/var/run/pluto/ipsec.info
> _plutorun:info=/var/run/pluto/ipsec.info
> _plutorun:pidfile=/var/run/pluto/pluto.pid
> _realsetup:plutopid=/var/run/pluto/pluto.pid
> _realsetup:plutoctl=/var/run/pluto/pluto.ctl
> _realsetup:lock=/var/run/pluto/ipsec_setup.pid
> _realsetup:info=/var/run/pluto/ipsec.info
> _realsetup: if [ -f /var/run/pluto.pid -a ! -f /var/run/pluto/pluto.pid ]
> _realsetup:    mkdir -p /var/run/pluto
> _realsetup:    mv /var/run/pluto.pid /var/run/pluto/pluto.pid
> _realsetup: rm -f /var/run/pluto.pid
> _startklips:info=/var/run/pluto/ipsec.info
> _updown.klips:OPENSWAN_RESOLV_CONF=/var/run/pluto/openswan-resolv-conf-backup
> _updown.netkey:OPENSWAN_RESOLV_CONF=/var/run/pluto/openswan-resolv-conf-backup
> 
> So, if we are about complete customisation of installation for our needs, we shoud also be able
> to change this, for example, if I want to change path to /server/ipsec/run/pluto.pid I have no
> possibility to do that except changing these paths by hand ...

Yes, these are bugs. They should use roper preprocessing using @ variables,
as is done elsewhere. Eg see programs/Makefile.program:

TRANSFORM_VARIABLES = sed -e "s/xxx/$(IPSECVERSION)/" \
                         -e "s:@IPSEC_DIR@:$(FINALBINDIR):" \
                         -e "s:@IPSEC_EXECDIR@:$(FINALLIBEXECDIR):" \
                         -e "s:@IPSEC_SBINDIR@:$(FINALSBINDIR):" \
                         -e "s:@IPSEC_LIBDIR@:$(FINALLIBDIR):" \
                         -e "s:@FINALCONFDIR@:$(FINALCONFDIR):" \
                         -e "/@${OSDEP}_START@/,/@${OSDEP}_END@/d" \
                         -e "s:@EXAMPLECONFDIR@:$(EXAMPLECONFDIR):" \
                         -e "s:@FINALDOCDIR@:$(FINALDOCDIR):" \
                         -e "s:@FINALEXAMPLECONFDIR@:$(FINALEXAMPLECONFDIR):" \
                         -e "s:@RSAKEYBITS@:$(RSAKEYBITS):" \

[...]

Paul



More information about the Dev mailing list