Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 83187

Summary: apache-2.0.52-r3 doesn't create /var/cache/apache2 when USE="ssl"
Product: Gentoo Linux Reporter: stephen white <steve>
Component: New packagesAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description stephen white 2005-02-24 06:25:24 UTC
Same as bug report for -r1

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Actual Results:  
Same as -r1

Expected Results:  
Created the directories.
Comment 1 stephen white 2005-02-24 06:52:08 UTC
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2; do
              keepdir ${i}
              fowners apache:apache ${i}
              fperms 755 ${i}
done

There's no mkdir, so this ebuild will only work when updating an older ebuild, but not as a fresh install.
Comment 2 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-02-26 19:38:20 UTC
The ebuild uses keepdir to create these directories in src_install.


/usr/sbin/ebuild.sh:

# adds ".keep" files so that dirs aren't auto-cleaned
keepdir()
{
    dodir "$@"
    local x
    if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then                                       shift
        find "$@" -type d -printf "${D}/%p/.keep\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || die "Failed to recursive create .keep files"                          else
        for x in "$@"; do
            touch "${D}/${x}/.keep" || die "Failed to create .keep in ${D}/${x}"
        done
    fi
} 


/usr/lib/portage/bin/dodir:

for x in "$@" ; do
    install -d ${DIROPTIONS} "${D}${x}"
done


man install:

       -d, --directory
              Create each given directory and any missing
              parent   directories,  setting  the  owner,
              group and mode as given on the command line
              or to the defaults.  It also gives any par-
              ent   directories    it    creates    those
              attributes.   (This  is  different from the
              SunOS 4.x install, which gives  directories
              that it creates the default attributes.)


So, keepdir, which the ebuild currently uses, should work.
Checking my /var/db/pkg/apache-2.0.52-r3/CONTENTS file, I see:

dir /var/cache
dir /var/cache/apache2
obj /var/cache/apache2/.keep d41d8cd98f00b204e9800998ecf8427e 1109447054


Despite that the code shows everything should work fine, I uninstalled apache-2, removed /var/cache/apache2, and then reinstalled, and /var/cache/apache2 was created. Works for me... resolving.