Bug 10178

Summary: apache: fix of rpm update script
Product: Mageia Reporter: Pablo Saratxaga <pablo>
Component: RPM PackagesAssignee: Guillaume Rousse <guillomovitch>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: luigiwalser, pablo
Version: CauldronKeywords: Triaged
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: apache-2.4.4-7.mga3.src.rpm CVE:
Status comment:
Bug Depends on: 10756    
Bug Blocks:    

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