Bug 175283 - security/openvpn fails to build package because of missed man-file and libraries
Summary: security/openvpn fails to build package because of missed man-file and libraries
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-14 09:40 UTC by Alexey Markov
Modified: 2013-01-17 23:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Markov 2013-01-14 09:40:00 UTC
Package building fails because of missed openvpn.8 file and some openvpn plugins.

How-To-Repeat: cd /usr/ports/security/openvpn

port:security/openvpn# make package
===>  Installing for openvpn-2.3.0_1
===>   openvpn-2.3.0_1 depends on shared library: lzo2 - found
===>   Generating temporary packing list
===>  Checking if security/openvpn already installed
Making install-exec in build
Making install-exec in msvc
Making install-exec in msvc-generate
Making install-exec in distro
Making install-exec in rpm
Making install-exec in include
Making install-exec in src
Making install-exec in compat
Making install-exec in openvpn
test -z "/usr/local/sbin" || ../.././install-sh -c -d "/usr/local/sbin"
  /bin/sh ../../libtool   --mode=install install  -s -o root -g wheel -m 555 openvpn '/usr/local/sbin'
libtool: install: install -o root -g wheel -m 555 -s openvpn /usr/local/sbin/openvpn
Making install-exec in openvpnserv
test -z "/usr/local/sbin" || ../.././install-sh -c -d "/usr/local/sbin"
Making install-exec in plugins
Making install-exec in auth-pam
Making install-exec in down-root
Making install-exec in sample
Making install-exec in doc
Making install-exec in tests
===> Installing rc.d startup script(s)
/bin/mkdir -p /usr/local/lib
rmdir: /usr/local/share/doc/openvpn: No such file or directory
*** Error code 1 (ignored)
### ------------------------------------------------------------------------
###  Edit /etc/rc.conf[.local] to start OpenVPN automatically at system
###  startup. See /usr/local/etc/rc.d/openvpn for details.
### ------------------------------------------------------------------------
###  For compatibility notes when interoperating with older OpenVPN
###  versions, please, see <http://openvpn.net/relnotes.html>
### ------------------------------------------------------------------------
===>   Compressing manual pages for openvpn-2.3.0_1
gzip: can't stat: /usr/local/man/man8/openvpn.8: No such file or directory
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for openvpn-2.3.0_1
===>   Registering installation for openvpn-2.3.0_1
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/sbin/openvpn

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/openvpn

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://openvpn.net/index.php/open-source.html
===>  Building package for openvpn-2.3.0_1
tar: man/man8/openvpn.8.gz: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: include/openvpn-plugin.h: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: lib/openvpn/plugins/openvpn-plugin-auth-pam.la: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: lib/openvpn/plugins/openvpn-plugin-auth-pam.so: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: lib/openvpn/plugins/openvpn-plugin-down-root.la: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: lib/openvpn/plugins/openvpn-plugin-down-root.so: Cannot stat: &#1053;&#1077;&#1090; &#1090;&#1072;&#1082;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1080;&#1083;&#1080; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075;&#1072;
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** Error code 1

Stop in /arc/ports/security/openvpn.
*** Error code 1

Stop in /arc/ports/security/openvpn.


pkg_delete openvpn-2.3.0_1

pkg_delete: file '/usr/local/man/man8/openvpn.8.gz' doesn't exist
pkg_delete: file '/usr/local/include/openvpn-plugin.h' doesn't exist
pkg_delete: file '/usr/local/lib/openvpn/plugins/openvpn-plugin-auth-pam.la' doesn't exist
pkg_delete: file '/usr/local/lib/openvpn/plugins/openvpn-plugin-auth-pam.so' doesn't exist
pkg_delete: file '/usr/local/lib/openvpn/plugins/openvpn-plugin-down-root.la' doesn't exist
pkg_delete: file '/usr/local/lib/openvpn/plugins/openvpn-plugin-down-root.so' doesn't exist
pkg_delete: file '/usr/local/lib/openvpn/plugins' doesn't exist
pkg_delete: unable to completely remove directory '/usr/local/lib/openvpn/plugins'
pkg_delete: file '/usr/local/lib/openvpn' doesn't exist
pkg_delete: unable to completely remove directory '/usr/local/lib/openvpn'
pkg_delete: couldn't entirely delete package (perhaps the packing list is incorrectly specified?)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-14 09:40:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mandree

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Matthias Andree 2013-01-14 18:31:43 UTC
I cannot reproduce this.

Note: I require bug reports in English, German, French or Dutch. I do
not understand error messages in other languages.

Note: I need your /etc/make.conf, command line options, the output of
"make pretty-print-config" and maybe other information to reproduce
this.  This is a general expectation and would also apply for other ports.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2013-01-14 18:32:05 UTC
State Changed
From-To: open->feedback

