sammcj / puppet-luks

Puppet module for managing LUKS encrypted volumes
Other
3 stars 5 forks source link

Upload to puppet-forge #4

Closed sammcj closed 7 years ago

sammcj commented 7 years ago

The module should be uploaded to the puppet forge (as antiqued as it is).

Two issues:

  1. At present when using the official process for packaging the module and uploading it the forge errors out saying that the metadata states the module is owned / managed by the user 'puppet', which it does - it states the user 'sammcj' as it should.

https://tickets.puppetlabs.com/browse/PUP-7491

  1. Today I'm also getting errors trying to even run puppet module build .

https://tickets.puppetlabs.com/browse/PUP-7490

samm at systems-samm-imac in ~/git/puppet-luks on master! puppet module build .
/Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util/monkey_patches.rb:104:in `<class:SSLContext>': undefined method `<<' for nil:NilClass (NoMethodError)
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util/monkey_patches.rb:98:in `<top (required)>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util.rb:17:in `require'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util.rb:17:in `<module:Util>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util.rb:16:in `<module:Puppet>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util.rb:15:in `<top (required)>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet.rb:14:in `require'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet.rb:14:in `<top (required)>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util/command_line.rb:12:in `require'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util/command_line.rb:12:in `<top (required)>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/bin/puppet:4:in `require'
    from /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/bin/puppet:4:in `<top (required)>'
    from /usr/local/bin/puppet:23:in `load'
    from /usr/local/bin/puppet:23:in `<main>'
    from /Users/samm/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
    from /Users/samm/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
sammcj commented 7 years ago

File /Users/samm/.rvm/gems/ruby-2.4.1/gems/puppet-4.10.0/lib/puppet/util/monkey_patches.rb Line 104:

DEFAULT_PARAMS[:ciphers] << ':!SSLv2'

which is part of:


    (#19151) Reject all SSLv2 ciphers and handshakes
    require 'openssl'
    class OpenSSL::SSL::SSLContext
    if DEFAULT_PARAMS[:options]
    DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3
    else
    DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3
    end
    DEFAULT_PARAMS[:ciphers] << ':!SSLv2'

alias __original_initialize initialize
private :__original_initialize

def initialize(*args)
__original_initialize(*args)
params = {
:options => DEFAULT_PARAMS[:options],
:ciphers => DEFAULT_PARAMS[:ciphers],
}
set_params(params)
end
end
sammcj commented 7 years ago

It appears that puppet relies on an old / specific version of the openssl gem, but isn't specifying to use that exact version when running.

If I comment out line 104 in money_patches.rb the command works.

~/git/puppet-luks on master puppet module build .
Notice: Building /Users/samm/git/puppet-luks for release
Module built: /Users/samm/git/puppet-luks/pkg/puppet-luks-0.1.2.tar.gz
sammcj commented 7 years ago

However the upload to the puppet forge still fails:

screen shot 2017-05-03 at 11 37 48 am

although:

https://github.com/sammcj/puppet-luks/blob/master/metadata.json#L4

 "author": "sammcj",
sammcj commented 7 years ago

Closed,

metadata.json doesn't use the field Author it uses the name of the module, which must contain the username rather than puppet-{modulename}