saltstack / saltstack/salt

[FEATURE REQUEST] rvm deb package support

Open
#62,904 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Is your feature request related to a problem? Please describe.
The rvm Salt module cannot find the rvm binary if it was installed as an apt package.
Salt is hard coded to use /usr/local/rvm/bin/rvm but the apt package installs rvm into /usr/share/rvm/bin/rvm

This causes issues if, for example, RVM was installed from the official rvm PPA https://github.com/rvm/ubuntu_rvm.

You can replicate this by running the following states.
The second state will try to install RVM fresh despite it already being present on the system (https://github.com/saltstack/salt/blob/master/salt/modules/rvm.py#L68)

rvm:
  pkgrepo.managed:
    - ppa: rael-gc/rvm
  pkg.installed:
    - name: rvm
    - require:
      - pkgrepo: rvm

ruby-3.1.2:
  rvm.installed

Describe the solution you'd like
Salt to detect rvm is installed under /usr/share/rvm/bin/rvm.

Describe alternatives you've considered
I also considered making the rvm binary path a variable you can pass to states however this is a much bigger change.

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in salt/modules/rvm.py around the referenced line 68 and inspect how the RVM binary path is determined. Reproduce the provided Salt states with the apt-installed package, then verify that the existing /usr/share/rvm/bin/rvm installation is detected instead of being installed again.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, ruby
Domain
devops, infrastructure
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.