[arch-commits] Commit in gitlab/repos (14 files)

Anatol Pomozov anatolik at archlinux.org
Tue May 26 09:43:12 UTC 2020


    Date: Tuesday, May 26, 2020 @ 09:43:11
  Author: anatolik
Revision: 635017

archrelease: copy trunk to community-testing-x86_64

Added:
  gitlab/repos/community-testing-x86_64/
  gitlab/repos/community-testing-x86_64/PKGBUILD
    (from rev 635016, gitlab/trunk/PKGBUILD)
  gitlab/repos/community-testing-x86_64/build_fix.patch
    (from rev 635016, gitlab/trunk/build_fix.patch)
  gitlab/repos/community-testing-x86_64/configs.patch
    (from rev 635016, gitlab/trunk/configs.patch)
  gitlab/repos/community-testing-x86_64/gitlab-backup.service
    (from rev 635016, gitlab/trunk/gitlab-backup.service)
  gitlab/repos/community-testing-x86_64/gitlab-backup.timer
    (from rev 635016, gitlab/trunk/gitlab-backup.timer)
  gitlab/repos/community-testing-x86_64/gitlab-mailroom.service
    (from rev 635016, gitlab/trunk/gitlab-mailroom.service)
  gitlab/repos/community-testing-x86_64/gitlab-puma.service
    (from rev 635016, gitlab/trunk/gitlab-puma.service)
  gitlab/repos/community-testing-x86_64/gitlab-sidekiq.service
    (from rev 635016, gitlab/trunk/gitlab-sidekiq.service)
  gitlab/repos/community-testing-x86_64/gitlab.install
    (from rev 635016, gitlab/trunk/gitlab.install)
  gitlab/repos/community-testing-x86_64/gitlab.logrotate
    (from rev 635016, gitlab/trunk/gitlab.logrotate)
  gitlab/repos/community-testing-x86_64/gitlab.target
    (from rev 635016, gitlab/trunk/gitlab.target)
  gitlab/repos/community-testing-x86_64/gitlab.tmpfiles.d
    (from rev 635016, gitlab/trunk/gitlab.tmpfiles.d)
  gitlab/repos/community-testing-x86_64/ruby27-pop-extra-arg.patch
    (from rev 635016, gitlab/trunk/ruby27-pop-extra-arg.patch)

----------------------------+
 PKGBUILD                   |  199 +++++++++++++++++++++++++++++++++++++++++++
 build_fix.patch            |   23 ++++
 configs.patch              |  184 +++++++++++++++++++++++++++++++++++++++
 gitlab-backup.service      |   20 ++++
 gitlab-backup.timer        |   10 ++
 gitlab-mailroom.service    |   22 ++++
 gitlab-puma.service        |   34 +++++++
 gitlab-sidekiq.service     |   31 ++++++
 gitlab.install             |   29 ++++++
 gitlab.logrotate           |    6 +
 gitlab.target              |    7 +
 gitlab.tmpfiles.d          |    1 
 ruby27-pop-extra-arg.patch |   26 +++++
 13 files changed, 592 insertions(+)

Copied: gitlab/repos/community-testing-x86_64/PKGBUILD (from rev 635016, gitlab/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,199 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
+# Contributor: Pavol (Lopo) Hluchy <lopo AT losys DOT eu>
+# Contributor: Jonas Heinrich <onny at project-insanity.org>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Tobias Hunger <tobias DOT hunger AT gmail DOT com>
+# Contributor: Stefan Tatschner <stefan at sevenbyte.org>
+# Contributor: Caleb Maclennan <caleb at alerque.com>
+
+# NOTE: Gitlab isn't always compatible with modern Ruby versions. In that case, check the
+# commit log for an old fix on how to tell it to use older versions of Ruby. I'm afraid we'll
+# need this again at some point in the future.
+pkgname=gitlab
+pkgver=13.0.0
+pkgrel=2
+pkgdesc="Project management and code hosting application"
+arch=('x86_64')
+url="https://gitlab.com/gitlab-org/gitlab-foss"
+license=('MIT')
+options=(!buildflags)
+depends=('ruby' 'ruby-bundler' 'git' 'gitlab-workhorse' 'gitlab-gitaly' 'openssh' 'redis' 'libxslt' 'icu' 're2' 'http-parser' 'nodejs' 'openssl')
+makedepends=('cmake' 'postgresql' 'yarn' 'go' 'nodejs')
+optdepends=('postgresql: database backend'
+            'python-docutils: reStructuredText markup language support'
+            'smtp-server: mail server in order to receive mail notifications')
+backup=("etc/webapps/gitlab/application.rb"
+        "etc/webapps/gitlab/database.yml"
+        "etc/webapps/gitlab/gitlab.yml"
+        "etc/webapps/gitlab/resque.yml"
+        "etc/webapps/gitlab/puma.rb"
+        "etc/logrotate.d/gitlab")
+source=(git+https://gitlab.com/gitlab-org/gitlab-foss.git#tag=v$pkgver
+        configs.patch
+        build_fix.patch
+        gitlab-puma.service
+        gitlab-sidekiq.service
+        gitlab-backup.service
+        gitlab-mailroom.service
+        gitlab-backup.timer
+        gitlab.target
+        gitlab.tmpfiles.d
+        gitlab.logrotate
+        ruby27-pop-extra-arg.patch)
+install='gitlab.install'
+sha512sums=('SKIP'
+            '9b054872e2017dae3acd0534c0608634cf7c5f996672e589c3b9988ce18b110423b63f5207585c2ba4941b516606a2a9a8db6fd320012a4d90cf3beca147a220'
+            '9623de113358d3d6e49047f688e272d9394579734ace1bd647497e8717a90784546d27e547a29197a16c80d72ad9f2c79eb65f8edc631deadf2ec90ee86ea44b'
+            '8d759f1ae3391a0bafe8cfbbddfa6e7bfb5b587439f9f750e34e0bbf85c6c514da7c6932d74be284746f596bf2c4bdddfeff66f81ae39f73e43a9b5326bc688f'
+            '31fccf265783fd6c95fd94036d2f1148945d5fc9b713d108632d931b0cc51a5e166972956d042d5f30fe411d68a056794461103832ce9afbd4654923a8bde531'
+            '0cbb9a1631b529a83d5c6db95fd3a684c8f06073890b31f6262c339360444e7452275d804fb6a119a3d61a0ef1b76d0e956f260a12f032d54c00308e8d9520b0'
+            '15de5b11a31d733bd5b6fa50faa2395dbe53c252bd52f937e67cdc940de17554e946d1e7f9746538a6be0cc12024fc2816c2b64a56e16762abaca75562a7512d'
+            'c76d634647336aaf157bc66ba094a363e971c0d275875a7df4521819147f54cd4c709eb8e024cdac9e900d99167e8a78a222587e7292e915573ef29060e6ec21'
+            '879be339148123e32b58a5669fdd3d3bb8b5d711326cb618f95b1680a6ac3a83c85d8862f2691b352fa26c95e4764dbb827856e22a3e2b9e4a76c13fe42864b5'
+            'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3'
+            '88e199d2f63e4f235930c35c6dfde80e6010e590907bd4de0af1fbfe6d5491ff56845aefcfe8edefa707712bd84fef96880655747b8bfb949ceeadc0456b0121'
+            '0cc5c1df3cd18978df9a01bb64680d3a375c1ff4de6a453045dd26355777b4f08e3a05f55f035c8012a9683100de0bc3d11c280debcb343eb7167fc25342d5c0')
+
+
+_datadir="/usr/share/webapps/gitlab"
+_etcdir="/etc/webapps/gitlab"
+_homedir="/var/lib/gitlab"
+_logdir="/var/log/gitlab"
+
+prepare() {
+  # Get first 7 characters from sha1 which has 40 characters in total
+  local revision=$(ls -d gitlab-foss | rev | cut -c 34-40 | rev)
+
+  cd gitlab-foss
+
+  patch -p1 < ../build_fix.patch
+
+  # GitLab tries to read its revision information from a file.
+  echo "${revision}" > REVISION
+
+  export SKIP_STORAGE_VALIDATION='true'
+
+  patch -p1 < ../configs.patch
+  # '/home/git' path in the config files indicates a default path that need to be adjusted
+  grep -FqR '/home/git' config || exit 1
+
+  cp config/gitlab.yml.example config/gitlab.yml
+  cp config/database.yml.postgresql config/database.yml
+  cp config/resque.yml.example config/resque.yml
+  cp config/puma.rb.example config/puma.rb
+
+  echo "Setting up systemd service files ..."
+  for service_file in gitlab-sidekiq.service gitlab-puma.service gitlab.logrotate gitlab-backup.service gitlab-mailroom.service; do
+    sed -i "s|<HOMEDIR>|${_homedir}|g" "${srcdir}/${service_file}"
+    sed -i "s|<DATADIR>|${_datadir}|g" "${srcdir}/${service_file}"
+    sed -i "s|<LOGDIR>|${_logdir}|g" "${srcdir}/${service_file}"
+  done
+
+  # https://github.com/bundler/bundler/issues/6882
+  sed -e '/BUNDLED WITH/,+1d' -i Gemfile.lock
+  bundle lock --update=bundler-audit
+  # 'lock' adds 'BUNDLED WITH' back. Remove it again.
+  sed -e '/BUNDLED WITH/,+1d' -i Gemfile.lock
+}
+
+build() {
+  cd gitlab-foss
+
+  echo "Fetching bundled gems..."
+  # Gems will be installed into vendor/bundle
+  bundle config build.gpgme --use-system-libraries  # See https://bugs.archlinux.org/task/63654
+  bundle config force_ruby_platform true # some native gems are not available for newer ruby
+  bundle install --jobs=$(nproc) --no-cache --deployment --without development test aws kerberos
+
+  # workaround for a ruby2.7 issue
+  # https://gitlab.com/groups/gitlab-org/-/epics/2380
+  # https://github.com/ruby-grape/grape/issues/1967
+  pushd vendor/bundle/ruby/2.7.0/gems/grape-1.1.0/
+  patch -p1 < $srcdir/ruby27-pop-extra-arg.patch
+  popd
+
+  yarn install --production --pure-lockfile
+  bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096"
+  bundle exec rake gettext:compile RAILS_ENV=production
+}
+
+package() {
+  cd gitlab-foss
+  depends+=('gitlab-shell')
+
+  install -d "${pkgdir}/usr/share/webapps"
+
+  cp -r "${srcdir}"/gitlab-foss "${pkgdir}${_datadir}"
+  # Remove unneeded directories: node_modules is only needed during build
+  rm -r "${pkgdir}${_datadir}/node_modules"
+  # https://gitlab.com/gitlab-org/omnibus-gitlab/blob/194cf8f12e51c26980c09de6388bbd08409e1209/config/software/gitlab-rails.rb#L179
+  for dir in spec qa rubocop app/assets vendor/assets; do
+    rm -r "${pkgdir}${_datadir}/${dir}"
+  done
+
+  chown -R root:root "${pkgdir}${_datadir}"
+  chmod 755 "${pkgdir}${_datadir}"
+
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}"
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/satellites"
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/shared/"{,artifacts,lfs-objects}
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/builds"
+  install -dm700 -o 105 -g 105 "${pkgdir}${_homedir}/uploads"
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/backups"
+  install -dm750 -o 105 -g 105 "${pkgdir}${_etcdir}"
+  install -dm755 "${pkgdir}/usr/share/doc/gitlab"
+
+  ln -fs /run/gitlab "${pkgdir}${_homedir}/pids"
+  ln -fs /run/gitlab "${pkgdir}${_homedir}/sockets"
+  ln -fs ${_datadir}/log "${pkgdir}${_homedir}/log"
+
+  rm -rf "${pkgdir}${_datadir}/public/uploads" && ln -fs "${_homedir}/uploads" "${pkgdir}${_datadir}/public/uploads"
+  rm -rf "${pkgdir}${_datadir}/builds" && ln -fs "${_homedir}/builds" "${pkgdir}${_datadir}/builds"
+  rm -rf "${pkgdir}${_datadir}/tmp" && ln -fs /var/tmp "${pkgdir}${_datadir}/tmp"
+  rm -rf "${pkgdir}${_datadir}/log" && ln -fs "${_logdir}" "${pkgdir}${_datadir}/log"
+
+  # Fixes https://bugs.archlinux.org/task/59762
+  ln -s "${_datadir}/config/boot.rb" "${pkgdir}"/${_etcdir}/boot.rb
+
+  mv "${pkgdir}${_datadir}/.gitlab_workhorse_secret" "${pkgdir}${_etcdir}/gitlab_workhorse_secret"
+  chmod 660 "${pkgdir}${_etcdir}/gitlab_workhorse_secret"
+  chown root:105 "${pkgdir}${_etcdir}/gitlab_workhorse_secret"
+  ln -fs "${_etcdir}/gitlab_workhorse_secret" "${pkgdir}${_datadir}/.gitlab_workhorse_secret"
+
+  ln -fs /etc/webapps/gitlab-shell/secret "${pkgdir}${_datadir}/.gitlab_shell_secret"
+
+  sed -i "s|require_relative '../lib|require '${_datadir}/lib|" config/application.rb
+
+  # Install config files
+  for config_file in application.rb gitlab.yml database.yml puma.rb resque.yml; do
+    mv "config/${config_file}" "${pkgdir}${_etcdir}/"
+    [[ -f "${pkgdir}${_datadir}/config/${config_file}" ]] && rm "${pkgdir}${_datadir}/config/${config_file}"
+    ln -fs "${_etcdir}/${config_file}" "${pkgdir}${_datadir}/config/"
+  done
+
+  # Install database symlink
+  ln -fs "${_etcdir}/database.yml" "${pkgdir}${_datadir}/config/database.yml"
+
+  # Install secrets symlink
+  ln -fs "${_etcdir}/secrets.yml" "${pkgdir}${_datadir}/config/secrets.yml"
+
+  # 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"
+
+  # https://gitlab.com/gitlab-org/gitlab-foss/issues/765
+  cp -r "${pkgdir}${_datadir}/doc" "${pkgdir}${_datadir}/public/help"
+  find "${pkgdir}${_datadir}/public/help" -name "*.md" -exec rm {} \;
+  find "${pkgdir}${_datadir}/public/help/" -depth -type d -empty -exec rmdir {} \;
+
+  chown 105:105 "${pkgdir}${_datadir}/db/schema.rb"
+  chown 105:105 "${pkgdir}${_datadir}/db/structure.sql"
+
+  # Install systemd service files
+  for service_file in gitlab-puma.service gitlab-sidekiq.service gitlab-backup.service gitlab-backup.timer gitlab.target gitlab-mailroom.service; do
+    install -Dm644 "${srcdir}/${service_file}" "${pkgdir}/usr/lib/systemd/system/${service_file}"
+  done
+
+  install -Dm644 "${srcdir}/gitlab.tmpfiles.d" "${pkgdir}/usr/lib/tmpfiles.d/gitlab.conf"
+  install -Dm644 "${srcdir}/gitlab.logrotate" "${pkgdir}/etc/logrotate.d/gitlab"
+}

Copied: gitlab/repos/community-testing-x86_64/build_fix.patch (from rev 635016, gitlab/trunk/build_fix.patch)
===================================================================
--- community-testing-x86_64/build_fix.patch	                        (rev 0)
+++ community-testing-x86_64/build_fix.patch	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,23 @@
+commit 96ff060075dc13332347c0c4d69bd4df5c6be8b7
+Author: Anatol Pomozov <anatol.pomozov at gmail.com>
+Date:   Sat Mar 21 09:13:31 2020 -0700
+
+    ArchLinux fixes
+
+diff --git a/Gemfile b/Gemfile
+index 51350401807..60b49c90adf 100644
+--- a/Gemfile
++++ b/Gemfile
+@@ -310,6 +310,12 @@ gem 'gettext_i18n_rails', '~> 1.8.0'
+ gem 'gettext_i18n_rails_js', '~> 1.3'
+ gem 'gettext', '~> 3.2.2', require: false, group: :development
+ 
++# Ping the gems that are needed for the old gettext
++# https://github.com/ruby-gettext/gettext/issues/64 the fix is available in gettext 3.3.0
++gem 'irb', '~> 1.1.0'  # use irb version that matches ruby 2.6. Later irb versions heavily modified its API and it breaks gettext
++gem 'e2mmap' # 'irb' 1.1.1 requires it
++
++
+ gem 'batch-loader', '~> 1.4.0'
+ 
+ # Perf bar

Copied: gitlab/repos/community-testing-x86_64/configs.patch (from rev 635016, gitlab/trunk/configs.patch)
===================================================================
--- community-testing-x86_64/configs.patch	                        (rev 0)
+++ community-testing-x86_64/configs.patch	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,184 @@
+commit 4c1ed3d0b4c35f91cc34c23db50b6dc0966d048c
+Author: Anatol Pomozov <anatol.pomozov at gmail.com>
+Date:   Tue May 26 00:01:38 2020 -0700
+
+    Patch config files with Arch Linux specific locations
+    
+    Arch uses upstream's default config files as a base for its configs.
+    But directory structure at Arch is completely different from the default
+    one specified by gitlab project.
+    We used to have a lot of seds expressions to adjust the files but as
+    complexity of configs grew 'sed' makes it easy to miss a changed/added
+    option.
+    
+    Track set of diffs as a patch. If upstream modifies config file then it
+    will cause a conflict that needs to be reviewed manually.
+
+diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
+index 5b3b35c9226..afb139df97e 100644
+--- a/config/database.yml.postgresql
++++ b/config/database.yml.postgresql
+@@ -6,7 +6,7 @@ production:
+   encoding: unicode
+   database: gitlabhq_production
+   pool: 10
+-  username: git
++  username: gitlab
+   password: "secure password"
+   host: localhost
+   # load_balancing:
+@@ -39,7 +39,7 @@ staging:
+   encoding: unicode
+   database: gitlabhq_staging
+   pool: 10
+-  username: git
++  username: gitlab
+   password: "secure password"
+   host: localhost
+ 
+diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
+index 9a2e470f852..2189b86ed8d 100644
+--- a/config/gitlab.yml.example
++++ b/config/gitlab.yml.example
+@@ -83,7 +83,7 @@ production: &base
+       #- 2001:0db8::/32
+ 
+     # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
+-    # user: git
++    user: gitlab
+ 
+     ## Date & Time settings
+     # Uncomment and customize if you want to change the default time zone of GitLab application.
+@@ -103,13 +103,13 @@ production: &base
+       # enabled: false
+       # S/MIME private key file in PEM format, unencrypted
+       # Default is '.gitlab_smime_key' relative to Rails.root (i.e. root of the GitLab app).
+-      # key_file: /home/git/gitlab/.gitlab_smime_key
++      # key_file: /var/lib/gitlab/.gitlab_smime_key
+       # S/MIME public certificate key in PEM format, will be attached to signed messages
+       # Default is '.gitlab_smime_cert' relative to Rails.root (i.e. root of the GitLab app).
+-      # cert_file: /home/git/gitlab/.gitlab_smime_cert
++      # cert_file: /var/lib/gitlab/.gitlab_smime_cert
+       # S/MIME extra CA public certificates in PEM format, will be attached to signed messages
+       # Optional
+-      # ca_certs_file: /home/git/gitlab/.gitlab_smime_ca_certs
++      # ca_certs_file: /var/lib/gitlab/.gitlab_smime_ca_certs
+ 
+     # Email server smtp settings are in config/initializers/smtp_settings.rb.sample
+ 
+@@ -363,7 +363,7 @@ production: &base
+ 
+     # File that contains the shared secret key for verifying access for gitlab-pages.
+     # Default is '.gitlab_pages_secret' relative to Rails.root (i.e. root of the GitLab app).
+-    # secret_file: /home/git/gitlab/.gitlab_pages_secret
++    # secret_file: /var/lib/gitlab/.gitlab_pages_secret
+ 
+   ## Mattermost
+   ## For enabling Add to Mattermost button
+@@ -956,12 +956,12 @@ production: &base
+ 
+   # Shared file storage settings
+   shared:
+-    # path: /mnt/gitlab # Default: shared
++    path: /var/lib/gitlab/shared # Default: shared
+ 
+   # Gitaly settings
+   gitaly:
+     # Path to the directory containing Gitaly client executables.
+-    client_path: /home/git/gitaly
++    client_path: /usr/bin
+     # Default Gitaly authentication token. Can be overridden per storage. Can
+     # be left blank when Gitaly is running locally on a Unix socket, which
+     # is the normal way to deploy Gitaly.
+@@ -979,13 +979,13 @@ production: &base
+     # real path not the symlink.
+     storages: # You must have at least a `default` storage path.
+       default:
+-        path: /home/git/repositories/
+-        gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket # TCP connections are supported too (e.g. tcp://host:port). TLS connections are also supported using the system certificate pool (eg: tls://host:port).
++        path: /var/lib/gitlab/repositories/
++        gitaly_address: unix:/run/gitlab/gitlab-gitaly.socket # TCP connections are supported too (e.g. tcp://host:port). TLS connections are also supported using the system certificate pool (eg: tls://host:port).
+         # gitaly_token: 'special token' # Optional: override global gitaly.token for this storage.
+ 
+   ## Backup settings
+   backup:
+-    path: "tmp/backups"   # Relative paths are relative to Rails.root (default: tmp/backups/)
++    path: "/var/lib/gitlab/backups"   # Relative paths are relative to Rails.root (default: tmp/backups/)
+     # archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
+     # keep_time: 604800   # default: 0 (forever) (in seconds)
+     # pg_schema: public     # default: nil, it means that all schemas will be backed up
+@@ -1026,12 +1026,12 @@ production: &base
+ 
+   ## GitLab Shell settings
+   gitlab_shell:
+-    path: /home/git/gitlab-shell/
+-    authorized_keys_file: /home/git/.ssh/authorized_keys
++    path: /usr/share/webapps/gitlab-shell/
++    authorized_keys_file: /var/lib/gitlab/.ssh/authorized_keys
+ 
+     # File that contains the secret key for verifying access for gitlab-shell.
+     # Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app).
+-    # secret_file: /home/git/gitlab/.gitlab_shell_secret
++    # secret_file: /var/lib/gitlab/.gitlab_shell_secret
+ 
+     # Git over HTTP
+     upload_pack: true
+@@ -1046,11 +1046,11 @@ production: &base
+   workhorse:
+     # File that contains the secret key for verifying access for gitlab-workhorse.
+     # Default is '.gitlab_workhorse_secret' relative to Rails.root (i.e. root of the GitLab app).
+-    # secret_file: /home/git/gitlab/.gitlab_workhorse_secret
++    # secret_file: /var/lib/gitlab/.gitlab_workhorse_secret
+ 
+   ## GitLab Elasticsearch settings
+   elasticsearch:
+-    indexer_path: /home/git/gitlab-elasticsearch-indexer/
++    indexer_path: /var/lib/gitlab/elasticsearch-indexer/
+ 
+   ## Git settings
+   # CAUTION!
+diff --git a/config/puma.rb.example b/config/puma.rb.example
+index cd7adca157f..9dffc101ae5 100644
+--- a/config/puma.rb.example
++++ b/config/puma.rb.example
+@@ -5,11 +5,11 @@
+ # The default is "config.ru".
+ #
+ rackup 'config.ru'
+-pidfile '/home/git/gitlab/tmp/pids/puma.pid'
+-state_path '/home/git/gitlab/tmp/pids/puma.state'
++pidfile '/run/gitlab/puma.pid'
++state_path '/run/gitlab/puma.state'
+ 
+-stdout_redirect '/home/git/gitlab/log/puma.stdout.log',
+-  '/home/git/gitlab/log/puma.stderr.log',
++stdout_redirect '/var/log/gitlab/puma.stdout.log',
++  '/var/log/gitlab/puma.stderr.log',
+   true
+ 
+ # Configure "min" to be the minimum number of threads to use to answer
+@@ -31,12 +31,12 @@ queue_requests false
+ 
+ # Bind the server to "url". "tcp://", "unix://" and "ssl://" are the only
+ # accepted protocols.
+-bind 'unix:///home/git/gitlab/tmp/sockets/gitlab.socket'
++bind 'unix:///run/gitlab/gitlab.socket'
+ 
+ workers 3
+ 
+-require_relative "/home/git/gitlab/lib/gitlab/cluster/lifecycle_events"
+-require_relative "/home/git/gitlab/lib/gitlab/cluster/puma_worker_killer_initializer"
++require_relative "/usr/share/webapps/gitlab/lib/gitlab/cluster/lifecycle_events"
++require_relative "/usr/share/webapps/gitlab/lib/gitlab/cluster/puma_worker_killer_initializer"
+ 
+ on_restart do
+   # Signal application hooks that we're about to restart
+@@ -70,7 +70,7 @@ tag 'gitlab-puma-worker'
+ worker_timeout 60
+ 
+ # Use json formatter
+-require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
++require_relative "/usr/share/webapps/gitlab/lib/gitlab/puma_logging/json_formatter"
+ 
+ json_formatter = Gitlab::PumaLogging::JSONFormatter.new
+ log_formatter do |str|

Copied: gitlab/repos/community-testing-x86_64/gitlab-backup.service (from rev 635016, gitlab/trunk/gitlab-backup.service)
===================================================================
--- community-testing-x86_64/gitlab-backup.service	                        (rev 0)
+++ community-testing-x86_64/gitlab-backup.service	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,20 @@
+[Unit]
+Description=GitLab Backup process
+Requires=
+After=network.target
+
+[Service]
+Type=oneshot
+User=gitlab
+Group=gitlab
+SyslogIdentifier=gitlab-backup
+WorkingDirectory=<DATADIR>
+# Prevent ExecJS from complaining that Node is not installed in production
+Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+CapabilityBoundingSet=
+PrivateTmp=true
+PrivateDevices=true
+ProtectSystem=full
+ProtectHome=true
+NoNewPrivileges=true
+ExecStart=/usr/bin/bundle exec rake gitlab:backup:create

Copied: gitlab/repos/community-testing-x86_64/gitlab-backup.timer (from rev 635016, gitlab/trunk/gitlab-backup.timer)
===================================================================
--- community-testing-x86_64/gitlab-backup.timer	                        (rev 0)
+++ community-testing-x86_64/gitlab-backup.timer	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Daily gitlab backup
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=timers.target

Copied: gitlab/repos/community-testing-x86_64/gitlab-mailroom.service (from rev 635016, gitlab/trunk/gitlab-mailroom.service)
===================================================================
--- community-testing-x86_64/gitlab-mailroom.service	                        (rev 0)
+++ community-testing-x86_64/gitlab-mailroom.service	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,22 @@
+[Unit]
+Description=Gitlab Mailroom Worker
+Requires=gitlab-puma.service
+Wants=gitlab-puma.service
+After=gitlab-puma.service
+StartLimitIntervalSec=100s
+
+[Service]
+User=gitlab
+Group=gitlab
+WorkingDirectory=<DATADIR>
+# Prevent ExecJS from complaining that Node is not installed in production
+Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+SyslogIdentifier=gitlab-mailroom
+PIDFile=/run/gitlab/mailroom.pid
+ExecStart=/usr/bin/bundle exec mail_room -q -c <DATADIR>/config/mail_room.yml
+ExecStop=/usr/bin/kill -QUIT $MAINPID
+Restart=on-failure
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target

Copied: gitlab/repos/community-testing-x86_64/gitlab-puma.service (from rev 635016, gitlab/trunk/gitlab-puma.service)
===================================================================
--- community-testing-x86_64/gitlab-puma.service	                        (rev 0)
+++ community-testing-x86_64/gitlab-puma.service	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,34 @@
+[Unit]
+Description=GitLab Puma Server
+Requires=redis.service
+Wants=mysqld.service postgresql.service
+After=redis.service mysqld.service postgresql.service network.target
+StartLimitIntervalSec=100s
+
+[Service]
+User=gitlab
+Group=gitlab
+WorkingDirectory=<DATADIR>
+# Prevent ExecJS from complaining that Node is not installed in production
+Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+SyslogIdentifier=gitlab-puma
+PIDFile=/run/gitlab/puma.pid
+RuntimeDirectory=gitlab
+RuntimeDirectoryMode=775
+PrivateTmp=true
+PrivateDevices=true
+ProtectSystem=full
+ProtectHome=true
+# These options break Gitlab's email delivery if you
+# use postfix' sendmail wrapper. If you use an SMTP server
+# instead you can safely enable these security features.
+#NoNewPrivileges=true
+#CapabilityBoundingSet=
+ExecStart=/usr/bin/bundle exec puma -C <DATADIR>/config/puma.rb -e production
+ExecStop=/usr/bin/kill -QUIT $MAINPID
+ExecReload=/usr/bin/kill -USR2 $MAINPID
+Restart=on-failure
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target

Copied: gitlab/repos/community-testing-x86_64/gitlab-sidekiq.service (from rev 635016, gitlab/trunk/gitlab-sidekiq.service)
===================================================================
--- community-testing-x86_64/gitlab-sidekiq.service	                        (rev 0)
+++ community-testing-x86_64/gitlab-sidekiq.service	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,31 @@
+[Unit]
+Description=GitLab Sidekiq Worker
+Requires=redis.service gitlab-puma.service
+Wants=mysqld.service postgresql.service
+After=redis.service mysqld.service postgresql.service network.target gitlab-puma.service
+JoinsNamespaceOf=gitlab-puma.service
+StartLimitIntervalSec=100s
+
+[Service]
+User=gitlab
+Group=gitlab
+WorkingDirectory=<DATADIR>
+# Prevent ExecJS from complaining that Node is not installed in production
+Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
+SyslogIdentifier=gitlab-sidekiq
+PIDFile=/run/gitlab/sidekiq.pid
+PrivateTmp=true
+ProtectSystem=full
+ProtectHome=true
+# These options break Gitlab's email delivery if you
+# use postfix' sendmail wrapper. If you use an SMTP server
+# instead you can safely enable these security features.
+#NoNewPrivileges=true
+#CapabilityBoundingSet=
+ExecStart=/usr/bin/bundle exec sidekiq -C <DATADIR>/config/sidekiq_queues.yml -e production
+ExecStop=/usr/bin/bundle exec sidekiqctl stop /run/gitlab/sidekiq.pid
+Restart=on-failure
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target

Copied: gitlab/repos/community-testing-x86_64/gitlab.install (from rev 635016, gitlab/trunk/gitlab.install)
===================================================================
--- community-testing-x86_64/gitlab.install	                        (rev 0)
+++ community-testing-x86_64/gitlab.install	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,29 @@
+post_install() {
+    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 "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 "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\""
+}
+
+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 "Afterwards, restart gitlab-related services:"
+    echo "# systemctl daemon-reload"
+    echo "# systemctl restart gitlab-sidekiq gitlab-puma gitlab-workhorse gitlab-gitaly"
+
+    if (( $(vercmp $2 13.0.1) < 0)); then
+        echo "=========="
+        echo "Since 13.0.0, upstream switched default Ruby web server from Unicorn to Puma."
+        echo "Please use 'gitlab-puma' systemd service instead of 'gitlab-unicorn'."
+
+        echo "=========="
+        echo "The new Puma server uses socket files by default thus configuration for gitlab-gitlay and gitlab-shell need to be updated."
+        echo "Please check new option values for 'gitlab_url' and 'secret_file' in /etc/webapps/gitlab-shell/config.yml and /etc/gitlab-gitaly/config.toml."
+    fi
+}

Copied: gitlab/repos/community-testing-x86_64/gitlab.logrotate (from rev 635016, gitlab/trunk/gitlab.logrotate)
===================================================================
--- community-testing-x86_64/gitlab.logrotate	                        (rev 0)
+++ community-testing-x86_64/gitlab.logrotate	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,6 @@
+<LOGDIR>/*.log {
+	missingok
+	compress
+	notifempty
+	copytruncate
+}

Copied: gitlab/repos/community-testing-x86_64/gitlab.target (from rev 635016, gitlab/trunk/gitlab.target)
===================================================================
--- community-testing-x86_64/gitlab.target	                        (rev 0)
+++ community-testing-x86_64/gitlab.target	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,7 @@
+[Unit]
+Description=GitLab - Self Hosted Git Management
+Requires=gitlab-puma.service gitlab-workhorse.service
+Wants=gitlab-sidekiq.service gitlab-backup.timer gitlab-gitaly.service gitlab-mailroom.service
+
+[Install]
+WantedBy=multi-user.target

Copied: gitlab/repos/community-testing-x86_64/gitlab.tmpfiles.d (from rev 635016, gitlab/trunk/gitlab.tmpfiles.d)
===================================================================
--- community-testing-x86_64/gitlab.tmpfiles.d	                        (rev 0)
+++ community-testing-x86_64/gitlab.tmpfiles.d	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1 @@
+d /run/gitlab 0775 gitlab gitlab - -

Copied: gitlab/repos/community-testing-x86_64/ruby27-pop-extra-arg.patch (from rev 635016, gitlab/trunk/ruby27-pop-extra-arg.patch)
===================================================================
--- community-testing-x86_64/ruby27-pop-extra-arg.patch	                        (rev 0)
+++ community-testing-x86_64/ruby27-pop-extra-arg.patch	2020-05-26 09:43:11 UTC (rev 635017)
@@ -0,0 +1,26 @@
+From 9ff085264c5ce3db12290c68bc8373578234e425 Mon Sep 17 00:00:00 2001
+From: dm1try <me at dmitry.it>
+Date: Sat, 11 Jan 2020 22:24:15 +0300
+Subject: [PATCH] fix args forwarding in Middleware::Stack#merge_with for ruby
+ 2.7.0 ref #1967
+
+---
+ CHANGELOG.md                        | 1 +
+ lib/grape/middleware/stack.rb       | 3 ++-
+ spec/grape/middleware/stack_spec.rb | 9 +++++++++
+ 3 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib/grape/middleware/stack.rb b/lib/grape/middleware/stack.rb
+index 8509a4653..488a51498 100644
+--- a/lib/grape/middleware/stack.rb
++++ b/lib/grape/middleware/stack.rb
+@@ -78,7 +78,8 @@ def use(*args, &block)
+       def merge_with(middleware_specs)
+         middleware_specs.each do |operation, *args|
+           if args.last.is_a?(Proc)
+-            public_send(operation, *args, &args.pop)
++            last_proc = args.pop
++            public_send(operation, *args, &last_proc)
+           else
+             public_send(operation, *args)
+           end


More information about the arch-commits mailing list