File apparmor_abstractions_ruby.patch of Package monitoring-plugins-obs

The current abstraction file for ruby provided by the upstream project [1] doesn't
work with newer ruby version, because they are installed in 
/usr/lib{,32,64}/ruby/1.9.1/ (I've checked openSUSE 12.2 and Ubuntu 12.10), which
doesn't match the current globbing.

A bug and patch is already submitted [2].

[1] https://launchpad.net/apparmor
[2] https://bugs.launchpad.net/apparmor/+bug/1074481

--- a/usr.lib.nagios.plugins.check_obs	2012-11-02 21:06:50.780856775 +0100
+++ b/usr.lib.nagios.plugins.check_obs	2012-11-02 21:07:31.127868486 +0100
@@ -4,11 +4,25 @@
 /usr/lib/nagios/plugins/check_obs {
   #include <abstractions/base>
   #include <abstractions/nameservice>
-  #include <abstractions/ruby>
 
   /usr/bin/ruby{,1.9} ix,
   /usr/bin/stty ix,
   /usr/lib64/ruby/gems/1.9.1/gems/nokogiri-1.5.2/lib/nokogiri/nokogiri.so mr,
 
+  /usr/lib{,32,64}/ruby/1.{[89],[89].[0-9]}/ r,
+  /usr/lib{,32,64}/ruby/1.{[89],[89].[0-9]}/*.rb r,
+  /usr/lib{,32,64}/ruby/1.{[89],[89].[0-9]}/**/*.rb r,
+  /usr/lib{,32,64}/ruby/1.{[89],[89].[0-9]}/*-linux/*.so mr,
+  /usr/lib{,32,64}/ruby/1.{[89],[89].[0-9]}/*-linux/**/*.so mr,
+
+  /usr/lib{,32,64}/ruby/site_ruby/1.{[89],[89].[0-9]}/ r,
+  /usr/lib{,32,64}/ruby/site_ruby/1.{[89],[89].[0-9]}/*.rb r,
+  /usr/lib{,32,64}/ruby/site_ruby/1.{[89],[89].[0-9]}/**/*.rb r,
+  /usr/lib{,32,64}/ruby/site_ruby/1.{[89],[89].[0-9]}/*-linux/*.so mr,
+  /usr/lib{,32,64}/ruby/site_ruby/1.{[89],[89].[0-9]}/*-linux/**/*.so mr,
+
+  /usr/lib{,32,64}/ruby/gems/1.{[89],[89].[0-9]}/ r,
+  /usr/lib{,32,64}/ruby/gems/1.{[89],[89].[0-9]}/** r,
+
   /usr/lib/nagios/plugins/check_obs r,
 }
openSUSE Build Service is sponsored by