ports/90251: [maintainer] net/phpldapadmin -- update to 0.9.7.2
Matthew Seaman
m.seaman at infracaninophile.co.uk
Sun Dec 11 18:20:36 UTC 2005
>Number: 90251
>Category: ports
>Synopsis: [maintainer] net/phpldapadmin -- update to 0.9.7.2
>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: Sun Dec 11 18:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Matthew Seaman
>Release: FreeBSD 4.11-STABLE i386
>Organization:
Infracaninophile
>Environment:
System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 4.11-STABLE FreeBSD 4.11-STABLE #91: Wed Nov 16 22:41:11 GMT 2005 root at happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386
>Description:
Update to 0.9.7.2
This release of phpldapadmin has had its directory structure
completely reorganized. Users updating from version 0.9.7 or earlier
will have to do two things:
*) Modify the /phpldapadmin/ alias in their httpd.conf
*) Merge settings from their old config.php to the new
config/config.php
as directed in pkg-message.
Other than that this update:
* adds SHA1 checksum
* uses SUB_FILES instead of rolling my own sed commands
Notes for committer:
The following files/directories were added:
phpldapadmin/files
phpldapadmin/files/pkg-deinstall.in
phpldapadmin/files/pkg-install.in
phpldapadmin/files/pkg-message.in
The following files were removed:
phpldapadmin/pkg-deinstall-suphp
phpldapadmin/pkg-install-suphp
phpldapadmin/pkg-message
>How-To-Repeat:
>Fix:
--- phpldapadmin.diff begins here ---
diff -Nur /usr/ports/net/phpldapadmin/Makefile phpldapadmin/Makefile
--- /usr/ports/net/phpldapadmin/Makefile Wed Sep 28 08:10:31 2005
+++ phpldapadmin/Makefile Sun Dec 11 17:57:32 2005
@@ -6,7 +6,7 @@
#
PORTNAME= phpldapadmin
-PORTVERSION= 0.9.7
+PORTVERSION= 0.9.7.2
PORTEPOCH= 1
CATEGORIES= net www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -24,17 +24,12 @@
PKGNAMESUFFIX= -suphp
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp
WANT_PHP_CGI= yes
-PKGINST_SKEL= ${PKGDIR}/pkg-install${PKGNAMESUFFIX}
-PKGINSTALL= ${WRKDIR}/pkg-install${PKGNAMESUFFIX}
-PKGDEINST_SKEL= ${PKGDIR}/pkg-deinstall${PKGNAMESUFFIX}
-PKGDEINSTALL= ${WRKDIR}/pkg-deinstall${PKGNAMESUFFIX}
PLAUSR?= pldapadm
-SED_SCRIPT= -e 's!%%PREFIX%%!${PREFIX}!g' \
- -e 's!%%PLADIR%%!${PLADIR}!g' \
- -e 's!%%PLAUSR%%!${PLAUSR}!g' \
- -e 's!%%PLAGRP%%!${PLAGRP}!g'
+SUB_LIST+= "PLAUSR=${PLAUSR}" \
+ " PLAGRP=${PLAGRP}"
+SUB_FILES+= pkg-install pkg-deinstall
.else
@@ -42,17 +37,22 @@
.endif
-MSG_SKEL= ${PKGDIR}/pkg-message
-PKGMESSAGE= ${WRKDIR}/pkg-message
-
# PLAUSR is only used WITH_SUPHP
PLADIR?= www/${PORTNAME}
PLAGRP?= ${WWWGRP}
+CFGDIR= config
CFGFILE= config.php
+SUB_LIST+= "PKGNAME=${PKGNAME}" \
+ "PLADIR=${PLADIR}"
+SUB_FILES+= pkg-message
+
PLIST= ${WRKDIR}/plist
PLIST_SUB+= PLADIR=${PLADIR} PLAGRP=${PLAGRP}
+sedSTART= @unexec rmdir %D/%%PLADIR%%
+sedEND= 2>/dev/null || true
+
.SILENT:
pre-everything::
@@ -64,21 +64,14 @@
${ECHO_MSG} ""
post-patch:
- ${RM} -f ${PLIST}
- cd ${WRKSRC} ; \
+ cd ${WRKSRC} ; \
${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore | \
- ${SORT} | ${SED} "s!^\.!%%PLADIR%%!" >${PLIST} ; \
- ${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \
- ${FIND} . -type d | ${SORT} -r | ${SED} \
- -e 's!^\.$$!@unexec rmdir %D/%%PLADIR%% 2>/dev/null || true!' \
- -e 's!^\.!@dirrm %%PLADIR%%!' >>${PLIST}
- ${SED} -e 's!%%PKGNAME%%!${PKGNAME}!g' \
- -e 's!%%PREFIX%%!${PREFIX}!g' \
- -e 's!%%PLADIR%%!${PLADIR}!g' ${MSG_SKEL} > ${PKGMESSAGE}
-.if defined(WITH_SUPHP)
- ${SED} ${SED_SCRIPT} ${PKGINST_SKEL} > ${PKGINSTALL}
- ${SED} ${SED_SCRIPT} ${PKGDEINST_SKEL} > ${PKGDEINSTALL}
-.endif
+ ${SORT} | ${SED} -e "s!^\.!%%PLADIR%%!" >${PLIST} ; \
+ ${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \
+ ${FIND} . -type d | ${SORT} -r | ${SED} \
+ -e 's!^\./${CFGDIR}$$!${sedSTART}/${CFGDIR} ${sedEND}!' \
+ -e 's!^\.$$!${sedSTART} ${sedEND}!' \
+ -e 's!^\.!@dirrm %%PLADIR%%!' >>${PLIST}
pre-install:
.if defined(WITH_SUPHP)
@@ -99,7 +92,7 @@
done
install-conf:
- cd ${PREFIX}/${PLADIR} ; \
+ cd ${PREFIX}/${PLADIR}/${CFGDIR} ; \
${CHMOD} 0640 ${CFGFILE}.example ; \
${CHGRP} ${PLAGRP} ${CFGFILE}.example ; \
if ${TEST} ! -f ${CFGFILE} ; then \
diff -Nur /usr/ports/net/phpldapadmin/distinfo phpldapadmin/distinfo
--- /usr/ports/net/phpldapadmin/distinfo Wed Sep 28 08:10:31 2005
+++ phpldapadmin/distinfo Sun Dec 11 16:22:51 2005
@@ -1,2 +1,3 @@
-MD5 (phpldapadmin-0.9.7.tar.gz) = a9a6f8dd289210a3d732552d38eb2d25
-SIZE (phpldapadmin-0.9.7.tar.gz) = 745974
+MD5 (phpldapadmin-0.9.7.2.tar.gz) = ac9923e37bbc232b9ca537cfd9282691
+SHA256 (phpldapadmin-0.9.7.2.tar.gz) = bcc3b608336e93f821759e2cdc2120c7abf855a962a3e1972d5a7b9df50059cd
+SIZE (phpldapadmin-0.9.7.2.tar.gz) = 819703
diff -Nur /usr/ports/net/phpldapadmin/files/pkg-deinstall.in phpldapadmin/files/pkg-deinstall.in
--- /usr/ports/net/phpldapadmin/files/pkg-deinstall.in Thu Jan 1 01:00:00 1970
+++ phpldapadmin/files/pkg-deinstall.in Thu May 20 17:31:29 2004
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/net/phpldapadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:31:29 thierry Exp $
+#
+
+case $2 in
+ POST-DEINSTALL)
+ cat <<EOMSG
+The phpldapadmin-suphp port has been deleted.
+If you are not upgrading and don't intend to use
+phpLDAPadmin any more then you may wish to delete
+the %%PLAUSR%% account, which can be done with
+the following command:
+
+ # pw userdel %%PLAUSR%%
+EOMSG
+ if [ -d %%PREFIX%%/%%PLADIR%% ] ; then
+ echo " # rm -rf %%PREFIX%%/%%PLADIR%%/"
+ fi
+ echo
+ ;;
+esac
+
+#
+# That's All Folks!
+#
diff -Nur /usr/ports/net/phpldapadmin/files/pkg-install.in phpldapadmin/files/pkg-install.in
--- /usr/ports/net/phpldapadmin/files/pkg-install.in Thu Jan 1 01:00:00 1970
+++ phpldapadmin/files/pkg-install.in Thu May 20 17:31:29 2004
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/net/phpldapadmin/pkg-install-suphp,v 1.1 2004/05/20 16:31:29 thierry Exp $
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+pladir=%%PREFIX%%/%%PLADIR%%
+plausr=%%PLAUSR%%
+plagrp=%%PLAGRP%%
+
+plagcos="phpLDAPadmin Owner"
+plahome=/nonexistent
+plashell=/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 pla user and group if they do not already exist
+
+ if pw user show -n $plausr >/dev/null 2>&1 ; then
+ echo "===> Using pre-existing user $plausr"
+ else
+ if ! pw group show -n $plagrp >/dev/null 2>&1 ; then
+ create_group $plausr $plagrp "$plagcos" $plahome \
+ $plashell
+ fi
+ create_user $plausr $plagrp "$plagcos" $plahome $plashell
+ fi
+ ;;
+ POST-INSTALL)
+
+ # Change ownership of the phpLDAPadmin directory
+
+ echo "===> Adjusting file ownership in $pladir"
+ chown -R $plausr:$plagrp $pladir || exit 1
+ ;;
+esac
+
+#
+# That's All Folks!
+#
diff -Nur /usr/ports/net/phpldapadmin/files/pkg-message.in phpldapadmin/files/pkg-message.in
--- /usr/ports/net/phpldapadmin/files/pkg-message.in Thu Jan 1 01:00:00 1970
+++ phpldapadmin/files/pkg-message.in Sun Dec 11 17:55:21 2005
@@ -0,0 +1,24 @@
+
+%%PKGNAME%% has been installed into:
+
+ %%PREFIX%%/%%PLADIR%%
+
+Please edit config.php to suit your needs.
+
+To make phpLDAPadmin available through your web site,
+I suggest that you add the following to httpd.conf:
+
+ Alias /phpldapadmin/ "%%PREFIX%%/%%PLADIR%%/htdocs"
+
+Please note: if you are upgrading from version 0.9.7 or earlier, the
+layout of the %%PKGNAME%% files has been completely reworked. You
+will need to modify your apache configuration and merge the settings
+from your original configuration file:
+
+ %%PREFIX%%/%%PLADIR%%/config.php
+
+ to
+
+ %%PREFIX%%/%%PLADIR%%/config/config.php
+
+
diff -Nur /usr/ports/net/phpldapadmin/pkg-deinstall-suphp phpldapadmin/pkg-deinstall-suphp
--- /usr/ports/net/phpldapadmin/pkg-deinstall-suphp Thu May 20 17:31:29 2004
+++ phpldapadmin/pkg-deinstall-suphp Thu Jan 1 01:00:00 1970
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net/phpldapadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:31:29 thierry Exp $
-#
-
-case $2 in
- POST-DEINSTALL)
- cat <<EOMSG
-The phpldapadmin-suphp port has been deleted.
-If you are not upgrading and don't intend to use
-phpLDAPadmin any more then you may wish to delete
-the %%PLAUSR%% account, which can be done with
-the following command:
-
- # pw userdel %%PLAUSR%%
-EOMSG
- if [ -d %%PREFIX%%/%%PLADIR%% ] ; then
- echo " # rm -rf %%PREFIX%%/%%PLADIR%%/"
- fi
- echo
- ;;
-esac
-
-#
-# That's All Folks!
-#
diff -Nur /usr/ports/net/phpldapadmin/pkg-install-suphp phpldapadmin/pkg-install-suphp
--- /usr/ports/net/phpldapadmin/pkg-install-suphp Thu May 20 17:31:29 2004
+++ phpldapadmin/pkg-install-suphp Thu Jan 1 01:00:00 1970
@@ -1,98 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net/phpldapadmin/pkg-install-suphp,v 1.1 2004/05/20 16:31:29 thierry Exp $
-#
-
-PATH=/usr/sbin:/usr/bin:/bin ; export PATH
-
-pladir=%%PREFIX%%/%%PLADIR%%
-plausr=%%PLAUSR%%
-plagrp=%%PLAGRP%%
-
-plagcos="phpLDAPadmin Owner"
-plahome=/nonexistent
-plashell=/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 pla user and group if they do not already exist
-
- if pw user show -n $plausr >/dev/null 2>&1 ; then
- echo "===> Using pre-existing user $plausr"
- else
- if ! pw group show -n $plagrp >/dev/null 2>&1 ; then
- create_group $plausr $plagrp "$plagcos" $plahome \
- $plashell
- fi
- create_user $plausr $plagrp "$plagcos" $plahome $plashell
- fi
- ;;
- POST-INSTALL)
-
- # Change ownership of the phpLDAPadmin directory
-
- echo "===> Adjusting file ownership in $pladir"
- chown -R $plausr:$plagrp $pladir || exit 1
- ;;
-esac
-
-#
-# That's All Folks!
-#
diff -Nur /usr/ports/net/phpldapadmin/pkg-message phpldapadmin/pkg-message
--- /usr/ports/net/phpldapadmin/pkg-message Tue Jun 7 09:00:11 2005
+++ phpldapadmin/pkg-message Thu Jan 1 01:00:00 1970
@@ -1,12 +0,0 @@
-
-%%PKGNAME%% has been installed into:
-
- %%PREFIX%%/%%PLADIR%%
-
-Please edit config.php to suit your needs.
-
-To make phpLDAPadmin available through your web site,
-I suggest that you add the following to httpd.conf:
-
- Alias /phpldapadmin/ "%%PREFIX%%/%%PLADIR%%/"
-
diff -Nur /usr/ports/net/phpldapadmin/pkg-plist-chunk phpldapadmin/pkg-plist-chunk
--- /usr/ports/net/phpldapadmin/pkg-plist-chunk Thu May 20 17:31:30 2004
+++ phpldapadmin/pkg-plist-chunk Sun Dec 11 16:53:30 2005
@@ -1,7 +1,7 @@
@mode 640
@group %%PLAGRP%%
- at unexec if cmp -s %D/%%PLADIR%%/config.php.example %D/%%PLADIR%%/config.php ; then rm -f %D/%%PLADIR%%/config.php ; fi
-%%PLADIR%%/config.php.example
+ at unexec if cmp -s %D/%%PLADIR%%/config/config.php.example %D/%%PLADIR%%/config/config.php ; then rm -f %D/%%PLADIR%%/config/config.php ; fi
+%%PLADIR%%/config/config.php.example
@exec [ ! -f %B/config.php ] && cp -p %B/%f %B/config.php || true
@mode
@group
--- phpldapadmin.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list