Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186937 - dev-ruby/rubygems - init-script for gem_server
Summary: dev-ruby/rubygems - init-script for gem_server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-28 21:58 UTC by Henning Schild
Modified: 2007-09-03 08:54 UTC (History)
0 users

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


Attachments
/etc/init.d/gem_server (gem_server,528 bytes, text/plain)
2007-07-28 21:59 UTC, Henning Schild
Details
/etc/conf.d/gem_server (gem_server,81 bytes, text/plain)
2007-07-28 22:00 UTC, Henning Schild
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Schild 2007-07-28 21:58:22 UTC
rubygems contains gem_server which starts a web-server that offers rdoc of all installed gems
if someone wants to start this server an init-script is handy

Reproducible: Always

Steps to Reproduce:
Comment 1 Henning Schild 2007-07-28 21:59:30 UTC
Created attachment 126266 [details]
/etc/init.d/gem_server

init script
Comment 2 Henning Schild 2007-07-28 22:00:33 UTC
Created attachment 126268 [details]
/etc/conf.d/gem_server

config
Comment 3 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-08-28 12:42:09 UTC
Thanks for contributing! I have some questions though.

/usr/bin/gem_server is executable. Why do I have to run it via /usr/bin/ruby?
I see you define $CONFIG but it does not get used. Am I missing something or is it just bogus? Ah and $PID definition should be moved to /etc/conf.d/gem_server as well, just in case someone wants to change the path.
And the initscript should depend on net besides localmount because I don't think gem_server is really useful without a connection.
Final note, we also need "Copyright 2007 Gentoo Foundation blah blah..". I hope you don't mind.

Sorry I talk too much :-X
Comment 4 Henning Schild 2007-09-01 14:01:37 UTC
I dont remember why i used "ruby gem_server"  instead of "gem_server". In the beginning i had problems with start-stop-daemon. I think i used it in a wrong way and one of the things i did to fix my problem was using ruby. It might have been because of the PID-file. If you dont like it try without which might work or not ;).

The config is used, try "-p 10000" or something like in the configfile. I dont think the name of the pidfile should be configured by any user.

You are right it should depend on net.

I dont mind add whatever you need.
Comment 5 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-09-03 08:54:04 UTC
I have added the scripts to rubygems-0.9.4-r1. Thank you for contributing.

(In reply to comment #4)
> I dont remember why i used "ruby gem_server"  instead of "gem_server". In the
> beginning i had problems with start-stop-daemon. I think i used it in a wrong
> way and one of the things i did to fix my problem was using ruby. It might have
> been because of the PID-file. If you dont like it try without which might work
> or not ;).

Tried and failed. Apparently start-stop-daemon does not like shebang scripts

> 
> The config is used, try "-p 10000" or something like in the configfile.

Sure. But the variable $CONFIG is not used. /etc/conf.d/gem_server will get read no matter $CONFIG is defined. I still want to get rid of CONFIG assignment in the script unless it's there on purpose. I have removed it for now. If you still see the variable needed, tell me.

> 
> You are right it should depend on net.
> 
> I dont mind add whatever you need.
>