Compare commits

..

22 Commits

Author SHA1 Message Date
Patrick J Cherry
86f7867f34 Merged in another test fix 2015-04-02 11:53:58 +01:00
Patrick J Cherry
06d78d4168 Scaled back the massive allocation of IPs from 11 /24s to 4.
Otherwise I get

Error: test_massively_parallel_IP_address_addition(TestAddr::TestWithNetlinkRouteSocket)
  Errno::EMFILE: Too many open files - socket(2)
  lib/linux/netlink/nlsocket.rb:61:in `initialize'
  lib/linux/netlink/nlsocket.rb:61:in `new'
  lib/linux/netlink/nlsocket.rb:61:in `initialize'
  lib/linux/netlink/route.rb:21:in `initialize'
  test/t_route.rb:54:in `new'
  test/t_route.rb:54:in `block (4 levels) in <class:TestAddr>'
2015-04-02 11:52:56 +01:00
Patrick J Cherry
2ceb0fbf6d Make sure link exists before proceeding with test 2015-04-02 11:44:40 +01:00
Patrick J Cherry
51b8bbcd8a Fixed new massive IP test thing to work with ruby1.8 and also non-root users 2015-04-01 23:05:41 +01:00
Patrick J Cherry
443756cf1b Added tag 0.17-1+squeeze1 for changeset ef12aea2fcc6 2015-04-01 22:49:29 +01:00
Patrick J Cherry
486b19a565 New squeeze release 2015-04-01 22:49:18 +01:00
Patrick J Cherry
2b34dbae71 Added tag 0.16-1+squeeze1 for changeset 18a68367218f 2014-08-26 16:33:28 +01:00
Patrick J Cherry
36352b4f9f New upstream release 2014-08-26 16:33:16 +01:00
Patrick J Cherry
fba61f79e3 Added tag 0.15-1+squeeze1 for changeset e74eb5d7ce2c 2014-01-21 10:03:26 +00:00
Patrick J Cherry
0c30853e93 New upstream release 2014-01-21 10:03:24 +00:00
Patrick J Cherry
d858e3d5b3 Added tag 0.14-1+squeeze1 for changeset 8b86579d1efb 2013-11-14 13:38:22 +00:00
Patrick J Cherry
f2e31b5337 New upstream release 2013-11-14 13:37:10 +00:00
Patrick J Cherry
5880ede839 Added tag 0.13-1+squeeze1 for changeset 03fdcb15a9be 2013-11-13 16:18:05 +00:00
Patrick J Cherry
ff565e1dd3 New upstream release 2013-11-13 16:16:25 +00:00
Patrick J Cherry
25cf355fc3 Added tag 0.12-1+squeeze1 for changeset fac5948fd32c 2013-09-12 14:31:28 +01:00
Patrick J Cherry
d4eeb977ce New upstream release 2013-09-12 14:28:35 +01:00
Patrick J Cherry
c0263e83d0 merge 2013-07-16 16:52:27 +01:00
Patrick J Cherry
2251b116ce merge 2013-07-16 16:45:29 +01:00
Patrick J Cherry
e27f54116e Foo 2013-07-16 16:28:40 +01:00
Patrick J Cherry
7195d7b24e arse 2013-07-16 16:36:19 +01:00
Patrick J Cherry
eeb55fa103 Added tag 0.11-1+squeeze1 for changeset 6993fdccebef 2013-07-05 14:02:25 +01:00
Patrick J Cherry
9c7e3a1a96 Updated hgignore for squeeze packages 2013-07-05 13:59:40 +01:00
11 changed files with 57 additions and 93 deletions

View File

@@ -1,7 +1,6 @@
^debian/ruby-linux-netlink$ ^debian/liblinux-netlink-ruby(1.8|1.9.1)?$
~$ ~$
^.config-liblinux-netlink-ruby ^.config-liblinux-netlink-ruby
^.pc/
^debian/files$ ^debian/files$
^debian/.*\.substvars$ ^debian/.*\.substvars$
^debian/.*\.debhelper.log$ ^debian/.*\.debhelper.log$

44
debian/changelog vendored
View File

@@ -1,58 +1,44 @@
ruby-linux-netlink (0.17-1+jessie1) testing; urgency=medium linux-netlink-ruby (0.17-1+squeeze1) oldstable; urgency=medium
* New upstream release * New upstream release
-- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 01 Apr 2015 22:51:34 +0100 -- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 01 Apr 2015 22:48:55 +0100
ruby-linux-netlink (0.16-1+jessie1) testing; urgency=medium linux-netlink-ruby (0.16-1+squeeze1) oldstable; urgency=low
* Repackaged for jessie
-- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 01 Apr 2015 17:39:44 +0100
ruby-linux-netlink (0.16-1+wheezy1) stable; urgency=medium
* New upstream release. * New upstream release.
-- Patrick J Cherry <patch@dynamo> Tue, 26 Aug 2014 16:33:48 +0100 -- Patrick J Cherry <patch@dynamo> Tue, 26 Aug 2014 16:32:44 +0100
ruby-linux-netlink (0.15-1+wheezy1) stable; urgency=low linux-netlink-ruby (0.15-1+squeeze1) oldstable; urgency=low
* New upstream release. * New upstream release.
-- Patrick J Cherry <patrick@bytemark.co.uk> Tue, 21 Jan 2014 10:01:20 +0000 -- Patrick J Cherry <patrick@bytemark.co.uk> Tue, 21 Jan 2014 10:02:54 +0000
ruby-linux-netlink (0.14-1+wheezy1) stable; urgency=low linux-netlink-ruby (0.14-1+squeeze1) oldstable; urgency=low
* New upstream release. * New upstream release.
-- Patrick J Cherry <patrick@bytemark.co.uk> Thu, 14 Nov 2013 13:37:28 +0000 -- Patrick J Cherry <patrick@bytemark.co.uk> Thu, 14 Nov 2013 11:59:05 +0000
ruby-linux-netlink (0.13-1+wheezy1) stable; urgency=low linux-netlink-ruby (0.13-1+squeeze1) oldstable; urgency=low
* New upstream release. * New upstream release.
-- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 13 Nov 2013 16:16:36 +0000 -- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 13 Nov 2013 16:15:43 +0000
ruby-linux-netlink (0.12-1+wheezy1) stable; urgency=low linux-netlink-ruby (0.12-1+squeeze1) oldstable; urgency=low
* New upstream release. * New upstream release.
-- Patrick J Cherry <patrick@bytemark.co.uk> Thu, 12 Sep 2013 14:26:41 +0100 -- Patrick J Cherry <patrick@bytemark.co.uk> Thu, 12 Sep 2013 14:28:10 +0100
ruby-linux-netlink (0.11-1+wheezy2) stable; urgency=low linux-netlink-ruby (0.11-1+squeeze1) oldstable; urgency=low
* Switch to dpkg-source 3.0 (quilt) format. * New upstream version.
* Added patch to remove rubygems requires.
* Renamed source package to fit in with the new guidelines.
-- Patrick J Cherry <patrick@bytemark.co.uk> Fri, 05 Jul 2013 14:16:30 +0100 -- Patrick J Cherry <patrick@bytemark.co.uk> Fri, 05 Jul 2013 13:52:09 +0100
linux-netlink-ruby (0.11-1+wheezy1) stable; urgency=low
* New upstream version, repackaged for wheezy.
-- Patrick J Cherry <patrick@bytemark.co.uk> Fri, 05 Jul 2013 14:16:05 +0100
linux-netlink-ruby (0.10-6) stable; urgency=low linux-netlink-ruby (0.10-6) stable; urgency=low

37
debian/control vendored
View File

