ports/78445: [ maintainer ] databases/phpmyadmin update to 2.6.1.pl3 plus other improvements

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Mar 5 14:10:18 UTC 2005


>Number:         78445
>Category:       ports
>Synopsis:       [ maintainer ] databases/phpmyadmin update to 2.6.1.pl3 plus other improvements
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 05 14:10:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Seaman
>Release:        FreeBSD 5.4-PRERELEASE i386
>Organization:
Infracaninophile
>Environment:
System: FreeBSD gravitas.thebunker.net 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #8: Fri Mar 4 23:11:23 GMT 2005 root at gravitas.thebunker.net:/usr/obj/usr/src/sys/GRAVITAS i386


	
>Description:

Update to phpmyadmin-2.6.1.pl3 which corrects some pugs introduced
with the security patches in pl2.  Announcement is at:

    http://sourceforge.net/mailarchive/forum.php?thread_id=6732974&forum_id=2141

Release Notes:

    http://www.phpmyadmin.net/home_page/downloads.php?relnotes=0 

While I'm here:

    - add OPTIONS support for the PHP MCRYPT and MBSTRING modules,
      both of which are can be used by recent versions of phpMyAdmin.

    - Switch to the SUB_FILES, SUB_LIST mechanism for substituting
      values into pkg-message, pkg-install, pkg-deinstall.

Notes to committer:

    Directory added:

        phpmyadmin/files

    Renamed files:

        phpmyadmin/pkg-message         --> phpmyadmin/files/pkg-message.in
        phpmyadmin/pkg-deinstall-suphp --> phpmyadmin/files/pkg-deinstall.in
        phpmyadmin/pkg-install-suphp   --> phpmyadmin/files/pkg-install.in

    Modified files:

        phpmyadmin/Makefile
        phpmyadmin/distinfo

>How-To-Repeat:
	
>Fix:

	

--- phpmyadmin.diff begins here ---
diff -Nur /usr/ports/databases/phpmyadmin/Makefile phpmyadmin/Makefile
--- /usr/ports/databases/phpmyadmin/Makefile	Mon Feb 28 09:10:59 2005
+++ phpmyadmin/Makefile	Sat Mar  5 13:41:35 2005
@@ -6,8 +6,8 @@
 #
 
 PORTNAME=	phpMyAdmin
-PORTVERSION=	2.6.1.2
-#DISTVERSION=	2.6.1-pl2
+PORTVERSION=	2.6.1.3
+#DISTVERSION=	2.6.1-pl3
 CATEGORIES=	databases www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	phpmyadmin
@@ -20,6 +20,10 @@
 NO_BUILD=	yes
 USE_PHP=	mysql pcre
 
+SUB_LIST+=	"MYADMDIR=${MYADMDIR}" \
+		"PKGNAME=${PKGNAME}"
+SUB_FILES=	pkg-message
+
 # Unfortunately can't make WITH_SUPHP part of the OPTIONS selection,
 # since it has to be processed before just about anything else.
 
@@ -35,10 +39,9 @@
 
 MYADMUSR?=	phpmyadm
 
-SED_SCRIPT=	-e 's,%%PREFIX%%,${PREFIX},g'     \
-		-e 's,%%MYADMDIR%%,${MYADMDIR},g' \
-		-e 's,%%MYADMUSR%%,${MYADMUSR},g' \
-		-e 's,%%MYADMGRP%%,${MYADMGRP},g'
+SUB_LIST+=	"MYADMUSR=${MYADMUSR}" \
+		"MYADMGRP=${MYADMGRP}"
+SUB_FILES+=	pkg-install pkg-deinstall
 
 .else
 
@@ -49,12 +52,14 @@
 # Copy the way lang/php{4,5}-extensions deals with its OPTIONS -- avoids
 # problems with include of bsd.port.pre.mk
 
