Skip to content

Replace the vendored copy of highline with a versioned fetch #241

Done

Description

@silug

Problem

ext/gems/highline is a copy of highline's source tree. Compared with upstream's v2.0.3 tag, it's identical apart from the missing doc/ and test/ directories: there are no SIMP-specific changes. rake pkg:gem builds a gem from every directory under ext/gems/, and build/rubygem-simp-cli.spec packages it as the rubygem-simp-cli-highline subpackage (%global highline_version 2.0.3).

That copy can't realistically be maintained:

  • Updating highline means replacing a whole source tree by hand. It was last done in SIMP-7305, so the RPM still ships highline 2.0.3 (2019) while highline is at 3.1.2.
  • Renovate can't see or update it. Its highline.gemspec is also picked up by Renovate's gemspec manager as if it were SIMP's own.
  • The version is recorded twice: in the copied lib/highline/version.rb and in the RPM spec's %global highline_version. Nothing checks that they agree.

The bundling itself is needed. simp-cli runs under the OpenVox/Puppet agent's Ruby and installs its gems under /usr/share/simp/ruby, so an OS rubygem-highline package doesn't help.

Proposal

  • Make %global highline_version in the RPM spec the single source of the version.
  • Have rake pkg:gem obtain that exact highline version at build time. It could be fetched from rubygems.org, or checked out from highline's git repository at the matching tag and built; which one depends on how SIMP's release builds get their sources.
  • Delete ext/gems/highline.
  • Let Renovate manage %global highline_version, e.g. with a regex manager in renovate.json.

Done with the version kept at 2.0.3, the first step changes nothing in the shipped RPM. Moving the RPM to highline 3.x is then a separate Renovate PR. That one needs a manual simp config run on an EL host before merging, because the specs don't exercise interactive prompting.

The gemspec's own highline range is a separate question: gem installs already resolve highline from rubygems.org.

🤖 Generated with Claude Code

Activity

  1. silug commented on Nov 23, 2026

    @silug
    ContributorAuthor

    How release builds get their sources

    • simp-core release builds already need network access. build:auto (rubygem-simp-rake-helpers, lib/simp/rake/build/pkg.rb) builds each non-module component by running its own rake pkg:rpm, rubygem-simp-cli and pkg-r10k included. If that fails, it runs bundle install and retries. Components are cloned with deps:checkout from Puppetfile.pinned. Unless the component's version changed, the published RPM is downloaded instead of rebuilt.
    • pkg-r10k already builds bundled gems from git at build time. Its pkg:gem task depends on checkout, which clones each gem's upstream repository listed in build/sources.yaml and checks out the version's tag (X.Y.Z, then vX.Y.Z). log4r has a hard-coded commit because it has no tags. The gems are then built from those checkouts and packaged as subpackages.

    So fetching highline at build time adds no new requirement. Following pkg-r10k's approach would mean cloning https://github.com/JEG2/highline at v%{highline_version} and building the gem from it, the way ext/gems/highline is built today. Renovate would then track %global highline_version with the github-tags datasource (JEG2/highline, v prefix) instead of rubygems.

    Trade-offs between the two sources:

    git tag (pkg-r10k's approach) rubygems.org (gem fetch)
    Precedent in SIMP pkg-r10k none found
    What's packaged a gem built from upstream source upstream's published gem
    Depends on upstream tagging every release consistently publishing to rubygems.org
    Renovate datasource github-tags rubygems

    🤖 Generated with Claude Code

  2. moved this from New to In Review in Org Triageon Nov 23, 2026
  3. moved this from In Review to Done in Org Triageon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions