packages: magento/apache.conf, magento/magento.spec - merge .htaccess layin...

glen glen at pld-linux.org
Wed Jul 21 18:13:23 CEST 2010


Author: glen                         Date: Wed Jul 21 16:13:23 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- merge .htaccess laying around to main apache.conf
- update deps from install instructions

---- Files affected:
packages/magento:
   apache.conf (1.2 -> 1.3) , magento.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/magento/apache.conf
diff -u packages/magento/apache.conf:1.2 packages/magento/apache.conf:1.3
--- packages/magento/apache.conf:1.2	Wed Jul 21 16:57:39 2010
+++ packages/magento/apache.conf	Wed Jul 21 18:13:17 2010
@@ -77,7 +77,7 @@
 ############################################
 ## you can put here your magento root folder
 ## path relative to web root
-    RewriteBase /magento/
+    RewriteBase /magento
 
 ############################################
 ## workaround for HTTP authorization
@@ -96,7 +96,7 @@
 
 ############################################
 ## rewrite everything else to index.php
-    RewriteRule .* index.php [L]
+    RewriteRule ^.*$ index.php [L]
 </IfModule>
 
 <IfModule mod_expires.c>
@@ -122,3 +122,36 @@
 ## http://developer.yahoo.com/performance/rules.html#etags
     #FileETag none
 </Directory>
+
+<Directory ~ /usr/share/magento/(app|includes|media/downloadable|lib|pkginfo|var)>
+	Order deny,allow
+	Deny from all
+</Directory>
+
+<Directory /usr/share/magento/media>
+	Options All -Indexes
+	<IfModule mod_php5.c>
+	php_flag engine 0
+	</IfModule>
+
+	AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
+	Options -ExecCGI
+</Directory>
+
+<Directory /usr/share/magento/errors>
+<FilesMatch "\.(xml|phtml)$">
+    Deny from all
+</FilesMatch>
+</Directory>
+
+<Directory /usr/share/magento/downloader>
+<IfModule mod_deflate.c>
+    RemoveOutputFilter DEFLATE
+    RemoveOutputFilter GZIP
+</IfModule>
+</Directory>
+<Directory ~ /usr/share/magento/downloader/(Maged|pearlib|template)>
+	Order deny,allow
+	Deny from all
+</Directory>
+

================================================================
Index: packages/magento/magento.spec
diff -u packages/magento/magento.spec:1.2 packages/magento/magento.spec:1.3
--- packages/magento/magento.spec:1.2	Wed Jul 21 16:03:18 2010
+++ packages/magento/magento.spec	Wed Jul 21 18:13:17 2010
@@ -1,9 +1,13 @@
 # $Revision$, $Date$
+# TODO
+# - writable dirs: Ensure that the directories app/etc, var, and media are writable by the web server
+#include	/usr/lib/rpm/macros.php
+%define		php_min_version 5.2.0
 Summary:	An open-source eCommerce platform focused on flexibility and control
 Name:		magento
 Version:	1.4.0.0
-Release:	0.1
-License:	Open Software License
+Release:	0.3
+License:	Open Software License (OSL 3.0)
 Group:		Applications/WWW
 URL:		http://www.magentocommerce.com/
 Source0:	http://www.magentocommerce.com/downloads/assets/%{version}/%{name}-%{version}.tar.bz2
@@ -17,7 +21,14 @@
 Patch1:		%{name}-1.3.2.1-categories_id.patch
 Patch2:		%{name}-1.3.2.1-cron_export_fix_lang.patch
 Patch3:		%{name}-1.3.2.4-homelist_random.patch
-Requires:	php-mysql
+BuildRequires:	rpmbuild(macros) >= 1.553
+Requires:	php-common >= 4:%{php_min_version}
+Requires:	php-dom
+Requires:	php-mcrypt
+Requires:	php-mhash
+Requires:	php-pdo-mysql
+Requires:	php-simplexml
+Suggests:	php-pecl-APC
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -31,12 +42,16 @@
 
 %prep
 %setup -q -n %{name}
+%undos -f php
 #%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 rm -rf app/.svn
 
+# contents included in apache.conf
+find -name .htaccess | xargs rm
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_appdir}
@@ -74,26 +89,25 @@
 %dir %{_appdir}
 %{_appdir}/errors
 %dir %{_appdir}/app
-%{_appdir}/app/.htaccess
+%dir %{_appdir}/app/code
 %{_appdir}/app/code/*
+%dir %{_appdir}/app/design
 %{_appdir}/app/design/*
+%dir %{_appdir}/app/etc
 %attr(775,root,http) %config(noreplace) %{_appdir}/app/etc/*
+%dir %{_appdir}/app/locale
 %{_appdir}/app/locale/*
 %{_appdir}/app/Mage.php
 %dir %{_appdir}/downloader
 %{_appdir}/downloader/*
-%{_appdir}/downloader/.htaccess
+%dir %{_appdir}/includes
 %{_appdir}/includes/config.php
-%{_appdir}/includes/.htaccess
 %{_appdir}/index.php.sample
-%{_appdir}/media/downloadable/.htaccess
-%{_appdir}/media/.htaccess
 %dir %{_appdir}/pkginfo
 %{_appdir}/pkginfo/*
-%{_appdir}/pkginfo/.htaccess
 #%dir %{_appdir}/report
 #%{_appdir}/report/*
-#%{_appdir}/report/.htaccess
+%dir %{_appdir}/shell
 %{_appdir}/shell/*.php
 %dir %{_appdir}/skin
 %{_appdir}/skin/*
@@ -101,11 +115,9 @@
 %{_appdir}/js/*
 %dir %{_appdir}/install.php
 %dir %{_appdir}/lib
-%dir %{_appdir}/lib/.htaccess
 %{_appdir}/lib/*
 %attr(775,root,http) %dir %{_appdir}/media
 %attr(775,root,http) %dir %{_appdir}/var
-%attr(664,root,http) %{_appdir}/var/.htaccess
 %{_appdir}/favicon.ico
 %{_appdir}/cron.php
 %{_appdir}/cron.sh
@@ -120,7 +132,6 @@
 #%{_appdir}/STATUS.txt
 %{_appdir}/pear
 %{_appdir}/php.ini.sample
-%{_appdir}/.htaccess
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -128,6 +139,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2010/07/21 16:13:17  glen
+- merge .htaccess laying around to main apache.conf
+- update deps from install instructions
+
 Revision 1.2  2010/07/21 14:03:18  glen
 - add apache.conf
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/magento/apache.conf?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/magento/magento.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list