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

Bug 212132

Summary: net-p2p/dbhub - openrc scripts support and several ebuild improvements
Product: Gentoo Linux Reporter: Petr Polezhaev <NightNord>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED TEST-REQUEST    
Severity: enhancement CC: net-p2p
Priority: High Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Ebuild
Configure patch
Patch for fileio.c
conf.d configuration
Init.d startup script
Ebuild. Fixed LINGUAS bug

Description Petr Polezhaev 2008-03-03 00:17:02 UTC
Normally, dbhub has no baselayot scripts, futhermore - this is very hard to make them, as dbhub always trying to access "<workdir>/.dbhub/". Only way to override - patching sources, to switch meaning of "workdir" argument - now this is config dir, and it's default value (if none given) set as "$HOME/.dbhub". So normal user will notice nothing. Futhermore - patching and all baselayout support was restricted by use 'baselayout', and big warning about changes prints. Also this ebuild provide pkg_config() to easily configure new installation and init.d/conf.d scripts. Also incompartibily with grsec's (hardened) "CONFIG_GRKERNSEC_SHM (Destory unused shared memory)" noticed during compile on hardened kernels. 

Also "switch_user" (or 'suid') was renamed to normal for this option name 'caps' and libcap dependence added (dbhub, as seen in "main.c" uses libcap).
Also four official languages added. Only problem with Greek language, called 'gr' in package, but by ISO: 'el'. In ebuild it called 'el'. No charset convertion maded, but notice about source charsets printed (Romanian charset is unknown for me. enca don't known it).

Even if compiled with baselayout support it still can be used as normal.
Ebuild adds new user 'dbhub', and pkg_config creates /etc/dbhub/ dir owned by this user.

Reproducible: Always

Steps to Reproduce:
Comment 1 Petr Polezhaev 2008-03-03 00:18:38 UTC
Created attachment 145154 [details]
Ebuild
Comment 2 Petr Polezhaev 2008-03-03 00:19:32 UTC
Created attachment 145155 [details, diff]
Configure patch

Removes on_compile config dir creation
Comment 3 Petr Polezhaev 2008-03-03 00:21:34 UTC
Created attachment 145156 [details, diff]
Patch for fileio.c

Switches meaning of workdir argument
Comment 4 Petr Polezhaev 2008-03-03 00:22:37 UTC
Created attachment 145158 [details]
conf.d configuration
Comment 5 Petr Polezhaev 2008-03-03 00:22:53 UTC
Created attachment 145160 [details]
Init.d startup script
Comment 6 Petr Polezhaev 2008-03-03 00:29:50 UTC
There is one problem - pkg_config creates configs by running dbhub echoing in it's input info, than killing it. After all it adjust permissions on files, but sometimes dbhub process dies after permission adjusting, so some files (like 'config') becames unreadable for 'dbhub' user. So pkg_config must wait while dbhub will exit, but for this we need dbhub pid, while dbhub clones itself minimum twicely...
Comment 7 Petr Polezhaev 2008-03-14 15:19:18 UTC
Created attachment 146130 [details]
Ebuild. Fixed LINGUAS bug
Comment 8 Petr Polezhaev 2008-03-14 15:21:13 UTC
Description error
Comment 9 Mizery De Aria 2010-04-01 00:36:41 UTC
How come buffer overflow on startup?
http://pastebin.com/G10jx327

What information about my system configuration is useful to provide?
Comment 10 Pacho Ramos gentoo-dev 2019-10-20 17:03:52 UTC
are this init scripts still running with current openrc?