[arch-commits] Commit in gitlab/trunk (7 files)
Anatol Pomozov
anatolik at archlinux.org
Fri May 29 07:38:27 UTC 2020
Date: Friday, May 29, 2020 @ 07:38:26
Author: anatolik
Revision: 636970
Move account's default environment variables to a file
All systemd services and command-line instructions require following envvars to
be set: RAILS_ENV and EXECJS_RUNTIME. To avoid repeating ourselves in multiple
places we moved these envvars to /usr/share/webapps/gitlab/environment.
Use this environment file from all the systemd service units and in
command-line instructions.
Add RUBYOPT='-W:no-deprecated' envvar that is used to silence annoying ruby 2.7
deprecation warnings. Initially the hope was that Gitlab developers move to 2.7
or at least fix the new warnings quickly. But 6 months since Ruby 2.7 release and
not much progress has been done here. Let's disable the warnings for now.
Added:
gitlab/trunk/environment
Modified:
gitlab/trunk/PKGBUILD
gitlab/trunk/gitlab-backup.service
gitlab/trunk/gitlab-mailroom.service
gitlab/trunk/gitlab-puma.service
gitlab/trunk/gitlab-sidekiq.service
gitlab/trunk/gitlab.install
-------------------------+
PKGBUILD | 12 ++++++++----
environment | 3 +++
gitlab-backup.service | 3 +--
gitlab-mailroom.service | 3 +--
gitlab-puma.service | 3 +--
gitlab-sidekiq.service | 3 +--
gitlab.install | 10 +++++-----
7 files changed, 20 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-05-29 06:08:26 UTC (rev 636969)
+++ PKGBUILD 2020-05-29 07:38:26 UTC (rev 636970)
@@ -31,6 +31,7 @@
source=(git+https://gitlab.com/gitlab-org/gitlab-foss.git#tag=v$pkgver
configs.patch
build_fix.patch
+ environment
gitlab-puma.service
gitlab-sidekiq.service
gitlab-backup.service
@@ -44,10 +45,11 @@
sha512sums=('SKIP'
'9b054872e2017dae3acd0534c0608634cf7c5f996672e589c3b9988ce18b110423b63f5207585c2ba4941b516606a2a9a8db6fd320012a4d90cf3beca147a220'
'9623de113358d3d6e49047f688e272d9394579734ace1bd647497e8717a90784546d27e547a29197a16c80d72ad9f2c79eb65f8edc631deadf2ec90ee86ea44b'
- 'bf735ab9cd25138fbe4bc900d29b703b6e9601b58a650133a997747db47db3711aa432d74c3991a36ab874646599cfc9ab21988bc3de569b55073affe82af225'
- '42af7388358b2ad52ddb4b7239477d94a06ffdb4550c51d11fd5eb5e6efcc558ee5d8fd8c0094533102a855b15c64091289550dc8c7a39ed1af0dff963aaaa33'
- 'ec3ce0e0bb0cb3118c936a63e36bf760093c080a9fd529b200fc09b4cc715bb75cc2f14f66f67b7a7711718ef49710660654804978cfc31fc52f33d8386bc372'
- 'fa26f358d5a6d89affd015806e84d3e3820b91c0296d0a39af18e790fc2bd964a3f6cdbcc79f70fe3771ffb6b3fe310360907e656a030d432a6e0cfac0578bd5'
+ '5b1ca2958f03a5baf1c5576a1568072e8ed749e2d15745ecbcc4860d2dbd543f2f3ed077e8d87afac2670c9436b19fe498217b49916d56a4e31fb9811aeb9067'
+ '6e6a9be7a3985a20e3140553e95e39b08aa4d13005dd4496eea9d3cac6cc6c223018eb01a0ac496f94606d77d73c18d84c9c230e8869dac87b004b46125d67f7'
+ '18f4a31935d0626c26d1be1942b715128cf3edcb114f672af16e4a145d8ac693e1afc7d59094cae3702e47e4c6c4cb4a62a009bafcbec500e69120a2dd400a2a'
+ '8afffb8caafdaa7a39991a4e694efc5133af1dc201ae07f3dc3989dbabb983339941011ffdd1f97c63033c94a02a3a7a6eb3722001aa3e7155c16f6743aec4c8'
+ '35c1175ef4347d700e2331c3963ac871cada50c9274964eb4ac8cb80bb27a7d3459bed1548bd1f3a1681b6eb5dd94fe7ec4855cab7b33dddc4e524a91ca791d7'
'c76d634647336aaf157bc66ba094a363e971c0d275875a7df4521819147f54cd4c709eb8e024cdac9e900d99167e8a78a222587e7292e915573ef29060e6ec21'
'879be339148123e32b58a5669fdd3d3bb8b5d711326cb618f95b1680a6ac3a83c85d8862f2691b352fa26c95e4764dbb827856e22a3e2b9e4a76c13fe42864b5'
'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3'
@@ -172,6 +174,8 @@
chown root:105 "${pkgdir}${_etcdir}/${secret_file}"
done
+ install -Dm644 "${srcdir}/environment" "${pkgdir}${_appdir}"
+
# Install license and help files
mv README.md MAINTENANCE.md CONTRIBUTING.md CHANGELOG.md PROCESS.md VERSION config/*.{example,postgresql} "${pkgdir}/usr/share/doc/gitlab"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/gitlab/LICENSE"
Added: environment
===================================================================
--- environment (rev 0)
+++ environment 2020-05-29 07:38:26 UTC (rev 636970)
@@ -0,0 +1,3 @@
+RAILS_ENV=production
+EXECJS_RUNTIME=Disabled
+RUBYOPT='-W:no-deprecated'
Modified: gitlab-backup.service
===================================================================
--- gitlab-backup.service 2020-05-29 06:08:26 UTC (rev 636969)
+++ gitlab-backup.service 2020-05-29 07:38:26 UTC (rev 636970)
@@ -9,8 +9,7 @@
Group=gitlab
SyslogIdentifier=gitlab-backup
WorkingDirectory=<APPDIR>
-# Prevent ExecJS from complaining that Node is not installed in production
-Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+EnvironmentFile=<APPDIR>/environment
CapabilityBoundingSet=
PrivateTmp=true
PrivateDevices=true
Modified: gitlab-mailroom.service
===================================================================
--- gitlab-mailroom.service 2020-05-29 06:08:26 UTC (rev 636969)
+++ gitlab-mailroom.service 2020-05-29 07:38:26 UTC (rev 636970)
@@ -9,8 +9,7 @@
User=gitlab
Group=gitlab
WorkingDirectory=<APPDIR>
-# Prevent ExecJS from complaining that Node is not installed in production
-Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+EnvironmentFile=<APPDIR>/environment
SyslogIdentifier=gitlab-mailroom
PIDFile=/run/gitlab/mailroom.pid
ExecStart=/usr/bin/bundle exec mail_room -q -c <APPDIR>/config/mail_room.yml
Modified: gitlab-puma.service
===================================================================
--- gitlab-puma.service 2020-05-29 06:08:26 UTC (rev 636969)
+++ gitlab-puma.service 2020-05-29 07:38:26 UTC (rev 636970)
@@ -9,8 +9,7 @@
User=gitlab
Group=gitlab
WorkingDirectory=<APPDIR>
-# Prevent ExecJS from complaining that Node is not installed in production
-Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+EnvironmentFile=<APPDIR>/environment
SyslogIdentifier=gitlab-puma
PIDFile=/run/gitlab/puma.pid
RuntimeDirectory=gitlab
Modified: gitlab-sidekiq.service
===================================================================
--- gitlab-sidekiq.service 2020-05-29 06:08:26 UTC (rev 636969)
+++ gitlab-sidekiq.service 2020-05-29 07:38:26 UTC (rev 636970)
@@ -10,8 +10,7 @@
User=gitlab
Group=gitlab
WorkingDirectory=<APPDIR>
-# Prevent ExecJS from complaining that Node is not installed in production
-Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+EnvironmentFile=<APPDIR>/environment
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/sidekiq.pid
PrivateTmp=true
Modified: gitlab.install
===================================================================
--- gitlab.install 2020-05-29 06:08:26 UTC (rev 636969)
+++ gitlab.install 2020-05-29 07:38:26 UTC (rev 636970)
@@ -2,17 +2,17 @@
echo "Configure your /etc/webapps/gitlab/gitlab.yml"
echo "Set up your redis to run on /run/redis/redis.sock or configure gitlab to use redis TCP"
echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
- echo "Copy /usr/share/doc/gitlab/secrets.yml.example to /etc/webapps/gitlab/secrets.yml and configure it"
+ echo "Copy /usr/share/webapps/gitlab/config/secrets.yml.example to /etc/webapps/gitlab/secrets.yml and configure it"
echo "Setup the database:"
- echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle exec rake gitlab:setup RAILS_ENV=production\""
+ echo "$ (cd /usr/share/webapps/gitlab && sudo -u gitlab \$(cat environment | xargs) bundle exec rake gitlab:setup)"
echo "Finally run the following commands to check your installation:"
- echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle exec rake gitlab:env:info RAILS_ENV=production\""
- echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle exec rake gitlab:check RAILS_ENV=production\""
+ echo "$ (cd /usr/share/webapps/gitlab && sudo -u gitlab \$(cat environment | xargs) bundle exec rake gitlab:env:info)"
+ echo "$ (cd /usr/share/webapps/gitlab && sudo -u gitlab \$(cat environment | xargs) bundle exec rake gitlab:check)"
}
post_upgrade() {
echo "You should upgrade your database:"
- echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle exec rake db:migrate RAILS_ENV=production\""
+ echo "$ (cd /usr/share/webapps/gitlab && sudo -u gitlab \$(cat environment | xargs) bundle exec rake db:migrate)"
echo "Afterwards, restart gitlab-related services:"
echo "# systemctl daemon-reload"
echo "# systemctl restart gitlab-sidekiq gitlab-puma gitlab-workhorse gitlab-gitaly"
More information about the arch-commits
mailing list