diff options
author | thierry <thierry@FreeBSD.org> | 2005-03-06 18:48:47 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2005-03-06 18:48:47 +0800 |
commit | 5b5e8d7aad606b0cb50128f184969497f3bfe88a (patch) | |
tree | 9b25fdef56ed718c1e05bd0e901a7190527e6b32 /databases/phpmyadmin/files | |
parent | f58d509d230ebc38e175ad1a0be3119c2232928e (diff) | |
download | freebsd-ports-gnome-5b5e8d7aad606b0cb50128f184969497f3bfe88a.tar.gz freebsd-ports-gnome-5b5e8d7aad606b0cb50128f184969497f3bfe88a.tar.zst freebsd-ports-gnome-5b5e8d7aad606b0cb50128f184969497f3bfe88a.zip |
- 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
- add OPTIONS support for the PHP MCRYPT and MBSTRING modules,
both of which are can be used by recent versions of phpMyAdmin.
PR: ports/78445
Submitted by: Matthew Seaman (maintainer)
Diffstat (limited to 'databases/phpmyadmin/files')
-rw-r--r-- | databases/phpmyadmin/files/pkg-deinstall.in | 26 | ||||
-rw-r--r-- | databases/phpmyadmin/files/pkg-install.in | 98 | ||||
-rw-r--r-- | databases/phpmyadmin/files/pkg-message.in | 12 |
3 files changed, 136 insertions, 0 deletions
diff --git a/databases/phpmyadmin/files/pkg-deinstall.in b/databases/phpmyadmin/files/pkg-deinstall.in new file mode 100644 index 000000000000..4962506b4e26 --- /dev/null +++ b/databases/phpmyadmin/files/pkg-deinstall.in @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +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 --git a/databases/phpmyadmin/files/pkg-install.in b/databases/phpmyadmin/files/pkg-install.in new file mode 100644 index 000000000000..bb4180b2660f --- /dev/null +++ b/databases/phpmyadmin/files/pkg-install.in @@ -0,0 +1,98 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +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 --git a/databases/phpmyadmin/files/pkg-message.in b/databases/phpmyadmin/files/pkg-message.in new file mode 100644 index 000000000000..a9f3636dad94 --- /dev/null +++ b/databases/phpmyadmin/files/pkg-message.in @@ -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%%/" + |