@@ -1,18 +1,39 @@
Source: ruby-linux-netlink Source: linux-netlink-ruby
Maintainer: Matthew Bloch <matthew@bytemark.co.uk> Maintainer: Matthew Bloch <matthew@bytemark.co.uk>
Uploaders: Patrick J Cherry <patrick@bytemark.co.uk> Uploaders: Patrick J Cherry <patrick@bytemark.co.uk>
Section: ruby Section: ruby
Priority: optional Priority: optional
Build-Depends: debhelper (>= 7), gem2deb, rake, ruby-ffi Build-Depends: debhelper (>= 7), cdbs, ruby1.8, ruby1.9.1, ruby-pkg-tools, rake
Standards-Version: 3.8.0 Standards-Version: 3.8.0
XS-Ruby-Versions: all
Package: ruby-linux-netlink Package: liblinux-netlink-ruby
Architecture: any Architecture: all
Depends: ruby | ruby-interpreter, ruby-ffi, ${misc:Depends} Depends: liblinux-netlink-ruby1.8 | liblinux-netlink-ruby1.9.1, ${misc:Depends}
Provides: liblinux-netlink-ruby1.8, liblinux-netlink-ruby1.9.1
XB-Ruby-Versions: ${ruby:Versions}
Description: Netlink socket library for Ruby Description: Netlink socket library for Ruby
This library provides an API for using a Linux Netlink socket, for doing This library provides an API for using a Linux Netlink socket, for doing
things like manipulating IP interfaces and routes programmatically, and things like manipulating IP interfaces and routes programmatically, and
capturing packets from ULOG. capturing packets from ULOG.
.
This is the metapackage for all versions of Ruby.
Package: liblinux-netlink-ruby1.8
Architecture: any
Depends: ruby1.8 (>= 1.8.7), libffi-ruby1.8, ${misc:Depends}
Description: Netlink socket library for Ruby 1.8
This library provides an API for using a Linux Netlink socket, for doing
things like manipulating IP interfaces and routes programmatically, and
capturing packets from ULOG.
.
This is the version for Ruby 1.8.7.
Package: liblinux-netlink-ruby1.9.1
Architecture: any
Depends: ruby1.9.1, libffi-ruby1.9.1, ${misc:Depends}
Description: Netlink socket library for Ruby 1.9.1
This library provides an API for using a Linux Netlink socket, for doing
things like manipulating IP interfaces and routes programmatically, and
capturing packets from ULOG.
.
This is the version for Ruby 1.9.1.

View File

@@ -0,0 +1 @@
examples/*

View File

@@ -1,32 +0,0 @@
Removed "require rubygems" from everywhere.
--- a/lib/linux/iptables.rb
+++ b/lib/linux/iptables.rb
@@ -1,11 +1,6 @@
require 'socket'
require 'linux/constants'
-
-begin
- require 'ffi'
-rescue LoadError
- require('rubygems') ? retry : raise
-end
+require 'ffi'
# Good things about FFI::Struct:
--- a/lib/linux/sendmsg.rb
+++ b/lib/linux/sendmsg.rb
@@ -1,12 +1,7 @@
# Patchup to add Socket#sendmsg and Socket#recvmsg for ruby 1.8
if BasicSocket.instance_methods.grep(/^sendmsg$/).empty?
- begin
- require 'ffi'
- rescue LoadError
- require('rubygems') ? retry : raise
- end
-
+ require 'ffi'
class BasicSocket
module FFIExt

View File

@@ -1 +0,0 @@
remove-rubygems-requirements

View File

@@ -1,2 +0,0 @@
---
- test/t_route.rb

20
debian/rules vendored
View File

@@ -1,23 +1,11 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# #
# export DH_VERBOSE=1
#
# Uncomment to ignore all test failures (but the tests will run anyway)
# export DH_RUBY_IGNORE_TESTS=all
#
# Uncomment to ignore some test failures (but the tests will run anyway).
# Valid values:
# export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
#
# If you need to specify the .gemspec (eg there is more than one)
# export DH_RUBY_GEMSPEC=gem.gemspec
%: include /usr/share/cdbs/1/rules/debhelper.mk
dh $@ --buildsystem=ruby --with ruby include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk
override_dh_auto_build-arch: makebuilddir::
rake lib/linux/c_struct_sizeof_size_t.rb rake lib/linux/c_struct_sizeof_size_t.rb
override_dh_auto_clean: clean::
rake clean rake clean

View File

@@ -1 +0,0 @@
3.0 (quilt)

View File

@@ -42,8 +42,12 @@ class TestAddr < Test::Unit::TestCase
test "massively parallel IP address addition" do test "massively parallel IP address addition" do
@ifname = create_test_interface @ifname = create_test_interface
return if @ifname.nil?
link = @ip.link.list.find{|x| x.ifname == @ifname}
return if link.nil?
ips = (10..20).map {|y| (1..254).map {|z| "10.100.#{y}.#{z}" } }.flatten.compact ips = (10..13).map {|y| (1..254).map {|z| "10.100.#{y}.#{z}" } }.flatten.compact
threads = ips.map {|ip| threads = ips.map {|ip|
Thread.new { Thread.new {
@@ -55,7 +59,8 @@ class TestAddr < Test::Unit::TestCase
} }
} }
threads.map(&:join) threads.map{|t| t.join }
created = @ip.addr.list(:index => @ifname, :family => Socket::AF_INET). created = @ip.addr.list(:index => @ifname, :family => Socket::AF_INET).
map {|ifaddr| ifaddr.address.to_s } map {|ifaddr| ifaddr.address.to_s }