Bug 10178 - apache: fix of rpm update script
Summary: apache: fix of rpm update script
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Guillaume Rousse
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on: 10756
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-20 15:04 CEST by Pablo Saratxaga
Modified: 2013-08-10 20:50 CEST (History)
2 users (show)

See Also:
Source RPM: apache-2.4.4-7.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Pablo Saratxaga 2013-05-20 15:04:14 CEST
update from old version of apache fails if /etc/httpd/conf/sites.d dir is already present along with old webapps.d or vhosts.d dirs; so those old dirs are not deleted and it conflicts with them being symlinks in new rpm.

the current %pretransinstall script in the rpm package is:

if [ ! -d /etc/httpd/conf/sites.d ]; then
    mkdir -p /etc/httpd/conf/sites.d
    if [ -d /etc/httpd/conf/webapps.d ]; then
        mv -f /etc/httpd/conf/webapps.d/* /etc/httpd/conf/sites.d 2>/dev/null
        rmdir /etc/httpd/conf/webapps.d
    fi
    if [ -d /etc/httpd/conf/vhosts.d ]; then
        mv -f /etc/httpd/conf/vhosts.d/* /etc/httpd/conf/sites.d 2>/dev/null
        rmdir /etc/httpd/conf/vhosts.d
    fi
fi



it should be:

if [ -d /etc/httpd/conf/webapps.d ]; then
    if [ ! -d /etc/httpd/conf/sites.d ]; then
        mkdir -p /etc/httpd/conf/sites.d
    fi
    mv -f /etc/httpd/conf/webapps.d/* /etc/httpd/conf/sites.d 2>/dev/null
    rmdir /etc/httpd/conf/webapps.d
fi
if [ -d /etc/httpd/conf/vhosts.d ]; then
    if [ ! -d /etc/httpd/conf/sites.d ]; then
        mkdir -p /etc/httpd/conf/sites.d
    fi
    mv -f /etc/httpd/conf/vhosts.d/* /etc/httpd/conf/sites.d 2>/dev/null
    rmdir /etc/httpd/conf/vhosts.d
fi



thanks

Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-05-21 23:38:11 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => guillomovitch

Pablo Saratxaga 2013-06-03 12:27:47 CEST

CC: (none) => pablo
Summary: fix of rpm update script => apache: fix of rpm update script

David Walser 2013-07-23 15:02:05 CEST

Depends on: (none) => 10756

Comment 1 David Walser 2013-08-10 20:50:00 CEST
Fixed in apache-2.4.4-7.4.mga3.

Status: NEW => RESOLVED
CC: (none) => luigiwalser
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.