| diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle |
| --- logstash-5.4.1/bin/bundle 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/bin/bundle 2020-03-02 11:03:48.740336076 +0800 |
| @@ -10,7 +10,8 @@ |
| |
| require_relative "../lib/bootstrap/environment" |
| ::Gem.clear_paths |
| -::Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home |
| +ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home |
| +::Gem.paths = ENV |
| |
| ENV["BUNDLE_GEMFILE"] = LogStash::Environment::GEMFILE_PATH |
| |
| diff -ruaN logstash-5.4.1/Gemfile linaro-logstash-5.4.1/Gemfile |
| --- logstash-5.4.1/Gemfile 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/Gemfile 2020-03-02 11:03:48.740336076 +0800 |
| @@ -11,13 +11,13 @@ |
| gem "ci_reporter_rspec", "1.0.0", :group => :development |
| gem "simplecov", :group => :development |
| gem "tins", "1.6", :group => :development |
| -gem "rspec", "~> 3.1.0", :group => :development |
| +gem "rspec", "~> 3.5", :group => :development |
| gem "logstash-devutils", :group => :development |
| gem "benchmark-ips", :group => :development |
| gem "octokit", "3.8.0", :group => :build |
| gem "stud", "~> 0.0.22", :group => :build |
| gem "fpm", "~> 1.3.3", :group => :build |
| -gem "rubyzip", "~> 1.1.7", :group => :build |
| +gem "rubyzip", "~> 1.2.1", :group => :build |
| gem "gems", "~> 0.8.3", :group => :build |
| gem "rack-test", :require => "rack/test", :group => :development |
| gem "flores", "~> 0.0.6", :group => :development |
| @@ -117,3 +117,24 @@ |
| gem "logstash-output-udp" |
| gem "logstash-output-webhdfs" |
| gem "logstash-filter-dissect" |
| +gem "logstash-filter-multiline" |
| +gem "logstash-patterns-core", ">= 0" |
| +gem "pry", ">= 0" |
| +gem "rspec-wait", ">= 0" |
| +gem "childprocess", ">= 0" |
| +gem "ftw", "~> 0.0.42" |
| +gem "rspec-sequencing", ">= 0" |
| +gem "gmetric", ">= 0" |
| +gem "gelf", "= 1.3.2" |
| +gem "timecop", ">= 0" |
| +gem "jdbc-derby", ">= 0" |
| +gem "jar-dependencies", "~> 0.3.2" |
| +gem "addressable", "~> 2.3.0" |
| +gem "json", ">= 0" |
| +gem "gzip", ">= 0" |
| +gem "elasticsearch", ">= 0" |
| +gem "sinatra", ">= 0" |
| +gem "webrick", ">= 0" |
| +gem "poseidon", ">= 0" |
| +gem "snappy", ">= 0" |
| +gem "webmock", "~> 1.21.0" |
| diff -ruaN logstash-5.4.1/Gemfile.jruby-1.9.lock linaro-logstash-5.4.1/Gemfile.jruby-1.9.lock |
| --- logstash-5.4.1/Gemfile.jruby-1.9.lock 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/Gemfile.jruby-1.9.lock 1970-01-01 08:00:00.000000000 +0800 |
| @@ -1,731 +0,0 @@ |
| -PATH |
| - remote: ./logstash-core |
| - specs: |
| - logstash-core (5.4.1-java) |
| - chronic_duration (= 0.10.6) |
| - clamp (~> 0.6.5) |
| - concurrent-ruby (= 1.0.0) |
| - filesize (= 0.0.4) |
| - gems (~> 0.8.3) |
| - i18n (= 0.6.9) |
| - jar-dependencies |
| - jrjackson (~> 0.4.0) |
| - jrmonitor (~> 0.4.2) |
| - jruby-openssl (= 0.9.16) |
| - minitar (~> 0.5.4) |
| - pry (~> 0.10.1) |
| - puma (~> 2.16) |
| - ruby-maven (~> 3.3.9) |
| - rubyzip (~> 1.1.7) |
| - sinatra (~> 1.4, >= 1.4.6) |
| - stud (~> 0.0.19) |
| - thread_safe (~> 0.3.5) |
| - treetop (< 1.5.0) |
| - |
| -PATH |
| - remote: ./logstash-core-plugin-api |
| - specs: |
| - logstash-core-plugin-api (2.1.12-java) |
| - logstash-core (= 5.4.1) |
| - |
| -GEM |
| - remote: https://rubygems.org/ |
| - specs: |
| - addressable (2.3.8) |
| - arr-pm (0.0.10) |
| - cabin (> 0) |
| - atomic (1.1.99-java) |
| - avl_tree (1.2.1) |
| - atomic (~> 1.1) |
| - awesome_print (1.7.0) |
| - aws-sdk (2.3.22) |
| - aws-sdk-resources (= 2.3.22) |
| - aws-sdk-core (2.3.22) |
| - jmespath (~> 1.0) |
| - aws-sdk-resources (2.3.22) |
| - aws-sdk-core (= 2.3.22) |
| - aws-sdk-v1 (1.67.0) |
| - json (~> 1.4) |
| - nokogiri (~> 1) |
| - backports (3.8.0) |
| - benchmark-ips (2.7.2) |
| - bindata (2.4.0) |
| - buftok (0.2.0) |
| - builder (3.2.3) |
| - cabin (0.9.0) |
| - childprocess (0.6.3) |
| - ffi (~> 1.0, >= 1.0.11) |
| - chronic_duration (0.10.6) |
| - numerizer (~> 0.1.1) |
| - ci_reporter (2.0.0) |
| - builder (>= 2.1.2) |
| - ci_reporter_rspec (1.0.0) |
| - ci_reporter (~> 2.0) |
| - rspec (>= 2.14, < 4) |
| - cinch (2.3.3) |
| - clamp (0.6.5) |
| - coderay (1.1.1) |
| - concurrent-ruby (1.0.0-java) |
| - diff-lcs (1.3) |
| - docile (1.1.5) |
| - docker-api (1.31.0) |
| - excon (>= 0.38.0) |
| - json |
| - domain_name (0.5.20170404) |
| - unf (>= 0.0.5, < 1.0.0) |
| - dotenv (2.2.1) |
| - edn (1.1.1) |
| - elasticsearch (5.0.4) |
| - elasticsearch-api (= 5.0.4) |
| - elasticsearch-transport (= 5.0.4) |
| - elasticsearch-api (5.0.4) |
| - multi_json |
| - elasticsearch-transport (5.0.4) |
| - faraday |
| - multi_json |
| - equalizer (0.0.10) |
| - excon (0.55.0) |
| - faraday (0.9.2) |
| - multipart-post (>= 1.2, < 3) |
| - ffi (1.9.18-java) |
| - file-dependencies (0.1.6) |
| - minitar |
| - filesize (0.0.4) |
| - filewatch (0.9.0) |
| - fivemat (1.3.3) |
| - flores (0.0.7) |
| - fpm (1.3.3) |
| - arr-pm (~> 0.0.9) |
| - backports (>= 2.6.2) |
| - cabin (>= 0.6.0) |
| - childprocess |
| - clamp (~> 0.6) |
| - ffi |
| - json (>= 1.7.7) |
| - gelfd (0.2.0) |
| - gem_publisher (1.5.0) |
| - gems (0.8.3) |
| - hitimes (1.2.4-java) |
| - http (0.9.9) |
| - addressable (~> 2.3) |
| - http-cookie (~> 1.0) |
| - http-form_data (~> 1.0.1) |
| - http_parser.rb (~> 0.6.0) |
| - http-cookie (1.0.3) |
| - domain_name (~> 0.5) |
| - http-form_data (1.0.1) |
| - http_parser.rb (0.6.0-java) |
| - i18n (0.6.9) |
| - insist (1.0.0) |
| - jar-dependencies (0.3.11) |
| - jls-grok (0.11.4) |
| - cabin (>= 0.6.0) |
| - jls-lumberjack (0.0.26) |
| - concurrent-ruby |
| - jmespath (1.3.1) |
| - jrjackson (0.4.2-java) |
| - jrmonitor (0.4.2) |
| - jruby-openssl (0.9.16-java) |
| - jruby-stdin-channel (0.2.0-java) |
| - json (1.8.6-java) |
| - kramdown (1.13.2) |
| - logstash-codec-cef (4.1.2-java) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-collectd (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-dots (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-edn (3.0.2) |
| - edn |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-edn_lines (3.0.2) |
| - edn |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-es_bulk (3.0.3) |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-fluent (3.1.1-java) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - msgpack-jruby |
| - logstash-codec-graphite (3.0.2) |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-json (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-json_lines (3.0.2) |
| - logstash-codec-line (>= 2.1.0) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-line (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-msgpack (3.0.2-java) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - msgpack-jruby |
| - logstash-codec-multiline (3.0.3) |
| - jls-grok (~> 0.11.1) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-patterns-core |
| - logstash-codec-netflow (3.4.0) |
| - bindata (>= 1.5.0) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-plain (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-codec-rubydebug (3.0.2) |
| - awesome_print |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-devutils (1.3.1-java) |
| - fivemat |
| - gem_publisher |
| - insist (= 1.0.0) |
| - kramdown |
| - logstash-core-plugin-api (>= 2.0, <= 2.99) |
| - minitar |
| - rake |
| - rspec (~> 3.0) |
| - rspec-wait |
| - stud (>= 0.0.20) |
| - logstash-filter-clone (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-csv (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-date (3.1.5) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-dissect (1.0.8) |
| - jar-dependencies |
| - logstash-core-plugin-api (>= 2.1.1, <= 2.99) |
| - logstash-filter-dns (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - lru_redux (~> 1.1.0) |
| - logstash-filter-drop (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-fingerprint (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - murmurhash3 |
| - logstash-filter-geoip (4.0.4-java) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-grok (3.4.0) |
| - jls-grok (~> 0.11.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-patterns-core |
| - logstash-filter-json (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-kv (4.0.0) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-metrics (4.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - metriks |
| - thread_safe |
| - logstash-filter-mutate (3.1.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-ruby (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-date |
| - logstash-filter-sleep (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-split (3.1.1) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-syslog_pri (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-throttle (4.0.1) |
| - atomic |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - thread_safe |
| - logstash-filter-urldecode (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-useragent (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - lru_redux (~> 1.1.0) |
| - user_agent_parser (>= 2.0.0) |
| - logstash-filter-uuid (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-xml (4.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - nokogiri |
| - xml-simple |
| - logstash-input-beats (3.1.15-java) |
| - concurrent-ruby (>= 0.9.2, <= 1.0.0) |
| - jar-dependencies (~> 0.3.4) |
| - logstash-codec-multiline (>= 2.0.5) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - thread_safe (~> 0.3.5) |
| - logstash-input-couchdb_changes (3.1.1) |
| - json |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (>= 0.0.22) |
| - logstash-input-elasticsearch (4.0.3) |
| - elasticsearch (>= 5.0.3, < 6.0.0) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-exec (3.1.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-file (4.0.0) |
| - addressable |
| - filewatch (~> 0.8, >= 0.8.1) |
| - logstash-codec-multiline (~> 3.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-ganglia (3.1.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-gelf (3.0.2) |
| - gelfd (= 0.2.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-generator (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-graphite (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-tcp |
| - logstash-input-heartbeat (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud |
| - logstash-input-http (3.0.4) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - puma (~> 2.16, >= 2.16.0) |
| - rack (~> 1) |
| - stud |
| - logstash-input-http_poller (3.1.1) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-http_client (>= 2.2.4, < 5.0.0) |
| - rufus-scheduler (~> 3.0.9) |
| - stud (~> 0.0.22) |
| - logstash-input-imap (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - mail (~> 2.6.3) |
| - mime-types (= 2.6.2) |
| - stud (~> 0.0.22) |
| - logstash-input-irc (3.0.2) |
| - cinch |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-jdbc (4.2.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - rufus-scheduler |
| - sequel |
| - tzinfo |
| - tzinfo-data |
| - logstash-input-kafka (5.1.7) |
| - logstash-codec-json |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (>= 0.0.22, < 0.1.0) |
| - logstash-input-log4j (3.0.5-java) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-lumberjack (3.1.1) |
| - concurrent-ruby |
| - jls-lumberjack (~> 0.0.26) |
| - logstash-codec-multiline (~> 3.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-pipe (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-rabbitmq (5.2.3) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-rabbitmq_connection (>= 4.2.2, < 5.0.0) |
| - logstash-input-redis (3.1.2) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - redis |
| - logstash-input-s3 (3.1.4) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws |
| - stud (~> 0.0.18) |
| - logstash-input-snmptrap (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - snmp |
| - logstash-input-sqs (3.0.3) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws (>= 1.0.0) |
| - logstash-input-stdin (3.2.2) |
| - concurrent-ruby |
| - jruby-stdin-channel |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-syslog (3.2.0) |
| - concurrent-ruby |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-date |
| - logstash-filter-grok |
| - stud (>= 0.0.22, < 0.1.0) |
| - thread_safe |
| - logstash-input-tcp (4.1.0) |
| - logstash-codec-json |
| - logstash-codec-json_lines |
| - logstash-codec-line |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-twitter (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (>= 0.0.22, < 0.1) |
| - twitter (= 5.15.0) |
| - logstash-input-udp (3.1.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud (~> 0.0.22) |
| - logstash-input-unix (3.0.3) |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-xmpp (3.1.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - xmpp4r (= 0.5) |
| - logstash-mixin-aws (4.2.1) |
| - aws-sdk (~> 2.3.0) |
| - aws-sdk-v1 (>= 1.61.0) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-http_client (4.0.3) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - manticore (>= 0.5.2, < 1.0.0) |
| - logstash-mixin-rabbitmq_connection (4.3.0-java) |
| - march_hare (~> 3.0.0) |
| - stud (~> 0.0.22) |
| - logstash-output-cloudwatch (3.0.4) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws (>= 1.0.0) |
| - rufus-scheduler (~> 3.0.9) |
| - logstash-output-csv (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-filter-json |
| - logstash-input-generator |
| - logstash-output-file |
| - logstash-output-elasticsearch (7.3.1-java) |
| - cabin (~> 0.6) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - manticore (>= 0.5.4, < 1.0.0) |
| - stud (~> 0.0, >= 0.0.17) |
| - logstash-output-file (4.0.1) |
| - logstash-codec-json_lines |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 2.0.0, < 2.99) |
| - logstash-output-graphite (3.1.1) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-http (4.2.0) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-http_client (>= 2.2.1, < 5.0.0) |
| - logstash-output-irc (3.0.2) |
| - cinch |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-kafka (5.1.6) |
| - logstash-codec-json |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-nagios (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-null (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-pagerduty (3.0.3) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-pipe (3.0.2) |
| - logstash-codec-plain |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-rabbitmq (4.0.7-java) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-rabbitmq_connection (>= 4.3.0, < 5.0.0) |
| - logstash-output-redis (3.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - redis |
| - stud |
| - logstash-output-s3 (4.0.7) |
| - concurrent-ruby |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws |
| - stud (~> 0.0.22) |
| - logstash-output-sns (4.0.3) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws (>= 1.0.0) |
| - logstash-output-sqs (4.0.1) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-mixin-aws (>= 1.0.0) |
| - logstash-output-statsd (3.1.1) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-input-generator |
| - statsd-ruby (= 1.2.0) |
| - logstash-output-stdout (3.1.0) |
| - logstash-codec-line |
| - logstash-core-plugin-api (>= 1.60.1, < 2.99) |
| - logstash-output-tcp (4.0.0) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - stud |
| - logstash-output-udp (3.0.2) |
| - logstash-codec-json |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - logstash-output-webhdfs (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - snappy (= 0.0.12) |
| - webhdfs |
| - logstash-output-xmpp (3.0.2) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - xmpp4r (= 0.5) |
| - logstash-patterns-core (4.1.0) |
| - logstash-core-plugin-api (>= 1.60, <= 2.99) |
| - lru_redux (1.1.0) |
| - mail (2.6.5) |
| - mime-types (>= 1.16, < 4) |
| - manticore (0.6.1-java) |
| - march_hare (3.0.0-java) |
| - memoizable (0.4.2) |
| - thread_safe (~> 0.3, >= 0.3.1) |
| - method_source (0.8.2) |
| - metriks (0.9.9.8) |
| - atomic (~> 1.0) |
| - avl_tree (~> 1.2.0) |
| - hitimes (~> 1.1) |
| - mime-types (2.6.2) |
| - minitar (0.5.4) |
| - msgpack-jruby (1.4.1-java) |
| - multi_json (1.12.1) |
| - multipart-post (2.0.0) |
| - murmurhash3 (0.1.6-java) |
| - mustache (0.99.8) |
| - naught (1.1.0) |
| - netrc (0.11.0) |
| - nokogiri (1.7.1-java) |
| - numerizer (0.1.1) |
| - octokit (3.8.0) |
| - sawyer (~> 0.6.0, >= 0.5.3) |
| - paquet (0.2.1) |
| - pleaserun (0.0.29) |
| - cabin (> 0) |
| - clamp |
| - dotenv |
| - insist |
| - mustache (= 0.99.8) |
| - stud |
| - polyglot (0.3.5) |
| - pry (0.10.4-java) |
| - coderay (~> 1.1.0) |
| - method_source (~> 0.8.1) |
| - slop (~> 3.4) |
| - spoon (~> 0.0) |
| - puma (2.16.0-java) |
| - rack (1.6.5) |
| - rack-protection (1.5.3) |
| - rack |
| - rack-test (0.6.3) |
| - rack (>= 1.0) |
| - rake (12.0.0) |
| - redis (3.3.3) |
| - rest-client (1.8.0) |
| - http-cookie (>= 1.0.2, < 2.0) |
| - mime-types (>= 1.16, < 3.0) |
| - netrc (~> 0.7) |
| - rspec (3.1.0) |
| - rspec-core (~> 3.1.0) |
| - rspec-expectations (~> 3.1.0) |
| - rspec-mocks (~> 3.1.0) |
| - rspec-core (3.1.7) |
| - rspec-support (~> 3.1.0) |
| - rspec-expectations (3.1.2) |
| - diff-lcs (>= 1.2.0, < 2.0) |
| - rspec-support (~> 3.1.0) |
| - rspec-mocks (3.1.3) |
| - rspec-support (~> 3.1.0) |
| - rspec-support (3.1.2) |
| - rspec-wait (0.0.9) |
| - rspec (>= 3, < 4) |
| - ruby-maven (3.3.12) |
| - ruby-maven-libs (~> 3.3.9) |
| - ruby-maven-libs (3.3.9) |
| - ruby-progressbar (1.8.1) |
| - rubyzip (1.1.7) |
| - rufus-scheduler (3.0.9) |
| - tzinfo |
| - sawyer (0.6.0) |
| - addressable (~> 2.3.5) |
| - faraday (~> 0.8, < 0.10) |
| - sequel (4.46.0) |
| - simple_oauth (0.3.1) |
| - simplecov (0.14.1) |
| - docile (~> 1.1.0) |
| - json (>= 1.8, < 3) |
| - simplecov-html (~> 0.10.0) |
| - simplecov-html (0.10.0) |
| - sinatra (1.4.8) |
| - rack (~> 1.5) |
| - rack-protection (~> 1.4) |
| - tilt (>= 1.3, < 3) |
| - slop (3.6.0) |
| - snappy (0.0.12-java) |
| - snappy-jars (~> 1.1.0) |
| - snappy-jars (1.1.0.1.2-java) |
| - snmp (1.2.0) |
| - spoon (0.0.6) |
| - ffi |
| - statsd-ruby (1.2.0) |
| - stud (0.0.22) |
| - term-ansicolor (1.3.2) |
| - tins (~> 1.0) |
| - thread_safe (0.3.6-java) |
| - tilt (2.0.7) |
| - tins (1.6.0) |
| - treetop (1.4.15) |
| - polyglot |
| - polyglot (>= 0.3.1) |
| - twitter (5.15.0) |
| - addressable (~> 2.3) |
| - buftok (~> 0.2.0) |
| - equalizer (= 0.0.10) |
| - faraday (~> 0.9.0) |
| - http (>= 0.4, < 0.10) |
| - http_parser.rb (~> 0.6.0) |
| - json (~> 1.8) |
| - memoizable (~> 0.4.0) |
| - naught (~> 1.0) |
| - simple_oauth (~> 0.3.0) |
| - tzinfo (1.2.3) |
| - thread_safe (~> 0.1) |
| - tzinfo-data (1.2017.2) |
| - tzinfo (>= 1.0.0) |
| - unf (0.1.4-java) |
| - user_agent_parser (2.3.0) |
| - webhdfs (0.8.0) |
| - addressable |
| - xml-simple (1.1.5) |
| - xmpp4r (0.5) |
| - |
| -PLATFORMS |
| - java |
| - |
| -DEPENDENCIES |
| - benchmark-ips |
| - builder (~> 3.2.2) |
| - ci_reporter_rspec (= 1.0.0) |
| - docker-api (= 1.31.0) |
| - file-dependencies (= 0.1.6) |
| - flores (~> 0.0.6) |
| - fpm (~> 1.3.3) |
| - gems (~> 0.8.3) |
| - logstash-codec-cef |
| - logstash-codec-collectd |
| - logstash-codec-dots |
| - logstash-codec-edn |
| - logstash-codec-edn_lines |
| - logstash-codec-es_bulk |
| - logstash-codec-fluent |
| - logstash-codec-graphite |
| - logstash-codec-json |
| - logstash-codec-json_lines |
| - logstash-codec-line |
| - logstash-codec-msgpack |
| - logstash-codec-multiline |
| - logstash-codec-netflow |
| - logstash-codec-plain |
| - logstash-codec-rubydebug |
| - logstash-core! |
| - logstash-core-plugin-api! |
| - logstash-devutils |
| - logstash-filter-clone |
| - logstash-filter-csv |
| - logstash-filter-date |
| - logstash-filter-dissect |
| - logstash-filter-dns |
| - logstash-filter-drop |
| - logstash-filter-fingerprint |
| - logstash-filter-geoip |
| - logstash-filter-grok |
| - logstash-filter-json |
| - logstash-filter-kv |
| - logstash-filter-metrics |
| - logstash-filter-mutate |
| - logstash-filter-ruby |
| - logstash-filter-sleep |
| - logstash-filter-split |
| - logstash-filter-syslog_pri |
| - logstash-filter-throttle |
| - logstash-filter-urldecode |
| - logstash-filter-useragent |
| - logstash-filter-uuid |
| - logstash-filter-xml |
| - logstash-input-beats |
| - logstash-input-couchdb_changes |
| - logstash-input-elasticsearch |
| - logstash-input-exec |
| - logstash-input-file |
| - logstash-input-ganglia |
| - logstash-input-gelf |
| - logstash-input-generator |
| - logstash-input-graphite |
| - logstash-input-heartbeat |
| - logstash-input-http |
| - logstash-input-http_poller |
| - logstash-input-imap |
| - logstash-input-irc |
| - logstash-input-jdbc |
| - logstash-input-kafka (~> 5) |
| - logstash-input-log4j |
| - logstash-input-lumberjack |
| - logstash-input-pipe |
| - logstash-input-rabbitmq |
| - logstash-input-redis |
| - logstash-input-s3 |
| - logstash-input-snmptrap |
| - logstash-input-sqs |
| - logstash-input-stdin |
| - logstash-input-syslog |
| - logstash-input-tcp |
| - logstash-input-twitter |
| - logstash-input-udp |
| - logstash-input-unix |
| - logstash-input-xmpp |
| - logstash-output-cloudwatch |
| - logstash-output-csv |
| - logstash-output-elasticsearch |
| - logstash-output-file |
| - logstash-output-graphite |
| - logstash-output-http |
| - logstash-output-irc |
| - logstash-output-kafka (~> 5) |
| - logstash-output-nagios |
| - logstash-output-null |
| - logstash-output-pagerduty |
| - logstash-output-pipe |
| - logstash-output-rabbitmq |
| - logstash-output-redis |
| - logstash-output-s3 |
| - logstash-output-sns |
| - logstash-output-sqs |
| - logstash-output-statsd |
| - logstash-output-stdout |
| - logstash-output-tcp |
| - logstash-output-udp |
| - logstash-output-webhdfs |
| - logstash-output-xmpp |
| - octokit (= 3.8.0) |
| - paquet (~> 0.2.0) |
| - pleaserun (~> 0.0.28) |
| - rack-test |
| - rest-client (= 1.8.0) |
| - rspec (~> 3.1.0) |
| - ruby-progressbar (~> 1.8.1) |
| - rubyzip (~> 1.1.7) |
| - simplecov |
| - stud (~> 0.0.22) |
| - term-ansicolor (~> 1.3.2) |
| - tins (= 1.6) |
| diff -ruaN logstash-5.4.1/.gitignore linaro-logstash-5.4.1/.gitignore |
| --- logstash-5.4.1/.gitignore 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/.gitignore 2020-03-02 11:03:48.736336108 +0800 |
| @@ -33,6 +33,7 @@ |
| qa/.vagrant |
| qa/acceptance/.vagrant |
| qa/Gemfile.lock |
| +Gemfile.jruby-2.3.lock |
| *.ipr |
| *.iws |
| *.iml |
| diff -ruaN logstash-5.4.1/lib/bootstrap/bundler.rb linaro-logstash-5.4.1/lib/bootstrap/bundler.rb |
| --- logstash-5.4.1/lib/bootstrap/bundler.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/bootstrap/bundler.rb 2020-03-02 11:03:48.760335911 +0800 |
| @@ -46,7 +46,8 @@ |
| # make sure we use our own installed bundler |
| LogStash::Rubygems.patch! |
| ::Gem.clear_paths |
| - ::Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = Environment.logstash_gem_home |
| + ENV['GEM_HOME'] = ENV['GEM_PATH'] = Environment.logstash_gem_home |
| + ::Gem.paths = ENV |
| |
| # set BUNDLE_GEMFILE ENV before requiring bundler to avoid bundler recurse and load unrelated Gemfile(s) |
| ENV["BUNDLE_GEMFILE"] = Environment::GEMFILE_PATH |
| @@ -86,7 +87,8 @@ |
| # require "logstash/patches/rubygems" # patch rubygems before clear_paths |
| LogStash::Rubygems.patch! |
| ::Gem.clear_paths |
| - ::Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home |
| + ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home |
| + ::Gem.paths = ENV |
| |
| # set BUNDLE_GEMFILE ENV before requiring bundler to avoid bundler recurse and load unrelated Gemfile(s). |
| # in the context of calling Bundler::CLI this is not really required since Bundler::CLI will look at |
| @@ -95,6 +97,12 @@ |
| |
| require "bundler" |
| require "bundler/cli" |
| + |
| + lock_template = ::File.join(ENV["LOGSTASH_HOME"], "Gemfile.jruby-2.3.lock.release") |
| + if ::File.exists?(lock_template) && !::File.exists?(Environment::LOCKFILE) |
| + FileUtils.copy(lock_template, Environment::LOCKFILE) |
| + end |
| + |
| LogStash::Bundler.patch! |
| |
| # force Rubygems sources to our Gemfile sources |
| diff -ruaN logstash-5.4.1/lib/bootstrap/environment.rb linaro-logstash-5.4.1/lib/bootstrap/environment.rb |
| --- logstash-5.4.1/lib/bootstrap/environment.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/bootstrap/environment.rb 2020-03-02 11:03:48.760335911 +0800 |
| @@ -18,7 +18,7 @@ |
| GEMFILE_PATH = ::File.join(LOGSTASH_HOME, "Gemfile") |
| LOCAL_GEM_PATH = ::File.join(LOGSTASH_HOME, 'vendor', 'local_gems') |
| CACHE_PATH = ::File.join(LOGSTASH_HOME, "vendor", "cache") |
| - LOCKFILE = Pathname.new(::File.join(LOGSTASH_HOME, "Gemfile.jruby-1.9.lock")) |
| + LOCKFILE = Pathname.new(::File.join(LOGSTASH_HOME, "Gemfile.jruby-2.3.lock")) |
| GEMFILE = Pathname.new(::File.join(LOGSTASH_HOME, "Gemfile")) |
| |
| # @return [String] the ruby version string bundler uses to craft its gem path |
| diff -ruaN logstash-5.4.1/lib/pluginmanager/bundler/logstash_injector.rb linaro-logstash-5.4.1/lib/pluginmanager/bundler/logstash_injector.rb |
| --- logstash-5.4.1/lib/pluginmanager/bundler/logstash_injector.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/pluginmanager/bundler/logstash_injector.rb 2020-03-02 11:03:48.760335911 +0800 |
| @@ -7,6 +7,7 @@ |
| require "bundler/injector" |
| require "bundler/shared_helpers" |
| require "pluginmanager/gemfile" |
| +require "rubygems/specification" |
| require "pathname" |
| |
| |
| @@ -23,6 +24,12 @@ |
| module Bundler |
| class LogstashInjector < ::Bundler::Injector |
| def self.inject!(new_deps, options = { :gemfile => LogStash::Environment::GEMFILE, :lockfile => LogStash::Environment::LOCKFILE }) |
| + # Make sure all the available Specifications |
| + # are loaded before trying to inject any new gems |
| + # If we dont do this, we will have a stale index that wont have the gems |
| + # that we just have installed. |
| + ::Gem::Specification.reset |
| + |
| gemfile = options.delete(:gemfile) |
| lockfile = options.delete(:lockfile) |
| |
| diff -ruaN logstash-5.4.1/lib/pluginmanager/custom_gem_indexer.rb linaro-logstash-5.4.1/lib/pluginmanager/custom_gem_indexer.rb |
| --- logstash-5.4.1/lib/pluginmanager/custom_gem_indexer.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/pluginmanager/custom_gem_indexer.rb 1970-01-01 08:00:00.000000000 +0800 |
| @@ -1,63 +0,0 @@ |
| -# encoding: utf-8 |
| -require "pluginmanager/ui" |
| -require "stud/temporary" |
| - |
| -module LogStash module PluginManager |
| - class CustomGemIndexer |
| - GEMS_DIR = "gems" |
| - |
| - class << self |
| - # Copy the file to a specific format that `Gem::Indexer` can understand |
| - # See `#update_in_memory_index` |
| - def copy_to_local_source(temporary_directory) |
| - local_source = Stud::Temporary.pathname |
| - local_source_gems = ::File.join(local_source, GEMS_DIR) |
| - |
| - FileUtils.mkdir_p(local_source_gems) |
| - PluginManager.ui.debug("Creating the index structure format from #{temporary_directory} to #{local_source}") |
| - |
| - Dir.glob(::File.join(temporary_directory, "**", "*.gem")).each do |file| |
| - destination = ::File.join(local_source_gems, ::File.basename(file)) |
| - FileUtils.cp(file, destination) |
| - end |
| - |
| - local_source |
| - end |
| - |
| - # *WARNING*: Bundler need to not be activated at this point because it won't find anything that |
| - # is not defined in the gemfile/lock combo |
| - # |
| - # This takes a folder with a special structure, will generate an index |
| - # similar to what rubygems do and make them available in the local program, |
| - # we use this **side effect** to validate theses gems with the current gemfile/lock. |
| - # Bundler will assume they are system gems and will use them when doing resolution checks. |
| - # |
| - #. |
| - # ├── gems |
| - # │  ├── addressable-2.4.0.gem |
| - # │  ├── cabin-0.9.0.gem |
| - # │  ├── ffi-1.9.14-java.gem |
| - # │  ├── gemoji-1.5.0.gem |
| - # │  ├── launchy-2.4.3-java.gem |
| - # │  ├── logstash-output-elasticsearch-5.2.0-java.gem |
| - # │  ├── logstash-output-secret-0.1.0.gem |
| - # │  ├── manticore-0.6.0-java.gem |
| - # │  ├── spoon-0.0.6.gem |
| - # │  └── stud-0.0.22.gem |
| - # |
| - # Right now this work fine, but I think we could also use Bundler's SourceList classes to handle the same thing |
| - def update_in_memory_index!(local_source) |
| - PluginManager.ui.debug("Generating indexes in #{local_source}") |
| - indexer = ::Gem::Indexer.new(local_source, { :build_modern => true}) |
| - indexer.ui = ::Gem::SilentUI.new unless ENV["DEBUG"] |
| - indexer.generate_index |
| - end |
| - |
| - def index(path) |
| - local_source = copy_to_local_source(path) |
| - update_in_memory_index!(local_source) |
| - local_source |
| - end |
| - end |
| - end |
| -end end |
| diff -ruaN logstash-5.4.1/lib/pluginmanager/gem_installer.rb linaro-logstash-5.4.1/lib/pluginmanager/gem_installer.rb |
| --- logstash-5.4.1/lib/pluginmanager/gem_installer.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/pluginmanager/gem_installer.rb 2020-03-02 11:03:48.760335911 +0800 |
| @@ -10,7 +10,7 @@ |
| # - Generate the specifications |
| # - Copy the data in the right folders |
| class GemInstaller |
| - GEM_HOME = Pathname.new(::File.join(LogStash::Environment::BUNDLE_DIR, "jruby", "1.9")) |
| + GEM_HOME = Pathname.new(::File.join(LogStash::Environment::BUNDLE_DIR, "jruby", "2.3.0")) |
| SPECIFICATIONS_DIR = "specifications" |
| GEMS_DIR = "gems" |
| CACHE_DIR = "cache" |
| @@ -28,7 +28,7 @@ |
| create_destination_folders |
| extract_files |
| write_specification |
| - display_post_install_message |
| + post_install_message |
| copy_gem_file_to_cache |
| end |
| |
| @@ -69,8 +69,8 @@ |
| end |
| end |
| |
| - def display_post_install_message |
| - PluginManager.ui.info(spec.post_install_message) if display_post_install_message? |
| + def post_install_message |
| + spec.post_install_message if display_post_install_message? |
| end |
| |
| def display_post_install_message? |
| diff -ruaN logstash-5.4.1/lib/pluginmanager/pack_installer/local.rb linaro-logstash-5.4.1/lib/pluginmanager/pack_installer/local.rb |
| --- logstash-5.4.1/lib/pluginmanager/pack_installer/local.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/lib/pluginmanager/pack_installer/local.rb 2020-03-02 11:03:48.760335911 +0800 |
| @@ -2,7 +2,6 @@ |
| require "pluginmanager/ui" |
| require "pluginmanager/bundler/logstash_injector" |
| require "pluginmanager/gem_installer" |
| -require "pluginmanager/custom_gem_indexer" |
| require "pluginmanager/errors" |
| require "pluginmanager/pack_installer/pack" |
| require "bootstrap/util/compress" |
| @@ -29,24 +28,26 @@ |
| pack = LogStash::PluginManager::PackInstaller::Pack.new(uncompressed_path) |
| raise PluginManager::InvalidPackError, "The pack must contains at least one plugin" unless pack.valid? |
| |
| - local_source = LogStash::PluginManager::CustomGemIndexer.index(uncompressed_path) |
| + # Install the gems to make them available locally when bundler does his local resolution |
| + post_install_messages = [] |
| + pack.gems.each do |packed_gem| |
| + PluginManager.ui.debug("Installing, #{packed_gem.name}, version: #{packed_gem.version} file: #{packed_gem.file}") |
| + post_install_messages << LogStash::PluginManager::GemInstaller::install(packed_gem.file, packed_gem.plugin?) |
| + end |
| |
| # Try to add the gems to the current gemfile and lock file, if successful |
| # both of them will be updated. This injector is similar to Bundler's own injector class |
| # minus the support for additionals source and doing local resolution only. |
| ::Bundler::LogstashInjector.inject!(pack) |
| |
| - # When successful its safe to install the gem and their specifications in the bundle directory |
| - pack.gems.each do |packed_gem| |
| - PluginManager.ui.debug("Installing, #{packed_gem.name}, version: #{packed_gem.version} file: #{packed_gem.file}") |
| - LogStash::PluginManager::GemInstaller::install(packed_gem.file, packed_gem.plugin?) |
| + post_install_messages.compact.each do |message| |
| + PluginManager.ui.info(message) |
| end |
| PluginManager.ui.info("Install successful") |
| rescue ::Bundler::BundlerError => e |
| raise PluginManager::InstallError.new(e), "An error occurred went installing plugins" |
| ensure |
| FileUtils.rm_rf(uncompressed_path) if uncompressed_path && Dir.exist?(uncompressed_path) |
| - FileUtils.rm_rf(local_source) if local_source && Dir.exist?(local_source) |
| end |
| |
| private |
| diff -ruaN logstash-5.4.1/logstash-core/build.gradle linaro-logstash-5.4.1/logstash-core/build.gradle |
| --- logstash-5.4.1/logstash-core/build.gradle 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/build.gradle 2020-03-02 11:03:48.760335911 +0800 |
| @@ -120,7 +120,7 @@ |
| testCompile 'org.apache.logging.log4j:log4j-api:2.6.2:tests' |
| testCompile 'junit:junit:4.12' |
| testCompile 'net.javacrumbs.json-unit:json-unit:1.9.0' |
| - provided 'org.jruby:jruby-core:1.7.25' |
| + provided 'org.jruby:jruby-core:9.1.9.0' |
| } |
| |
| // See http://www.gradle.org/docs/current/userguide/gradle_wrapper.html |
| diff -ruaN logstash-5.4.1/logstash-core/lib/logstash/config/mixin.rb linaro-logstash-5.4.1/logstash-core/lib/logstash/config/mixin.rb |
| --- logstash-5.4.1/logstash-core/lib/logstash/config/mixin.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/lib/logstash/config/mixin.rb 2020-03-02 11:03:48.764335879 +0800 |
| @@ -10,7 +10,6 @@ |
| require "filesize" |
| |
| LogStash::Environment.load_locale! |
| - |
| # This module is meant as a mixin to classes wishing to be configurable from |
| # config files |
| # |
| @@ -33,13 +32,13 @@ |
| # } |
| # |
| module LogStash::Config::Mixin |
| + include LogStash::Util::EnvironmentVariables |
| attr_accessor :config |
| attr_accessor :original_params |
| |
| PLUGIN_VERSION_1_0_0 = LogStash::Util::PluginVersion.new(1, 0, 0) |
| PLUGIN_VERSION_0_9_0 = LogStash::Util::PluginVersion.new(0, 9, 0) |
| |
| - ENV_PLACEHOLDER_REGEX = /\$\{(?<name>\w+)(\:(?<default>[^}]*))?\}/ |
| |
| # This method is called when someone does 'include LogStash::Config' |
| def self.included(base) |
| @@ -47,22 +46,6 @@ |
| base.extend(LogStash::Config::Mixin::DSL) |
| end |
| |
| - # Recursive method to replace environment variable references in parameters |
| - def deep_replace(value) |
| - if (value.is_a?(Hash)) |
| - value.each do |valueHashKey, valueHashValue| |
| - value[valueHashKey.to_s] = deep_replace(valueHashValue) |
| - end |
| - else |
| - if (value.is_a?(Array)) |
| - value.each_index do | valueArrayIndex| |
| - value[valueArrayIndex] = deep_replace(value[valueArrayIndex]) |
| - end |
| - else |
| - return replace_env_placeholders(value) |
| - end |
| - end |
| - end |
| |
| def config_init(params) |
| # Validation will modify the values inside params if necessary. |
| @@ -158,28 +141,10 @@ |
| @config = params |
| end # def config_init |
| |
| - # Replace all environment variable references in 'value' param by environment variable value and return updated value |
| - # Process following patterns : $VAR, ${VAR}, ${VAR:defaultValue} |
| - def replace_env_placeholders(value) |
| - return value unless value.is_a?(String) |
| - |
| - value.gsub(ENV_PLACEHOLDER_REGEX) do |placeholder| |
| - # Note: Ruby docs claim[1] Regexp.last_match is thread-local and scoped to |
| - # the call, so this should be thread-safe. |
| - # |
| - # [1] http://ruby-doc.org/core-2.1.1/Regexp.html#method-c-last_match |
| - name = Regexp.last_match(:name) |
| - default = Regexp.last_match(:default) |
| - |
| - replacement = ENV.fetch(name, default) |
| - if replacement.nil? |
| - raise LogStash::ConfigurationError, "Cannot evaluate `#{placeholder}`. Environment variable `#{name}` is not set and there is no default value given." |
| - end |
| - replacement |
| - end |
| - end # def replace_env_placeholders |
| - |
| module DSL |
| + |
| + include LogStash::Util::EnvironmentVariables |
| + |
| attr_accessor :flags |
| |
| # If name is given, set the name and return it. |
| @@ -425,6 +390,8 @@ |
| # (see LogStash::Inputs::File for example) |
| result = nil |
| |
| + value = deep_replace(value) |
| + |
| if validator.nil? |
| return true, value |
| elsif validator.is_a?(Array) |
| diff -ruaN logstash-5.4.1/logstash-core/lib/logstash/settings.rb linaro-logstash-5.4.1/logstash-core/lib/logstash/settings.rb |
| --- logstash-5.4.1/logstash-core/lib/logstash/settings.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/lib/logstash/settings.rb 2020-03-02 11:03:48.768335846 +0800 |
| @@ -2,10 +2,12 @@ |
| require "logstash/util/loggable" |
| require "fileutils" |
| require "logstash/util/byte_value" |
| +require "logstash/util/environment_variables" |
| require "logstash/util/time_value" |
| |
| module LogStash |
| class Settings |
| + include LogStash::Util::EnvironmentVariables |
| |
| def initialize |
| @settings = {} |
| @@ -107,7 +109,10 @@ |
| |
| def from_yaml(yaml_path) |
| settings = read_yaml(::File.join(yaml_path, "logstash.yml")) |
| - self.merge(flatten_hash(settings), true) |
| + self.merge( |
| + deep_replace(flatten_hash(settings)), |
| + true |
| + ) |
| self |
| end |
| |
| diff -ruaN logstash-5.4.1/logstash-core/lib/logstash/util/environment_variables.rb linaro-logstash-5.4.1/logstash-core/lib/logstash/util/environment_variables.rb |
| --- logstash-5.4.1/logstash-core/lib/logstash/util/environment_variables.rb 1970-01-01 08:00:00.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/lib/logstash/util/environment_variables.rb 2020-03-02 11:03:48.768335846 +0800 |
| @@ -0,0 +1,42 @@ |
| +# encoding: utf-8 |
| +module ::LogStash::Util::EnvironmentVariables |
| + |
| + ENV_PLACEHOLDER_REGEX = /\${(?<name>[a-zA-Z_.][a-zA-Z0-9_.]*)(:(?<default>[^}]*))?}/ |
| + |
| + # Recursive method to replace environment variable references in parameters |
| + def deep_replace(value) |
| + if value.is_a?(Hash) |
| + value.each do |valueHashKey, valueHashValue| |
| + value[valueHashKey.to_s] = deep_replace(valueHashValue) |
| + end |
| + else |
| + if value.is_a?(Array) |
| + value.each_index do | valueArrayIndex| |
| + value[valueArrayIndex] = deep_replace(value[valueArrayIndex]) |
| + end |
| + else |
| + return replace_env_placeholders(value) |
| + end |
| + end |
| + end |
| + # Replace all environment variable references in 'value' param by environment variable value and return updated value |
| + # Process following patterns : $VAR, ${VAR}, ${VAR:defaultValue} |
| + def replace_env_placeholders(value) |
| + return value unless value.is_a?(String) |
| + |
| + value.gsub(ENV_PLACEHOLDER_REGEX) do |placeholder| |
| + # Note: Ruby docs claim[1] Regexp.last_match is thread-local and scoped to |
| + # the call, so this should be thread-safe. |
| + # |
| + # [1] http://ruby-doc.org/core-2.1.1/Regexp.html#method-c-last_match |
| + name = Regexp.last_match(:name) |
| + default = Regexp.last_match(:default) |
| + |
| + replacement = ENV.fetch(name, default) |
| + if replacement.nil? |
| + raise LogStash::ConfigurationError, "Cannot evaluate `#{placeholder}`. Environment variable `#{name}` is not set and there is no default value given." |
| + end |
| + replacement |
| + end |
| + end # def replace_env_placeholders |
| +end |
| diff -ruaN logstash-5.4.1/logstash-core/logstash-core.gemspec linaro-logstash-5.4.1/logstash-core/logstash-core.gemspec |
| --- logstash-5.4.1/logstash-core/logstash-core.gemspec 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/logstash-core.gemspec 2020-03-02 11:03:48.768335846 +0800 |
| @@ -27,7 +27,7 @@ |
| gem.add_runtime_dependency "concurrent-ruby", "1.0.0" |
| gem.add_runtime_dependency "sinatra", '~> 1.4', '>= 1.4.6' |
| gem.add_runtime_dependency 'puma', '~> 2.16' |
| - gem.add_runtime_dependency "jruby-openssl", "0.9.16" # >= 0.9.13 Required to support TLSv1.2 |
| + gem.add_runtime_dependency "jruby-openssl", "0.9.20" # >= 0.9.13 Required to support TLSv1.2 |
| gem.add_runtime_dependency "chronic_duration", "0.10.6" |
| gem.add_runtime_dependency "jrmonitor", '~> 0.4.2' |
| |
| @@ -40,7 +40,7 @@ |
| |
| # filetools and rakelib |
| gem.add_runtime_dependency "minitar", "~> 0.5.4" |
| - gem.add_runtime_dependency "rubyzip", "~> 1.1.7" |
| + gem.add_runtime_dependency "rubyzip", "~> 1.2.1" |
| gem.add_runtime_dependency "thread_safe", "~> 0.3.5" #(Apache 2.0 license) |
| |
| gem.add_runtime_dependency "jrjackson", "~> 0.4.0" #(Apache 2.0 license) |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/config/mixin_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/config/mixin_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/config/mixin_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/config/mixin_spec.rb 2020-03-02 11:03:48.768335846 +0800 |
| @@ -369,11 +369,13 @@ |
| before do |
| ENV["FunString"] = "fancy" |
| ENV["FunBool"] = "true" |
| + ENV["SERVER_LS_TEST_ADDRESS"] = "some.host.address.tld" |
| end |
| |
| after do |
| ENV.delete("FunString") |
| ENV.delete("FunBool") |
| + ENV.delete("SERVER_LS_TEST_ADDRESS") |
| end |
| |
| subject do |
| @@ -397,6 +399,16 @@ |
| expect(subject.nestedArray).to(be == { "level1" => [{ "key1" => "http://fancy:8080/blah.txt" }, { "key2" => "http://fancy:8080/foo.txt" }] }) |
| expect(subject.deepHash).to(be == { "level1" => { "level2" => { "level3" => { "key1" => "http://fancy:8080/blah.txt" } } } }) |
| end |
| + |
| + it "should validate settings after interpolating ENV variables" do |
| + expect { |
| + Class.new(LogStash::Filters::Base) do |
| + include LogStash::Config::Mixin |
| + config_name "test" |
| + config :server_address, :validate => :uri |
| + end.new({"server_address" => "${SERVER_LS_TEST_ADDRESS}"}) |
| + }.not_to raise_error |
| + end |
| end |
| |
| context "should support $ in values" do |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/filters/base_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/filters/base_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/filters/base_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/filters/base_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -24,7 +24,7 @@ |
| end |
| |
| it "should provide class public API" do |
| - [:register, :filter, :multi_filter, :execute, :threadsafe?, :filter_matched, :filter?, :close].each do |method| |
| + [:register, :filter, :multi_filter, :execute, :threadsafe?, :close].each do |method| |
| expect(subject).to respond_to(method) |
| end |
| end |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/legacy_ruby_timestamp_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/legacy_ruby_timestamp_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/legacy_ruby_timestamp_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/legacy_ruby_timestamp_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -6,13 +6,13 @@ |
| describe LogStash::Timestamp do |
| |
| it "should parse its own iso8601 output" do |
| - t = Time.now |
| + t = DateTime.now.to_time |
| ts = LogStash::Timestamp.new(t) |
| expect(LogStash::Timestamp.parse_iso8601(ts.to_iso8601).to_i).to eq(t.to_i) |
| end |
| |
| it "should coerce iso8601 string" do |
| - t = Time.now |
| + t = DateTime.now.to_time |
| ts = LogStash::Timestamp.new(t) |
| expect(LogStash::Timestamp.coerce(ts.to_iso8601).to_i).to eq(t.to_i) |
| end |
| @@ -57,27 +57,27 @@ |
| end |
| |
| it "should allow unary operation +" do |
| - current = Time.now |
| + current = DateTime.now.to_time |
| t = LogStash::Timestamp.new(current) + 10 |
| expect(t).to eq(current + 10) |
| end |
| |
| describe "subtraction" do |
| it "should work on a timestamp object" do |
| - t = Time.now |
| + t = DateTime.now.to_time |
| current = LogStash::Timestamp.new(t) |
| future = LogStash::Timestamp.new(t + 10) |
| expect(future - current).to eq(10) |
| end |
| |
| it "should work on with time object" do |
| - current = Time.now |
| + current = DateTime.now.to_time |
| t = LogStash::Timestamp.new(current + 10) |
| expect(t - current).to eq(10) |
| end |
| |
| it "should work with numeric value" do |
| - current = Time.now |
| + current = DateTime.now.to_time |
| t = LogStash::Timestamp.new(current + 10) |
| expect(t - 10).to eq(current) |
| end |
| @@ -96,15 +96,15 @@ |
| end |
| |
| context "numeric casting methods" do |
| - let (:now) {Time.now} |
| + let (:now) {DateTime.now.to_time} |
| subject { LogStash::Timestamp.new(now) } |
| |
| it "should support to_i" do |
| - expect(subject.to_i).to eq(now.to_i) |
| + expect(subject.to_i).to be_kind_of(Integer) |
| end |
| |
| it "should support to_f" do |
| - expect(subject.to_f).to eq(now.to_f) |
| + expect(subject.to_f).to be_kind_of(Float) |
| end |
| end |
| |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/runner_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/runner_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/runner_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/runner_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -8,10 +8,6 @@ |
| require "logstash/logging/json" |
| require "json" |
| |
| -class NullRunner |
| - def run(args); end |
| -end |
| - |
| describe LogStash::Runner do |
| |
| subject { LogStash::Runner } |
| @@ -184,13 +180,13 @@ |
| let(:queue_override_path) { "/tmp/queue-override_path" } |
| |
| it "should set data paths" do |
| + LogStash::SETTINGS.set("path.queue", queue_override_path) |
| + |
| expect(LogStash::Agent).to receive(:new) do |settings| |
| expect(settings.get("path.data")).to eq(test_data_path) |
| expect(settings.get("path.queue")).to eq(queue_override_path) |
| end |
| |
| - LogStash::SETTINGS.set("path.queue", queue_override_path) |
| - |
| args = ["--path.data", test_data_path, "-e", pipeline_string] |
| subject.run("bin/logstash", args) |
| end |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/settings/writable_directory_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/settings/writable_directory_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/settings/writable_directory_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/settings/writable_directory_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -18,7 +18,7 @@ |
| shared_examples "failure" do |
| before { subject.set(path) } |
| it "should fail" do |
| - expect { subject.validate_value }.to raise_error |
| + expect { subject.validate_value }.to raise_error E |
| end |
| end |
| |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/setting_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/setting_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/setting_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/setting_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -80,7 +80,7 @@ |
| end |
| context "when the argument's class does not match @klass" do |
| it "should throw an exception" do |
| - expect { subject.set("not a number") }.to raise_error |
| + expect { subject.set("not a number") }.to raise_error ArgumentError |
| end |
| end |
| context "when strict=false" do |
| @@ -131,7 +131,7 @@ |
| context "when validation fails" do |
| let(:new_value) { "very very very very very big text" } |
| it "should raise an exception" do |
| - expect { subject.set(new_value) }.to raise_error |
| + expect { subject.set(new_value) }.to raise_error ArgumentError |
| end |
| it "should not change the value" do |
| subject.set(new_value) rescue nil |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/settings_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/settings_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/settings_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/settings_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -1,5 +1,6 @@ |
| # encoding: utf-8 |
| require "spec_helper" |
| +require "logstash/util/environment_variables" |
| require "logstash/settings" |
| require "fileutils" |
| |
| @@ -146,4 +147,94 @@ |
| end |
| end |
| end |
| + |
| + describe "#from_yaml" do |
| + |
| + context "env placeholders in flat logstash.yml" do |
| + |
| + after do |
| + ENV.delete('SOME_LOGSTASH_SPEC_ENV_VAR') |
| + ENV.delete('some.logstash.spec.env.var') |
| + end |
| + |
| + subject do |
| + settings = described_class.new |
| + settings.register(LogStash::Setting::String.new("interpolated", "missing")) |
| + settings.register(LogStash::Setting::String.new("with_dot", "missing")) |
| + settings |
| + end |
| + |
| + let(:values) {{ |
| + "interpolated" => "${SOME_LOGSTASH_SPEC_ENV_VAR}", |
| + "with_dot" => "${some.logstash.spec.env.var}" |
| + }} |
| + let(:yaml_path) do |
| + p = Stud::Temporary.pathname |
| + FileUtils.mkdir_p(p) |
| + |
| + ::File.open(::File.join(p, "logstash.yml"), "w+") do |f| |
| + f.write(YAML.dump(values)) |
| + end |
| + p |
| + end |
| + |
| + it "can interpolate environment into settings" do |
| + expect(subject.get('interpolated')).to eq("missing") |
| + expect(subject.get('with_dot')).to eq("missing") |
| + ENV['SOME_LOGSTASH_SPEC_ENV_VAR'] = "correct_setting" |
| + ENV['some.logstash.spec.env.var'] = "correct_setting_for_dotted" |
| + subject.from_yaml(yaml_path) |
| + expect(subject.get('interpolated')).to eq("correct_setting") |
| + expect(subject.get('with_dot')).to eq("correct_setting_for_dotted") |
| + end |
| + end |
| + end |
| + |
| + context "env placeholders in nested logstash.yml" do |
| + |
| + before do |
| + ENV['lsspecdomain'] = "domain1" |
| + ENV['lsspecdomain2'] = "domain2" |
| + end |
| + |
| + after do |
| + ENV.delete('lsspecdomain') |
| + ENV.delete('lsspecdomain2') |
| + end |
| + |
| + subject do |
| + settings = described_class.new |
| + settings.register(LogStash::Setting::ArrayCoercible.new("host", String, [])) |
| + settings.register(LogStash::Setting::ArrayCoercible.new("modules", Hash, [])) |
| + settings |
| + end |
| + |
| + let(:values) {{ |
| + "host" => ["dev1.${lsspecdomain}", "dev2.${lsspecdomain}"], |
| + "modules" => [ |
| + {"name" => "${lsspecdomain}", "testing" => "${lsspecdomain}"}, |
| + {"name" => "${lsspecdomain2}", "testing" => "${lsspecdomain2}"} |
| + ] |
| + }} |
| + let(:yaml_path) do |
| + p = Stud::Temporary.pathname |
| + FileUtils.mkdir_p(p) |
| + |
| + ::File.open(::File.join(p, "logstash.yml"), "w+") do |f| |
| + f.write(YAML.dump(values)) |
| + end |
| + p |
| + end |
| + |
| + it "can interpolate environment into settings" do |
| + expect(subject.get('host')).to match_array([]) |
| + expect(subject.get('modules')).to match_array([]) |
| + subject.from_yaml(yaml_path) |
| + expect(subject.get('host')).to match_array(["dev1.domain1", "dev2.domain1"]) |
| + expect(subject.get('modules')).to match_array([ |
| + {"name" => "domain1", "testing" => "domain1"}, |
| + {"name" => "domain2", "testing" => "domain2"} |
| + ]) |
| + end |
| + end |
| end |
| diff -ruaN logstash-5.4.1/logstash-core/spec/logstash/timestamp_spec.rb linaro-logstash-5.4.1/logstash-core/spec/logstash/timestamp_spec.rb |
| --- logstash-5.4.1/logstash-core/spec/logstash/timestamp_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/spec/logstash/timestamp_spec.rb 2020-03-02 11:03:48.772335813 +0800 |
| @@ -12,7 +12,7 @@ |
| t = LogStash::Timestamp.now |
| expect(t.time.to_i).to be_within(1).of Time.now.to_i |
| |
| - now = Time.now.utc |
| + now = DateTime.now.to_time.utc |
| t = LogStash::Timestamp.new(now) |
| expect(t.time).to eq(now) |
| |
| diff -ruaN logstash-5.4.1/logstash-core/src/main/java/org/logstash/ackedqueue/ext/JrubyAckedBatchExtLibrary.java linaro-logstash-5.4.1/logstash-core/src/main/java/org/logstash/ackedqueue/ext/JrubyAckedBatchExtLibrary.java |
| --- logstash-5.4.1/logstash-core/src/main/java/org/logstash/ackedqueue/ext/JrubyAckedBatchExtLibrary.java 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/src/main/java/org/logstash/ackedqueue/ext/JrubyAckedBatchExtLibrary.java 2020-03-02 11:03:48.776335780 +0800 |
| @@ -59,7 +59,7 @@ |
| context.runtime.newArgumentError("expected queue AckedQueue"); |
| } |
| |
| - this.batch = new Batch(((RubyArray)events).getList(), ((RubyArray)seqNums).getList(), ((JrubyAckedQueueExtLibrary.RubyAckedQueue)queue).getQueue()); |
| + //this.batch = new Batch(((RubyArray)events).getList(), ((RubyArray)seqNums).getList(), ((JrubyAckedQueueExtLibrary.RubyAckedQueue)queue).getQueue()); |
| |
| return context.nil; |
| } |
| diff -ruaN logstash-5.4.1/logstash-core/src/main/java/org/logstash/ext/JrubyTimestampExtLibrary.java linaro-logstash-5.4.1/logstash-core/src/main/java/org/logstash/ext/JrubyTimestampExtLibrary.java |
| --- logstash-5.4.1/logstash-core/src/main/java/org/logstash/ext/JrubyTimestampExtLibrary.java 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/logstash-core/src/main/java/org/logstash/ext/JrubyTimestampExtLibrary.java 2020-03-02 11:03:48.776335780 +0800 |
| @@ -130,6 +130,12 @@ |
| return ruby_to_iso8601(context); |
| } |
| |
| + @JRubyMethod(name = "inspect") |
| + public IRubyObject ruby_inspect(ThreadContext context) |
| + { |
| + return ruby_to_iso8601(context); |
| + } |
| + |
| @JRubyMethod(name = "to_iso8601") |
| public IRubyObject ruby_to_iso8601(ThreadContext context) |
| { |
| @@ -206,15 +212,8 @@ |
| { |
| RubyTime t; |
| if (args.length == 1) { |
| - IRubyObject epoch = args[0]; |
| - |
| - if (epoch instanceof RubyBigDecimal) { |
| - // bug in JRuby prevents correctly parsing a BigDecimal fractional part, see https://github.com/elastic/logstash/issues/4565 |
| - double usec = ((RubyBigDecimal)epoch).frac().convertToFloat().getDoubleValue() * 1000000; |
| - t = (RubyTime)RubyTime.at(context, context.runtime.getTime(), ((RubyBigDecimal)epoch).to_int(), new RubyFloat(context.runtime, usec)); |
| - } else { |
| - t = (RubyTime)RubyTime.at(context, context.runtime.getTime(), epoch); |
| - } |
| + // JRuby 9K has fixed the problem iwth BigDecimal precision see https://github.com/elastic/logstash/issues/4565 |
| + t = (RubyTime)RubyTime.at(context, context.runtime.getTime(), args[0]); |
| } else { |
| t = (RubyTime)RubyTime.at(context, context.runtime.getTime(), args[0], args[1]); |
| } |
| diff -ruaN logstash-5.4.1/NOTICE.TXT linaro-logstash-5.4.1/NOTICE.TXT |
| --- logstash-5.4.1/NOTICE.TXT 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/NOTICE.TXT 2020-03-02 11:03:48.740336076 +0800 |
| @@ -82,541 +82,7 @@ |
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| |
| ========================================================================== |
| -RubyGem: geoip Version: 1.6.3 |
| -[ Note that while the core GeoIP library is licensed under the |
| -LGPL, the libGeoIPUpdate library depends on md5.c and types.h |
| -which are licensed under the GPL. ] |
| - |
| - |
| - GNU LESSER GENERAL PUBLIC LICENSE |
| - Version 2.1, February 1999 |
| - |
| - Copyright (C) 1991, 1999 Free Software Foundation, Inc. |
| - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| - Everyone is permitted to copy and distribute verbatim copies |
| - of this license document, but changing it is not allowed. |
| - |
| -[This is the first released version of the Lesser GPL. It also counts |
| - as the successor of the GNU Library Public License, version 2, hence |
| - the version number 2.1.] |
| - |
| - Preamble |
| - |
| - The licenses for most software are designed to take away your |
| -freedom to share and change it. By contrast, the GNU General Public |
| -Licenses are intended to guarantee your freedom to share and change |
| -free software--to make sure the software is free for all its users. |
| - |
| - This license, the Lesser General Public License, applies to some |
| -specially designated software packages--typically libraries--of the |
| -Free Software Foundation and other authors who decide to use it. You |
| -can use it too, but we suggest you first think carefully about whether |
| -this license or the ordinary General Public License is the better |
| -strategy to use in any particular case, based on the explanations below. |
| - |
| - When we speak of free software, we are referring to freedom of use, |
| -not price. Our General Public Licenses are designed to make sure that |
| -you have the freedom to distribute copies of free software (and charge |
| -for this service if you wish); that you receive source code or can get |
| -it if you want it; that you can change the software and use pieces of |
| -it in new free programs; and that you are informed that you can do |
| -these things. |
| - |
| - To protect your rights, we need to make restrictions that forbid |
| -distributors to deny you these rights or to ask you to surrender these |
| -rights. These restrictions translate to certain responsibilities for |
| -you if you distribute copies of the library or if you modify it. |
| - |
| - For example, if you distribute copies of the library, whether gratis |
| -or for a fee, you must give the recipients all the rights that we gave |
| -you. You must make sure that they, too, receive or can get the source |
| -code. If you link other code with the library, you must provide |
| -complete object files to the recipients, so that they can relink them |
| -with the library after making changes to the library and recompiling |
| -it. And you must show them these terms so they know their rights. |
| - |
| - We protect your rights with a two-step method: (1) we copyright the |
| -library, and (2) we offer you this license, which gives you legal |
| -permission to copy, distribute and/or modify the library. |
| - |
| - To protect each distributor, we want to make it very clear that |
| -there is no warranty for the free library. Also, if the library is |
| -modified by someone else and passed on, the recipients should know |
| -that what they have is not the original version, so that the original |
| -author's reputation will not be affected by problems that might be |
| -introduced by others. |
| - |
| - Finally, software patents pose a constant threat to the existence of |
| -any free program. We wish to make sure that a company cannot |
| -effectively restrict the users of a free program by obtaining a |
| -restrictive license from a patent holder. Therefore, we insist that |
| -any patent license obtained for a version of the library must be |
| -consistent with the full freedom of use specified in this license. |
| - |
| - Most GNU software, including some libraries, is covered by the |
| -ordinary GNU General Public License. This license, the GNU Lesser |
| -General Public License, applies to certain designated libraries, and |
| -is quite different from the ordinary General Public License. We use |
| -this license for certain libraries in order to permit linking those |
| -libraries into non-free programs. |
| - |
| - When a program is linked with a library, whether statically or using |
| -a shared library, the combination of the two is legally speaking a |
| -combined work, a derivative of the original library. The ordinary |
| -General Public License therefore permits such linking only if the |
| -entire combination fits its criteria of freedom. The Lesser General |
| -Public License permits more lax criteria for linking other code with |
| -the library. |
| - |
| - We call this license the "Lesser" General Public License because it |
| -does Less to protect the user's freedom than the ordinary General |
| -Public License. It also provides other free software developers Less |
| -of an advantage over competing non-free programs. These disadvantages |
| -are the reason we use the ordinary General Public License for many |
| -libraries. However, the Lesser license provides advantages in certain |
| -special circumstances. |
| - |
| - For example, on rare occasions, there may be a special need to |
| -encourage the widest possible use of a certain library, so that it becomes |
| -a de-facto standard. To achieve this, non-free programs must be |
| -allowed to use the library. A more frequent case is that a free |
| -library does the same job as widely used non-free libraries. In this |
| -case, there is little to gain by limiting the free library to free |
| -software only, so we use the Lesser General Public License. |
| - |
| - In other cases, permission to use a particular library in non-free |
| -programs enables a greater number of people to use a large body of |
| -free software. For example, permission to use the GNU C Library in |
| -non-free programs enables many more people to use the whole GNU |
| -operating system, as well as its variant, the GNU/Linux operating |
| -system. |
| - |
| - Although the Lesser General Public License is Less protective of the |
| -users' freedom, it does ensure that the user of a program that is |
| -linked with the Library has the freedom and the wherewithal to run |
| -that program using a modified version of the Library. |
| - |
| - The precise terms and conditions for copying, distribution and |
| -modification follow. Pay close attention to the difference between a |
| -"work based on the library" and a "work that uses the library". The |
| -former contains code derived from the library, whereas the latter must |
| -be combined with the library in order to run. |
| - |
| - GNU LESSER GENERAL PUBLIC LICENSE |
| - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| - |
| - 0. This License Agreement applies to any software library or other |
| -program which contains a notice placed by the copyright holder or |
| -other authorized party saying it may be distributed under the terms of |
| -this Lesser General Public License (also called "this License"). |
| -Each licensee is addressed as "you". |
| - |
| - A "library" means a collection of software functions and/or data |
| -prepared so as to be conveniently linked with application programs |
| -(which use some of those functions and data) to form executables. |
| - |
| - The "Library", below, refers to any such software library or work |
| -which has been distributed under these terms. A "work based on the |
| -Library" means either the Library or any derivative work under |
| -copyright law: that is to say, a work containing the Library or a |
| -portion of it, either verbatim or with modifications and/or translated |
| -straightforwardly into another language. (Hereinafter, translation is |
| -included without limitation in the term "modification".) |
| - |
| - "Source code" for a work means the preferred form of the work for |
| -making modifications to it. For a library, complete source code means |
| -all the source code for all modules it contains, plus any associated |
| -interface definition files, plus the scripts used to control compilation |
| -and installation of the library. |
| - |
| - Activities other than copying, distribution and modification are not |
| -covered by this License; they are outside its scope. The act of |
| -running a program using the Library is not restricted, and output from |
| -such a program is covered only if its contents constitute a work based |
| -on the Library (independent of the use of the Library in a tool for |
| -writing it). Whether that is true depends on what the Library does |
| -and what the program that uses the Library does. |
| - |
| - 1. You may copy and distribute verbatim copies of the Library's |
| -complete source code as you receive it, in any medium, provided that |
| -you conspicuously and appropriately publish on each copy an |
| -appropriate copyright notice and disclaimer of warranty; keep intact |
| -all the notices that refer to this License and to the absence of any |
| -warranty; and distribute a copy of this License along with the |
| -Library. |
| - |
| - You may charge a fee for the physical act of transferring a copy, |
| -and you may at your option offer warranty protection in exchange for a |
| -fee. |
| - |
| - 2. You may modify your copy or copies of the Library or any portion |
| -of it, thus forming a work based on the Library, and copy and |
| -distribute such modifications or work under the terms of Section 1 |
| -above, provided that you also meet all of these conditions: |
| - |
| - a) The modified work must itself be a software library. |
| - |
| - b) You must cause the files modified to carry prominent notices |
| - stating that you changed the files and the date of any change. |
| - |
| - c) You must cause the whole of the work to be licensed at no |
| - charge to all third parties under the terms of this License. |
| - |
| - d) If a facility in the modified Library refers to a function or a |
| - table of data to be supplied by an application program that uses |
| - the facility, other than as an argument passed when the facility |
| - is invoked, then you must make a good faith effort to ensure that, |
| - in the event an application does not supply such function or |
| - table, the facility still operates, and performs whatever part of |
| - its purpose remains meaningful. |
| - |
| - (For example, a function in a library to compute square roots has |
| - a purpose that is entirely well-defined independent of the |
| - application. Therefore, Subsection 2d requires that any |
| - application-supplied function or table used by this function must |
| - be optional: if the application does not supply it, the square |
| - root function must still compute square roots.) |
| - |
| -These requirements apply to the modified work as a whole. If |
| -identifiable sections of that work are not derived from the Library, |
| -and can be reasonably considered independent and separate works in |
| -themselves, then this License, and its terms, do not apply to those |
| -sections when you distribute them as separate works. But when you |
| -distribute the same sections as part of a whole which is a work based |
| -on the Library, the distribution of the whole must be on the terms of |
| -this License, whose permissions for other licensees extend to the |
| -entire whole, and thus to each and every part regardless of who wrote |
| -it. |
| - |
| -Thus, it is not the intent of this section to claim rights or contest |
| -your rights to work written entirely by you; rather, the intent is to |
| -exercise the right to control the distribution of derivative or |
| -collective works based on the Library. |
| - |
| -In addition, mere aggregation of another work not based on the Library |
| -with the Library (or with a work based on the Library) on a volume of |
| -a storage or distribution medium does not bring the other work under |
| -the scope of this License. |
| - |
| - 3. You may opt to apply the terms of the ordinary GNU General Public |
| -License instead of this License to a given copy of the Library. To do |
| -this, you must alter all the notices that refer to this License, so |
| -that they refer to the ordinary GNU General Public License, version 2, |
| -instead of to this License. (If a newer version than version 2 of the |
| -ordinary GNU General Public License has appeared, then you can specify |
| -that version instead if you wish.) Do not make any other change in |
| -these notices. |
| - |
| - Once this change is made in a given copy, it is irreversible for |
| -that copy, so the ordinary GNU General Public License applies to all |
| -subsequent copies and derivative works made from that copy. |
| - |
| - This option is useful when you wish to copy part of the code of |
| -the Library into a program that is not a library. |
| - |
| - 4. You may copy and distribute the Library (or a portion or |
| -derivative of it, under Section 2) in object code or executable form |
| -under the terms of Sections 1 and 2 above provided that you accompany |
| -it with the complete corresponding machine-readable source code, which |
| -must be distributed under the terms of Sections 1 and 2 above on a |
| -medium customarily used for software interchange. |
| - |
| - If distribution of object code is made by offering access to copy |
| -from a designated place, then offering equivalent access to copy the |
| -source code from the same place satisfies the requirement to |
| -distribute the source code, even though third parties are not |
| -compelled to copy the source along with the object code. |
| - |
| - 5. A program that contains no derivative of any portion of the |
| -Library, but is designed to work with the Library by being compiled or |
| -linked with it, is called a "work that uses the Library". Such a |
| -work, in isolation, is not a derivative work of the Library, and |
| -therefore falls outside the scope of this License. |
| - |
| - However, linking a "work that uses the Library" with the Library |
| -creates an executable that is a derivative of the Library (because it |
| -contains portions of the Library), rather than a "work that uses the |
| -library". The executable is therefore covered by this License. |
| -Section 6 states terms for distribution of such executables. |
| - |
| - When a "work that uses the Library" uses material from a header file |
| -that is part of the Library, the object code for the work may be a |
| -derivative work of the Library even though the source code is not. |
| -Whether this is true is especially significant if the work can be |
| -linked without the Library, or if the work is itself a library. The |
| -threshold for this to be true is not precisely defined by law. |
| - |
| - If such an object file uses only numerical parameters, data |
| -structure layouts and accessors, and small macros and small inline |
| -functions (ten lines or less in length), then the use of the object |
| -file is unrestricted, regardless of whether it is legally a derivative |
| -work. (Executables containing this object code plus portions of the |
| -Library will still fall under Section 6.) |
| - |
| - Otherwise, if the work is a derivative of the Library, you may |
| -distribute the object code for the work under the terms of Section 6. |
| -Any executables containing that work also fall under Section 6, |
| -whether or not they are linked directly with the Library itself. |
| - |
| - 6. As an exception to the Sections above, you may also combine or |
| -link a "work that uses the Library" with the Library to produce a |
| -work containing portions of the Library, and distribute that work |
| -under terms of your choice, provided that the terms permit |
| -modification of the work for the customer's own use and reverse |
| -engineering for debugging such modifications. |
| - |
| - You must give prominent notice with each copy of the work that the |
| -Library is used in it and that the Library and its use are covered by |
| -this License. You must supply a copy of this License. If the work |
| -during execution displays copyright notices, you must include the |
| -copyright notice for the Library among them, as well as a reference |
| -directing the user to the copy of this License. Also, you must do one |
| -of these things: |
| - |
| - a) Accompany the work with the complete corresponding |
| - machine-readable source code for the Library including whatever |
| - changes were used in the work (which must be distributed under |
| - Sections 1 and 2 above); and, if the work is an executable linked |
| - with the Library, with the complete machine-readable "work that |
| - uses the Library", as object code and/or source code, so that the |
| - user can modify the Library and then relink to produce a modified |
| - executable containing the modified Library. (It is understood |
| - that the user who changes the contents of definitions files in the |
| - Library will not necessarily be able to recompile the application |
| - to use the modified definitions.) |
| - |
| - b) Use a suitable shared library mechanism for linking with the |
| - Library. A suitable mechanism is one that (1) uses at run time a |
| - copy of the library already present on the user's computer system, |
| - rather than copying library functions into the executable, and (2) |
| - will operate properly with a modified version of the library, if |
| - the user installs one, as long as the modified version is |
| - interface-compatible with the version that the work was made with. |
| - |
| - c) Accompany the work with a written offer, valid for at |
| - least three years, to give the same user the materials |
| - specified in Subsection 6a, above, for a charge no more |
| - than the cost of performing this distribution. |
| - |
| - d) If distribution of the work is made by offering access to copy |
| - from a designated place, offer equivalent access to copy the above |
| - specified materials from the same place. |
| - |
| - e) Verify that the user has already received a copy of these |
| - materials or that you have already sent this user a copy. |
| - |
| - For an executable, the required form of the "work that uses the |
| -Library" must include any data and utility programs needed for |
| -reproducing the executable from it. However, as a special exception, |
| -the materials to be distributed need not include anything that is |
| -normally distributed (in either source or binary form) with the major |
| -components (compiler, kernel, and so on) of the operating system on |
| -which the executable runs, unless that component itself accompanies |
| -the executable. |
| - |
| - It may happen that this requirement contradicts the license |
| -restrictions of other proprietary libraries that do not normally |
| -accompany the operating system. Such a contradiction means you cannot |
| -use both them and the Library together in an executable that you |
| -distribute. |
| - |
| - 7. You may place library facilities that are a work based on the |
| -Library side-by-side in a single library together with other library |
| -facilities not covered by this License, and distribute such a combined |
| -library, provided that the separate distribution of the work based on |
| -the Library and of the other library facilities is otherwise |
| -permitted, and provided that you do these two things: |
| - |
| - a) Accompany the combined library with a copy of the same work |
| - based on the Library, uncombined with any other library |
| - facilities. This must be distributed under the terms of the |
| - Sections above. |
| - |
| - b) Give prominent notice with the combined library of the fact |
| - that part of it is a work based on the Library, and explaining |
| - where to find the accompanying uncombined form of the same work. |
| - |
| - 8. You may not copy, modify, sublicense, link with, or distribute |
| -the Library except as expressly provided under this License. Any |
| -attempt otherwise to copy, modify, sublicense, link with, or |
| -distribute the Library is void, and will automatically terminate your |
| -rights under this License. However, parties who have received copies, |
| -or rights, from you under this License will not have their licenses |
| -terminated so long as such parties remain in full compliance. |
| - |
| - 9. You are not required to accept this License, since you have not |
| -signed it. However, nothing else grants you permission to modify or |
| -distribute the Library or its derivative works. These actions are |
| -prohibited by law if you do not accept this License. Therefore, by |
| -modifying or distributing the Library (or any work based on the |
| -Library), you indicate your acceptance of this License to do so, and |
| -all its terms and conditions for copying, distributing or modifying |
| -the Library or works based on it. |
| - |
| - 10. Each time you redistribute the Library (or any work based on the |
| -Library), the recipient automatically receives a license from the |
| -original licensor to copy, distribute, link with or modify the Library |
| -subject to these terms and conditions. You may not impose any further |
| -restrictions on the recipients' exercise of the rights granted herein. |
| -You are not responsible for enforcing compliance by third parties with |
| -this License. |
| - |
| - 11. If, as a consequence of a court judgment or allegation of patent |
| -infringement or for any other reason (not limited to patent issues), |
| -conditions are imposed on you (whether by court order, agreement or |
| -otherwise) that contradict the conditions of this License, they do not |
| -excuse you from the conditions of this License. If you cannot |
| -distribute so as to satisfy simultaneously your obligations under this |
| -License and any other pertinent obligations, then as a consequence you |
| -may not distribute the Library at all. For example, if a patent |
| -license would not permit royalty-free redistribution of the Library by |
| -all those who receive copies directly or indirectly through you, then |
| -the only way you could satisfy both it and this License would be to |
| -refrain entirely from distribution of the Library. |
| - |
| -If any portion of this section is held invalid or unenforceable under any |
| -particular circumstance, the balance of the section is intended to apply, |
| -and the section as a whole is intended to apply in other circumstances. |
| - |
| -It is not the purpose of this section to induce you to infringe any |
| -patents or other property right claims or to contest validity of any |
| -such claims; this section has the sole purpose of protecting the |
| -integrity of the free software distribution system which is |
| -implemented by public license practices. Many people have made |
| -generous contributions to the wide range of software distributed |
| -through that system in reliance on consistent application of that |
| -system; it is up to the author/donor to decide if he or she is willing |
| -to distribute software through any other system and a licensee cannot |
| -impose that choice. |
| - |
| -This section is intended to make thoroughly clear what is believed to |
| -be a consequence of the rest of this License. |
| - |
| - 12. If the distribution and/or use of the Library is restricted in |
| -certain countries either by patents or by copyrighted interfaces, the |
| -original copyright holder who places the Library under this License may add |
| -an explicit geographical distribution limitation excluding those countries, |
| -so that distribution is permitted only in or among countries not thus |
| -excluded. In such case, this License incorporates the limitation as if |
| -written in the body of this License. |
| - |
| - 13. The Free Software Foundation may publish revised and/or new |
| -versions of the Lesser General Public License from time to time. |
| -Such new versions will be similar in spirit to the present version, |
| -but may differ in detail to address new problems or concerns. |
| - |
| -Each version is given a distinguishing version number. If the Library |
| -specifies a version number of this License which applies to it and |
| -"any later version", you have the option of following the terms and |
| -conditions either of that version or of any later version published by |
| -the Free Software Foundation. If the Library does not specify a |
| -license version number, you may choose any version ever published by |
| -the Free Software Foundation. |
| - |
| - 14. If you wish to incorporate parts of the Library into other free |
| -programs whose distribution conditions are incompatible with these, |
| -write to the author to ask for permission. For software which is |
| -copyrighted by the Free Software Foundation, write to the Free |
| -Software Foundation; we sometimes make exceptions for this. Our |
| -decision will be guided by the two goals of preserving the free status |
| -of all derivatives of our free software and of promoting the sharing |
| -and reuse of software generally. |
| - |
| - NO WARRANTY |
| - |
| - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO |
| -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. |
| -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR |
| -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY |
| -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE |
| -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE |
| -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME |
| -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
| - |
| - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
| -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY |
| -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU |
| -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR |
| -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE |
| -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
| -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
| -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
| -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
| -DAMAGES. |
| - |
| - END OF TERMS AND CONDITIONS |
| - |
| - How to Apply These Terms to Your New Libraries |
| - |
| - If you develop a new library, and you want it to be of the greatest |
| -possible use to the public, we recommend making it free software that |
| -everyone can redistribute and change. You can do so by permitting |
| -redistribution under these terms (or, alternatively, under the terms of the |
| -ordinary General Public License). |
| - |
| - To apply these terms, attach the following notices to the library. It is |
| -safest to attach them to the start of each source file to most effectively |
| -convey the exclusion of warranty; and each file should have at least the |
| -"copyright" line and a pointer to where the full notice is found. |
| - |
| - <one line to give the library's name and a brief idea of what it does.> |
| - Copyright (C) <year> <name of author> |
| - |
| - This library is free software; you can redistribute it and/or |
| - modify it under the terms of the GNU Lesser General Public |
| - License as published by the Free Software Foundation; either |
| - version 2.1 of the License, or (at your option) any later version. |
| - |
| - This library is distributed in the hope that it will be useful, |
| - but WITHOUT ANY WARRANTY; without even the implied warranty of |
| - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| - Lesser General Public License for more details. |
| - |
| - You should have received a copy of the GNU Lesser General Public |
| - License along with this library; if not, write to the Free Software |
| - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| - |
| -Also add information on how to contact you by electronic and paper mail. |
| - |
| -You should also get your employer (if you work as a programmer) or your |
| -school, if any, to sign a "copyright disclaimer" for the library, if |
| -necessary. Here is a sample; alter the names: |
| - |
| - Yoyodyne, Inc., hereby disclaims all copyright interest in the |
| - library `Frob' (a library for tweaking knobs) written by James Random Hacker. |
| - |
| - <signature of Ty Coon>, 1 April 1990 |
| - Ty Coon, President of Vice |
| - |
| -That's all there is to it! |
| - |
| - |
| - |
| -========================================================================== |
| -RubyGem: user_agent_parser Version: 2.3.0 |
| -Copyright (c) 2012 Tim Lucas |
| - |
| -Permission is hereby granted, free of charge, to any person obtaining |
| -a copy of this software and associated documentation files (the |
| -"Software"), to deal in the Software without restriction, including |
| -without limitation the rights to use, copy, modify, merge, publish, |
| -distribute, sublicense, and/or sell copies of the Software, and to |
| -permit persons to whom the Software is furnished to do so, subject to |
| -the following conditions: |
| - |
| -The above copyright notice and this permission notice shall be |
| -included in all copies or substantial portions of the Software. |
| - |
| -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| -========================================================================== |
| -RubyGem: elasticsearch Version: 1.1.2 |
| +RubyGem: elasticsearch Version: 5.0.4 |
| Copyright 2013 Elasticsearch |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| @@ -861,7 +327,7 @@ |
| |
| |
| ========================================================================== |
| -RubyGem: mail Version: 2.6.5 |
| +RubyGem: mail Version: 2.6.6 |
| Copyright (c) 2009-2017 Mikel Lindsaar |
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| @@ -908,7 +374,7 @@ |
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| |
| ========================================================================== |
| -RubyGem: sequel Version: 4.46.0 |
| +RubyGem: sequel Version: 4.47.0 |
| Copyright (c) 2007-2008 Sharon Rosner |
| Copyright (c) 2008-2017 Jeremy Evans |
| |
| @@ -1019,8 +485,35 @@ |
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| |
| ========================================================================== |
| -RubyGem: jar-dependencies Version: 0.3.11 |
| -Copyright (c) 2014 Christian Meier |
| +RubyGem: http-form_data Version: 1.0.1 |
| +Copyright (c) 2015 Aleksey V Zapparov |
| + |
| +MIT License |
| + |
| +Permission is hereby granted, free of charge, to any person obtaining |
| +a copy of this software and associated documentation files (the |
| +"Software"), to deal in the Software without restriction, including |
| +without limitation the rights to use, copy, modify, merge, publish, |
| +distribute, sublicense, and/or sell copies of the Software, and to |
| +permit persons to whom the Software is furnished to do so, subject to |
| +the following conditions: |
| + |
| +The above copyright notice and this permission notice shall be |
| +included in all copies or substantial portions of the Software. |
| + |
| +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| + |
| +========================================================================== |
| +RubyGem: public_suffix Version: 1.4.6 |
| +Copyright (c) 2009-2014 Simone Carletti <weppos@weppos.net> |
| + |
| +MIT License |
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and associated documentation files (the |
| diff -ruaN logstash-5.4.1/qa/acceptance/spec/spec_helper.rb linaro-logstash-5.4.1/qa/acceptance/spec/spec_helper.rb |
| --- logstash-5.4.1/qa/acceptance/spec/spec_helper.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/qa/acceptance/spec/spec_helper.rb 2020-03-02 11:03:48.780335747 +0800 |
| @@ -5,6 +5,14 @@ |
| require_relative 'config_helper' |
| require_relative "../../platform_config" |
| |
| +# This is a non obvious hack, |
| +# EllipticalCurve are not completely implemented in JRuby 9k and the new version of SSH from the standard library |
| +# use them. |
| +# |
| +# Details: https://github.com/jruby/jruby-openssl/issues/105 |
| +Net::SSH::Transport::Algorithms::ALGORITHMS.values.each { |algs| algs.reject! { |a| a =~ /^ecd(sa|h)-sha2/ } } |
| +Net::SSH::KnownHosts::SUPPORTED_TYPE.reject! { |t| t =~ /^ecd(sa|h)-sha2/ } |
| + |
| ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..')) |
| $LOAD_PATH.unshift File.join(ROOT, 'logstash-core/lib') |
| |
| diff -ruaN logstash-5.4.1/qa/integration/services/logstash_service.rb linaro-logstash-5.4.1/qa/integration/services/logstash_service.rb |
| --- logstash-5.4.1/qa/integration/services/logstash_service.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/qa/integration/services/logstash_service.rb 2020-03-02 11:03:48.796335616 +0800 |
| @@ -201,7 +201,7 @@ |
| end |
| |
| def lock_file |
| - File.join(@logstash_home, "Gemfile.jruby-1.9.lock") |
| + File.join(@logstash_home, "Gemfile.jruby-2.3.lock") |
| end |
| |
| class PluginCli |
| diff -ruaN logstash-5.4.1/qa/integration/specs/01_logstash_bin_smoke_spec.rb linaro-logstash-5.4.1/qa/integration/specs/01_logstash_bin_smoke_spec.rb |
| --- logstash-5.4.1/qa/integration/specs/01_logstash_bin_smoke_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/qa/integration/specs/01_logstash_bin_smoke_spec.rb 2020-03-02 11:03:48.796335616 +0800 |
| @@ -174,10 +174,10 @@ |
| } |
| start_ls.call() |
| # we use a try since logstash may have started but the webserver may not yet |
| - first_id = try(num_retries) { get_id } |
| + first_id = Stud.try(num_retries.times, Errno::ECONNREFUSED) { get_id } |
| @ls1.teardown |
| start_ls.call() |
| - second_id = try(num_retries) { get_id } |
| + second_id = Stud.try(num_retries.times, Errno::ECONNREFUSED) { get_id } |
| expect(first_id).to eq(second_id) |
| end |
| end |
| diff -ruaN logstash-5.4.1/qa/integration/specs/cli/prepare_offline_pack_spec.rb linaro-logstash-5.4.1/qa/integration/specs/cli/prepare_offline_pack_spec.rb |
| --- logstash-5.4.1/qa/integration/specs/cli/prepare_offline_pack_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/qa/integration/specs/cli/prepare_offline_pack_spec.rb 2020-03-02 11:03:48.796335616 +0800 |
| @@ -48,7 +48,7 @@ |
| |
| unpacked = unpack(temporary_zip_file) |
| |
| - filters = @logstash_plugin.list(plugins_to_pack.first).stderr_and_stdout.split("\n") |
| + filters = @logstash_plugin.list(plugins_to_pack.first).stderr_and_stdout.split("\n").delete_if { |f| f =~ /cext/ } |
| |
| expect(unpacked.plugins.collect(&:name)).to include(*filters) |
| expect(unpacked.plugins.size).to eq(filters.size) |
| diff -ruaN logstash-5.4.1/rakelib/artifacts.rake linaro-logstash-5.4.1/rakelib/artifacts.rake |
| --- logstash-5.4.1/rakelib/artifacts.rake 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/rakelib/artifacts.rake 2020-03-02 11:03:48.800335584 +0800 |
| @@ -38,7 +38,7 @@ |
| # See more in https://github.com/elastic/logstash/issues/4818 |
| "vendor/??*/**/.mvn/**/*", |
| "Gemfile", |
| - "Gemfile.jruby-1.9.lock", |
| + "Gemfile.jruby-2.3.lock", |
| ] |
| end |
| |
| @@ -274,6 +274,10 @@ |
| require "fpm/errors" # TODO(sissel): fix this in fpm |
| require "fpm/package/dir" |
| require "fpm/package/gem" # TODO(sissel): fix this in fpm; rpm needs it. |
| + require "childprocess/jruby/pump" |
| + # TODO(ph): Cabin is closing the fd when it reach EOF, childprocess will attempt to write to it and hit an IOError. |
| + # This will make a the thread dies, in 1.7.25 we had a Thread Death |
| + require_relative "childprocess_patch" |
| |
| dir = FPM::Package::Dir.new |
| |
| diff -ruaN logstash-5.4.1/rakelib/childprocess_patch.rb linaro-logstash-5.4.1/rakelib/childprocess_patch.rb |
| --- logstash-5.4.1/rakelib/childprocess_patch.rb 1970-01-01 08:00:00.000000000 +0800 |
| +++ linaro-logstash-5.4.1/rakelib/childprocess_patch.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -0,0 +1,20 @@ |
| +# This is a patch for childprocess and this is due to ruby-cabin/fpm interaction. |
| +# When we use the logger.pipe construct and the IO reach EOF we close the IO. |
| +# The problem Childprocess will try to flush to it and hit an IOError making the software crash in JRuby 9k. |
| +# |
| +# In JRuby 1.7.25 we hit a thread death. |
| +# |
| +module ChildProcess |
| + module JRuby |
| + class Pump |
| + alias_method :old_pump, :pump |
| + |
| + def ignore_close_io |
| + old_pump |
| + rescue IOError |
| + end |
| + |
| + alias_method :pump, :ignore_close_io |
| + end |
| + end |
| +end |
| diff -ruaN logstash-5.4.1/rakelib/vendor.rake linaro-logstash-5.4.1/rakelib/vendor.rake |
| --- logstash-5.4.1/rakelib/vendor.rake 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/rakelib/vendor.rake 2020-03-02 11:03:48.800335584 +0800 |
| @@ -1,6 +1,6 @@ |
| namespace "vendor" do |
| VERSIONS = { |
| - "jruby" => { "version" => "1.7.25", "sha1" => "cd15aef419f97cff274491e53fcfb8b88ec36785" }, |
| + "jruby" => { "version" => "9.1.9.0", "sha1" => "b062fe6e411e4dab52ac7a25078b63e831471f9b" }, |
| } |
| |
| def vendor(*args) |
| diff -ruaN logstash-5.4.1/spec/spec_helper.rb linaro-logstash-5.4.1/spec/spec_helper.rb |
| --- logstash-5.4.1/spec/spec_helper.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/spec/spec_helper.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -22,6 +22,9 @@ |
| end |
| end |
| |
| +# Refactor the suite to https://github.com/elastic/logstash/issues/7148 |
| +RSpec::Expectations.configuration.on_potential_false_positives = :nothing |
| + |
| RSpec.configure do |c| |
| Flores::RSpec.configure(c) |
| c.before do |
| diff -ruaN logstash-5.4.1/spec/unit/license_spec.rb linaro-logstash-5.4.1/spec/unit/license_spec.rb |
| --- logstash-5.4.1/spec/unit/license_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/spec/unit/license_spec.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -1,6 +1,6 @@ |
| # encoding: utf-8 |
| require_relative '../spec_helper' |
| -require 'rakelib/default_plugins' |
| +require_relative '../../rakelib/default_plugins' |
| |
| describe "Project licenses" do |
| |
| diff -ruaN logstash-5.4.1/spec/unit/plugin_manager/gem_installer_spec.rb linaro-logstash-5.4.1/spec/unit/plugin_manager/gem_installer_spec.rb |
| --- logstash-5.4.1/spec/unit/plugin_manager/gem_installer_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/spec/unit/plugin_manager/gem_installer_spec.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -36,15 +36,13 @@ |
| |
| context "when we want the message" do |
| it "display the message" do |
| - expect(LogStash::PluginManager.ui).to receive(:info).with(message) |
| - subject.install(simple_gem, true, temporary_gem_home) |
| + expect(subject.install(simple_gem, true, temporary_gem_home)).to eq(message) |
| end |
| end |
| |
| context "when we dont want the message" do |
| it "doesn't display the message" do |
| - expect(LogStash::PluginManager.ui).not_to receive(:info).with(message) |
| - subject.install(simple_gem, false, temporary_gem_home) |
| + expect(subject.install(simple_gem, false, temporary_gem_home)).to be_nil |
| end |
| end |
| end |
| diff -ruaN logstash-5.4.1/spec/unit/plugin_manager/pack_installer/local_spec.rb linaro-logstash-5.4.1/spec/unit/plugin_manager/pack_installer/local_spec.rb |
| --- logstash-5.4.1/spec/unit/plugin_manager/pack_installer/local_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/spec/unit/plugin_manager/pack_installer/local_spec.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -53,14 +53,6 @@ |
| |
| expect(::LogStash::PluginManager::GemInstaller).to receive(:install).with(/logstash-input-packtest/, anything) |
| expect(::LogStash::PluginManager::GemInstaller).to receive(:install).with(/logstash-input-packtestdep/, anything) |
| - |
| - # Since the Gem::Indexer have side effect and we have more things loaded |
| - # I have to disable it in the tests |
| - mock_indexer = double("Gem::Indexer") |
| - allow(mock_indexer).to receive(:ui=).with(anything) |
| - expect(mock_indexer).to receive(:generate_index) |
| - expect(::Gem::Indexer).to receive(:new).with(be_kind_of(String), hash_including(:build_modern => true)).and_return(mock_indexer) |
| - |
| expect { subject.execute }.not_to raise_error |
| end |
| end |
| diff -ruaN logstash-5.4.1/spec/unit/util/retryable_spec.rb linaro-logstash-5.4.1/spec/unit/util/retryable_spec.rb |
| --- logstash-5.4.1/spec/unit/util/retryable_spec.rb 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/spec/unit/util/retryable_spec.rb 2020-03-02 11:03:48.800335584 +0800 |
| @@ -56,7 +56,7 @@ |
| |
| expect do |
| subject.retryable(:on_retry => callback){i += 1; raise E} |
| - end.to raise_error |
| + end.to raise_error E |
| |
| expect(i).to eq(2) |
| |
| @@ -86,7 +86,7 @@ |
| |
| expect do |
| subject.retryable(:tries => n, :on_retry => callback){i += 1; raise E} |
| - end.to raise_error |
| + end.to raise_error E |
| |
| expect(i).to eq(n + 1) |
| |
| @@ -136,4 +136,4 @@ |
| end.to raise_error(E) |
| end |
| end |
| -end |
| \ No newline at end of file |
| +end |
| diff -ruaN logstash-5.4.1/.travis.yml linaro-logstash-5.4.1/.travis.yml |
| --- logstash-5.4.1/.travis.yml 2017-05-18 23:13:07.000000000 +0800 |
| +++ linaro-logstash-5.4.1/.travis.yml 2020-03-02 11:03:48.736336108 +0800 |
| @@ -5,17 +5,17 @@ |
| - vendor/bundle |
| - ~/.gradle/ |
| rvm: |
| - - jruby-1.7.25 |
| + - jruby-9.1.9.0 |
| jdk: |
| - oraclejdk8 |
| env: |
| - - INTEGRATION=false SPEC_OPTS="--order rand --format documentation" |
| - - INTEGRATION=true SPEC_OPTS="--order rand --format documentation" |
| - - INTEGRATION=false FEATURE_FLAG=persistent_queues SPEC_OPTS="--order rand --format documentation" |
| - - INTEGRATION=true FEATURE_FLAG=persistent_queues SPEC_OPTS="--order rand --format documentation" |
| + - INTEGRATION=false SPEC_OPTS="--order rand --format documentation" JRUBY_OPTS='--server -Xcompile.invokedynamic=false' |
| + - INTEGRATION=true SPEC_OPTS="--order rand --format documentation" JRUBY_OPTS='--server -Xcompile.invokedynamic=false' |
| + - INTEGRATION=false FEATURE_FLAG=persistent_queues SPEC_OPTS="--order rand --format documentation" JRUBY_OPTS='--server -Xcompile.invokedynamic=false' |
| + - INTEGRATION=true FEATURE_FLAG=persistent_queues SPEC_OPTS="--order rand --format documentation" JRUBY_OPTS='--server -Xcompile.invokedynamic=false' |
| before_install: |
| # Force bundler 1.12.5 because version 1.13 has issues, see https://github.com/fastlane/fastlane/issues/6065#issuecomment-246044617 |
| - - gem uninstall -i /home/travis/.rvm/gems/jruby-1.7.25@global bundler |
| + - gem uninstall -i /home/travis/.rvm/gems/jruby-9.1.9.0@global bundler |
| - gem install bundler -v 1.12.5 --no-rdoc --no-ri --no-document --quiet |
| install: |
| - rake test:install-core |