Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198500 - New package: net-proxy/swiftiply-0.6.4 - A clustering proxy server for web applications.
Summary: New package: net-proxy/swiftiply-0.6.4 - A clustering proxy server for web ap...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords: EBUILD
Depends on: 198501
Blocks:
  Show dependency tree
 
Reported: 2007-11-08 22:10 UTC by Jochen Schalanda
Modified: 2013-05-02 19:29 UTC (History)
1 user (show)

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


Attachments
swiftiply-0.6.1.1.ebuild (swiftiply-0.6.1.1.ebuild,425 bytes, text/plain)
2007-11-08 22:11 UTC, Jochen Schalanda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Schalanda 2007-11-08 22:10:26 UTC
Swiftiply is a clustering proxy server for web applications.

Homepage: http://swiftiply.swiftcore.org/

Reproducible: Always

Steps to Reproduce:
Comment 1 Jochen Schalanda 2007-11-08 22:11:34 UTC
Created attachment 135519 [details]
swiftiply-0.6.1.1.ebuild
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2009-03-03 21:16:08 UTC
I cannot submit this into the tree because of this error:
g++ -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DHAVE_SYS_EPOLL_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H   -DOS_UNIX -DBUILD_FOR_RUBY -DHAVE_EPOLL -DWITH_SSL -fPIC -march=nocona -O2 -pipe -fno-strict-aliasing  -fPIC   -c mapper.cpp
mapper.cpp: In constructor ‘Mapper_t::Mapper_t(const std::string&)’:
mapper.cpp:53: error: ‘strerror’ was not declared in this scope
mapper.cpp:57: error: ‘strerror’ was not declared in this scope
mapper.cpp:62: error: ‘strerror’ was not declared in this scope
make: *** [mapper.o] Error 1

I tried to fix it myself, but apparently gem archives are not extracted during the compile. Ruby team, can you help me with that? 
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-03-03 21:31:31 UTC
If it has a non-gem release, use that: http://blog.flameeyes.eu/2008/12/12/id-rather-keep-myself-away-from-gems
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-31 15:22:24 UTC
New eclasses don't show this problem.

+  31 Mar 2013; Tom Wijsman <TomWij@gentoo.org> +metadata.xml,
+  +swiftiply-0.6.1.1.ebuild:
+  New ebuild for swiftiply. Ebuild contributed by Jochen Schalanda which has
+  been updated to use the new eclasses. Fixes bug #198500.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-03-31 15:31:38 UTC
Did you actually test the ebuild you committed? FEATURES=test is broken at the very least.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-03-31 15:33:39 UTC
And you're not building the extension.