requires more info from submitter
Comment 4 Alexey Markov 2013-01-15 08:43:25 UTC
Hello, Matthias!

I have found the root of my problem: it's a NOPORTDOCS variable
in the make.conf, which leads to absent DOCS option in the time
of port build. In this case INSTALL_TARGET in the Makefile of the
port set to the 'install-exec install-man' instead of 'install',
that's why plugins and man file does not installed: they needs an
'install-data' target to install.

You can confirm a problem by building a port with a NOPORTDOCS
variable set in the make.conf file or command line.

But simple changing 'INSTALL_TARGET= install-exec install-man'
to 'INSTALL_TARGET= install-exec install-data' leads to another
problem: some (not all) openvpn documentation files are installed
in this case, but not got into the PLIST, that's why 'make deinstall'
leaves some files in the /usr/local/share/doc/openvpn directory.

It seems we need to find a combination of Makefile targets which
will install binaries, plugins and includes, but not a documentation
or samples.

-- 
WBR, Alexey Markov.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-01-17 23:12:32 UTC
Author: mandree
Date: Thu Jan 17 23:12:24 2013
New Revision: 310575
URL: http://svnweb.freebsd.org/changeset/ports/310575

Log:
  - Fix NOPORTDOCS regression [1], by installing to DESTDIR= and then installing from
    there, rather than tweaking the Makefiles.
  - Move examples to EXAMPLESDIR, and heed NOPORTEXAMPLES
  - Remove a leftover SUB_LIST addition.
  - Switch comment to my FreeBSD e-mail address.
  - Use PORTDOCS=* and PORTEXAMPLES=* to remove pkg-plist cruft
  - Sort PORT_OPTIONS .ifs and stuff.
  
  PR:		ports/175283 [1]
  Submitted by:	Alexey Markov [1]

Modified:
  head/security/openvpn/Makefile
  head/security/openvpn/pkg-plist

Modified: head/security/openvpn/Makefile
==============================================================================
--- head/security/openvpn/Makefile	Thu Jan 17 23:01:41 2013	(r310574)
+++ head/security/openvpn/Makefile	Thu Jan 17 23:12:24 2013	(r310575)
@@ -1,9 +1,9 @@
-# Created by: Matthias Andree <matthias.andree@gmx.de>
+# Created by: Matthias Andree <mandree@FreeBSD.org>
 # $FreeBSD$
 
 PORTNAME=	openvpn
 DISTVERSION=	2.3.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security net
 MASTER_SITES=	http://swupdate.openvpn.net/community/releases/ \
 		http://build.openvpn.net/downloads/releases/
@@ -18,11 +18,11 @@ CONFLICTS_INSTALL=	openvpn-2.[!3].* open
 GNU_CONFIGURE=	yes
 USE_OPENSSL=	yes
 USE_XZ=		yes
-# let OpenVPN's configure script pick up the libraries
+# let OpenVPN's configure script pick up the requisite libraries:
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-# PolarSSL missing: OpenVPN does not currently compile with PolarSSL 1.2.0+
+# PolarSSL is not provided; OpenVPN does not currently compile with PolarSSL 1.2.0+
 OPTIONS_DEFINE=		PW_SAVE PKCS11 EASYRSA
 OPTIONS_DEFAULT=	EASYRSA
 PW_SAVE_DESC=	Interactive passwords may be read from a file
@@ -31,11 +31,10 @@ EASYRSA_DESC=	Install security/easy-rsa 
 
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MDOCS}
-INSTALL_TARGET=	install
-.else
-INSTALL_TARGET=	install-exec install-man
-.endif
+# use a "stage directory" to install - much easier to sort data/share
+# stuff into docs, examples, ...
+_stagedir=	${WRKDIR}/instage
+INSTALL_TARGET=	install DESTDIR=${_stagedir}
 
 .if ${PORT_OPTIONS:MEASYRSA}
 RUN_DEPENDS+=	easy-rsa>=0:${PORTSDIR}/security/easy-rsa
@@ -48,7 +47,6 @@ USE_RC_SUBR=	openvpn
 USE_LDCONFIG=	${PREFIX}/lib
 
 SUB_FILES=	pkg-message
-SUB_LIST+=	OSVERSION=${OSVERSION}
 
 .include <bsd.port.pre.mk>
 
@@ -58,11 +56,8 @@ CFLAGS+=	-DLOG_OPENVPN=${LOG_OPENVPN}
 
 LIB_DEPENDS+=	lzo2:${PORTSDIR}/archivers/lzo2
 
