]> git.pld-linux.org Git - packages/drupal.git/blobdiff - drupal.spec
- add trigger for DRUPAL-SA-2006-006 (suggested by blues); rel 3
[packages/drupal.git] / drupal.spec
index 0afa3d6d1eba14ec9af860410ba26cf8e962764a..12cbb1a6ee1077ddf59c6934dabf80aa72a9f242 100644 (file)
@@ -1,12 +1,14 @@
+%define                _ver            4.6
+%define                _patchlevel     7
 Summary:       Open source content management platform
 Summary(pl):   Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
 Name:          drupal
-Version:       4.6.5
-Release:       0.14
+Version:       %{_ver}.%{_patchlevel}
+Release:       3
 License:       GPL
 Group:         Applications/WWW
 Source0:       http://drupal.org/files/projects/%{name}-%{version}.tar.gz
-# Source0-md5: 21e5e768d92fb6ecf52d56cacd37706e
+# Source0-md5: 8c15ded4450a1afcf0c5b6593dc74541
 Source1:       %{name}.conf
 Source2:       %{name}.cron
 Source3:       %{name}.PLD
@@ -24,6 +26,7 @@ URL:          http://drupal.org/
 BuildRequires: rpmbuild(macros) >= 1.264
 BuildRequires: sed >= 4.0
 Requires:      %{name}(DB_Driver) = %{version}-%{release}
+Requires:      %{name}(theme) = %{_ver}
 Requires:      apache(mod_access)
 Requires:      apache(mod_alias)
 Requires:      apache(mod_dir)
@@ -35,6 +38,7 @@ Requires:     php-pcre
 Requires:      php-xml
 Requires:      webapps
 Requires:      webserver = apache
+Obsoletes:     drupal-update
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -138,13 +142,18 @@ UWAGA: Ten sterownik nie by
 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
 ryzyko.
 
-%package update
-Summary:       Package to perform Drupal database updates
+%package themes
+Summary:       Themes distributed with Drupal
+Summary(pl):   Motywy rozprowadzane z Drupalem
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
+Provides:      drupal(theme) = %{_ver}
 
-%description update
-This package contains scripts needed to do database updates via web.
+%description themes
+This package contains themes distributed with Drupal.
+
+%description themes -l pl
+Ten pakiet zawiera motywy rozprowadzane z Drupalem.
 
 %package xmlrpc
 Summary:       XMLRPC server for Drupal
@@ -185,10 +194,10 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}}
 
 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
-cp -a update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
 
-cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
+cp -a cron.php update.php $RPM_BUILD_ROOT%{_appdir}
 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
@@ -249,10 +258,10 @@ fi
 %triggerun -- apache1
 %webapp_unregister apache %{_webapp}
 
-%triggerin -- apache >= 2.0.0
+%triggerin -- apache < 2.2.0, apache-base
 %webapp_register httpd %{_webapp}
 
-%triggerun -- apache >= 2.0.0
+%triggerun -- apache < 2.2.0, apache-base
 %webapp_unregister httpd %{_webapp}
 
 %triggerpostun -- %{name} < 4.6.4-0.4
@@ -296,12 +305,24 @@ if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
 fi
 
 if [ "$httpd_reload" ]; then
-       %service httpd reload
+       %service -q httpd reload
 fi
 if [ "$apache_reload" ]; then
-       %service apache reload
+       %service -q apache reload
 fi
 
+%triggerpostun -- %{name} < 4.6.7-2.6
+grep -c This_is_a_Drupal_security_line_do_not_remove \
+%{_sysconfdir}/apache.conf %{_sysconfdir}/httpd.conf \
+| awk -F: '/:0/{print $1}' | xargs -r \
+sed -i -e '
+/<Directory \/var\/lib\/drupal>/{
+       n
+       a\      SetHandler This_is_a_Drupal_security_line_do_not_remove
+}'
+[ ! -L /etc/httpd/webapps.d/drupal.conf ] || %service -q httpd reload
+[ ! -L /etc/apache/webapps.d/drupal.conf ] || %service -q apache reload
+
 %files
 %defattr(644,root,root,755)
 %doc *.txt README.PLD
@@ -315,12 +336,17 @@ fi
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
 
 %dir %{_appdir}
+%{_appdir}/database
 %{_appdir}/includes
+%exclude %{_appdir}/includes/database.mysql.inc
+%exclude %{_appdir}/includes/database.pgsql.inc
 %{_appdir}/modules
 %{_appdir}/scripts
-%{_appdir}/themes
+%dir %{_appdir}/themes
+%dir %{_appdir}/themes/engines
 %{_appdir}/po
-# symlink
+%{_appdir}/update.php
+# symlinks
 %{_appdir}/files
 %{_appdir}/misc
 
@@ -328,7 +354,7 @@ fi
 %{_appdir}/htdocs/*.ico
 %{_appdir}/htdocs/index.php
 %{_appdir}/htdocs/misc
-%{_appdir}/htdocs/themes
+%dir %{_appdir}/htdocs/themes
 %{_appdir}/htdocs/modules
 
 %dir %attr(775,root,http) /var/lib/%{name}
@@ -343,15 +369,18 @@ fi
 %defattr(644,root,root,755)
 %doc database/*.mysql
 %doc README.replication
+%{_appdir}/includes/database.mysql.inc
 
 %files db-pgsql
 %defattr(644,root,root,755)
 %doc database/*.pgsql
+%{_appdir}/includes/database.pgsql.inc
 
-%files update
+%files themes
 %defattr(644,root,root,755)
-%{_appdir}/htdocs/update.php
-%{_appdir}/database
+%{_appdir}/themes/[!e]*
+%{_appdir}/themes/engines/*
+%{_appdir}/htdocs/themes/*
 
 %files xmlrpc
 %defattr(644,root,root,755)
This page took 0.165848 seconds and 4 git commands to generate.