Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428722 - dev-db/redis-2.4.x log verbosity sed issue
Summary: dev-db/redis-2.4.x log verbosity sed issue
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 427170 433850
  Show dependency tree
 
Reported: 2012-07-30 23:03 UTC by Chris White
Modified: 2012-10-08 05:15 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris White 2012-07-30 23:03:39 UTC
In the ebuild there is a sed line to change the log verbosity field in the config file from debug to notice. However the config file uses verbose instead (has useful information like debug, but less noisy) as the default value, so the sed fails. In essence:

e '/^loglevel\>/s:debug:notice:' \

should be:

e '/^loglevel\>/s:verbose:notice:' \

Haven't had a chance yet to check the latest unstable.
Comment 1 Johan Bergström 2012-07-31 01:24:13 UTC
good point, thanks. I took a look at all branches, this is how it looks:

unstable: loglevel notice
2.4: loglevel verbose
2.6: loglevel notice

So, we should just replace verbose with notice and don't fail if we can't – or something like:
sed "s/loglevel [a-z]\+/loglevel notice/g" redis.conf
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-09-30 13:17:29 UTC
I looked at it, but I couldn't get anything to work. A similar sed expression outside the ebuild seemed to work, though. Anyone want to do a patch?
Comment 3 Johan Bergström 2012-10-01 03:24:56 UTC
djc, try this patch (also: TODO was removed from dist):

--- redis-2.4.17.ebuild	2012-09-30 22:16:12.000000000 +1000
+++ redis-2.4.17-new.ebuild	2012-10-01 13:23:16.920881578 +1000
@@ -81,8 +81,8 @@
 		-e '/^maxmemory\>/s,<bytes>,67108864,' \
 		-e "/^dbfilename\>/s,dump.rdb,${REDIS_DATAPATH}/dump.rdb," \
 		-e "/^dir\>/s, .*, ${REDIS_DATAPATH}/," \
-		-e '/^loglevel\>/s:debug:notice:' \
 		-e "/^logfile\>/s:stdout:${REDIS_LOGFILE}:" \
+		-e "/^loglevel\>/s:verbose:notice:" \
 		<redis.conf \
 		>redis.conf.gentoo
 	newins redis.conf.gentoo redis.conf
@@ -92,7 +92,7 @@
 	newconfd "${FILESDIR}/redis.confd" redis
 	newinitd "${FILESDIR}/redis.initd" redis
 
-	nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING README TODO
+	nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING README
 
 	dobin src/redis-cli
 	dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump


Small note: redis 2.2 and older seemed to default to debug, hence the ebuild. old
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-08 05:15:06 UTC
In 2.4.17