From 7eb0b073ec9cff759963b4604ee12aee2f312ced Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 13:54:39 +0100 Subject: [PATCH 1/7] Added wheezy branch From 08050fbec7e27ee8d99ea9344c48680cf046a9a1 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 13:58:07 +0100 Subject: [PATCH 2/7] Updated packaging for wheezy. --- .hgignore | 4 ++- debian/changelog | 6 ++-- debian/control | 35 ++++--------------- debian/liblinux-netlink-ruby1.9.1.examples | 1 - ...8.examples => ruby-linux-netlink.examples} | 0 debian/ruby-test-files.yaml | 2 ++ debian/rules | 20 ++++++++--- 7 files changed, 31 insertions(+), 37 deletions(-) delete mode 100644 debian/liblinux-netlink-ruby1.9.1.examples rename debian/{liblinux-netlink-ruby1.8.examples => ruby-linux-netlink.examples} (100%) create mode 100644 debian/ruby-test-files.yaml diff --git a/.hgignore b/.hgignore index fd97206..41f51a9 100644 --- a/.hgignore +++ b/.hgignore @@ -1,4 +1,6 @@ -^debian/liblinux-netlink-ruby +^debian/ruby-linux-netlink$ ~$ ^.config-liblinux-netlink-ruby ^debian/files$ +^debian/.*\.substvars$ +^debian/.*\.debhelper.log$ diff --git a/debian/changelog b/debian/changelog index 1516e7c..7bb8092 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-netlink-ruby (0.11-1+squeeze1) oldstable; urgency=low +linux-netlink-ruby (0.11-1+wheezy1) stable; urgency=low - * New upstream version. + * New upstream version, repackaged for wheezy. - -- Patrick J Cherry Fri, 05 Jul 2013 13:52:09 +0100 + -- Patrick J Cherry Fri, 05 Jul 2013 13:57:06 +0100 linux-netlink-ruby (0.10-6) stable; urgency=low diff --git a/debian/control b/debian/control index d7104d5..acb05ec 100644 --- a/debian/control +++ b/debian/control @@ -3,37 +3,16 @@ Maintainer: Matthew Bloch Uploaders: Patrick J Cherry Section: ruby Priority: optional -Build-Depends: debhelper (>= 7), cdbs, ruby1.8, ruby1.9.1, ruby-pkg-tools, rake +Build-Depends: debhelper (>= 7), gem2deb, rake, ruby-ffi Standards-Version: 3.8.0 +XS-Ruby-Versions: all -Package: liblinux-netlink-ruby -Architecture: all -Depends: liblinux-netlink-ruby1.8 | liblinux-netlink-ruby1.9.1, ${misc:Depends} +Package: ruby-linux-netlink +Architecture: any +Depends: ruby | ruby-interpreter, ruby-ffi, ${misc:Depends} +Provides: liblinux-netlink-ruby1.8, liblinux-netlink-ruby1.9.1 +XB-Ruby-Versions: ${ruby:Versions} Description: Netlink socket library for Ruby 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 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. - diff --git a/debian/liblinux-netlink-ruby1.9.1.examples b/debian/liblinux-netlink-ruby1.9.1.examples deleted file mode 100644 index e39721e..0000000 --- a/debian/liblinux-netlink-ruby1.9.1.examples +++ /dev/null @@ -1 +0,0 @@ -examples/* diff --git a/debian/liblinux-netlink-ruby1.8.examples b/debian/ruby-linux-netlink.examples similarity index 100% rename from debian/liblinux-netlink-ruby1.8.examples rename to debian/ruby-linux-netlink.examples diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml new file mode 100644 index 0000000..bb88cd7 --- /dev/null +++ b/debian/ruby-test-files.yaml @@ -0,0 +1,2 @@ +--- +- test/t_route.rb diff --git a/debian/rules b/debian/rules index bf1db75..5a433f2 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,23 @@ #!/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 -include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk +%: + dh $@ --buildsystem=ruby --with ruby -makebuilddir:: +override_dh_auto_build-arch: rake lib/linux/c_struct_sizeof_size_t.rb -clean:: +override_dh_auto_clean: rake clean + From 9e1b28a8b1410c320335da5357c7c4a799dcfbb3 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 13:58:14 +0100 Subject: [PATCH 3/7] Added tag 0.11-1+wheezy1 for changeset 5db0aa45b5e2 From 4cba09d81919e7892d5ba172b4408b56b4178823 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 14:17:24 +0100 Subject: [PATCH 4/7] Added patches to remove rubygems requirements. --- .hgignore | 1 + debian/changelog | 9 +++++- debian/patches/remove-rubygems-requirements | 32 +++++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 debian/patches/remove-rubygems-requirements create mode 100644 debian/patches/series diff --git a/.hgignore b/.hgignore index 41f51a9..8dced2d 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ ^debian/ruby-linux-netlink$ ~$ ^.config-liblinux-netlink-ruby +^.pc/ ^debian/files$ ^debian/.*\.substvars$ ^debian/.*\.debhelper.log$ diff --git a/debian/changelog b/debian/changelog index 7bb8092..4e39acb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,15 @@ +linux-netlink-ruby (0.11-1+wheezy2) stable; urgency=low + + * Switch to dpkg-source 3.0 (quilt) format. + * Added patch to remove rubygems requires. + + -- Patrick J Cherry Fri, 05 Jul 2013 14:16:30 +0100 + linux-netlink-ruby (0.11-1+wheezy1) stable; urgency=low * New upstream version, repackaged for wheezy. - -- Patrick J Cherry Fri, 05 Jul 2013 13:57:06 +0100 + -- Patrick J Cherry Fri, 05 Jul 2013 14:16:05 +0100 linux-netlink-ruby (0.10-6) stable; urgency=low diff --git a/debian/patches/remove-rubygems-requirements b/debian/patches/remove-rubygems-requirements new file mode 100644 index 0000000..a76ed02 --- /dev/null +++ b/debian/patches/remove-rubygems-requirements @@ -0,0 +1,32 @@ +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 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..342717e --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +remove-rubygems-requirements From 10f11d9bc16ffbf455a4b1d8bceb97811b6c8181 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 14:23:49 +0100 Subject: [PATCH 5/7] Updated package name to match ruby-packaging standards. Added patch to remove rubygems requirements. --- .hgignore | 1 + debian/changelog | 10 ++++++- debian/control | 2 +- debian/patches/remove-rubygems-requirements | 32 +++++++++++++++++++++ debian/patches/series | 1 + debian/source/format | 1 + 6 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 debian/patches/remove-rubygems-requirements create mode 100644 debian/patches/series create mode 100644 debian/source/format diff --git a/.hgignore b/.hgignore index 41f51a9..8dced2d 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ ^debian/ruby-linux-netlink$ ~$ ^.config-liblinux-netlink-ruby +^.pc/ ^debian/files$ ^debian/.*\.substvars$ ^debian/.*\.debhelper.log$ diff --git a/debian/changelog b/debian/changelog index 7bb8092..3073728 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,16 @@ +ruby-linux-netlink (0.11-1+wheezy2) stable; urgency=low + + * Switch to dpkg-source 3.0 (quilt) format. + * Added patch to remove rubygems requires. + * Renamed source package to fit in with the new guidelines. + + -- Patrick J Cherry Fri, 05 Jul 2013 14:16:30 +0100 + linux-netlink-ruby (0.11-1+wheezy1) stable; urgency=low * New upstream version, repackaged for wheezy. - -- Patrick J Cherry Fri, 05 Jul 2013 13:57:06 +0100 + -- Patrick J Cherry Fri, 05 Jul 2013 14:16:05 +0100 linux-netlink-ruby (0.10-6) stable; urgency=low diff --git a/debian/control b/debian/control index acb05ec..7f03e6f 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: linux-netlink-ruby +Source: ruby-linux-netlink Maintainer: Matthew Bloch Uploaders: Patrick J Cherry Section: ruby diff --git a/debian/patches/remove-rubygems-requirements b/debian/patches/remove-rubygems-requirements new file mode 100644 index 0000000..a76ed02 --- /dev/null +++ b/debian/patches/remove-rubygems-requirements @@ -0,0 +1,32 @@ +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 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..342717e --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +remove-rubygems-requirements diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) From 4ed52c07dd89d142a306d4566c156ade4b2ba84d Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 5 Jul 2013 14:25:40 +0100 Subject: [PATCH 6/7] Added tag 0.11-1+wheezy2 for changeset 123ea9ee6130 From 181d3cd30acbf2dd7a29dbbebb906cbfa976f62b Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 16 Jul 2013 16:28:40 +0100 Subject: [PATCH 7/7] Foo --- netlinkrb.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netlinkrb.gemspec b/netlinkrb.gemspec index a9f0ef7..cdf2135 100644 --- a/netlinkrb.gemspec +++ b/netlinkrb.gemspec @@ -5,9 +5,9 @@ $:.unshift lib unless $:.include? lib Gem::Specification.new do |s| s.name = "netlinkrb" - s.version = "0.11" + s.version = "0.12" s.platform = Gem::Platform::RUBY - s.authors = ["Brian Candler", "Patrick Cherry", "Alex Young"] + s.authors = ["Brian Candler", "Matthew Bloch", "Patrick Cherry", "Alex Young"] s.email = ["matthew@bytemark.co.uk"] s.summary = "Interface to Linux' Netlink API" s.description = "Ruby native interface to the Netlink API which avoids shelling out to command-line tools as much as possible."