From e078f69d56249dceafa9a915e5ecd8b1880592d32bc00a9f1708b3c9b4135f98 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Fri, 12 Jun 2015 07:59:31 +0000 Subject: [PATCH] Accepting request 311566 from home:pgajdos - dropped 2.0 -> 2.2 modules transition during upgrade * apache-20-22-upgrade renamed to apache-22-24-upgrade - apache-*-upgrade script is called in %posttrans now [bnc#927223] OBS-URL: https://build.opensuse.org/request/show/311566 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=450 --- apache-20-22-upgrade | 82 -------------------------------------------- apache-22-24-upgrade | 22 ++++++++++++ apache2.changes | 7 ++++ apache2.spec | 10 +++--- 4 files changed, 35 insertions(+), 86 deletions(-) delete mode 100644 apache-20-22-upgrade create mode 100644 apache-22-24-upgrade diff --git a/apache-20-22-upgrade b/apache-20-22-upgrade deleted file mode 100644 index c119eb6..0000000 --- a/apache-20-22-upgrade +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# obsolete 2.0 modules -> 2.2 modules - -echo 'looking for old 2.0 modules to be renamed...' - -if a2enmod -q auth; then - echo 'auth -> auth_basic authn_file' - - a2dismod auth - a2enmod auth_basic - a2enmod authn_file - a2enmod authz_groupfile - a2enmod authz_default - a2enmod authz_user - cat <<-EOF - - - !!!ATTENTION!!! - - If you use basic authentication, you will need to update your - configuration. Typically, you need to add - AuthBasicProvider file - (example for file-based authentication) below "AuthType Basic". - - !!!ATTENTION!!! - - - EOF - -fi - -if a2enmod -q access; then - echo 'access -> authz_host' - a2dismod access - a2enmod authz_host -fi - -if a2enmod -q auth_dbm; then - echo 'auth_dbm -> authn_dbm' - a2dismod auth_dbm - a2enmod authn_dbm -fi - -if a2enmod -q imap; then - echo 'imap -> imagemap' - a2dismod imap - a2enmod imagemap -fi - -if a2enmod -q image_map; then - echo 'image_map -> imagemap' - a2dismod image_map - a2enmod imagemap -fi - -if a2enmod -q auth_ldap; then - echo 'auth_ldap -> mod_authnz_ldap' - a2dismod auth_ldap - a2enmod mod_authnz_ldap -fi - -for module in mod_authn_default mod_authz_default mod_mem_cache authz_default; do - if a2enmod -q "$module"; then - echo "!!ATTENTION! $module was removed from apache version 2.4 or later, CHECK YOUR CONFIGURATION!!!" - a2dismod "$module" - fi -done - -if ! a2enmod -q authn_core; then - a2enmod authn_core -fi - -if ! a2enmod -q authz_core; then - a2enmod authz_core -fi - -if ! a2enmod -q log_config; then - a2enmod log_config -fi - -echo 'Done.' diff --git a/apache-22-24-upgrade b/apache-22-24-upgrade new file mode 100644 index 0000000..fe90c32 --- /dev/null +++ b/apache-22-24-upgrade @@ -0,0 +1,22 @@ +#!/bin/bash + +# obsolete 2.2 modules -> 2.4 modules + +for module in mod_authn_default mod_authz_default mod_mem_cache authz_default authn_default mem_cache; do + if a2enmod -q "$module"; then + echo "!!ATTENTION! $module was removed from apache version 2.4 or later, CHECK YOUR CONFIGURATION!!!" + a2dismod "$module" + fi +done + +if ! a2enmod -q authn_core; then + a2enmod authn_core +fi + +if ! a2enmod -q authz_core; then + a2enmod authz_core +fi + +if ! a2enmod -q log_config; then + a2enmod log_config +fi diff --git a/apache2.changes b/apache2.changes index 497ec7b..21635bc 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 11 09:09:05 UTC 2015 - pgajdos@suse.com + +- dropped 2.0 -> 2.2 modules transition during upgrade + * apache-20-22-upgrade renamed to apache-22-24-upgrade +- apache-*-upgrade script is called in %posttrans now [bnc#927223] + ------------------------------------------------------------------- Tue Jun 9 09:04:32 UTC 2015 - pgajdos@suse.com diff --git a/apache2.spec b/apache2.spec index e231934..beba9a7 100644 --- a/apache2.spec +++ b/apache2.spec @@ -105,7 +105,7 @@ Source131: apache2-vhost-ssl.template Source132: apache2-default-vhost.conf Source133: apache2-default-vhost-ssl.conf Source140: apache2-check_forensic -Source141: apache-20-22-upgrade +Source141: apache-22-24-upgrade Source142: start_apache2 Source143: apache2-systemd-ask-pass Source144: apache2.service @@ -544,7 +544,7 @@ install -m 755 $RPM_SOURCE_DIR/load_configuration %{buildroot}/%{_datadir}/%{nam install -m 755 $RPM_SOURCE_DIR/find_mpm %{buildroot}/%{_datadir}/%{name}/ install -m 755 $RPM_SOURCE_DIR/get_includes %{buildroot}/%{_datadir}/%{name}/ install -m 755 $RPM_SOURCE_DIR/find_httpd_includes %{buildroot}/%{_datadir}/%{name}/ -install -m 755 $RPM_SOURCE_DIR/apache-20-22-upgrade %{buildroot}/%{_datadir}/%{name}/ +install -m 755 $RPM_SOURCE_DIR/apache-22-24-upgrade %{buildroot}/%{_datadir}/%{name}/ sed 's+%{_prefix}/lib+%{_libdir}+' $RPM_SOURCE_DIR/get_module_list \ > %{buildroot}/%{_datadir}/%{name}/get_module_list chmod 755 %{buildroot}/%{_datadir}/%{name}/get_module_list @@ -822,7 +822,7 @@ mv %{buildroot}/%{sysconfdir}/original . %{_libdir}/%{name}/mod_*.so %dir %{installbuilddir} %dir %{_datadir}/%{name} -%{_datadir}/%{name}/apache-20-22-upgrade +%{_datadir}/%{name}/apache-22-24-upgrade %{_datadir}/%{name}/get_module_list %{_datadir}/%{name}/get_includes %{_datadir}/%{name}/find_httpd_includes @@ -1354,10 +1354,12 @@ if [ $1 -gt 1 ] ; then fi rm -rf $tmpdir -%{_datadir}/%{name}/apache-20-22-upgrade %{_datadir}/%{name}/get_module_list >/dev/null 2>&1 exit 0 +%posttrans +%{_datadir}/%{name}/apache-22-24-upgrade + %verifyscript %verify_permissions -e %{_sbindir}/suexec