From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 13 00:30:13 2011 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 0D1151065677 for ; Tue, 13 Dec 2011 00:30:13 +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 CA23A8FC21 for ; Tue, 13 Dec 2011 00:30:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBD0UCl9071558 for ; Tue, 13 Dec 2011 00:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBD0UCmU071556; Tue, 13 Dec 2011 00:30:12 GMT (envelope-from gnats) Resent-Date: Tue, 13 Dec 2011 00:30:12 GMT Resent-Message-Id: <201112130030.pBD0UCmU071556@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, Dave Cornejo Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 205A11065672 for ; Tue, 13 Dec 2011 00:28:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id DBC0C8FC0A for ; Tue, 13 Dec 2011 00:28:28 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBD0SSnu055054 for ; Tue, 13 Dec 2011 00:28:28 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pBD0SS8x055053; Tue, 13 Dec 2011 00:28:28 GMT (envelope-from nobody) Message-Id: <201112130028.pBD0SS8x055053@red.freebsd.org> Date: Tue, 13 Dec 2011 00:28:28 GMT From: Dave Cornejo To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163216: New Port: databases/mysql-udf-sys Access to external programs from within MySQL 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: Tue, 13 Dec 2011 00:30:13 -0000 >Number: 163216 >Category: ports >Synopsis: New Port: databases/mysql-udf-sys Access to external programs from within MySQL >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 13 00:30:12 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dave Cornejo >Release: FreeBSD-9 >Organization: Dogwood Media >Environment: FreeBSD spud 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #11 r228428: Sun Dec 11 16:08:51 HST 2011 dave@spud:/usr/obj/usr/src/sys/SPUD amd64 >Description: This package contains a number of functions that allows one to interact with the operating system from MySQL: sys_eval - executes an arbitrary command, and returns it's output. sys_exec - executes an arbitrary command, and returns it's exit code. sys_get - gets the value of an environment variable. sys_set - create an environment variable, or update the value of an existing environment variable. Use lib_mysqludf_sys_info() to obtain information about the currently installed version of lib_mysqludf_sys. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mysql-udf-sys # mysql-udf-sys/files # mysql-udf-sys/files/patch-Makefile # mysql-udf-sys/Makefile # mysql-udf-sys/distinfo # mysql-udf-sys/pkg-descr # mysql-udf-sys/pkg-message # echo c - mysql-udf-sys mkdir -p mysql-udf-sys > /dev/null 2>&1 echo c - mysql-udf-sys/files mkdir -p mysql-udf-sys/files > /dev/null 2>&1 echo x - mysql-udf-sys/files/patch-Makefile sed 's/^X//' >mysql-udf-sys/files/patch-Makefile << 'efd1a7bf7f7844dc25296574cd74ecd5' X--- Makefile.orig 2009-01-18 23:11:00.000000000 -1000 X+++ Makefile 2011-12-12 13:16:07.000000000 -1000 X@@ -1,4 +1,16 @@ X-LIBDIR=/usr/lib X+ X+LIBDIR= /usr/local/lib/mysql/plugin X+INCDIR= /usr/local/include/mysql X+PROG= lib_mysqludf_sys.so X+ X+all: lib_mysql_udf.so X+ X+lib_mysql_udf.so: X+ gcc -fPIC -Wall -I$(INCDIR) -I. -shared lib_mysqludf_sys.c -o $(PROG) X X install: X- gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so X+ install -o root -g wheel -m 0755 $(PROG) $(LIBDIR) X+ X+clean: X+ rm -f $(PROG) X+ efd1a7bf7f7844dc25296574cd74ecd5 echo x - mysql-udf-sys/Makefile sed 's/^X//' >mysql-udf-sys/Makefile << 'd7a4576c8ffd1100aad59281a34ddb74' X# New ports collection makefile for: mysql-udf-sys X# Date created: December 2011 X# Whom: David Cornejo X# X# $FreeBSD: ports/databases/mysql-udf/Makefile,v 1.5 2011/10/17 04:34:59 dougb Exp $ X# X XPORTNAME= mysql-udf-sys XPORTVERSION= 0.0.3 XCATEGORIES= databases XMASTER_SITES= http://www.mysqludf.org/lib_mysqludf_sys/ XDISTNAME= lib_mysqludf_sys_${PORTVERSION} X XMAINTAINER= dave@dogwood.com XCOMMENT= System access UDFs X XWRKSRC= ${WRKDIR} X XUSE_MYSQL= yes X XUSE_LDCONFIG= yes X XPLIST_FILES= lib/mysql/plugin/lib_mysqludf_sys.so X XPLIST_DIRs= lib/mysql/plugins X X.include d7a4576c8ffd1100aad59281a34ddb74 echo x - mysql-udf-sys/distinfo sed 's/^X//' >mysql-udf-sys/distinfo << 'c87955ae0762a50fb3f943a26c3e4f0a' XSHA256 (lib_mysqludf_sys_0.0.3.tar.gz) = 174f43d1df5372c84d98981031f02a2b9e090954ac473f543bff79f9a87c2c4d XSIZE (lib_mysqludf_sys_0.0.3.tar.gz) = 9136 c87955ae0762a50fb3f943a26c3e4f0a echo x - mysql-udf-sys/pkg-descr sed 's/^X//' >mysql-udf-sys/pkg-descr << '7b8492b64621af7bd853b48f1f3942b4' XThis package contains a number of functions that allows one to interact Xwith the operating system from MySQL: X X sys_eval - executes an arbitrary command, and returns it's output. X sys_exec - executes an arbitrary command, and returns it's exit code. X sys_get - gets the value of an environment variable. X sys_set - create an environment variable, or update the value of an X existing environment variable. X XUse lib_mysqludf_sys_info() to obtain information about the currently Xinstalled version of lib_mysqludf_sys. 7b8492b64621af7bd853b48f1f3942b4 echo x - mysql-udf-sys/pkg-message sed 's/^X//' >mysql-udf-sys/pkg-message << '723b81cd06765f82b303b72e5ffa463b' X XTo add the custom functions to your MySQL server use the following SQL: X(These function can be dangerous, you should install only the functions Xyou need): X XUSE mysql; X XCREATE FUNCTION X lib_mysqludf_sys_info RETURNS string SONAME 'lib_mysqludf_sys.so'; XCREATE FUNCTION sys_get RETURNS string SONAME 'lib_mysqludf_sys.so'; XCREATE FUNCTION sys_set RETURNS int SONAME 'lib_mysqludf_sys.so'; XCREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so'; XCREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf_sys.so'; X XTo deinstall: X XDROP FUNCTION IF EXISTS lib_mysqludf_sys_info; XDROP FUNCTION IF EXISTS sys_get; XDROP FUNCTION IF EXISTS sys_set; XDROP FUNCTION IF EXISTS sys_exec; XDROP FUNCTION IF EXISTS sys_eval; X XFor function descriptions, see the following webpage: Xhttp://www.mysqludf.org/lib_mysqludf_sys 723b81cd06765f82b303b72e5ffa463b exit >Release-Note: >Audit-Trail: >Unformatted: