Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !2504

Merged
Created Jan 07, 2013 by Administrator@rootOwner

Update info.rake to be able to run successfully on SuSE.

  • Overview 7
  • Commits 1
  • Changes 1

Created by: mitchty

The rake task gitlab:env:info fails on a SuSE Linux system.

I updated the task to allow for suse systems to be detected.

The failing line was os_name.squish! on line 18 (with this patch, 15 without), os_name was nil so squish! was failing, thinking it may be better to refactor this a skosh to say:

os_name = "unknown".red os_name ||= run("lsb_release -irs")

To allow for Linux distributions that lack the lsb_release command to work. And then changing the puts line later to:

puts "System:\t\t#{os_name}

I can submit that as a refactoring separately if desired. But this works as-is. No other changes were made to get things running on SuSE 11. Note I haven't tested what run() outputs when nothing is there yet, just offering it up as an idea.

Output on a SuSE 11 service pack 2 system after the change:

bundle exec rake gitlab:env:info RAILS_ENV=production --trace ** Invoke gitlab:env:info (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute gitlab:env:info

System information System: SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 2 Current User: gitlab Using RVM: no Ruby Version: 1.9.3p327 Gem Version: 1.8.23 Bundler Version:1.2.3 Rake Version: 10.0.1

GitLab information Version: 4.0.0 Revision: c68540e9 Directory: /infra/app/gitlab/gitlab DB Adapter: postgresql URL: http://hostname HTTP Clone URL: http://hostname/some-project.git SSH Clone URL: git@hostname:some-project.git Using LDAP: no Using Omniauth: no

Gitolite information Version: v3.04-42-g2d29cf7 Admin URI: git@localhost:gitolite-admin Admin Key: gitlab Repositories: /infra/app/git/repositories/ Hooks: /infra/app/git/.gitolite/hooks/ Git: /usr/bin/git

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/mitchty/sles_changes