puppetlabs-stdlib: update for stx 5.0 82/8182/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 8 Jun 2021 02:32:10 +0000 (10:32 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Fri, 6 May 2022 08:54:35 +0000 (16:54 +0800)
* 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 <jackie.huang@windriver.com>
Change-Id: I2b0d32c2f9e81a2308abe0d2f71c53ee439965c4

meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-stdlib/0001-Filter-password-in-logs.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-stdlib_git.bbappend

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 (file)
index 73f7267..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From d95ec2abaa68a1da308c3c8b01c700fcc544a788 Mon Sep 17 00:00:00 2001
-From: Don Penney <don.penney@windriver.com>
-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
-
index 49241a3..302b02d 100644 (file)
@@ -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"