From: Jackie Huang Date: Tue, 8 Jun 2021 02:32:10 +0000 (+0800) Subject: puppetlabs-stdlib: update for stx 5.0 X-Git-Tag: f-release~94 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=4547c7c51bde74ce591b0e8d4528cb2bde750367;p=pti%2Frtp.git puppetlabs-stdlib: update for stx 5.0 * inherit stx-metadata to help apply patches from stx 'integ' repo * remove the local copy of stx patches Issue-ID: INF-215 Signed-off-by: Jackie Huang Change-Id: I2b0d32c2f9e81a2308abe0d2f71c53ee439965c4 --- diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-stdlib/0001-Filter-password-in-logs.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-stdlib/0001-Filter-password-in-logs.patch deleted file mode 100644 index 73f7267..0000000 --- a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-stdlib/0001-Filter-password-in-logs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d95ec2abaa68a1da308c3c8b01c700fcc544a788 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 1 May 2017 14:37:22 -0400 -Subject: [PATCH] Filter password in logs - ---- - lib/puppet/parser/functions/ensure_resource.rb | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb -index 1ba6a44..b9c3242 100644 ---- a/lib/puppet/parser/functions/ensure_resource.rb -+++ b/lib/puppet/parser/functions/ensure_resource.rb -@@ -30,15 +30,17 @@ ENDOFDOC - raise(ArgumentError, 'Must specify a type') unless type - raise(ArgumentError, 'Must specify a title') unless title - params ||= {} -+ filtered_params = Marshal.load(Marshal.dump(params)) # deep copy -+ filtered_params.delete("password") - - items = [title].flatten - - items.each do |item| - Puppet::Parser::Functions.function(:defined_with_params) - if function_defined_with_params(["#{type}[#{item}]", params]) -- Puppet.debug("Resource #{type}[#{item}] with params #{params} not created because it already exists") -+ Puppet.debug("Resource #{type}[#{item}] with params #{filtered_params} not created because it already exists") - else -- Puppet.debug("Create new resource #{type}[#{item}] with params #{params}") -+ Puppet.debug("Create new resource #{type}[#{item}] with params #{filtered_params}") - Puppet::Parser::Functions.function(:create_resources) - function_create_resources([type.capitalize, { item => params }]) - end --- -1.8.3.1 - diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-stdlib_git.bbappend b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-stdlib_git.bbappend index 49241a3..302b02d 100644 --- a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-stdlib_git.bbappend +++ b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-stdlib_git.bbappend @@ -8,10 +8,18 @@ PROTOCOL = "https" BRANCH = "master" PV = "4.18.0" +inherit stx-metadata + +STX_REPO = "integ" +STX_SUBPATH = "config/puppet-modules/puppet-stdlib-4.12.0/centos/patches" + +SRC_URI_STX += " \ + file://0001-Filter-password-in-logs.patch \ + " + SRC_URI = " \ git://github.com/puppetlabs/puppetlabs-stdlib.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \ file://puppetlabs-stdlib/Add-gemspec.patch \ - file://puppetlabs-stdlib/0001-Filter-password-in-logs.patch \ " S = "${WORKDIR}/git"