• Kirill Smelkov's avatar
    gitlab: Slapos'ify / tweak gitconfig and hook it into the system · 264d785a
    Kirill Smelkov authored
    Convert gitconfig template to jinja2 (reusing already-there
    `email_display_name` and `email_from` parameters for commits generated by
    gitlab).
    
    System-level git config from gitlab-omnibus is also imported to this
    file (on slapos we cannot tweak system-level git config -
    software/.../parts/git/... is read-only for programs in instance
    partitions - so we move all gitlab's system-wide git settings to this
    "user-level" gitconfig.
    
    System gitconfig in omnibus is defined here:
    
        https://gitlab.com/gitlab-org/omnibus-gitlab/blob/8eda093/files/gitlab-cookbooks/gitlab/attributes/default.rb#L23
    
    so it is
    
        pack.threads = 1    and
        receive.fsckObjects = true
    
    which makes sense to not waste a lot of memory when packing and not to
    allow corrupt objects to enter to system by evil users intentionally.
    
    To make the file foundable by git - we put it into partition root
    directory and set $HOME to point to partition root when running
    appropriate programs / services.
    
    NOTE we'll need to upgrade gitlab-shell and gitlab-workhorse to
        propagate $HOME for this setting to actually have effect.
        See the next patch.
    
    /cc @kazuhiko, @jerome
    264d785a
software.cfg 5.87 KB