Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133500 - Rails 1.1.2 needs => lighttpd 1.4.10
Summary: Rails 1.1.2 needs => lighttpd 1.4.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on: 123022
Blocks:
  Show dependency tree
 
Reported: 2006-05-16 08:38 UTC by Hans de Graaff
Modified: 2006-10-02 22:47 UTC (History)
1 user (show)

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


Attachments
rails-1.1.6-r1.ebuild (rails-1.1.6-r1.ebuild,1.12 KB, text/plain)
2006-10-02 05:08 UTC, Nguyen Thai Ngoc Duy (RETIRED)
Details
files/1.1.6-deprecate-old-lighttpd.patch (1.1.6-deprecate-old-lighttpd.patch,651 bytes, patch)
2006-10-02 05:09 UTC, Nguyen Thai Ngoc Duy (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev Security 2006-05-16 08:38:31 UTC
The use of lighttpd in Rails 1.1.2 is optional, but it is the default setup for the internal server script in script/server. The lighttpd config file that Rails copies into a new Rails setup contains features (in particular CWD) which older lighttpd versions don't understand. This leads to an error which gives no indication that a newer version of lighttpd is needed. Upgrading to lighttpd 1.4.10-r2 works fine.
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-30 13:02:50 UTC
1.4.11 has been asked to be marked stable
Comment 2 Jari-Matti Mäkelä 2006-09-30 03:00:52 UTC
(In reply to comment #1)
> 1.4.11 has been asked to be marked stable

1.4.11 has been marked stable (x86, amd64, ppc64, sparc) for a while now. Can we close this?
Comment 3 Hans de Graaff gentoo-dev Security 2006-09-30 03:05:32 UTC
The fact that lighttpd has been marked stable does not fix the bug, it just makes it less likely that people run into it.

I guess the right way to fix it is to add a lighttpd USE flag to the rails ebuild and depend on >=lighttpd-0.4.10 in this case.
Comment 4 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-09-30 03:37:28 UTC
perhaps adding something like

if has_version www-servers/lighttpd && has_version <=www-servers/lighttpd-1.4.10
   ewarn "you need at least www-servers/lighttpd-1.4.10 if you want"
   ewarn "to use lighttpd with rails!"
fi

in pkg_setup and/or pkg_config
would suffice. the ebuild should possibly even die at that point... i don't know of a reason why one would like to stick to a version below 1.4.10...

the big problem of course is, if you have rails and lighttpd installed you have to have lighttpd-1.4.10 or higher... there is nothing to choose. AFAICT this can't currently be modeled within an ebuild - so its just a matter of which hack we choose...

the last alternative would be to fix the rails server script to, depending on a use flag, use either webrick or lighttpd...

tough call
Comment 5 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-09-30 12:28:55 UTC
I'd rather hack commands/server.rb to ignore lighttpd older than 1.4.10 (along with a warning maybe). However patching a gem is not very fun.
Anyway, upstream should know about this and should fix this. They've already used `lighttpd -version` to check for lighttpd's existence. With a proper regexp, they can determine if the installed lighttpd can be used.
Hans, did you inform upstream?
Comment 6 Hans de Graaff gentoo-dev Security 2006-10-01 01:49:16 UTC
No, I did not inform upstream at the time because I thought we could handle this with a simple dependency. Looking through the Trac database it looks like this was reported twice, but upstream does not appear to see this as a problem. They just say to use 4.1.11 or higher. This is also their recommendation due to older versions being buggy. See:

http://dev.rubyonrails.org/ticket/4344
http://dev.rubyonrails.org/ticket/4451

Comment 7 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-10-02 05:08:54 UTC
Created attachment 98599 [details]
rails-1.1.6-r1.ebuild
Comment 8 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-10-02 05:09:17 UTC
Created attachment 98600 [details, diff]
files/1.1.6-deprecate-old-lighttpd.patch
Comment 9 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-10-02 05:11:44 UTC
I intend to patch rails 1.1.6 only.  Any reason I should patch older versions?
If you can test the attached ebuild, it would be highly appreciated.
I'll add it to portage some next days if there is no response.
Comment 10 Hans de Graaff gentoo-dev Security 2006-10-02 12:42:32 UTC
All the versions of rails < 1.1.6 contain a significant security leak, so they should not be patched but instead removed from portage.

I patch seems to work fine on my system.
Comment 11 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-10-02 22:47:01 UTC
InCVS