diff options
author | tron <tron@pkgsrc.org> | 2012-08-28 15:54:54 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2012-08-28 15:54:54 +0000 |
commit | 6719350bf81b917d01db0eeaaf4c0b88a14b0f2b (patch) | |
tree | ef9583ac4ab149c3a2817439abaf1b9633b51daa | |
parent | d6a62e88dae7f7bdff7b9a983b6136b1c2bda56e (diff) | |
download | pkgsrc-6719350bf81b917d01db0eeaaf4c0b88a14b0f2b.tar.gz |
Fix last commit:
- The setup scripts *must* not get write access to the real "config.inc.php".
Allow then instead to generate a file in "/var/phpmyadmin" which the
administrator copies it place manually. This is the intended procedure
as documented by the developers.
- Restore the normal "config.inc.php" to its original location. Not sure
why I didn't encounter any problems during testing the last change
because phpMyAdmin isn't working very well without this.
While here change dependences to require both the "php-mysql" and the
"php-mysqli" packages. Old installations will use the former, new
installation will use the later.
Bump the package revision again because of these changes.
-rw-r--r-- | databases/phpmyadmin/INSTALL | 19 | ||||
-rw-r--r-- | databases/phpmyadmin/Makefile | 17 | ||||
-rw-r--r-- | databases/phpmyadmin/PLIST | 11 | ||||
-rw-r--r-- | databases/phpmyadmin/patches/patch-libraries_vendor_config.php | 15 |
4 files changed, 45 insertions, 17 deletions
diff --git a/databases/phpmyadmin/INSTALL b/databases/phpmyadmin/INSTALL new file mode 100644 index 00000000000..c5022b61616 --- /dev/null +++ b/databases/phpmyadmin/INSTALL @@ -0,0 +1,19 @@ +# $NetBSD: INSTALL,v 1.3 2012/08/28 15:54:54 tron Exp $ + +APACHE_USER=@APACHE_USER@ +APACHE_GROUP=@APACHE_GROUP@ +PMSETUPDIR=@PMSETUPDIR@ +PMSETUPFILE=@PMSETUPFILE@ + +case ${STAGE} in +POST-INSTALL) + if [ ! -f ${PMSETUPFILE} ]; then + ${MKDIR} ${PMSETUPDIR} + ${CHOWN} ${APACHE_USER}:${APACHE_GROUP} ${PMSETUPDIR} + ${CHMOD} 755 ${PMSETUPDIR} + ${TOUCH} ${PMSETUPFILE} + ${CHOWN} ${APACHE_USER}:${APACHE_GROUP} ${PMSETUPFILE} + ${CHMOD} 644 ${PMSETUPFILE} + fi + ;; +esac diff --git a/databases/phpmyadmin/Makefile b/databases/phpmyadmin/Makefile index ac10f5cdd25..0cf5bf5d1cf 100644 --- a/databases/phpmyadmin/Makefile +++ b/databases/phpmyadmin/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.105 2012/08/27 17:11:34 tron Exp $ +# $NetBSD: Makefile,v 1.106 2012/08/28 15:54:54 tron Exp $ DISTNAME= phpMyAdmin-${DIST_VERSION}-all-languages PKGNAME= phpmyadmin-${DIST_VERSION:S/-//} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= databases www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=phpmyadmin/} EXTRACT_SUFX= .tar.xz @@ -17,18 +17,21 @@ DEPENDS+= ${PHP_PKG_PREFIX}-zip>=5.2.0:../../archivers/php-zip DEPENDS+= ${PHP_PKG_PREFIX}-zlib>=5.2.0:../../archivers/php-zlib DEPENDS+= ${PHP_PKG_PREFIX}-mbstring>=5.2.0:../../converters/php-mbstring DEPENDS+= ${PHP_PKG_PREFIX}-gettext>=5.2.0:../../devel/php-gettext -DEPENDS+= ${PHP_PKG_PREFIX}-mysql{,i}>=5.2.0:../../databases/php-mysql +DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=5.2.0:../../databases/php-mysql +DEPENDS+= ${PHP_PKG_PREFIX}-mysqli>=5.2.0:../../databases/php-mysqli DEPENDS+= ${PHP_PKG_PREFIX}-gd>=5.2.0:../../graphics/php-gd DEPENDS+= ${PHP_PKG_PREFIX}-mcrypt>=5.2.0:../../security/php-mcrypt DEPENDS+= ${PHP_PKG_PREFIX}-json>=5.2.0:../../textproc/php-json PKG_DESTDIR_SUPPORT= user-destdir +FILES_SUBST+= APACHE_GROUP=${APACHE_GROUP} APACHE_USER=${APACHE_USER} +FILES_SUBST+= PMSETUPDIR=${PMSETUPDIR} PMSETUPFILE=${PMSETUPFILE} PLIST_SUBST+= DIST_VERSION=${DIST_VERSION:Q} MESSAGE_SUBST+= CONF_INC_PHP=${CONF_INC_PHP} PMCONFFILE=${PMCONFFILE:Q} \ EXDIR=${EXDIR:Q} -CONF_INC_PHP= ${PREFIX}/share/phpmyadmin/config/config.inc.php +CONF_INC_PHP= ${PREFIX}/share/phpmyadmin/config.inc.php DIST_VERSION= 3.5.2.2 DOC_FILES= ChangeLog Documentation.txt LICENSE README \ RELEASE-DATE-${DIST_VERSION} @@ -44,6 +47,8 @@ PKG_GROUPS_VARS+= APACHE_GROUP EXDIR= ${PREFIX}/share/examples/phpmyadmin PMCONFFILE= ${PKG_SYSCONFDIR}/config.inc.php +PMSETUPDIR= ${VARBASE}/phpmyadmin +PMSETUPFILE= ${PMSETUPDIR}/config.inc.php PMDIR= ${PREFIX}/share/phpmyadmin PKG_SYSCONFSUBDIR?= phpmyadmin @@ -234,7 +239,7 @@ do-configure: ${SED} -e "s|@PMDIR@|${PMDIR}|g" ${FILESDIR}/phpmyadmin.conf \ >${WRKDIR}/phpmyadmin.conf cd ${WRKSRC}/libraries; \ - ${SED} -e "s#@@PMCONFFILE@@#${PMCONFFILE}#" vendor_config.php \ + ${SED} -e "s#@@PMSETUPFILE@@#${PMSETUPFILE}#" vendor_config.php \ >vendor_config.php.pkgsrc do-install: @@ -245,6 +250,7 @@ do-install: ${MV} ${DESTDIR}${PREFIX}/share/phpmyadmin/config.sample.inc.php \ ${DESTDIR}${EXDIR}/config.inc.php + ${INSTALL_DATA} ${WRKSRC}/examples/* ${DESTDIR}${EXDIR} ${INSTALL_DATA} ${WRKSRC}/Documentation.html ${DESTDIR}${PMDIR} @@ -266,6 +272,7 @@ do-install: cd ${WRKSRC} && \ ${INSTALL_DATA} ${DOC_FILES} ${DESTDIR}${PREFIX}/share/doc/phpmyadmin ${INSTALL_DATA} ${WRKDIR}/phpmyadmin.conf ${DESTDIR}${EXDIR}/apache.conf + ${LN} -s ${PMCONFFILE} ${DESTDIR}${CONF_INC_PHP} cd ${DESTDIR}${PREFIX}/share/phpmyadmin/libraries; \ ${MV} -f vendor_config.php.pkgsrc vendor_config.php diff --git a/databases/phpmyadmin/PLIST b/databases/phpmyadmin/PLIST index 71b35556a4a..80329ed2ac5 100644 --- a/databases/phpmyadmin/PLIST +++ b/databases/phpmyadmin/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.29 2012/08/27 17:11:34 tron Exp $ +@comment $NetBSD: PLIST,v 1.30 2012/08/28 15:54:54 tron Exp $ share/doc/phpmyadmin/ChangeLog share/doc/phpmyadmin/Documentation.txt share/doc/phpmyadmin/LICENSE @@ -6,6 +6,14 @@ share/doc/phpmyadmin/README share/doc/phpmyadmin/RELEASE-DATE-${DIST_VERSION} share/examples/phpmyadmin/apache.conf share/examples/phpmyadmin/config.inc.php +share/examples/phpmyadmin/config.manyhosts.inc.php +share/examples/phpmyadmin/create_tables.sql +share/examples/phpmyadmin/create_tables_drizzle.sql +share/examples/phpmyadmin/openid.php +share/examples/phpmyadmin/signon-script.php +share/examples/phpmyadmin/signon.php +share/examples/phpmyadmin/swekey.sample.conf +share/examples/phpmyadmin/upgrade_tables_mysql_4_1_2+.sql share/phpmyadmin/Documentation.html share/phpmyadmin/Documentation.txt share/phpmyadmin/browse_foreigners.php @@ -13,6 +21,7 @@ share/phpmyadmin/bs_disp_as_mime_type.php share/phpmyadmin/bs_play_media.php share/phpmyadmin/changelog.php share/phpmyadmin/chk_rel.php +share/phpmyadmin/config.inc.php share/phpmyadmin/db_create.php share/phpmyadmin/db_datadict.php share/phpmyadmin/db_events.php diff --git a/databases/phpmyadmin/patches/patch-libraries_vendor_config.php b/databases/phpmyadmin/patches/patch-libraries_vendor_config.php index 014309f22b3..98bc84a0546 100644 --- a/databases/phpmyadmin/patches/patch-libraries_vendor_config.php +++ b/databases/phpmyadmin/patches/patch-libraries_vendor_config.php @@ -1,23 +1,16 @@ -$NetBSD: patch-libraries_vendor_config.php,v 1.1 2012/08/27 17:11:34 tron Exp $ +$NetBSD: patch-libraries_vendor_config.php,v 1.2 2012/08/28 15:54:54 tron Exp $ Configure location of the configuration file in the vendor specific section as suggested by the phpMyAdmin documentation. --- libraries/vendor_config.php.orig 2012-08-12 14:45:56.000000000 +0100 -+++ libraries/vendor_config.php 2012-08-27 17:59:25.000000000 +0100 -@@ -25,13 +25,13 @@ ++++ libraries/vendor_config.php 2012-08-28 16:44:12.000000000 +0100 +@@ -25,7 +25,7 @@ /** * Path to config file generated using setup script. */ -define('SETUP_CONFIG_FILE', './config/config.inc.php'); -+define('SETUP_CONFIG_FILE', '@@PMCONFFILE@@'); ++define('SETUP_CONFIG_FILE', '@@PMSETUPFILE@@'); /** * Whether setup requires writable directory where config - * file will be generated. - */ --define('SETUP_DIR_WRITABLE', true); -+define('SETUP_DIR_WRITABLE', false); - - /** - * Directory where configuration files are stored. |