Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20686 - Not all files from ebuild cacti-0.6.8a.ebuild are owned by apache-user.
Summary: Not all files from ebuild cacti-0.6.8a.ebuild are owned by apache-user.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-09 05:52 UTC by Rigo
Modified: 2003-06-13 13:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cacti-0.6.8a-r1.ebuild (cacti-0.6.8a-r1.ebuild,2.25 KB, text/plain)
2003-05-09 05:53 UTC, Rigo
Details
cacti-0.6.8a-r1.ebuild (cacti-0.6.8a-r1.ebuild,2.25 KB, text/plain)
2003-05-09 05:55 UTC, Rigo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rigo 2003-05-09 05:52:53 UTC
diff -ur cacti-0.6.8a.ebuild cacti-0.6.8a-r1.ebuild
--- cacti-0.6.8a.ebuild 2003-05-09 12:22:34.000000000 +0200
+++ cacti-0.6.8a-r1.ebuild      2003-05-09 12:35:20.000000000 +0200
@@ -6,28 +6,42 @@
 HOMEPAGE="http://www.raxnet.net/products/cacti/"
 SRC_URI="http://www.raxnet.net/downloads/${P}.tar.gz"
                                                                               
                                                                        
-IUSE="snmp"
+IUSE="snmp apache2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="x86 ~ppc ~sparc ~alpha"
                                                                               
                                                                        
-DEPEND=""
+DEPEND="app-text/dos2unix"
 RDEPEND="net-www/apache
        snmp? ( net-analyzer/ucd-snmp )
        dev-db/mysql
-       dev-php/php
+       dev-db/php
        dev-php/mod_php"
                                                                               
                                                                        
-INSTALL_DEST="`grep '^DocumentRoot' /etc/apache/conf/apache.conf | cut -d\  -f2`"
-[ -z "${INSTALL_DEST}" ] && INSTALL_DEST="/home/httpd/htdocs"
-INSTALL_DEST="${INSTALL_DEST}/cacti"
+use apache2 && HTTPD_ROOT="`grep '^DocumentRoot' /etc/apache2/conf/apache2.conf
| cut -d\  -f2`"
+use apache2 && HTTPD_USER="`grep '^User' /etc/apache2/conf/commonapache2.conf |
cut -d \  -f2`"
+use apache2 && HTTPD_GROUP="`grep '^Group' /etc/apache2/conf/commonapache2.conf
| cut -d \  -f2`"
+
+use apache2 || HTTPD_ROOT="`grep '^DocumentRoot' /etc/apache/conf/apache.conf |
cut -d\  -f2`"
+use apache2 || HTTPD_USER="`grep '^User' /etc/apache/conf/commonapache.conf |
cut -d \  -f2`"
+use apache2 || HTTPD_GROUP="`grep '^Group' /etc/apache/conf/commonapache.conf |
cut -d \  -f2`"
+
+[ -z "${HTTPD_ROOT}" ] && HTTPD_ROOT="/home/httpd/htdocs"
+[ -z "${HTTPD_USER}" ] && HTTPD_USER="apache"
+[ -z "${HTTPD_GROUP}" ] && HTTPD_GROUP="apache"
+
+INSTALL_DEST="${HTTPD_ROOT}/cacti"
                                                                               
                                                                        
 src_install() {
        dodoc docs/{CHANGELOG,CONTRIB,README}
        rm README LICENSE docs/{CHANGELOG,CONTRIB,README}
                                                                               
                                                                        
        dodir ${INSTALL_DEST}
-       chown apache.apache * -R
+       einfo "Converting files to Unix-format"
+       find ${S} -type f -name '*.php' | while read f; do
+               dos2unix -q ${f} && einfo "${f} Converted." || ewarn "${f} Not
Converted."
+       done
+       chown -R ${HTTPD_USER}.${HTTPD_GROUP} * || ewarn "Are all files owned by
${HTTPD_USER} ?"
        mv * ${D}/${INSTALL_DEST}/
 }


Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
1. Added IUSE apache2
2. Changed "chown * -R"  to "chown -R *"
3. Uses dos2unix on all .php files



I saw the bug related to apache2, just added some minor additions. Hope you like it,

Rogi
Comment 1 Rigo 2003-05-09 05:53:46 UTC
Created attachment 11716 [details]
cacti-0.6.8a-r1.ebuild
Comment 2 Rigo 2003-05-09 05:55:57 UTC
Created attachment 11717 [details]
cacti-0.6.8a-r1.ebuild

Minor correction (dev-php instead of dev-db (see diff))
Comment 3 Jon Portnoy (RETIRED) gentoo-dev 2003-05-09 11:11:44 UTC
vapier: I know you're in Europe, but this is probably minor enough that it can wait until you get back, so you get stuck with it anyway.. :)