Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2011 00:28:28 GMT
From:      Dave Cornejo <dave@dogwood.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163216: New Port: databases/mysql-udf-sys Access to external programs from within MySQL
Message-ID:  <201112130028.pBD0SS8x055053@red.freebsd.org>
Resent-Message-ID: <201112130030.pBD0UCmU071556@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <dave@dogwood.com>
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 <bsd.port.mk>
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112130028.pBD0SS8x055053>