ports/sysutils/puppetserver6/files/patch-ffi.rb
Romain Tartière ea5dcc2fb1 Update to 6.6.0
- Unbreak on FreeBSD 12+ (this version bundles an updated version of jRuby
  which allows running the PuppetServer on hosts with 64 bits inodes);
- Override the jRuby bundled ffi.rb to workaround a NullPointerException when
  trying to open an inexistent file;
- Remove deprecated Java flags;

Release notes:
https://puppet.com/docs/puppetserver/latest/release_notes.html#puppet-server-660

With hat:	puppet
2019-09-23 18:02:11 +00:00

19 lines
530 B
Ruby

--- ffi.rb.orig 2019-09-22 21:04:46 UTC
+++ ffi.rb
@@ -125,7 +125,7 @@ module FFI
# Load all the platform dependent types/consts/struct members
class Config
CONFIG = Hash.new
- begin
+ if File.exist?(File.join(Platform::CONF_DIR, 'platform.conf'))
File.open(File.join(Platform::CONF_DIR, 'platform.conf'), "r") do |f|
typedef = "rbx.platform.typedef."
f.each_line { |line|
@@ -138,7 +138,6 @@ module FFI
end
}
end
- rescue Errno::ENOENT
end
end
end