Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 141550 Details for
Bug 206973
prefix support for trac
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch rooted between the original overlay and the fixed overlay
trac-works.patch (text/plain), 9.84 KB, created by
Daniel LaMotte
on 2008-01-22 01:39:24 UTC
(
hide
)
Description:
patch rooted between the original overlay and the fixed overlay
Filename:
MIME Type:
Creator:
Daniel LaMotte
Created:
2008-01-22 01:39:24 UTC
Size:
9.84 KB
patch
obsolete
>diff -u -r trac-current/app-admin/webapp-config/webapp-config-1.50.16-r2.ebuild trac-fixes/app-admin/webapp-config/webapp-config-1.50.16-r2.ebuild >--- trac-current/app-admin/webapp-config/webapp-config-1.50.16-r2.ebuild 2007-12-31 15:39:09.065794000 -0600 >+++ trac-fixes/app-admin/webapp-config/webapp-config-1.50.16-r2.ebuild 2007-12-31 14:03:19.000000000 -0600 >@@ -22,6 +22,14 @@ > cd "${S}" > epatch "${FILESDIR}"/${P}-apache-move.patch > epatch "${FILESDIR}"/${P}-baselayout2.patch >+ epatch "${FILESDIR}"/${P}-gentoo-prefix.patch >+ eprefixify \ >+ ${S}/WebappConfig/config.py \ >+ ${S}/WebappConfig/db.py \ >+ ${S}/WebappConfig/sandbox.py \ >+ ${S}/WebappConfig/wrapper.py \ >+ ${S}/sbin/webapp-cleaner \ >+ ${S}/config/webapp-config > } > > src_install() { >@@ -31,7 +39,7 @@ > # distutils does not provide for specifying two different script install > # locations. Since we only install one script here the following should > # be ok >- distutils_src_install --install-scripts="/usr/sbin" >+ distutils_src_install --install-scripts="${EPREFIX}/usr/sbin" > > dodir /etc/vhosts > cp config/webapp-config ${ED}/etc/vhosts/ >@@ -59,7 +67,7 @@ > pkg_postinst() { > echo > elog "Now that you have upgraded webapp-config, you **must** update your" >- elog "config files in /etc/vhosts/webapp-config before you emerge any" >+ elog "config files in ${EPREFIX}/etc/vhosts/webapp-config before you emerge any" > elog "packages that use webapp-config." > echo > epause 5 >diff -u -r trac-current/eclass/webapp.eclass trac-fixes/eclass/webapp.eclass >--- trac-current/eclass/webapp.eclass 2007-12-31 15:45:05.003735000 -0600 >+++ trac-fixes/eclass/webapp.eclass 2007-12-31 15:38:31.725433000 -0600 >@@ -1,6 +1,6 @@ > # Copyright 1999-2006 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/eclass/webapp.eclass,v 1.48 2007/01/03 20:16:39 rl03 Exp $ >+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.48 2007/01/03 20:16:39 rl03 Exp $ > # > # eclass/webapp.eclass > # Eclass for installing applications to run under a web server >@@ -35,9 +35,9 @@ > > INSTALL_CHECK_FILE="installed_by_webapp_eclass" > >-ETC_CONFIG="${ROOT}/etc/vhosts/webapp-config" >-WEBAPP_CONFIG="${ROOT}/usr/sbin/webapp-config" >-WEBAPP_CLEANER="${ROOT}/usr/sbin/webapp-cleaner" >+ETC_CONFIG="${EROOT}/etc/vhosts/webapp-config" >+WEBAPP_CONFIG="${EROOT}/usr/sbin/webapp-config" >+WEBAPP_CLEANER="${EROOT}/usr/sbin/webapp-cleaner" > > # ------------------------------------------------------------------------ > # INTERNAL FUNCTION - USED BY THIS ECLASS ONLY >@@ -134,7 +134,7 @@ > MY_FILE="$(webapp_strip_cwd "${MY_FILE}")" > > elog "(config) ${MY_FILE}" >- echo "${MY_FILE}" >> ${D}/${WA_CONFIGLIST} >+ echo "${MY_FILE}" >> ${ED}/${WA_CONFIGLIST#${EPREFIX}} > done > } > >@@ -152,8 +152,9 @@ > webapp_checkfileexists "${1}" > > elog "(hook) ${1}" >- cp "${1}" "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" || die "Unable to install ${1} into ${D}/${MY_HOOKSCRIPTSDIR}/" >- chmod 555 "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" >+ cp "${1}" "${ED}/${MY_HOOKSCRIPTSDIR#${EPREFIX}}/$(basename "${1}")" || >+ die "Unable to install ${1} into ${ED}/${MY_HOOKSCRIPTSDIR#${EPREFIX}}/" >+ chmod 555 "${ED}/${MY_HOOKSCRIPTSDIR#${EPREFIX}}/$(basename "${1}")" > } > > # ------------------------------------------------------------------------ >@@ -170,7 +171,7 @@ > webapp_checkfileexists "${2}" > > elog "(info) ${2} (lang: ${1})" >- cp "${2}" "${D}/${MY_APPDIR}/postinst-${1}.txt" >+ cp "${2}" "${ED}/${MY_APPDIR#${EPREFIX}}/postinst-${1}.txt" > } > > # ------------------------------------------------------------------------ >@@ -187,7 +188,7 @@ > webapp_checkfileexists "${2}" > > elog "(info) ${2} (lang: ${1})" >- cp "${2}" "${D}/${MY_APPDIR}/postupgrade-${1}.txt" >+ cp "${2}" "${ED}/${MY_APPDIR#${EPREFIX}}/postupgrade-${1}.txt" > } > > # ------------------------------------------------------------------------ >@@ -210,24 +211,24 @@ > if [ "${1}" = "-R" ]; then > shift > for m in "$@" ; do >- for a in $(find ${D}/${m}); do >- a=${a/${D}\/\///} >- webapp_checkfileexists "${a}" "$D" >+ for a in $(find ${ED}/${m}); do >+ a=${a/${ED}\/\///} >+ webapp_checkfileexists "${a}" "${D}" > local MY_FILE="$(webapp_strip_appdir "${a}")" > MY_FILE="$(webapp_strip_cwd "${MY_FILE}")" > > elog "(server owned) ${MY_FILE}" >- echo "${MY_FILE}" >> "${D}/${WA_SOLIST}" >+ echo "${MY_FILE}" >> "${ED}/${WA_SOLIST#${EPREFIX}}" > done > done > else > for m in "$@" ; do >- webapp_checkfileexists "${m}" "$D" >+ webapp_checkfileexists "${m}" "${D}" > local MY_FILE="$(webapp_strip_appdir "${m}")" > MY_FILE="$(webapp_strip_cwd "${MY_FILE}")" > > elog "(server owned) ${MY_FILE}" >- echo "${MY_FILE}" >> "${D}/${WA_SOLIST}" >+ echo "${MY_FILE}" >> "${ED}/${WA_SOLIST#${EPREFIX}}" > done > fi > } >@@ -266,7 +267,7 @@ > # the other scripts that also rely upon these names > > elog "(${1}) config file '${my_file}'" >- cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}" >+ cp "${2}" "${ED}/${MY_SERVERCONFIGDIR#${EPREFIX}}/${my_file}" > } > > # ------------------------------------------------------------------------ >@@ -290,8 +291,9 @@ > # scripts for specific database engines go into their own subdirectory > # just to keep things readable on the filesystem > >- if [ ! -d "${D}/${MY_SQLSCRIPTSDIR}/${1}" ]; then >- mkdir -p "${D}/${MY_SQLSCRIPTSDIR}/${1}" || die "unable to create directory ${D}/${MY_SQLSCRIPTSDIR}/${1}" >+ if [ ! -d "${ED}/${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}" ]; then >+ mkdir -p "${ED}/${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}" || \ >+ die "unable to create directory ${ED}/${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}" > fi > > # warning: >@@ -303,13 +305,13 @@ > if [ -n "${3}" ]; then > # yes we are > elog "(${1}) upgrade script from ${PN}-${PVR} to ${3}" >- cp "${2}" "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" >- chmod 600 "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" >+ cp "${2}" "${ED}${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}/${3}_to_${PVR}.sql" >+ chmod 600 "${ED}${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}/${3}_to_${PVR}.sql" > else > # no, we are not > elog "(${1}) create script for ${PN}-${PVR}" >- cp "${2}" "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" >- chmod 600 "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" >+ cp "${2}" "${ED}/${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}/${PVR}_create.sql" >+ chmod 600 "${ED}/${MY_SQLSCRIPTSDIR#${EPREFIX}}/${1}/${PVR}_create.sql" > fi > } > >@@ -323,13 +325,13 @@ > > function webapp_src_install () > { >- chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${D}/" >- chmod -R u-s "${D}/" >- chmod -R g-s "${D}/" >- >- keepdir "${MY_PERSISTDIR}" >- fowners "root:0" "${MY_PERSISTDIR}" >- fperms 755 "${MY_PERSISTDIR}" >+ #chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${ED}/" >+ chmod -R u-s "${ED}/" >+ chmod -R g-s "${ED}/" >+ >+ keepdir "${MY_PERSISTDIR#${EPREFIX}}" >+ fowners "root:0" "${MY_PERSISTDIR#${EPREFIX}}" >+ fperms 755 "${MY_PERSISTDIR#${EPREFIX}}" > > # to test whether or not the ebuild has correctly called this function > # we add an empty file to the filesystem >@@ -338,7 +340,7 @@ > # no longer rely on Portage calling both webapp_src_install() and > # webapp_pkg_postinst() within the same shell process > >- touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" >+ touch "${ED}/${MY_APPDIR#${EPREFIX}}/${INSTALL_CHECK_FILE}" > } > > # ------------------------------------------------------------------------ >@@ -367,7 +369,7 @@ > # non-webapp-config solution? > > if ! use vhosts ; then >- local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}" >+ local my_dir="${EROOT}${VHOST_ROOT}/${MY_HTDOCSBASE#${EPREFIX}}/${PN}" > local my_output > > if [ -d "${my_dir}" ] ; then >@@ -433,14 +435,14 @@ > { > # create the directories that we need > >- dodir "${MY_HTDOCSDIR}" >- dodir "${MY_HOSTROOTDIR}" >- dodir "${MY_CGIBINDIR}" >- dodir "${MY_ICONSDIR}" >- dodir "${MY_ERRORSDIR}" >- dodir "${MY_SQLSCRIPTSDIR}" >- dodir "${MY_HOOKSCRIPTSDIR}" >- dodir "${MY_SERVERCONFIGDIR}" >+ dodir "${MY_HTDOCSDIR#${EPREFIX}}" >+ dodir "${MY_HOSTROOTDIR#${EPREFIX}}" >+ dodir "${MY_CGIBINDIR#${EPREFIX}}" >+ dodir "${MY_ICONSDIR#${EPREFIX}}" >+ dodir "${MY_ERRORSDIR#${EPREFIX}}" >+ dodir "${MY_SQLSCRIPTSDIR#${EPREFIX}}" >+ dodir "${MY_HOOKSCRIPTSDIR#${EPREFIX}}" >+ dodir "${MY_SERVERCONFIGDIR#${EPREFIX}}" > } > > function webapp_pkg_postinst () >@@ -449,7 +451,7 @@ > > # sanity checks, to catch bugs in the ebuild > >- if [ ! -f "${ROOT}${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]; then >+ if [ ! -f "${EROOT}${MY_APPDIR#${EPREFIX}}/${INSTALL_CHECK_FILE}" ]; then > eerror > eerror "This ebuild did not call webapp_src_install() at the end" > eerror "of the src_install() function" >@@ -463,7 +465,7 @@ > fi > > # if 'vhosts' is not set in your USE flags, we install a copy of >- # this application in ${ROOT}/var/www/localhost/htdocs/${PN}/ for you >+ # this application in ${EROOT}/var/www/localhost/htdocs/${PN}/ for you > > if ! use vhosts ; then > echo >diff -u -r trac-current/www-apps/trac/trac-0.10.4.ebuild trac-fixes/www-apps/trac/trac-0.10.4.ebuild >--- trac-current/www-apps/trac/trac-0.10.4.ebuild 2007-12-31 15:38:59.052266000 -0600 >+++ trac-fixes/www-apps/trac/trac-0.10.4.ebuild 2007-12-31 15:26:44.000000000 -0600 >@@ -105,6 +105,12 @@ > webapp_pkg_setup > } > >+src_unpack() { >+ unpack "${A}" >+ cd ${S} >+ epatch ${FILESDIR}/${P}-sqlite-backend.patch >+} >+ > src_install () { > # project environments might go in here > keepdir /var/lib/trac >@@ -122,10 +128,10 @@ > # if needed, install cgi/fcgi scripts for webapp-config > local my_dir=${ED}/usr/share/trac > if use cgi ; then >- mv ${my_dir}/cgi-bin/trac.cgi ${ED}${MY_CGIBINDIR} || die >+ mv ${my_dir}/cgi-bin/trac.cgi ${ED}${MY_CGIBINDIR#${EPREFIX}} || die > fi > if use fastcgi ; then >- mv ${my_dir}/cgi-bin/trac.fcgi ${ED}${MY_CGIBINDIR} || die >+ mv ${my_dir}/cgi-bin/trac.fcgi ${ED}${MY_CGIBINDIR#${EPREFIX}} || die > fi > rm -rf ${my_dir}/cgi-bin || die > >@@ -134,7 +140,7 @@ > done > > # copy graphics, css & js >- cp -r htdocs/* ${ED}/${MY_HTDOCSDIR} >+ cp -r htdocs/* ${ED}/${MY_HTDOCSDIR#${EPREFIX}} > > webapp_src_install >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206973
:
141544
|
141548
| 141550