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
  • !2890

Merged
Created Feb 02, 2013 by Administrator@rootOwner

OS X support for gitlab:check rake tasks

  • Overview 2
  • Commits 1
  • Changes 1

Created by: cameronyule

The gitlab:check (and other :check) rake tasks currently fail on OS X due to the gid_for method in TaskHelpers.rake manually parsing the /etc/group file:

$ bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...

gitlab user is in gitg group? ... yes
Has no "-e" in ~git/.profile ... yes
Git configured for gitlab user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking Gitolite ...

Using recommended version ... yes
Repo umask is 0007 in .gitolite.rc? ... yes
Allow all Git config keys in .gitolite.rc ... yes
Config directory exists? ... yes
Config directory owned by git:gitg ... rake aborted!
undefined method `split' for nil:NilClass
/Users/gitlab/gitlab/lib/tasks/gitlab/task_helpers.rake:81:in `gid_for'
/Users/gitlab/gitlab/lib/tasks/gitlab/check.rake:533:in `check_dot_gitolite_user_and_group'
/Users/gitlab/gitlab/lib/tasks/gitlab/check.rake:400:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:check => gitlab:gitolite:check
(See full trace by running task with --trace)

While the /etc/group file exists on OS X it's only used for system services, with all user-created users and groups using Directory Services instead.

This simple pull request replaces the manual parsing of /etc/group with an equivalent call to the platform-independent Etc class from the standard library.

All tests continue to pass after this amend.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/cameronyule/support_osx_groups