FS#58546 - [gitlab] nodejs only required for make

Attached to Project: Community Packages
Opened by Jonas Hahnfeld (hahnjo) - Friday, 11 May 2018, 14:42 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 04 June 2018, 15:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
GitLab doesn't need nodejs during runtime, it's only used during installation to compile assets.

Additional info:
* gitlab 10.7.1-1
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 04 June 2018, 15:54 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 12 May 2018, 03:30 GMT
Are you sure that it doesn't need it for reconfiguration and other maintenance tasks?
Comment by Jonas Hahnfeld (hahnjo) - Saturday, 12 May 2018, 12:44 GMT
Yes, I'm pretty sure because GitLab's omnibus package doesn't depend on nodejs and it's listed nowhere in https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/projects/gitlab.rb nor https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb.

I think they even go as far as not including node_modules which would save ~250MB and ~25,000 files. They also explicitly list some more directories in https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb#L179 which are another 6650 files. I will try to reduce the packaged files later today, looks like there is quite some potential ;-)
Comment by Jonas Hahnfeld (hahnjo) - Saturday, 12 May 2018, 14:56 GMT
Ok, you have to cheat a bit to get rid of node: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb#L73
This environment variable needs to be added to all systemd unit files and prepended to all maintenance commands - maybe the package should have a wrapper that also sets RAILS_ENV=production?

The package built by attached patch runs fine on my server:
1. There is now an explicit dependency to http-parser which some gems are built against.
2. I've also fixed the permissions of /var/lib/gitlab/uploads as suggested by "bundle-2.3 exec rake gitlab:check"
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 31 May 2018, 18:17 GMT
Please test now.

Loading...