[strongSwan] Installing strong-swan in custom location?

Ben Greear greearb at candelatech.com
Mon Jul 15 19:50:53 CEST 2019


I am trying to build strongswan on one system, 'install' it in a local directory structure,
and then later install all of this to another machine.

I'm configuring with ./configure prefix=

And installing with:  make && PREFIX= DESTDIR=/home/greearb/btbits/x64_btbits/server/local make install);

That seems to properly put things in /home/greearb/btbits/x64_btbits/server/local

On the installed machine, the 'server/local' files will be placed in a different location.

So, things like the 'ipsec' script that have have hard-coded paths with fail:

# where the private directory and the config files are
  30 IPSEC_DIR="/home/greearb/btbits/x64_btbits/server/local/libexec/ipsec"
  31 IPSEC_BINDIR="/home/greearb/btbits/x64_btbits/server/local/bin"
  32 IPSEC_SBINDIR="/home/greearb/btbits/x64_btbits/server/local/sbin"
  33 IPSEC_CONFDIR="/home/greearb/btbits/x64_btbits/server/local/etc"
  34 IPSEC_PIDDIR="/var/run"
  35 IPSEC_SCRIPT="ipsec"

Is there a better way other than post-editing the ipsec tool (and who knows what else?)


On 7/15/19 6:01 AM, Ben Greear wrote:
> On 07/14/2019 10:54 PM, Martin Willi wrote:
>> Hi Ben,
>>> First, maybe autogen could detect this missing gperf right at the
>>> beginning and tell the user?
>> ./autogen.sh is just a wrapper for autogen -i these days, so it won't
>> help users calling that directly.
>> Doing such a check in ./configure is no option, as gperf is not
>> required for an ordinary build from tarball. The gperf (and other)
>> output is part of the distribution tarball, so that users don't need
>> non-standard tools.
> You could check for existence of gperf or detect that you are in a build
> system that has already successfully run gperf and fail if neither of those
> are true.
> The make maintainer-clean is indeed a useful step.  If the make file were
> done better, though, it could add a dependency such that when the gperf
> generated files or makefile were changed, then they are automatically re-built.
> Please see the patch that I posted that fixes detection of gperf on
> older build systems.  With that, it builds back to fedora-17 at least.
> Centos-6 still fails, but I am thinking I will just ignore that.
> Thanks,
> Ben
>>> confread.o: In function `load_conn':
>>> /home/greearb/git/strongswan/src/starter/confread.c:568: undefined
>>> reference to `in_word_set'
>> Try "make maintainer-clean", and start from scratch with autogen and
>> ./configure.
>> The problem here is that the gperf rule generates an empty file if
>> gperf is missing, and then "make" thinks the file is up to date once
>> gperf got installed. I've tried to address this issue with [1].
>> Regards
>> Martin
>> [1] https://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=bca7571b0fa17b3b0c448187166833ad3664250c

Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the Users mailing list