Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285246 - [ebuild] app-mobilephone/sqlbox ebuild request
Summary: [ebuild] app-mobilephone/sqlbox ebuild request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.kannel.org/~aguerrieri/Sql...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-16 20:49 UTC by Travis Hansen
Modified: 2009-12-05 08:32 UTC (History)
1 user (show)

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


Attachments
sqlbox-0.7.2.ebuild (sqlbox-0.7.2.ebuild,1.89 KB, text/plain)
2009-09-16 20:51 UTC, Travis Hansen
Details
sqlbox-0.7.2-sqlinit-hfiles.patch (sqlbox-0.7.2-sqlinit-hfiles.patch,3.33 KB, text/plain)
2009-09-16 20:51 UTC, Travis Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Travis Hansen 2009-09-16 20:49:41 UTC
DB-Based Kannel Box for message queueing
This is a plugin for app-mobile/kannel that allows storing messages (sent and queued) in a database.

The tricky part is integrating with the kannel ebuild startup script as sqlbox needs to start after bearerbox but before sms box.  I have some modified conf.d and init.d files for kannel that easily facilitated this behavior, but collaboration would need to take place between the 2 apps.

Reproducible: Always
Comment 1 Travis Hansen 2009-09-16 20:51:16 UTC
Created attachment 204366 [details]
sqlbox-0.7.2.ebuild
Comment 2 Travis Hansen 2009-09-16 20:51:58 UTC
Created attachment 204368 [details]
sqlbox-0.7.2-sqlinit-hfiles.patch
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2009-09-17 06:05:56 UTC
There are 2 ways of dealing with initd inter-dependencies:
  1) break kannel initd in 3 scripts (bearerbox, smsbox and wapbox). The sqlbox will have "use bearerbox" and "before smsbox".
  2) include sqlbox support within kannel ebuild through a local USE flag.

What do you think is best?
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2009-09-17 06:08:18 UTC
s/use bearerbox/need bearerbox/ ... duh
Comment 5 Travis Hansen 2009-09-17 15:32:33 UTC
(In reply to comment #3)
> There are 2 ways of dealing with initd inter-dependencies:
>   1) break kannel initd in 3 scripts (bearerbox, smsbox and wapbox). The sqlbox
> will have "use bearerbox" and "before smsbox".
>   2) include sqlbox support within kannel ebuild through a local USE flag.
> 
> What do you think is best?
> 

Easiest for 'normal' users would be a single ebuild.  However, since smsbox, wapbox, and sqlbox can all run without a local bearerbox it's probably 'correct' to have multiple init scripts.

Even that gets tricky though because (I'm ignorant to the details of the init deps) sqlbox doesn't necessarily need or use local beaerbox...nor is sqlbox neccesarily connected to via a local smsbox.  I'm guessing putting each in it's own init and have conf.d options to say if necessary services are local or not and then dynamically set {use,before,etc} based off the conf.d option(s)?  Not sure if that's possible, but it's an idea.
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2009-09-25 01:28:56 UTC
Imported in tree as app-mobilephone/kannel-sqlbox. I tried to unify kannel and sqlbox, but I realized it would make my life a lot harder.

app-mobilephone/kannel now installs 3 init scripts: kannel-{bearerbox,smsbox,wapbox}. kannel-smsbox and kannel-wapbox initd scripts have "need kannel-bearerbox". kannel-sqlbox have "need kannel-bearerbox" and "before kannel-smsbox".
I know it might not be required to run bearerbox on the same machine as the rest of the services, but at least baselayout-1.19 fails to find the right dependencies for "/etc/init.d/kannel-bearerbox stop" when other services had "use kannel-bearerbox". Since most peeps will run all these services on the same machine, I decided to use "need" iso "use".
Comment 7 Travis Hansen 2009-11-10 16:49:42 UTC
I finally got around to testing this out.  Thanks for helping out with this and getting sqlbox added to the tree!  The only suggestion I have is to add..

use kannel-sqlbox

to kannel-smsbox init script.

Not really a big deal though.  Thanks again for the help!
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2009-11-29 09:15:55 UTC
(In reply to comment #7)
I cannot do that, kannel-sqlbox service is optional!

"before kannel-smsbox" kannel-sqlbox's dependency is the only way to start services in the right order without breaking the standard scenario (the one without kannel-sqlbox service).
 
Comment 9 Travis Hansen 2009-11-29 16:56:51 UTC
Mabye baselayout 1 is different but for me a use <whatever> doesn't affect anything if it's not installed and added to a runlevel.  In other words, I don't see how this would affect the smsbox script if sqlbox is not installed and/or the script is not added to a runlevel.
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2009-12-05 08:32:40 UTC
"use" represents a mandatory dependency. If you put "use foo" and foo doesn't exist, I would expect to see at least a warning about it.