-.if ${PORT_OPTIONS:MPW_SAVE}
-CONFIGURE_ARGS+=	--enable-password-save
-.else
-CONFIGURE_ARGS+=	--disable-password-save
-.endif
+PORTDOCS=	*
+PORTEXAMPLES=	*
 
 .if ${PORT_OPTIONS:MPKCS11}
 LIB_DEPENDS+=	pkcs11-helper:${PORTSDIR}/security/pkcs11-helper
@@ -70,6 +65,12 @@ LIB_DEPENDS+=	pkcs11-helper:${PORTSDIR}/
 CONFIGURE_ARGS+=	--disable-pkcs11
 .endif
 
+.if ${PORT_OPTIONS:MPW_SAVE}
+CONFIGURE_ARGS+=	--enable-password-save
+.else
+CONFIGURE_ARGS+=	--disable-password-save
+.endif
+
 pre-configure:
 .ifdef (LOG_OPENVPN)
 	@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}"
@@ -78,7 +79,7 @@ pre-configure:
 	@${ECHO} "You may use the following build options:"
 	@${ECHO} ""
 	@${ECHO} "      LOG_OPENVPN={Valid syslog facility, default LOG_DAEMON}"
-	@${ECHO} "      EXAMPLE:  make LOG_OPENVPN=LOG_DAEMON"
+	@${ECHO} "      EXAMPLE:  make LOG_OPENVPN=LOG_LOCAL6"
 	@${ECHO} ""
 .endif
 
@@ -90,24 +91,22 @@ post-build:
 .endif
 
 post-install:
-	${MKDIR} ${PREFIX}/lib
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \
-	PORTS README
-	${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/
+	${MKDIR} ${PREFIX}/lib ${PREFIX}/sbin ${PREFIX}/include ${PREFIX}/man
+.for i in lib sbin
+	(cd ${_stagedir}${PREFIX}/${i} && ${COPYTREE_BIN} \* ${PREFIX}/${i}/)
 .endfor
-.for dir in sample/sample-config-files
-	${RM} -f ${WRKSRC}/${dir}/*.orig
-	${MKDIR} ${DOCSDIR}/${dir}
-	${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \;
-.endfor
-.for dir in sample/sample-scripts
-	${MKDIR} ${DOCSDIR}/${dir}
-	${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_SCRIPT} \{\} ${DOCSDIR}/${dir} \;
+	${INSTALL_DATA} ${_stagedir}${PREFIX}/include/* ${PREFIX}/include/
+	${INSTALL_MAN} ${_stagedir}${PREFIX}/man/man8/* ${MAN8PREFIX}/man/man8/
+.if ${PORT_OPTIONS:MDOCS}
+	-${RMDIR} ${_stagedir}${DOCSDIR}/sample
+	(cd ${_stagedir}${DOCSDIR} && ${COPYTREE_SHARE} \* ${DOCSDIR}/)
+.for i in AUTHORS ChangeLog PORTS
+	${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}/
 .endfor
-.else
-	-@${RMDIR} ${DOCSDIR}
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+	(cd ${WRKSRC}/sample && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/)
+	${CHMOD} ${BINMODE} ${EXAMPLESDIR}/sample-scripts/*
 .endif
 	@${CAT} ${PKGMESSAGE}
 

Modified: head/security/openvpn/pkg-plist
==============================================================================
--- head/security/openvpn/pkg-plist	Thu Jan 17 23:01:41 2013	(r310574)
+++ head/security/openvpn/pkg-plist	Thu Jan 17 23:12:24 2013	(r310575)
@@ -4,42 +4,5 @@ lib/openvpn/plugins/openvpn-plugin-auth-
 lib/openvpn/plugins/openvpn-plugin-down-root.la
 lib/openvpn/plugins/openvpn-plugin-down-root.so
 sbin/openvpn
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/management-notes.txt
-%%PORTDOCS%%%%DOCSDIR%%/PORTS
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/README.auth-pam
-%%PORTDOCS%%%%DOCSDIR%%/README.down-root
-%%PORTDOCS%%%%DOCSDIR%%/README.IPv6
-%%PORTDOCS%%%%DOCSDIR%%/README.polarssl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/README
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/client.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/firewall.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/home.up
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/loopback-client
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/loopback-server
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/office.up
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/openvpn-shutdown.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/openvpn-startup.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/server.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/static-home.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/static-office.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/tls-home.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/tls-office.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/xinetd-client-config
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/xinetd-server-config
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/auth-pam.pl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/bridge-start
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/bridge-stop
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/ucn.pl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/verify-cn
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample/sample-scripts
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample/sample-config-files
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/openvpn/plugins
 @dirrm lib/openvpn
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2013-01-17 23:12:50 UTC
State Changed
From-To: feedback->closed

Fixed, along with other cleanups and fixes. Thanks for the report!