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

Bug 352266

Summary: dev-db/redis ecopy successful (with mods)
Product: Gentoo/Alt Reporter: Sven Schwyn (svoop) <gentoo>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: enhancement CC: lu_zero, robbat2
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ecopied and modded redis ebuild
ecopied and modded redis ebuild

Description Sven Schwyn (svoop) 2011-01-20 18:58:15 UTC
I've ecopied redis and modified the result in order for it to compile on my prefixed Gentoo on Mac OS X (line 66 "fowners" and line 79 "diropts").

Reproducible: Always

Steps to Reproduce:
Comment 1 Sven Schwyn (svoop) 2011-01-20 18:59:00 UTC
Created attachment 260392 [details]
ecopied and modded redis ebuild
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-20 19:02:58 UTC
Try this:
use prefix || fowners <..> and similar for diropts.
Comment 3 Sven Schwyn (svoop) 2011-01-20 19:19:57 UTC
Created attachment 260393 [details]
ecopied and modded redis ebuild

By the way: Is there a reason why methods like fowners or diropts are not patched to ignore chown in Prefix?
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-25 15:58:54 UTC
Guys, here is the inline diff, may I commit it?

Index: redis-1.2.6.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.6.ebuild,v
retrieving revision 1.1
diff -u -r1.1 redis-1.2.6.ebuild
--- redis-1.2.6.ebuild  17 May 2010 21:32:23 -0000      1.1
+++ redis-1.2.6.ebuild  25 Jan 2011 15:58:15 -0000
@@ -11,7 +11,7 @@
 SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz"
 
 LICENSE="BSD"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86 ~x86-macos"
 IUSE="test"
 SLOT="0"
 
@@ -63,7 +63,7 @@
                <redis.conf \
                >redis.conf.gentoo
        newins redis.conf.gentoo redis.conf
-       fowners root:redis /etc/redis.conf
+       use prefix || fowners root:redis /etc/redis.conf
        fperms 0640 /etc/redis.conf
 
        newconfd "${FILESDIR}/redis.confd" redis
@@ -76,7 +76,11 @@
        dobin redis-benchmark redis-cli
        dosbin redis-server
 
-       diropts -m0750 -o redis -g redis
+       if use prefix; then
+               diropts -m0750
+       else
+               diropts -m0750 -o redis -g redis
+       fi
        keepdir ${REDIS_DATAPATH} ${REDIS_LOGPATH} ${REDIS_PIDDIR}
 }
 
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-26 02:27:41 UTC
in 2.2* now