Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Install homebrew
export HOMEBREW_NO_EMOJI=true
export HOMEBREW_NO_ANALYTICS=1
sudo dscl . -create /Users/test
sudo dscl . -create /Users/test UserShell /bin/bash
sudo dscl . -create /Users/test UniqueID 1001
sudo dscl . -create /Users/test PrimaryGroupID 1000
sudo dscl . -create /Users/test NFSHomeDirectory /Users/test

Gemspec Simplification

TL;DR

We should remove the gem metadata contained in ext/project_data.yaml for the puppet and facter gems, and instead use the gemspec as the source of truth when building them.

Background

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install ruby --yes --version=3.1.3.1
choco install msys2 --yes --params "/NoUpdate"
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
Update-SessionEnvironment
ridk install 2 3
ridk enable
gem install --no-document bundler
diff --git a/lib/puppet/network/http/compression.rb b/lib/puppet/network/http/compression.rb
index e4fd5b9e8a..782cbcb1de 100644
--- a/lib/puppet/network/http/compression.rb
+++ b/lib/puppet/network/http/compression.rb
@@ -18,7 +18,11 @@ module Puppet::Network::HTTP::Compression
# return an uncompressed body if the response has been
# compressed
def uncompress_body(response)
- Puppet.deprecation_warning(_('Puppet::Network::HTTP::Compression is deprecated.'))
+ Puppet.deprecation_warning(_('Puppet::Network::HTTP::Compression::Active#uncompress_body is deprecated.'))
require 'puppet'
module Puppet::Server
class HttpClient
def get(url, headers: {}, params: {}, options: {}, &block)
puts "GET #{url}"
end
end
end
Executing 'dnf install -y --allowerasing autoconf automake createrepo gcc gcc-c++ java-1.8.0-openjdk-devel libsepol libsepol-devel libselinux-devel make pkgconfig cmake readline-devel rsync rpm-build rpm-libs rpm-sign rpmdevtools swig yum-utils zlib-devel systemtap-sdt-devel' on '[email protected]'
Warning: Permanently added 'silken-vogue.delivery.puppetlabs.net,10.16.117.76' (ECDSA) to the list of known hosts.
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
localmirror-appstream 191 kB/s | 4.5 kB 00:00
localmirror-appstream 44 MB/s | 13 MB 00:00
localmirror-base 293 kB/s | 4.1 kB 00:00
localmirror-base 60 MB/s | 12 MB 00:00
Last metadata expiration check: 0:00:03 ago on Tue 10 Dec 2019 06:50:59 PM UTC.
* @puppetlabs/platform-core
# @puppetlabs/platform-os
lib/puppet/type/group
lib/puppet/type/package
lib/puppet/type/service
lib/puppet/type/user
lib/puppet/provider/group
lib/puppet/provider/package
lib/puppet/provider/service
$ bx puppet --version
5.5.7
$ bx puppet apply --modulepath=/etc/puppetlabs/code/environments/development -e "notice(mysql::deepmerge({'one' => 1}, {'two' => 2}))"
Error: Evaluation Error: Unknown function: 'mysql::deepmerge'. (line: 1, column: 8) on node localhost
$ bx puppet apply --modulepath=/etc/puppetlabs/code/environments/development -e "notice(mysql::deepmerge({'one' => 1}, {'two' => 2}))" --environment development
Error: Evaluation Error: Unknown function: 'mysql::deepmerge'. (line: 1, column: 8) on node localhost
$ bx puppet apply -e "notice(mysql::deepmerge({'one' => 1}, {'two' => 2}))" --environment development
Notice: Scope(Class[main]): {one => 1, two => 2}
Notice: Compiled catalog for localhost in environment development in 0.02 seconds
Notice: Applied catalog in 0.01 seconds
Warning: foo: Param :foo -> Starting
Warning: baz: Property :baz -> Starting
Warning: bar: Param :bar -> Starting
Warning: Setting Property Class Variables
Warning: qux: Param :name -> Validating 'qux'
Warning: qux: Param :name -> Munging 'qux'
Warning: Provider: Initializing Classvars
Warning: Provider Initialization :name= 'qux'
Warning: Provider Initialization :foo = ''
Warning: Provider Initialization :bar = ''

Given file with binary file content:

class rich {
  file { '/tmp/binary':
    ensure => file,
    content => Binary('YWJj'),
  }
}