Bug #29
'make install' fails if 'sysconfdir' does not exist.
Start date:
Due date:
Estimated time:
Affected version:
5.9.1
Resolution:
Description
Problem: If we specify the destination using the variable DESTDIR and the '${sysconfdir}' does not exist, installation fails.
[...]$ make install DESTDIR=$HOME/tmp/strongswan ... Making install in starter maker2: Entering directory @/home/dcorral/Téléchargement/strongswan-2008-02-21/src/starter' maker3: Entering directory @/home/dcorral/Téléchargement/strongswan-2008-02-21/src/starter' test -e "/home/dcorral/tmp/strongswan/usr/local/etc/ipsec.conf" || /usr/bin/install -c ipsec.conf /home/dcorral/tmp/strongswan/usr/local/etc/ipsec.conf /usr/bin/install: cannot create regular file @/home/dcorral/tmp/strongswan/usr/local/etc/ipsec.conf': No such file or directory maker3: *** [install-exec-local] Error 1 maker3: Leaving directory @/home/dcorral/Téléchargement/strongswan-2008-02-21/src/starter' maker2: *** [install-am] Error 2 maker2: Leaving directory @/home/dcorral/Téléchargement/strongswan-2008-02-21/src/starter' maker1: *** [install-recursive] Error 1 maker1: Leaving directory @/home/dcorral/Téléchargement/strongswan-2008-02-21/src' make: *** [install-recursive] Error 1
Solution: Check if the '${sysconfdir}' already exists and create it if not. Add the following line to 'src/starter/Makefile.am' in the target 'install-exec-local':
test -e "$(DESTDIR)${sysconfdir}" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
Or apply the attached patch file.
History
#1 Updated by Martin Willi almost 13 years ago
- Status changed from New to Closed
- Affected version set to fixed
Thanks for your detailed report, I've applied your patch (see r3492). Additionally I've moved all directory creations into starters Makefile.am.