diff --git a/CHANGELOG.md b/CHANGELOG.md index 1180cbd..a51b3d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ cookbook-postgresql CHANGELOG =============== +## 0.5.4 + + - manegron + - [3bed88c] Fix script rb_ingest_vuln_cve_pg + ## 0.5.3 - manegron diff --git a/resources/metadata.rb b/resources/metadata.rb index 9fa7440..911425f 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -5,4 +5,4 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures cookbook-logstash' -version '0.5.3' +version '0.5.4' diff --git a/resources/scripts/rb_ingest_vuln_cve_pg.rb b/resources/scripts/rb_ingest_vuln_cve_pg.rb index cde8e75..49490f4 100644 --- a/resources/scripts/rb_ingest_vuln_cve_pg.rb +++ b/resources/scripts/rb_ingest_vuln_cve_pg.rb @@ -74,15 +74,16 @@ def import_cve_files # https://nvd.nist.gov/feeds/json/cve/2.0/nvdcve-2.0-#{year}.meta # sha256sum = `curl -s #{url.sub('.json.gz', '.meta')} | grep 'sha256' | awk '{print $2}'`.strip - unless download_gz_file_with_retries(url, filename) + # Full paths: the script can be run from any directory + filepath = File.join(@download_path, filename) + unless download_gz_file_with_retries(url, filepath) puts "ERROR: Could not download #{filename} after multiple attempts." complete_download = false break end - filepath = @download_path + filename `gzip -dkf #{filepath}` - file_json = filename.sub(/\.gz$/, '') + file_json = filepath.sub(/\.gz$/, '') if File.exist?(file_json) system("dos2unix #{file_json}")