ports/179023: [PATCH] www/magento: update to 1.7.0.2
Melvyn Sopacua
melvyn at magemana.nl
Mon May 27 20:00:02 UTC 2013
>Number: 179023
>Category: ports
>Synopsis: [PATCH] www/magento: update to 1.7.0.2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon May 27 20:00:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Melvyn Sopacua
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD fire.magemana.nl 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
- Update to 1.7.0.2 (contains security fixes)
- Harden installation by making only required files/directories writable.
- Update pkg-message to say Magento and not Moodle. Also reference
app/etc/local.xml where config.php is said.
- Update pkg-message with a note about app/etc being writeable for installer.
- Add required dependency php5-ctype.
- Fix installation issue with PHP >= 5.4 (backwards compatible)
- Backport a fix for MySQL 5.6 engine check now that have_innodb is
removed [1].
Buildarchive: https://redports.org/buildarchive/20130526215301-3270/
[1] <https://github.com/erenkarayigit/magento2/commit/3f3eb37e91390ccd74fb9428c3174ba16dc5f832>
>How-To-Repeat:
>Fix:
--- magento.diff begins here ---
diff -r f16e268d010f www/magento/Makefile
--- a/www/magento/Makefile Sun May 26 09:12:26 2013 +0000
+++ b/www/magento/Makefile Sun May 26 22:37:03 2013 +0200
@@ -6,14 +6,15 @@
#
PORTNAME= magento
-PORTVERSION= 1.7.0.0
+PORTVERSION= 1.7.0.2
CATEGORIES= www finance
-MASTER_SITES= http://www.magentocommerce.com/downloads/assets/1.7.0.0/
+MASTER_SITES= http://www.magentocommerce.com/downloads/assets/${PORTVERSION}/
MAINTAINER= wen at FreeBSD.org
COMMENT= A feature-rich eCommerce platform
-USE_PHP= pdo_mysql hash gd iconv curl dom soap simplexml mcrypt mysql
+USE_PHP= pdo_mysql hash gd iconv curl dom soap simplexml mcrypt mysql \
+ ctype
WRKSRC= ${WRKDIR}/magento
.include <bsd.port.pre.mk>
@@ -22,6 +23,8 @@
PLIST= ${WRKDIR}/plist
SUB_FILES= pkg-message
SUB_LIST= MAGENTODIR=${MAGENTODIR}
+WRITABLE= var media app/etc/modules
+EXECUTABLE= cron.sh mage
MAGENTODIR?= www/magento
@@ -32,12 +35,20 @@
do-install:
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${PREFIX}/${MAGENTODIR}
-
- @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${MAGENTODIR}
- @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${MAGENTODIR}' \
+.for _dir in ${WRITABLE}
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${MAGENTODIR}/${_dir}
+ @${FIND} ${PREFIX}/${MAGENTODIR}/${_dir} -exec ${CHMOD} u+w {} +
+ @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${MAGENTODIR}/${_dir}' \
>> ${TMPPLIST}
- ${CHMOD} -R 755 ${PREFIX}/${MAGENTODIR}
- @${ECHO_CMD} '@exec ${CHMOD} -R 755 ${PREFIX}/${MAGENTODIR}' >> ${TMPPLIST}
+ @${ECHO_CMD} '@exec ${FIND} ${PREFIX}/${MAGENTODIR}/${_dir} -exec ${CHMOD} u+w {} +' \
+ >> ${TMPPLIST}
+.endfor
+.for _prog in ${EXECUTABLE}
+ @${CHMOD} 555 ${PREFIX}/${MAGENTODIR}/${_prog}
+ @${ECHO_CMD} '@exec ${CHMOD} 555 ${PREFIX}/${MAGENTODIR}/${_prog}' >> ${PLIST}
+.endfor
+ @${CHMOD} 777 ${PREFIX}/${MAGENTODIR}/app/etc
+ @${ECHO_CMD} '@exec ${CMMOD} 777 ${PREFIX}/${MAGENTODIR}/${_prog}' >> ${PLIST}
post-install:
@${CAT} ${PKGMESSAGE}
diff -r f16e268d010f www/magento/distinfo
--- a/www/magento/distinfo Sun May 26 09:12:26 2013 +0000
+++ b/www/magento/distinfo Sun May 26 22:37:03 2013 +0200
@@ -1,2 +1,2 @@
-SHA256 (magento-1.7.0.0.tar.gz) = f56a55ce2801c454cff8ab18258d89c7a84fd52d397c60816c76de59e9bad3e4
-SIZE (magento-1.7.0.0.tar.gz) = 17839115
+SHA256 (magento-1.7.0.2.tar.gz) = d1cc07bc1ed59b3f33240e38d1fe3c60d03a03162c8fcb932700cf16a137e0b9
+SIZE (magento-1.7.0.2.tar.gz) = 17891797
diff -r f16e268d010f www/magento/files/pkg-message.in
--- a/www/magento/files/pkg-message.in Sun May 26 09:12:26 2013 +0000
+++ b/www/magento/files/pkg-message.in Sun May 26 22:37:03 2013 +0200
@@ -1,4 +1,4 @@
-POST-INSTALL CONFIGURATION FOR MOODLE
+POST-INSTALL CONFIGURATION FOR MAGENTO
=====================================
1) Create a MySQL user and a database for Magento to store all
@@ -19,8 +19,11 @@
3) Visit your Magento site with a browser (i.e.,
http://your.server.com/magento/), and you should
be taken to the install.php script, which will lead
- you through creating a config.php file and then
- setting up Moodle, creating an admin account, etc.
+ you through creating the app/etc/local.xml file and then
+ setting up Magento, creating an admin account, etc.
+
+4) After installation consider setting app/etc back to mode 755 for security
+ reasons.
For more information, see the INSTALL DOCUMENTATION:
--- magento.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list