Overview: When building stunnel from ports, `make cert` doesn't work. I think line 121 of the Makefile is erroneously running `make install-data-local` instead of `make cert`. Steps to Reproduce: cd /usr/ports/security/stunnel make cert Actual Results: No certificate file is generated. Expected Results: A certificate is created and installed to /usr/local/etc/stunnel/stunnel.pem Build Date & Hardware: FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 amd64 GENERIC Additional Information: When building stunnel from ports, the `make` output contains: * Type 'make cert' to also install a sample certificate * Running `make cert` produces this output: [root@host /usr/ports/security/stunnel]# make cert ************************************************************************** The new certificate will be saved into /usr/local/etc/stunnel/stunnel.pem ************************************************************************** /usr/bin/install -c -d -m 1770 /var/tmp/lib/stunnel chgrp nogroup /var/tmp/lib/stunnel [root@host /usr/ports/security/stunnel]# But the certificate it mentions isn't created: [root@host /usr/ports/security/stunnel]# ls -la /usr/local/etc/stunnel/stunnel.pem ls: /usr/local/etc/stunnel/stunnel.pem: No such file or directory Looking at the Makefile I see the following (I've added line numbers) 115 cert: 116 @${ECHO} "" 117 @${ECHO} "**************************************************************************" 119 @${ECHO} "The new certificate will be saved into ${ETCDIR}/stunnel.pem" 119 @${ECHO} "**************************************************************************" 120 @${ECHO} "" 121 @(cd ${WRKSRC}/tools/; make install-data-local) If I cd to /usr/ports/security/stunnel/work/stunnel-5.42/tools and run `make cert` from there, it works as expected: [root@host /usr/ports/security/stunnel/work/stunnel-5.42/tools]# make cert ./makecert.sh . /usr /dev/urandom 1+0 records in 1+0 records out 256 bytes transferred in 0.000066 secs (3907741 bytes/sec) Generating a 2048 bit RSA private key [...snip...] /usr/bin/install -c -b -m 600 stunnel.pem /usr/local/etc/stunnel/stunnel.pem rm -f stunnel.pem [root@host /usr/ports/security/stunnel/work/stunnel-5.42/tools]# ls -la /usr/local/etc/stunnel/stunnel.pem -rw------- 1 root wheel 2998 Sep 17 22:36 /usr/local/etc/stunnel/stunnel.pem I think line 121 of the Makefile is erroneously running `make install-data-local` instead of `make cert`.
A commit references this bug: Author: zi Date: Mon Sep 18 11:35:25 UTC 2017 New revision: 450039 URL: https://svnweb.freebsd.org/changeset/ports/450039 Log: - Fix cert make target PR: 222419 Submitted by: freebsd@shaunc.com Changes: head/security/stunnel/Makefile