From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Oct 1 01:00:06 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A969916A418 for ; Mon, 1 Oct 2007 01:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 862D513C458 for ; Mon, 1 Oct 2007 01:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l91106vW026957 for ; Mon, 1 Oct 2007 01:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l91106mw026953; Mon, 1 Oct 2007 01:00:06 GMT (envelope-from gnats) Resent-Date: Mon, 1 Oct 2007 01:00:06 GMT Resent-Message-Id: <200710010100.l91106mw026953@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Logvinov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 118ED16A46D for ; Mon, 1 Oct 2007 00:57:02 +0000 (UTC) (envelope-from user@blg.akavia.ru) Received: from blg.akavia.ru (blg.akavia.ru [62.33.174.250]) by mx1.freebsd.org (Postfix) with ESMTP id E7EAD13C4A8 for ; Mon, 1 Oct 2007 00:57:00 +0000 (UTC) (envelope-from user@blg.akavia.ru) Received: from blg.akavia.ru (localhost [127.0.0.1]) by blg.akavia.ru (8.13.8/8.13.8) with ESMTP id l910uxjR071729; Mon, 1 Oct 2007 10:56:59 +1000 (YAKST) (envelope-from user@blg.akavia.ru) Received: (from root@localhost) by blg.akavia.ru (8.13.8/8.13.8/Submit) id l910uxR7071728; Mon, 1 Oct 2007 10:56:59 +1000 (YAKST) (envelope-from user) Message-Id: <200710010056.l910uxR7071728@blg.akavia.ru> Date: Mon, 1 Oct 2007 10:56:59 +1000 (YAKST) From: Alexander Logvinov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: roam@FreeBSD.org Subject: ports/116773: [PATCH] security/stunnel: new style of startup script install X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Logvinov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2007 01:00:06 -0000 >Number: 116773 >Category: ports >Synopsis: [PATCH] security/stunnel: new style of startup script install >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Oct 01 01:00:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alexander Logvinov >Release: FreeBSD 6.2-RELEASE-p7 i386 >Organization: >Environment: >Description: Use new style of startup script install Utilize ETCDIR for Makefile and pkg-plist >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/stunnel/Makefile,v retrieving revision 1.79 diff -u -r1.79 Makefile --- Makefile 28 Aug 2007 10:01:00 -0000 1.79 +++ Makefile 1 Oct 2007 00:52:57 -0000 @@ -7,7 +7,7 @@ PORTNAME= stunnel PORTVERSION= 4.20 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \ ftp://stunnel.mirt.net/stunnel/ \ @@ -19,7 +19,7 @@ USE_AUTOTOOLS= libtool:15 USE_OPENSSL= YES -USE_RC_SUBR= YES +USE_RC_SUBR= stunnel GNU_CONFIGURE= yes CONFIGURE_TARGET= --target=${MACHINE_ARCH}-portbld-freebsd${OSREL} @@ -77,9 +77,6 @@ .endif post-install: - ${SED} "s+!!PREFIX!!+${PREFIX}+g; s+!!RC_SUBR!!+${RC_SUBR}+g" \ - < ${FILESDIR}/stunnel.sh > ${WRKDIR}/stunnel.sh - ${INSTALL_SCRIPT} ${WRKDIR}/stunnel.sh ${PREFIX}/etc/rc.d/ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${ECHO} "" @@ -100,7 +97,7 @@ cert: @${ECHO} "" @${ECHO} "**************************************************************************" - @${ECHO} "The new certificate will be saved into ${PREFIX}/etc/stunnel/stunnel.pem" + @${ECHO} "The new certificate will be saved into ${ETCDIR}/stunnel.pem" @${ECHO} "**************************************************************************" @${ECHO} "" @(cd ${WRKSRC}/tools/; make install-data-local) Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/security/stunnel/pkg-plist,v retrieving revision 1.12 diff -u -r1.12 pkg-plist --- pkg-plist 21 Apr 2006 10:51:49 -0000 1.12 +++ pkg-plist 1 Oct 2007 00:52:57 -0000 @@ -1,5 +1,4 @@ -etc/rc.d/stunnel.sh -etc/stunnel/stunnel.conf-sample +%%ETCDIR%%/stunnel.conf-sample lib/libstunnel.a lib/libstunnel.la lib/libstunnel.so @@ -30,4 +29,4 @@ %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%@dirrm %%DOCSDIR%%/examples %%PORTDOCS%%@dirrm %%DOCSDIR%% -@unexec rmdir %D/etc/stunnel 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/etc/stunnel`` to remove any configuration files left." | fmt +@unexec rmdir %D/%%ETCDIR%% 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/%%ETCDIR%%`` to remove any configuration files left." | fmt Index: files/stunnel.in =================================================================== RCS file: files/stunnel.in diff -N files/stunnel.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/stunnel.in 1 Oct 2007 00:52:57 -0000 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD: ports/security/stunnel/files/stunnel.sh,v 1.6 2006/04/21 10:51:49 roam Exp $ +# + +# PROVIDE: stunnel +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add some of the following variables to /etc/rc.conf to configure stunnel: +# stunnel_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable stunnel. +# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" +# Set it to the full path to the config file +# that stunnel will use during the automated +# start-up. +# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" +# Set it to the value of 'pid' in +# the stunnel.conf file. +# + +. %%RC_SUBR%% + +name="stunnel" +rcvar=`set_rcvar` +stunnel_config="%%ETCDIR%%/${name}.conf" +stunnel_pidfile="/var/run/${name}.pid" +command="%%PREFIX%%/sbin/stunnel" + +[ -z "$stunnel_enable" ] && stunnel_enable="NO" + +load_rc_config $name + +command_args=${stunnel_config} +pidfile=${stunnel_pidfile} + +required_files="${stunnel_config}" + +run_rc_command "$1" Index: files/stunnel.sh =================================================================== RCS file: files/stunnel.sh diff -N files/stunnel.sh --- files/stunnel.sh 21 Apr 2006 10:51:49 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/security/stunnel/files/stunnel.sh,v 1.6 2006/04/21 10:51:49 roam Exp $ -# - -# PROVIDE: stunnel -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: shutdown - -# -# Add some of the following variables to /etc/rc.conf to configure stunnel: -# stunnel_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable stunnel. -# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" -# Set it to the full path to the config file -# that stunnel will use during the automated -# start-up. -# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" -# Set it to the value of 'pid' in -# the stunnel.conf file. -# - -. !!RC_SUBR!! - -name="stunnel" -rcvar=`set_rcvar` -stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf" -stunnel_pidfile="/var/run/${name}.pid" -command="!!PREFIX!!/sbin/stunnel" - -[ -z "$stunnel_enable" ] && stunnel_enable="NO" - -load_rc_config $name - -command_args=${stunnel_config} -pidfile=${stunnel_pidfile} - -required_files="${stunnel_config}" - -run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: