From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 12 01:20:06 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A29B416A422 for ; Thu, 12 Jan 2006 01:20:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12D3343D58 for ; Thu, 12 Jan 2006 01:20:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0C1K4GK055006 for ; Thu, 12 Jan 2006 01:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0C1K4Q0055005; Thu, 12 Jan 2006 01:20:04 GMT (envelope-from gnats) Resent-Date: Thu, 12 Jan 2006 01:20:04 GMT Resent-Message-Id: <200601120120.k0C1K4Q0055005@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, "Ion-Mihai "IOnut" Tetcu" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 479CB16A41F for ; Thu, 12 Jan 2006 01:17:16 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E7EE43D45 for ; Thu, 12 Jan 2006 01:17:12 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 4A1BEB84A for ; Thu, 12 Jan 2006 03:17:11 +0200 (EET) Message-Id: <1137028631.61447@it.buh.tecnik93.com> Date: Thu, 12 Jan 2006 03:17:11 +0200 From: "Ion-Mihai "IOnut" Tetcu" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.6 Cc: Subject: ports/91697: [PATCH] databases/mysql50-client: convert start-up script to rc.d X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 01:20:07 -0000 >Number: 91697 >Category: ports >Synopsis: [PATCH] databases/mysql50-client: convert start-up script to rc.d >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jan 12 01:20:04 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ion-Mihai "IOnut" Tetcu >Release: FreeBSD 6.0-STABLE i386 >Organization: Tecnik'93 >Environment: System: FreeBSD 6.0-STABLE #5: Fri Dec 30 19:34:15 EET 2005 >Description: Convert 000.mysql-client,sh to rc.d; this way ports dependign on it and it's libs will be able to run at start-up. Remove the old files/mysql-client.sh and add 000.mysql-client.sh to be able to USE_RC_SUBR in Makefile. Follow dougb@ and bump PORTREVISION to help users. TinderFoxy'ed on: 6-STABLE. Inspired from: misc/compat5x >How-To-Repeat: >Fix: --- mysql50-server.diff begins here --- diff -urN mysql50-server.cvs/Makefile mysql50-server/Makefile --- mysql50-server.cvs/Makefile Fri Dec 23 09:19:29 2005 +++ mysql50-server/Makefile Thu Jan 12 02:46:14 2006 @@ -24,6 +24,10 @@ USE_RC_SUBR= mysql-server.sh .endif +.if ${PKGNAMESUFFIX} == "-client" +USE_RC_SUBR= 000.mysql-client.sh +.endif + CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ @@ -196,10 +200,6 @@ .if defined(WITH_PROC_SCOPE_PTH) @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/tools/mysqlmanager.c .endif - -post-install: - @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/mysql-client.sh > ${PREFIX}/etc/rc.d/000.mysql-client.sh - @${CHMOD} 750 ${PREFIX}/etc/rc.d/000.mysql-client.sh .else # MySQL-Scripts part diff -urN mysql50-server.cvs/files/000.mysql-client.sh.in mysql50-server/files/000.mysql-client.sh.in --- mysql50-server.cvs/files/000.mysql-client.sh.in Thu Jan 1 02:00:00 1970 +++ mysql50-server/files/000.mysql-client.sh.in Thu Jan 12 02:46:16 2006 @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: mysql_client +# REQUIRE: ldconfig +# +# Add the following to /etc/rc.conf[.local] to enable this service +# +# mysql_client_enable="YES" +# + +. %%RC_SUBR%% + +name=mysql_client +rcvar=`set_rcvar` + +command=%%LDCONFIG%% +command_args='-m %%PREFIX%%/lib/mysql' + +load_rc_config ${name} +run_rc_command "$1" diff -urN mysql50-server.cvs/files/mysql-client.sh mysql50-server/files/mysql-client.sh --- mysql50-server.cvs/files/mysql-client.sh Thu Nov 16 12:29:06 2000 +++ mysql50-server/files/mysql-client.sh Thu Jan 1 02:00:00 1970 @@ -1,15 +0,0 @@ -#!/bin/sh - -case "$1" in - start) - /sbin/ldconfig -m %%PREFIX%%/lib/mysql - ;; - stop) - ;; - *) - echo "" - echo "Usage: `basename $0` { start | stop }" - echo "" - exit 64 - ;; -esac diff -urN mysql50-server.cvs/pkg-plist.client mysql50-server/pkg-plist.client --- mysql50-server.cvs/pkg-plist.client Sun Aug 28 21:46:42 2005 +++ mysql50-server/pkg-plist.client Thu Jan 12 02:51:17 2006 @@ -11,7 +11,6 @@ bin/mysqltest bin/mysqltestmanager-pwgen bin/mysqltestmanagerc -etc/rc.d/000.mysql-client.sh include/mysql/errmsg.h include/mysql/keycache.h include/mysql/m_ctype.h --- mysql50-server.diff ends here --- --- mysql50-client.diff begins here --- diff -urN mysql50-client.cvs/Makefile mysql50-client/Makefile --- mysql50-client.cvs/Makefile Thu Jan 12 02:54:59 2006 +++ mysql50-client/Makefile Thu Jan 12 02:57:18 2006 @@ -6,6 +6,7 @@ # PORTNAME= mysql +PORTREVISION= 1 PKGNAMESUFFIX= -client COMMENT= Multithreaded SQL database (client) --- mysql50-client.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: