Relax the immutable option to yarnpkg install

This commit is contained in:
Pirate Praveen 2023-05-30 21:00:47 +05:30
parent e2fca5a2ed
commit bf28b97a0a
No known key found for this signature in database
GPG key ID: 8F53E0193B294B75
4 changed files with 4 additions and 3 deletions

View file

@ -68,7 +68,7 @@ security.txt usr/share/gitlab
sidekiq_cluster usr/share/gitlab sidekiq_cluster usr/share/gitlab
storybook usr/share/gitlab storybook usr/share/gitlab
tests.yml usr/share/gitlab tests.yml usr/share/gitlab
yarn.lock usr/share/gitlab yarn.lock var/lib/gitlab
tooling usr/share/gitlab tooling usr/share/gitlab
vendor usr/share/gitlab vendor usr/share/gitlab
VERSION usr/share/gitlab VERSION usr/share/gitlab

2
debian/gitlab.links vendored
View file

@ -4,7 +4,7 @@ var/lib/gitlab/db usr/share/gitlab/db
var/lib/gitlab/node_modules usr/share/gitlab/node_modules var/lib/gitlab/node_modules usr/share/gitlab/node_modules
usr/share/gitlab/package.json var/lib/gitlab/package.json usr/share/gitlab/package.json var/lib/gitlab/package.json
var/lib/gitlab/yarn-error.log usr/share/gitlab/yarn-error.log var/lib/gitlab/yarn-error.log usr/share/gitlab/yarn-error.log
usr/share/gitlab/yarn.lock var/lib/gitlab/yarn.lock var/lib/gitlab/yarn.lock usr/share/gitlab/yarn.lock
var/lib/gitlab/.yarn usr/share/gitlab/.yarn var/lib/gitlab/.yarn usr/share/gitlab/.yarn
var/lib/gitlab/.yarnrc.yml usr/share/gitlab/.yarnrc.yml var/lib/gitlab/.yarnrc.yml usr/share/gitlab/.yarnrc.yml
var/lib/gitlab/.ssh usr/share/gitlab/.ssh var/lib/gitlab/.ssh usr/share/gitlab/.ssh

View file

@ -176,6 +176,7 @@ case "$1" in
# Make package.json writable for yarn 2 # Make package.json writable for yarn 2
chown ${gitlab_user}: /var/lib/gitlab/package.json chown ${gitlab_user}: /var/lib/gitlab/package.json
chown ${gitlab_user}: /var/lib/gitlab/yarn.lock
runuser -u ${gitlab_user} -- sh -c "chmod 700 ${gitlab_uploads_path}" runuser -u ${gitlab_user} -- sh -c "chmod 700 ${gitlab_uploads_path}"
runuser -u ${gitlab_user} -- sh -c 'git config --global core.autocrlf "input"' runuser -u ${gitlab_user} -- sh -c 'git config --global core.autocrlf "input"'

View file

@ -43,7 +43,7 @@ cd /var/lib/gitlab
runuser -u ${gitlab_user} -- sh -c 'install -d /var/lib/gitlab/.cache' runuser -u ${gitlab_user} -- sh -c 'install -d /var/lib/gitlab/.cache'
runuser -u ${gitlab_user} -- sh -c 'yarnpkg set version berry' runuser -u ${gitlab_user} -- sh -c 'yarnpkg set version berry'
runuser -u ${gitlab_user} -- sh -c 'if ! grep nodeLinker .yarnrc.yml >/dev/null; then echo "nodeLinker: \"node-modules\"" >>.yarnrc.yml; fi' runuser -u ${gitlab_user} -- sh -c 'if ! grep nodeLinker .yarnrc.yml >/dev/null; then echo "nodeLinker: \"node-modules\"" >>.yarnrc.yml; fi'
runuser -u ${gitlab_user} -- sh -c 'NODE_ENV=production yarnpkg install --immutable' runuser -u ${gitlab_user} -- sh -c 'NODE_ENV=production yarnpkg install'
# Remove write permissions of .yarn-metadata.json files # Remove write permissions of .yarn-metadata.json files
runuser -u ${gitlab_user} -- sh -c 'test -d "/var/lib/gitlab/.cache/yarn/v6" && find /var/lib/gitlab/.cache/yarn/v6/ -name .yarn-metadata.json -perm -a=w -exec chmod 644 {} \;' runuser -u ${gitlab_user} -- sh -c 'test -d "/var/lib/gitlab/.cache/yarn/v6" && find /var/lib/gitlab/.cache/yarn/v6/ -name .yarn-metadata.json -perm -a=w -exec chmod 644 {} \;'