Seriously, this ebuild cannot work, why on earth did you ever commit it if you don't even try using it?
Comment 7 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-31 17:11:59 UTC
(In reply to comment #5)
> Did you actually test the ebuild you committed? FEATURES=test is broken at
> the very least.

> * Running test phase for ruby18 ...
> rake aborted!
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

Will you write me one, please?

(In reply to comment #6)
> And you're not building the extension.

It appears that the new eclass does less than the old eclass.

(In reply to comment #6) 
> Seriously, this ebuild cannot work, why on earth did you ever commit it if
> you don't even try using it?

When there is no test phase, one resorts to run it; it ran without complaining.

The other binaries indeed don't, fixing those as I go.

+  31 Mar 2013; Tom Wijsman <TomWij@gentoo.org>
+  +cgi_multipart_eof_fix-2.1.ebuild, +metadata.xml:
+  Add ebuild for cgi_multipart_eof_fix, a dependency of net-proxy/swiftiply.

+  31 Mar 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/swiftiply-0.6.1.1-ffr-stderror.patch, +swiftiply-0.6.1.1-r1.ebuild,
+  -swiftiply-0.6.1.1.ebuild:
+  Fixed building of the fastfilereader extension. Added necessary dev-
+  ruby/cgi_multipart_eof_fix and www-servers/mongrel dependencies. Made testing
+  phase empty since there is no Rakefile.
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-31 20:52:54 UTC
+# Tom Wijsman <TomWij@gentoo.org> (31 Mar 2013)
+# Broken because dependency dev-ruby/cgi_multipart_eof_fix
+# is masked for removal, we need to fix net-proxy/swiftiply
+# to no longer depend on it and then apply more testing.
+net-proxy/swiftiply
+
+# Tom Wijsman <TomWij@gentoo.org> (31 Mar 2013)
+# Package only applies to versions of Ruby which are no
+# longer in the Portage tree; it was introduced because
+# net-proxy/swiftiply needed it, but I will instead fix
+# that package to no longer need this package.
+# Removal in 30 days.
+dev-ruby/cgi_multipart_eof_fix

I'll do my best to get this package working properly again over the next week.
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-19 20:20:06 UTC
(In reply to comment #5)
> Did you actually test the ebuild you committed? FEATURES=test is broken at
> the very least.

Only partially (check if runs != check if works and usable), but not in detail, sorry for that; thank you for letting me know, you woke me up and I have since went through most other packages I have touched as well to revise them to ensure they are actually usable. :)

I have figured out there are test cases in the test folder and that they return a non-zero status code if they fail, therefore I can run them from each_ruby_test. These appeared horribly broken, but then I found out on their site that they have a GitHub and in their tags version 0.6.4 is available. This version solves the problem in Comment #2 such that I no longer need to patch the compilation itself and it also made more tests work.

The first two test cases Deque and ProxyBag succeed properly, for the test case Swiftiply there is still one test left that I still need to look into which is

> ../../src/swiftcore/Swiftiply/cache_base_mixin.rb:36:in `check_verification_queue': undefined method `*' for nil:NilClass (NoMethodError)
> 	from ../../src/swiftcore/Swiftiply.rb:411:in `verify_cache'
> 	from ../../src/swiftcore/Swiftiply.rb:1370:in `em_config'
> 	from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
> 	from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
> 	from /usr/lib64/ruby/gems/1.8/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
> 	from ../../src/swiftcore/Swiftiply.rb:1212:in `run'
> 	from ../../bin/swiftiply:146:in `run'
> 	from ../../bin/swiftiply:156

which yields

>   1) Error:
> test_serve_static_file_caches(TC_Swiftiply):
> Errno::ECONNREFUSED: Connection refused - connect(2)
>     /usr/lib64/ruby/1.8/net/http.rb:560:in `initialize'
>     /usr/lib64/ruby/1.8/net/http.rb:560:in `open'
>     /usr/lib64/ruby/1.8/net/http.rb:560:in `connect'
>     /usr/lib64/ruby/1.8/timeout.rb:53:in `timeout'
>     /usr/lib64/ruby/1.8/timeout.rb:101:in `timeout'
>     /usr/lib64/ruby/1.8/net/http.rb:560:in `connect'
>     /usr/lib64/ruby/1.8/net/http.rb:553:in `do_start'
>     /usr/lib64/ruby/1.8/net/http.rb:542:in `start'
>     /usr/lib64/ruby/1.8/net/http.rb:440:in `start'
>     test/TC_Swiftiply.rb:37:in `get_url'
>     test/TC_Swiftiply.rb:233:in `test_serve_static_file_caches'

and the summary

> 15 tests, 80 assertions, 0 failures, 1 errors

+  19 Apr 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/swiftiply-0.6.4-test-deque-fix.patch, +swiftiply-0.6.4.ebuild,
+  -files/swiftiply-0.6.1.1-ffr-stderror.patch, -swiftiply-0.6.1.1-r1.ebuild:
+  Version bump to 0.6.4 which fixes all compilation errors and most test errors,
+  there is only one failing test remaining.

So, we're close to a working Swiftiply. To be continued...
Comment 10 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-02 18:39:36 UTC
The test failure was fixed; however, the package seems to have tests that randomly fail; it seems to be a difference in order so this is probably still fixable by adjusting the test itself to test the different order (HTTP doesn't specify order afaik):

  1) Failure:
test_HUP(TC_Swiftiply) [test/TC_Swiftiply.rb:849]:
<"GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n"> expected but was
<"GET /xyzzy HTTP/1.1\r\nHost: 127.0.0.1:29998\r\nAccept: */*\r\n\r\n">.

  2) Failure:
test_redeployable(TC_Swiftiply) [test/TC_Swiftiply.rb:599]:
<"GET /slo_gin_fizz HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n"> expected but was
<"GET /slo_gin_fizz HTTP/1.1\r\nHost: 127.0.0.1:29998\r\nAccept: */*\r\n\r\n">.

  3) Failure:
test_serve_normal_proxy(TC_Swiftiply) [test/TC_Swiftiply.rb:537]:
<"GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n"> expected but was
<"GET /xyzzy HTTP/1.1\r\nHost: 127.0.0.1:29998\r\nAccept: */*\r\n\r\n">.

  4) Failure:
test_serve_normal_proxy_with_authentication(TC_Swiftiply) [test/TC_Swiftiply.rb:668]:
<"GET /xyzzy HTTP/1.1\r\nAccept: */*\r\nHost: 127.0.0.1:29998\r\n\r\n"> expected but was
<"GET /xyzzy HTTP/1.1\r\nHost: 127.0.0.1:29998\r\nAccept: */*\r\n\r\n">.

+  02 May 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/swiftiply-0.6.4-cache-base-mixin-fix.patch, swiftiply-0.6.4.ebuild:
+  Fixed a test failure, there are still random failures left where the HTTP
+  headers return in a different order.
Comment 11 Hans de Graaff gentoo-dev Security 2013-05-02 18:53:15 UTC
This looks like a ruby 1.8 specific test failure. In ruby 1.8 the ordering of hash keys is not guaranteed. In ruby 1.9 the ordering of hash keys is, based on creation order.

It's usually not worth fixing these. I'd comment out these tests, preferably for ruby18 only in each_ruby_prepare(). There are several examples of this using 'case' in dev-ruby.
Comment 12 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-02 19:29:11 UTC
Resolved this by only partially testing the response body, more specifically the important part that was meant to be tested. All test pass multiple times, hence this can now be unmasked and used. Thank you very much!

+  02 May 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/swiftiply-0.6.4-test-http-headers-order-fix.patch,
+  swiftiply-0.6.4.ebuild:
+  Gave the distfile a more unique name. Added a patch to no longer test
+  uninportant random data causing tests to unnecessarly fail, all test pass
+  multiple times. Removed QA warning.

+  02 May 2013; Tom Wijsman <TomWij@gentoo.org> package.mask:
+  Removed package mask on net-proxy/swiftiply, see bug #198500.