Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbenv fails when owner is not root and parent directory is not owned by the same user #102

Open
alexander-komarov-ibm opened this issue Jan 31, 2025 · 0 comments

Comments

@alexander-komarov-ibm
Copy link

alexander-komarov-ibm commented Jan 31, 2025

Giving the user write permissions on the parent directory is not always desirable.

  file {'/data': 
      ensure => directory, 
      #owner => 'jekyll'  # <--- Will not work without this
  }


  user {'jekyll':
    ensure => present,
    managehome => true,
  }

  # rbenv build seems to need this
  package{'libssl-dev': ensure => installed}

  #rbenv:
  class { 'rbenv':
    # manage_deps => false, # no deps, conflicts with gcc
    install_dir => '/data/rbenv',
    owner => 'jekyll',
  }
  -> rbenv::plugin { 'rbenv/ruby-build': }
  -> rbenv::build { '3.0.2': global => true }
Notice: /Stage[main]/Tc_legacyjira/File[/data]/ensure: created
Notice: /Stage[main]/Rbenv::Deps::Debian/Package[libncurses5-dev]/ensure: created (corrective)
Notice: /Stage[main]/Rbenv::Deps::Debian/Package[libgdbm6]/ensure: created (corrective)
Notice: /Stage[main]/Rbenv/Exec[git-clone-rbenv]/returns: fatal: could not create work tree dir '/data/rbenv': Permission denied
Error: '/usr/bin/git clone https://github.com/rbenv/rbenv.git /data/rbenv' returned 128 instead of one of [0]
Error: /Stage[main]/Rbenv/Exec[git-clone-rbenv]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/git clone https://github.com/rbenv/rbenv.git /data/rbenv' returned 128 instead of one of [0] (corrective)
Notice: /Stage[main]/Rbenv/File[/data/rbenv]: Dependency Exec[git-clone-rbenv] has failures: true
Warning: /Stage[main]/Rbenv/File[/data/rbenv]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/plugins]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/shims]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/versions]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Plugin[rbenv/ruby-build]/Exec[install-rbenv/ruby-build]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Plugin[rbenv/ruby-build]/Exec[rbenv-permissions-rbenv/ruby-build]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[own-plugins-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[git-pull-rubybuild-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-install-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-ownit-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-global-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-gem-install-bundler-_0]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-rbenv-rehash-bundler-_0]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-rbenv-permissions-bundler-_0]: Skipping because of failed dependencies
Info: Class[Tc_legacyjira]: Unscheduling all events on Class[Tc_legacyjira]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant