Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 22406 Details for
Bug 36069
webapp-apache fixes for userpriv
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
webapp-apache.eclass
webapp-apache.eclass (text/plain), 3.56 KB, created by
Cory Visi (RETIRED)
on 2003-12-18 08:41:31 UTC
(
hide
)
Description:
webapp-apache.eclass
Filename:
MIME Type:
Creator:
Cory Visi (RETIRED)
Created:
2003-12-18 08:41:31 UTC
Size:
3.56 KB
patch
obsolete
># Author: Stuart Herbert <stuart@gentoo.org> ># ># Based on discussions held on gentoo-dev mailing list, and a bug report ># contributed by Ian Leitch <port001@w0r.mine.nu> in bug #14870, ># and robbat2's mod_php ebuild > >ECLASS=webapp-apache >INHERITED="$INHERITED $ECLASS" ># we can handle apache not installed >#DEPEND="${DEPEND} net-www/apache" > >EXPORT_FUNCTIONS pkg_setup > ># NOTE: ># ># It is deliberate that the functions in this eclass are called ># 'webapp-xxx' rather than 'webapp-apache-xxx'. This ensures ># that we can drop in eclasses for other web servers without ># having to change the ebuilds! > >function webapp-apache-detect () >{ > APACHEVER= > has_version '=net-www/apache-1*' && APACHEVER=1 && CONFVER= > has_version '=net-www/apache-2*' && use apache2 && APACHEVER=2 && CONFVER=2 > [ -z "${APACHEVER}" ] && has_version '=net-www/apache-2*' && APACHEVER=2 && CONFVER=2 > > if [ "${APACHEVER}+" = "+" ]; then > # no apache version detected > # return 1 > # we can handle apache not installed > WEBAPP_SERVER="" > else > WEBAPP_SERVER="Apache v${APACHEVER}" > fi > > APACHECONF_DIR="/etc/apache${CONFVER}/conf/" > APACHECONF="/etc/apache${CONFVER}/conf/apache${CONFVER}.conf" > > if [ -f "${APACHECONF}" ]; then > APACHECONF_COMMON="/etc/apache${CONFVER}/`grep '^Include' "${APACHECONF}" | grep -i common | head -n1 | cut -d ' ' -f 2`" > [ -z "${APACHECONF_COMMON}" ] && APACHECONF_COMMON="/etc/apache${CONFVER}/conf/commonapache${CONFVER}.conf" > else > APACHECONF_COMMON="/etc/apache${CONFVER}/conf/commonapache${CONFVER}.conf" > fi >} > > >function webapp-determine-htdocsdir () >{ > webapp-determine-installowner > > if [ -f "${APACHECONF}" ]; then > HTTPD_ROOT="`grep '^DocumentRoot' "${APACHECONF}" | cut -d ' ' -f 2`" > [ -z "${HTTPD_ROOT}" ] && HTTPD_ROOT="/var/www/localhost/htdocs/" > else > HTTPD_ROOT="/var/www/localhost/htdocs/" > fi >} > > >function webapp-determine-cgibindir () >{ > if [ -f "${APACHECONF_COMMON}" ]; then > HTTPD_CGIBIN="`grep 'ScriptAlias /cgi-bin/' "${APACHECONF_COMMON}" | cut -d ' ' -f 7`" > [ -z "${HTTPD_CGIBIN}" ] && HTTPD_CGIBIN="/var/www/localhost/cgi-bin/" > else > HTTPD_CGIBIN="/var/www/localhost/cgi-bin/" > fi >} > > >function webapp-determine-installowner () >{ > HTTPD_USER="apache" > HTTPD_GROUP="apache" >} > > ># run the function, so we know which version of apache we are using >function webapp-detect () { > # comment out return since we can handle apache not installed > # this allows us to avoid dependencies > webapp-apache-detect # || return 1 > webapp-determine-installowner > webapp-determine-htdocsdir > webapp-determine-cgibindir > > # explicit return here to ensure the return code > # from webapp-determine-cgibindir above isn't returned instead > > return 0 >} > > >function webapp-pkg_setup () >{ > if [ "$1" == "1" ]; then > msg="I couldn't find an installation of Apache" > eerror "${msg}" > die "${msg}" > fi >} > > >function webapp-pkg_install () >{ > keepdir "$HTTPD_ROOT" > fowners "$HTTPD_USER":"$HTTPD_GROUP" "$HTTPD_ROOT" > fperms 755 "$HTTPD_ROOT" >} > ># shamelessly stolen from Max Kalika <max@gentoo.org>'s horde stuff ;-) ># ># call this from your ebuild's pkg_setup() function!! > >function webapp-check-php () >{ > local missing="" > local php_use="$(</var/db/pkg/`best_version dev-php/mod_php`/USE)" > local i > > for i in $* ; do > if [ ! "`has ${i} ${php_use}`" ] ; then > missing="${missing} ${i}" > fi > done > > # let's tell the user how to fix these problems > > if [ -n "${missing}" ]; then > eerror "PHP is missing support for one or more options:" > eerror " ${missing}" > eerror > eerror "Please add '${missing}' to your USE flags, and re-install mod_php" > die "mod_php needs re-compiling with missing options" > fi > > return 0 >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36069
:
22406
|
23111