Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-4313

Some gemspecs are missing from puppet-agent MSI

    XMLWordPrintable

Details

    • Hide

      To verify this bug, install a version of puppet-agent on Windows that contains the fix.

      For 6.x, run "Start Command Prompt" (see https://puppet.com/docs/puppet/6/services_commands_windows.html#start_menu_items). From the command line, verify you can install a gem that depends on the hiera gem:

      C:\Windows\System32> gem install --no-document hiera-redis
      Fetching: redis-3.2.1.gem (100%)
      Successfully installed redis-3.2.1
      Fetching: hiera-redis-2.0.1.gem (100%)
      Successfully installed hiera-redis-2.0.1
      ...
      C:\Windows\System32> gem dependency hiera-redis
      Gem hiera-redis-2.0.1
        hiera (~> 3.0)
        redis (~> 3.2)
        rspec (~> 3.3, development)
      

      For 7.x, do the same thing for the hiera gem. Also verify you can install a gem that depends on the facter gem:

      C:\Windows\System32> gem install --no-document shadow_facter
      Fetching: shadow_facter-0.1.2.gem (100%)
      Successfully installed shadow_facter-0.1.2
      ...
      C:\Windows\System32> gem dependency shadow_facter
      Gem shadow_facter-0.1.2
        facter (>= 1.5.4)
      

      Show
      To verify this bug, install a version of puppet-agent on Windows that contains the fix. For 6.x, run "Start Command Prompt" (see https://puppet.com/docs/puppet/6/services_commands_windows.html#start_menu_items ). From the command line, verify you can install a gem that depends on the hiera gem: C:\Windows\System32> gem install --no-document hiera-redis Fetching: redis-3.2.1.gem (100%) Successfully installed redis-3.2.1 Fetching: hiera-redis-2.0.1.gem (100%) Successfully installed hiera-redis-2.0.1 ... C:\Windows\System32> gem dependency hiera-redis Gem hiera-redis-2.0.1 hiera (~> 3.0) redis (~> 3.2) rspec (~> 3.3, development) For 7.x, do the same thing for the hiera gem. Also verify you can install a gem that depends on the facter gem: C:\Windows\System32> gem install --no-document shadow_facter Fetching: shadow_facter-0.1.2.gem (100%) Successfully installed shadow_facter-0.1.2 ... C:\Windows\System32> gem dependency shadow_facter Gem shadow_facter-0.1.2 facter (>= 1.5.4)
    • Phoenix
    • 2
    • Phoenix 2022-03-16
    • Needs Assessment
    • Bug Fix
    • On Windows, it is now possible to install a gem into Puppet's vendored ruby that has a dependency on facter or hiera.
    • Needs Assessment

    Description

      The hiera gemspec is missing from both puppet6 and puppet7, and the facter gemspec is missing from puppet7. It prevents our pipeline from generating a correct Gemfile from the puppet-agent build artifact.

      puppet-agent 6.25.1:

      PS C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby> ls 'C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\gems\2.5.0\specifications\' -Name -Exclude default
      concurrent-ruby-1.1.9.gemspec
      did_you_mean-1.2.0.gemspec
      facter-3.14.21.gemspec
      facter-ng-4.2.5.gemspec
      ffi-1.9.25-x64-mingw32.gemspec
      httpclient-2.8.3.gemspec
      minitar-0.9.gemspec
      minitest-5.10.3.gemspec
      net-ssh-4.2.0.gemspec
      net-telnet-0.1.1.gemspec
      power_assert-1.1.1.gemspec
      puppet-6.25.1.gemspec
      rake-12.3.3.gemspec
      test-unit-3.2.7.gemspec
      thor-1.1.0.gemspec
      win32-dir-0.4.9.gemspec
      win32-process-0.7.5.gemspec
      win32-security-0.2.5.gemspec
      win32-service-0.8.8.gemspec
      xmlrpc-0.3.0.gemspec
      PS C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby> ls 'C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\vendor_gems\specifications' -Name -Exclude default
      deep_merge-1.0.1.gemspec
      fast_gettext-1.1.2.gemspec
      gettext-3.2.2.gemspec
      hiera-eyaml-3.2.2.gemspec
      highline-2.0.3.gemspec
      hocon-1.3.1.gemspec
      locale-2.1.3.gemspec
      multi_json-1.15.0.gemspec
      optimist-3.0.1.gemspec
      puppet-resource_api-1.8.14.gemspec
      semantic_puppet-1.0.4.gemspec
      text-1.3.1.gemspec
      

      In Puppet 7.14.0:

      PS C:\> ls 'C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\gems\2.7.0\specifications\' -Name -Exclude default
      concurrent-ruby-1.1.9.gemspec
      ffi-1.15.3-x64-mingw32.gemspec
      minitar-0.9.gemspec
      minitest-5.13.0.gemspec
      net-ssh-4.2.0.gemspec
      net-telnet-0.2.0.gemspec
      power_assert-1.1.7.gemspec
      puppet-7.14.0.gemspec
      rake-13.0.1.gemspec
      test-unit-3.3.4.gemspec
      thor-1.1.0.gemspec
      xmlrpc-0.3.0.gemspec
      PS C:\> ls 'C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\vendor_gems\specifications' -Name -Exclude default
      deep_merge-1.2.1.gemspec
      fast_gettext-1.1.2.gemspec
      gettext-3.2.2.gemspec
      hiera-eyaml-3.2.2.gemspec
      highline-2.0.3.gemspec
      hocon-1.3.1.gemspec
      locale-2.1.3.gemspec
      multi_json-1.15.0.gemspec
      optimist-3.0.1.gemspec
      puppet-resource_api-1.8.14.gemspec
      scanf-1.0.0.gemspec
      semantic_puppet-1.0.4.gemspec
      text-1.3.1.gemspec
      

      To resolve this:

      1. In both streams, hiera-<version>.gemspec should be added to C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\vendor_gems\specifications along with hocon, etc.
      2. In puppet7 only, facter-<version>.gemspec should be added to C:\Program Files\Puppet Labs\Puppet\puppet\lib\ruby\vendor_gems\specifications. Note facter and facter-ng gemspecs are already present in puppet6.

       

      It should be possible to follow these steps (or something equivalent) to verify you can install a gem that depends on hiera & facter: https://tickets.puppetlabs.com/browse/PA-25?focusedCommentId=234854&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-234854

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              josh Josh Cooper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support