diff options
author | Caleb Maclennan | 2019-04-08 08:18:53 +0300 |
---|---|---|
committer | Caleb Maclennan | 2019-04-08 08:26:09 +0300 |
commit | 10dfb68ea26a03c1e47069f7b87a92547c4f529d (patch) | |
tree | 3d9b8d8d23bdb07130f08b5bcabf60286936aa4b /PKGBUILD | |
parent | eefbf2797680b9fa414c5ef08482974f6140964e (diff) | |
download | aur-10dfb68ea26a03c1e47069f7b87a92547c4f529d.tar.gz |
Update to 11.9.6, track edits from [community]/gitlab
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 65 |
1 files changed, 34 insertions, 31 deletions
@@ -8,9 +8,12 @@ # Contributor: Tobias Hunger <tobias DOT hunger AT gmail DOT com> # Contributor: Stefan Tatschner <stefan@sevenbyte.org> +# 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 pkgname=${_pkgname}-ee -pkgver=11.1.4 +pkgver=11.9.6 pkgrel=1 pkgdesc="Project management and code hosting application" arch=('x86_64') @@ -19,7 +22,7 @@ license=('MIT') conflicts=("${_pkgname}") provides=("${_pkgname}") options=(!buildflags) -depends=('ruby2.3' 'git' 'ruby2.3-bundler' 'gitlab-workhorse' 'gitlab-gitaly' 'openssh' 'redis' 'libxslt' 'icu' 're2' 'http-parser') +depends=('ruby2.5' 'ruby2.5-bundler' 'git' 'gitlab-workhorse' 'gitlab-gitaly' 'openssh' 'redis' 'libxslt' 'icu' 're2' 'http-parser' 'nodejs') makedepends=('cmake' 'postgresql' 'mariadb' 'yarn' 'go' 'nodejs') optdepends=('postgresql: database backend' 'mysql: database backend' @@ -30,7 +33,7 @@ backup=("etc/webapps/${_pkgname}/application.rb" "etc/webapps/${_pkgname}/resque.yml" "etc/webapps/${_pkgname}/unicorn.rb" "etc/logrotate.d/${_pkgname}") -source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ee/repository/archive?sha=v${pkgver}-ee" +source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ee/repository/archive?sha=v${pkgver}-ee" gitlab-unicorn.service gitlab-sidekiq.service gitlab-backup.service @@ -38,19 +41,17 @@ source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/api/v4/projects/gitlab- gitlab-backup.timer gitlab.target gitlab.tmpfiles.d - gitlab.logrotate - "b41b2de702c26bfbbe375c70c48293a75546df42.patch::https://git.archlinux.org/svntogit/community.git/plain/trunk/b41b2de702c26bfbbe375c70c48293a75546df42.patch?h=packages/gitlab") + gitlab.logrotate) install='gitlab.install' -sha512sums=('95fcb76edf04307c3c4af88f99eb71ecacda11c8906b83c58f42872eeee5afc44987ead9e4bf118458866aa0fb05e712388ba31327450934323efba6cdfc350a' - 'e96364b3373420a0704552584264f42fee23d64d44d3f769dffa6b516ea9d4c09873da8b2a279445ae9a09f17f81628815efc83e8d0070b3246e56aa13c02ac6' - '1104db0397ae5f9a69452ea2a432b837cfaf37d72d063226c2156de5f753b5ae42be1f90292c34f27e251ce3d265ac9c1f79faad1d377c923e7dbc6744100471' - 'bfc98f3890dfbe11a6f7fa3275f2b04b54b8e31455dcf70abfdc7f1021ff9acb1243f7af8381465346cd780bc76fa2b1c80fada860b8c3c87c7c56bb5229c1ee' - '1410a207279a62ca33ddd6844d41dbdb46121209668ab2fba65fbf8b97aa89da1578d39c72c3f1f2ede1770a0e16cd82c3e144d06ed62d2e76e5d2c79ce01386' +sha512sums=('c8f0dcfdf08b5d935800383c0b711a6255c80acbaeee01c44930e0c04438ee967bfe241ca1ae3b14dfab164f771d7720934be84b1717130f13eb244f3d888b3d' + 'd6d0604a726277f27a7596caf31909ff7d9854fd85f2902fd8a06eb581b38cc0e0fd6c10b3b16c84e0c629230501bc51d2f74c765761b43cdead139a521a327d' + '41ca8890aff1dd99b3c4ef283f70a172af772837ab6b1bda1d26710616a822f5179899ca9b3a96bc0b434f8f6d614b29b39b1596c0f284e5347ae9e06d40c1c4' + '2e49f4c2549c219d5d1c8572a7db7a700847bc8c520b44bdfc1742d3caf57d8336da5c0b74672f820349b8eab0fa1712dcec5588a4fb742ad98c8eb7ec2b5951' + 'fdb698c86057574aecaa1f1503f3d3319e06d5e872c676d58590b48bb7b3483b837bc991136eb2cc4b2cea68b52d294b8c1b382c9659f14027a923ac3c17d6d5' 'c11d2c59da8325551a465227096e8d39b0e4bcd5b1db21565cf3439e431838c04bc00aa6f07f4d493f3f47fd6b4e25aeb0fe0fc1a05756064706bf5708c960ec' 'bf33b818e4ea671c16f58563997ba5fe0a09090e5c03577ff974d31324d4e9782b85a9bb4f1749b97257ce93400c692de935f003770d52b5994c9cab9aee57c6' 'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3' - '20b93eab504e82cc4401685b59e6311b4d2c0285bc594d47ce4106d3f418a3e2ba92c4f49732748c0ba913aa3e3299126166e37d2a2d5b4d327d66bae4b8abda' - '32c432bf5e45be7b63e078335deaab5d05f8c0e78da891038cc607beed75c670f4c825138bb2c6ba0b4cf879ef45f5cbeb12cebd4fa63d7f58362960788c9e72') + '20b93eab504e82cc4401685b59e6311b4d2c0285bc594d47ce4106d3f418a3e2ba92c4f49732748c0ba913aa3e3299126166e37d2a2d5b4d327d66bae4b8abda') _datadir="/usr/share/webapps/${_pkgname}" _etcdir="/etc/webapps/${_pkgname}" @@ -64,15 +65,13 @@ prepare() { cd "${_srcdir}"* - # patch -Np1 -i "${srcdir}"/b41b2de702c26bfbbe375c70c48293a75546df42.patch - # GitLab tries to read its revision information from a file. echo "${revision}" > REVISION export SKIP_STORAGE_VALIDATION='true' # Patching config files: - msg2 "Patching paths in and username gitlab.yml..." + echo "Patching paths in and username gitlab.yml..." sed -e "s|# user: git|user: gitlab|" \ -e "s|/home/git/gitaly/bin|/usr/bin|" \ -e "s|/home/git/repositories|${_homedir}/repositories|" \ @@ -83,7 +82,7 @@ prepare() { -e "s|/home/git/gitlab/tmp/sockets/private/gitaly.socket|${_homedir}/sockets/gitlab-gitaly.socket|" \ config/gitlab.yml.example > config/gitlab.yml - msg2 "Patching paths and timeout in unicorn.rb..." + echo "Patching paths and timeout in unicorn.rb..." sed -e "s|/home/git/gitlab/tmp/.*/|/run/gitlab/|g" \ -e "s|/var/run/|/run/|g" \ -e "s|/home/git/gitlab|${_datadir}|g" \ @@ -93,15 +92,15 @@ prepare() { # We need this one untouched because otherwise assets will fail cp config/database.yml.postgresql config/database.yml.postgresql.orig - msg2 "Patching username in database.yml.{mysql,postgresql}..." + echo "Patching username in database.yml.{mysql,postgresql}..." sed -i -e "s|username: git|username: gitlab|" config/database.yml.mysql sed -i -e "s|username: git|username: gitlab|" config/database.yml.postgresql - msg2 "Patching redis connection in resque.yml" + echo "Patching redis connection in resque.yml" sed -e "s|production: unix:/var/run/redis/redis.sock|production: redis://localhost:6379|" \ config/resque.yml.example > config/resque.yml.patched - msg2 "Setting up systemd service files ..." + echo "Setting up systemd service files ..." for service_file in gitlab-sidekiq.service gitlab-unicorn.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}" @@ -112,10 +111,10 @@ prepare() { build() { cd "${srcdir}/${_srcdir}"* - msg "Fetching bundled gems..." - # Gems will be installed into vendor/bundle + echo "Fetching bundled gems..." - bundle-2.3 install --no-cache --deployment --without development test + # Gems will be installed into vendor/bundle + bundle-2.5 install --no-cache --deployment --without development test # We'll temporarily stick this in here so we can build the assets cp config/database.yml.postgresql.orig config/database.yml @@ -123,8 +122,9 @@ build() { sed -i 's/url.*/nope.sock/g' config/resque.yml yarn install --production --pure-lockfile - bundle-2.3 exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production - bundle-2.3 exec rake gettext:compile RAILS_ENV=production + bundle-2.5 exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096" + bundle-2.5 exec rake gettext:compile RAILS_ENV=production + # After building assets, clean this up again rm config/database.yml config/database.yml.postgresql.orig mv config/resque.yml.patched config/resque.yml @@ -165,6 +165,9 @@ package() { 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" @@ -174,14 +177,14 @@ package() { sed -i "s|require_relative '../lib|require '${_datadir}/lib|" config/application.rb - # Fix for ruby-2.3 and bundle-2.3 - sed -i "s|bundle|bundle-2.3|g" "${pkgdir}${_datadir}/lib/tasks/gitlab/check.rake" - grep -rl "bin/env ruby" "${pkgdir}${_datadir}" | xargs sed -i "s|bin/env ruby$|bin/env ruby-2.3|g" + # Fix for ruby-2.5 and bundle-2.5 + sed -i "s|bundle|bundle-2.5|g" "${pkgdir}${_datadir}/lib/tasks/gitlab/check.rake" + grep -rl "bin/env ruby" "${pkgdir}${_datadir}" | xargs sed -i "s|bin/env ruby$|bin/env ruby-2.5|g" sed -i \ - -e "s|ruby --version|ruby-2.3 --version|g" \ - -e "s|gem --version|gem-2.3 --version|g" \ - -e "s|bundle --version|bundle-2.3 --version|g" \ - -e "s|rake --version|rake-2.3 --version|g" \ + -e "s|ruby --version|ruby-2.5 --version|g" \ + -e "s|gem --version|gem-2.5 --version|g" \ + -e "s|bundle --version|bundle-2.5 --version|g" \ + -e "s|rake --version|rake-2.5 --version|g" \ "${pkgdir}${_datadir}/lib/tasks/gitlab/info.rake" # Install config files |