diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index e7b0020..157e00e 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -15,7 +15,7 @@ arch=('x86_64') url="https://gitlab.com/gitlab-org/gitlab-foss" license=('MIT') options=(!buildflags !debug) -depends=('ruby2.7' 'git' 'gitlab-workhorse' 'gitlab-gitaly' 'openssh' 'redis' 'libxslt' 'icu' 're2' 'http-parser' 'nodejs' 'openssl') +depends=('ruby2.7' 'git' 'perl-image-exiftool' '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' @@ -34,6 +34,7 @@ source=(git+https://gitlab.com/gitlab-org/gitlab-foss.git#tag=v$pkgver gitlab-sidekiq.service gitlab-backup.service gitlab-mailroom.service + gitlab-workhorse.service gitlab-backup.timer gitlab.target gitlab.tmpfiles.d @@ -47,6 +48,7 @@ sha512sums=('SKIP' '419848c668928276620b5229e457a39e0ed7e111f1da68a30c3e0ae1a644af1c869b004b35435ccec4ddcdf6cf7418b1ab71e6e2ee8a2c861c6625c8bfd908f6' 'd86e16747ad79f514ce180646c68bec8b6fa61764b2b14b1621db998f48955c3fb81f4e19ecb0fbab9d603dd25d95929e6d72a473652608373e6551f26244738' 'f8067d1ee444a50dc9b2ed871974225ad521c310eb191e075adb0e45e47168da7d16b92f2e40d7ce755041dd4426a05f0ad1385392b4db526aeaf8a638eb024f' + '893527f270179fc78ff60e33f0b44abd984d1e9859dd5bf59fea77245ddd4c1c252d2c7882719366944d0f9341a90b5e077470b15afcc3df419b0d0a9f2e6d56' 'c76d634647336aaf157bc66ba094a363e971c0d275875a7df4521819147f54cd4c709eb8e024cdac9e900d99167e8a78a222587e7292e915573ef29060e6ec21' '879be339148123e32b58a5669fdd3d3bb8b5d711326cb618f95b1680a6ac3a83c85d8862f2691b352fa26c95e4764dbb827856e22a3e2b9e4a76c13fe42864b5' 'abacbff0d7be918337a17b56481c84e6bf3eddd9551efe78ba9fb74337179e95c9b60f41c49f275e05074a4074a616be36fa208a48fc12d5b940f0554fbd89c3' @@ -102,6 +104,13 @@ build() { bundle-2.7 config force_ruby_platform true # some native gems are not available for newer ruby bundle-2.7 install --jobs=$(nproc) --no-cache --deployment --without development test aws kerberos + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + make -C workhorse + yarn install --production --pure-lockfile bundle-2.7 exec rake gettext:compile RAILS_ENV=production NODE_ENV=production USE_DB=false SKIP_STORAGE_VALIDATION=true NODE_OPTIONS="--max_old_space_size=3584" bundle-2.7 exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production USE_DB=false SKIP_STORAGE_VALIDATION=true NODE_OPTIONS="--max_old_space_size=3584" @@ -125,6 +134,10 @@ package() { chown -R root:root "${pkgdir}${_appdir}" chmod 755 "${pkgdir}${_appdir}" + install -Dm755 "workhorse/gitlab-workhorse" "${pkgdir}/usr/bin/gitlab-workhorse" + install -Dm755 "workhorse/gitlab-zip-cat" "${pkgdir}/usr/bin/gitlab-zip-cat" + install -Dm755 "workhorse/gitlab-zip-metadata" "${pkgdir}/usr/bin/gitlab-zip-metadata" + install -dm750 -o 105 -g 105 "${pkgdir}${_datadir}" install -dm750 -o 105 -g 105 "${pkgdir}${_datadir}/satellites" install -dm750 -o 105 -g 105 "${pkgdir}${_datadir}/shared/"{,artifacts,lfs-objects} @@ -183,7 +196,7 @@ package() { chown 105:105 "${pkgdir}${_appdir}/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 + for service_file in gitlab-puma.service gitlab-sidekiq.service gitlab-backup.service gitlab-backup.timer gitlab.target gitlab-mailroom.service gitlab-workhorse.service; do install -Dm644 "${srcdir}/${service_file}" "${pkgdir}/usr/lib/systemd/system/${service_file}" done diff --git a/trunk/gitlab-workhorse.service b/trunk/gitlab-workhorse.service new file mode 100644 index 0000000..8a6ebc3 --- /dev/null +++ b/trunk/gitlab-workhorse.service @@ -0,0 +1,22 @@ +[Unit] +Description=Gitlab Workhorse +Requires=gitlab-puma.service +After=gitlab-puma.service + +[Service] +User=gitlab +Group=gitlab +WorkingDirectory=/usr/share/webapps/gitlab +SyslogIdentifier=gitlab-workhorse +CapabilityBoundingSet= +ProtectSystem=full +ProtectHome=true +NoNewPrivileges=true +ExecStart=/usr/bin/gitlab-workhorse -listenUmask 0 -listenNetwork unix -listenAddr /run/gitlab/gitlab-workhorse.socket -authBackend http://localhost:8080 -authSocket /run/gitlab/gitlab.socket -documentRoot /usr/share/webapps/gitlab/public +ExecStop=/usr/bin/kill -QUIT $MAINPID +ExecReload=/usr/bin/kill -USR2 $MAINPID +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target