-OPTIONS=	BZ2	"bzip2 library support" on \
-		GD	"GD library support" on \
-		MYSQLI	"Improved MySQL support (PHP5, MySQL 4.1 only)" off \
-		OPENSSL	"OpenSSL support" on \
-		PDF	"PDFlib support (implies GD)" on \
-		ZLIB	"ZLIB support" on
+OPTIONS=	BZ2	 "bzip2 library support" on \
+		GD	 "GD library support" on \
+		MYSQLI	 "Improved MySQL support (PHP5, MySQL 4.1 only)" off \
+		OPENSSL	 "OpenSSL support" on \
+		PDF	 "PDFlib support (implies GD)" on \
+		ZLIB	 "ZLIB support" on \
+		MCRYPT   "MCrypt library support" on \
+		MBSTRING "Multi-byte character-set string support" on
 
 PORT_DBDIR?=	/var/db/ports
 LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
@@ -65,7 +70,7 @@
 .endif
 
 # Options that default to on:
-.for opt in BZ2 GD OPENSSL PDF ZLIB
+.for opt in BZ2 GD OPENSSL PDF ZLIB MCRYPT MBSTRING
 .    if !defined(WITHOUT_${opt}) || defined(WITH_${opt})
 USE_PHP+=	${opt:L}
 .    endif
@@ -78,9 +83,6 @@
 .    endif
 .endfor
 
-MSG_SKEL=	${PKGDIR}/pkg-message
-PKGMESSAGE=	${WRKDIR}/pkg-message
-
 # MYADMUSR is only used WITH_SUPHP
 MYADMDIR?=	www/phpMyAdmin
 MYADMGRP?=	${WWWGRP}
@@ -111,13 +113,6 @@
 	${FIND} . -type d | ${SORT} -r | ${SED} \
 	     -e "s,^\.$$, at unexec rmdir %D/%%MYADMDIR%% 2>/dev/null || true," \
 	     -e "s,^\., at dirrm %%MYADMDIR%%,"         >>${PLIST}
-	${SED} -e 's,%%MYADMDIR%%,${MYADMDIR},g' \
-	       -e 's,%%PREFIX%%,${PREFIX},g'     \
-	       -e 's,%%PKGNAME%%,${PKGNAME},g' ${MSG_SKEL} > ${PKGMESSAGE}
-.if defined(WITH_SUPHP)
-	${SED} ${SED_SCRIPT} ${PKGINST_SKEL}   > ${PKGINSTALL}
-	${SED} ${SED_SCRIPT} ${PKGDEINST_SKEL} > ${PKGDEINSTALL}
-.endif
 
 pre-install:
 .if defined(WITH_SUPHP)
diff -Nur /usr/ports/databases/phpmyadmin/distinfo phpmyadmin/distinfo
--- /usr/ports/databases/phpmyadmin/distinfo	Mon Feb 28 09:10:59 2005
+++ phpmyadmin/distinfo	Sat Mar  5 13:03:49 2005
@@ -1,2 +1,2 @@
-MD5 (phpMyAdmin-2.6.1-pl2.tar.bz2) = 787feeebe16ef7ab43e75e4046550da2
-SIZE (phpMyAdmin-2.6.1-pl2.tar.bz2) = 1541665
+MD5 (phpMyAdmin-2.6.1-pl3.tar.bz2) = 77b97c6212ee9322db0aea6ba00e305c
+SIZE (phpMyAdmin-2.6.1-pl3.tar.bz2) = 1543219
diff -Nur /usr/ports/databases/phpmyadmin/files/pkg-deinstall.in phpmyadmin/files/pkg-deinstall.in
--- /usr/ports/databases/phpmyadmin/files/pkg-deinstall.in	Thu Jan  1 01:00:00 1970
+++ phpmyadmin/files/pkg-deinstall.in	Sat Mar  5 13:55:25 2005
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/databases/phpmyadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
+#
+
+case $2 in
+    POST-DEINSTALL)
+    cat <<EOMSG
+The phpMyAdmin-suphp port has been deleted.
+If you are not upgrading and don't intend to use
+phpMyAdmin any more then you may wish to delete
+the %%MYADMUSR%% account, which can be done with
+the following command:
+
+    # pw userdel %%MYADMUSR%%
+EOMSG
+    if [ -d %%PREFIX%%/%%MYADMDIR%% ] ; then
+	echo "    # rm -rf %%PREFIX%%/%%MYADMDIR%%/"
+    fi
+    echo
+    ;;
+esac
+
+#
+# That's All Folks!
+#
diff -Nur /usr/ports/databases/phpmyadmin/files/pkg-install.in phpmyadmin/files/pkg-install.in
--- /usr/ports/databases/phpmyadmin/files/pkg-install.in	Thu Jan  1 01:00:00 1970
+++ phpmyadmin/files/pkg-install.in	Sat Mar  5 13:55:51 2005
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/databases/phpmyadmin/pkg-install-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+myadmdir=%%PREFIX%%/%%MYADMDIR%%
+myadmusr=%%MYADMUSR%%
+myadmgrp=%%MYADMGRP%%
+
+myadmgcos="phpMyAdmin Owner"
+myadmhome=/nonexistent
+myadmshell=/sbin/nologin
+
+create_group() {
+    local user group gcos home shell
+
+    user=$1
+    group=$2
+    gcos=$3
+    home=$4
+    shell=$5
+
+    if pw groupadd -n $group ; then
+	echo "===> Group $group created"
+    else
+	cat <<-EOERRORMSG
+	*** Failed to create the $group group.
+
+	Please add the $user user and $group group
+	manually with the commands:
+
+	    pw groupadd -n $group
+	    pw useradd -n $user -g $group -c "$gcos" \\
+	        -d $home -s $shell -h -
+	    
+	and retry installing this package.
+	EOERRORMSG
+	exit 1
+    fi
+}
+
+
+create_user() {
+    local user group gcos home shell
+
+    user=$1
+    group=$2
+    gcos=$3
+    home=$4
+    shell=$5
+
+    if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then
+	echo "===> Created $user user"
+    else
+	cat <<-EOERRORMSG
+	*** Failed to create the $user user.
+
+	Please add the $user user manually with the command:
+
+	    pw useradd -n $user -g $group -c "$gcos" \\
+		        -d $home -s $shell -h -
+
+	and retry installing this package.
+	EOERRORMSG
+	exit 1
+    fi
+}
+
+
+case $2 in
+    PRE-INSTALL)
+
+        # Create the myadm user and group if they do not already exist
+
+        if pw user show -n $myadmusr >/dev/null 2>&1 ; then
+	    echo "===> Using pre-existing user $myadmusr"
+	else
+	    if ! pw group show -n $myadmgrp >/dev/null 2>&1 ; then
+		create_group $myadmusr $myadmgrp "$myadmgcos" $myadmhome \
+		    $myadmshell
+	    fi
+	    create_user $myadmusr $myadmgrp "$myadmgcos" $myadmhome $myadmshell
+	fi
+	;;
+    POST-INSTALL)
+
+    	# Change ownership of the phpMyAdm directory
+
+        echo "===> Adjusting file ownership in $myadmdir"
+        chown -R $myadmusr:$myadmgrp $myadmdir || exit 1
+	;;
+esac
+
+#
+# That's All Folks!
+#
diff -Nur /usr/ports/databases/phpmyadmin/files/pkg-message.in phpmyadmin/files/pkg-message.in
--- /usr/ports/databases/phpmyadmin/files/pkg-message.in	Thu Jan  1 01:00:00 1970
+++ phpmyadmin/files/pkg-message.in	Sat Mar  5 13:54:50 2005
@@ -0,0 +1,12 @@
+
+%%PKGNAME%% has been installed into:
+
+    %%PREFIX%%/%%MYADMDIR%%
+
+Please edit config.inc.php to suit your needs.
+
+To make phpMyAdmin available through your web site, I suggest
+that you add the following to httpd.conf:
+
+    Alias /phpmyadmin/ "%%PREFIX%%/%%MYADMDIR%%/"
+
diff -Nur /usr/ports/databases/phpmyadmin/pkg-deinstall-suphp phpmyadmin/pkg-deinstall-suphp
--- /usr/ports/databases/phpmyadmin/pkg-deinstall-suphp	Thu May 20 17:29:49 2004
+++ phpmyadmin/pkg-deinstall-suphp	Thu Jan  1 01:00:00 1970
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/databases/phpmyadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
-#
-
-case $2 in
-    POST-DEINSTALL)
-    cat <<EOMSG
-The phpMyAdmin-suphp port has been deleted.
-If you are not upgrading and don't intend to use
-phpMyAdmin any more then you may wish to delete
-the %%MYADMUSR%% account, which can be done with
-the following command:
-
-    # pw userdel %%MYADMUSR%%
-EOMSG
-    if [ -d %%PREFIX%%/%%MYADMDIR%% ] ; then
-	echo "    # rm -rf %%PREFIX%%/%%MYADMDIR%%/"
-    fi
-    echo
-    ;;
-esac
-
-#
-# That's All Folks!
-#
\ No newline at end of file
diff -Nur /usr/ports/databases/phpmyadmin/pkg-install-suphp phpmyadmin/pkg-install-suphp
--- /usr/ports/databases/phpmyadmin/pkg-install-suphp	Thu May 20 17:29:49 2004
+++ phpmyadmin/pkg-install-suphp	Thu Jan  1 01:00:00 1970
@@ -1,98 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/databases/phpmyadmin/pkg-install-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
-#
-
-PATH=/usr/sbin:/usr/bin:/bin ; export PATH
-
-myadmdir=%%PREFIX%%/%%MYADMDIR%%
-myadmusr=%%MYADMUSR%%
-myadmgrp=%%MYADMGRP%%
-
-myadmgcos="phpMyAdmin Owner"
-myadmhome=/nonexistent
-myadmshell=/sbin/nologin
-
-create_group() {
-    local user group gcos home shell
-
-    user=$1
-    group=$2
-    gcos=$3
-    home=$4
-    shell=$5
-
-    if pw groupadd -n $group ; then
-	echo "===> Group $group created"
-    else
-	cat <<-EOERRORMSG
-	*** Failed to create the $group group.
-
-	Please add the $user user and $group group
-	manually with the commands:
-
-	    pw groupadd -n $group
-	    pw useradd -n $user -g $group -c "$gcos" \\
-	        -d $home -s $shell -h -
-	    
-	and retry installing this package.
-	EOERRORMSG
-	exit 1
-    fi
-}
-
-
-create_user() {
-    local user group gcos home shell
-
-    user=$1
-    group=$2
-    gcos=$3
-    home=$4
-    shell=$5
-
-    if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then
-	echo "===> Created $user user"
-    else
-	cat <<-EOERRORMSG
-	*** Failed to create the $user user.
-
-	Please add the $user user manually with the command:
-
-	    pw useradd -n $user -g $group -c "$gcos" \\
-		        -d $home -s $shell -h -
-
-	and retry installing this package.
-	EOERRORMSG
-	exit 1
-    fi
-}
-
-
-case $2 in
-    PRE-INSTALL)
-
-        # Create the myadm user and group if they do not already exist
-
-        if pw user show -n $myadmusr >/dev/null 2>&1 ; then
-	    echo "===> Using pre-existing user $myadmusr"
-	else
-	    if ! pw group show -n $myadmgrp >/dev/null 2>&1 ; then
-		create_group $myadmusr $myadmgrp "$myadmgcos" $myadmhome \
-		    $myadmshell
-	    fi
-	    create_user $myadmusr $myadmgrp "$myadmgcos" $myadmhome $myadmshell
-	fi
-	;;
-    POST-INSTALL)
-
-    	# Change ownership of the phpMyAdm directory
-
-        echo "===> Adjusting file ownership in $myadmdir"
-        chown -R $myadmusr:$myadmgrp $myadmdir || exit 1
-	;;
-esac
-
-#
-# That's All Folks!
-#
diff -Nur /usr/ports/databases/phpmyadmin/pkg-message phpmyadmin/pkg-message
--- /usr/ports/databases/phpmyadmin/pkg-message	Thu Nov 25 13:02:26 2004
+++ phpmyadmin/pkg-message	Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-
-%%PKGNAME%% has been installed into:
-
-    %%PREFIX%%/%%MYADMDIR%%
-
-Please edit config.inc.php to suit your needs.
-
-To make phpMyAdmin available through your web site, I suggest
-that you add the following to httpd.conf:
-
-    Alias /phpmyadmin/ "%%PREFIX%%/%%MYADMDIR%%/"
-
--- phpmyadmin.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list