[arch-commits] Commit in gitlab-shell/trunk (PKGBUILD configs.patch)
Anatol Pomozov
anatolik at archlinux.org
Tue May 26 08:32:52 UTC 2020
Date: Tuesday, May 26, 2020 @ 08:32:51
Author: anatolik
Revision: 635011
upgpkg: gitlab-shell 2:13.2.0-2: FS#66774 Adjust configs for the new file locations
Added:
gitlab-shell/trunk/configs.patch
Modified:
gitlab-shell/trunk/PKGBUILD
---------------+
PKGBUILD | 15 +++++---------
configs.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-05-26 08:14:04 UTC (rev 635010)
+++ PKGBUILD 2020-05-26 08:32:51 UTC (rev 635011)
@@ -12,7 +12,7 @@
# need this again at some point in the future.
pkgname=gitlab-shell
pkgver=13.2.0
-pkgrel=1
+pkgrel=2
epoch=2
pkgdesc="Git management software"
arch=('x86_64')
@@ -26,9 +26,11 @@
"etc/webapps/${pkgname}/secret"
"etc/webapps/${pkgname}/.gitconfig")
source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v${pkgver}/gitlab-shell-v${pkgver}.tar.gz"
+ "configs.patch"
"gitlab-shell.gitconfig"
"gitlab-shell.sysusers")
sha512sums=('75aa095b4912a7ce7e7523a454cb32b543cb3e0061cba8c5346cf2837b486dee49fad855d73086ad7a303cfd9e47f4119e2d3806deaab0bea0bd745f0122fd61'
+ 'd419883949c6aaa1fec8e251b82db845483a439df3f743a0370a547449a271bd8e197d93bf6f83d6610f12dbdc4ea17956ae7af1447ac44bd92b73036bb9cd05'
'5caafe5300621ced58479e724b39656afc17f32a64ecde5dfa4919683ef37d9121552c78f066678472acb56e0a34b5c3cf34d9b44414d1ed5d91f725d180fa43'
'616188911fa7b7c569bc2d5e2024177e67366c48b4ffef1f7ad4dc8e4e9e2cdb421b687f45a1e9bdec8bf2736a157ca9f1e0ba24edae2f073b8c7b5ac42745e8')
@@ -41,13 +43,8 @@
prepare() {
cd "${srcdir}/${_srcdir}"
- sed -e "s|user: git|user: gitlab|" \
- -e "s|/home/git|${_homedir}|" \
- -e "s|# log_file: .*|log_file: \"${_logdir}/gitlab-shell.log\"|" \
- -e "s|# host:|host:|" \
- -e "s|# port:|port:|" \
- -e "s|socket:|# socket:|" \
- config.yml.example > config.yml
+ patch -p1 < ../configs.patch
+ # At this point config file should not contain any references to '/home/git'
}
build() {
@@ -85,7 +82,7 @@
ln -fs "${_etcdir}/secret" "${pkgdir}${_datadir}/.gitlab_shell_secret"
# config.yml
- mv config.yml "${pkgdir}${_etcdir}"
+ install -Dm644 config.yml.example "${pkgdir}${_etcdir}/config.yml"
ln -fs "${_etcdir}/config.yml" "${pkgdir}${_datadir}/config.yml"
cp -r VERSION bin hooks spec support "${pkgdir}${_datadir}"
Added: configs.patch
===================================================================
--- configs.patch (rev 0)
+++ configs.patch 2020-05-26 08:32:51 UTC (rev 635011)
@@ -0,0 +1,57 @@
+commit 589384cfc1f10d818c531efa9c8d572532484278
+Author: Anatol Pomozov <anatol.pomozov at gmail.com>
+Date: Tue May 26 00:39:46 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.yml.example b/config.yml.example
+index 658839d..145a12a 100644
+--- a/config.yml.example
++++ b/config.yml.example
+@@ -4,7 +4,7 @@
+ #
+
+ # GitLab user. git by default
+-user: git
++user: gitlab
+
+ # URL to GitLab instance, used for API calls. Default: http://localhost:8080.
+ # For relative URL support read http://doc.gitlab.com/ce/install/relative_url.html
+@@ -13,7 +13,7 @@ user: git
+ # only listen on a Unix domain socket. For Unix domain sockets use
+ # "http+unix://<urlquoted-path-to-socket>", e.g.
+ # "http+unix://%2Fpath%2Fto%2Fsocket"
+-gitlab_url: "http://localhost:8080"
++gitlab_url: "http+unix://%2Frun%2Fgitlab%2Fgitlab.socket"
+
+ # See installation.md#using-https for additional HTTPS configuration details.
+ http_settings:
+@@ -25,15 +25,15 @@ http_settings:
+ self_signed_cert: false
+
+ # File used as authorized_keys for gitlab user
+-auth_file: "/home/git/.ssh/authorized_keys"
++auth_file: "/var/lib/gitlab/.ssh/authorized_keys"
+
+ # File that contains the secret key for verifying access to GitLab.
+ # Default is .gitlab_shell_secret in the gitlab-shell directory.
+-# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
++secret_file: "/var/lib/gitlab/gitlab-shell/.gitlab_shell_secret"
+
+ # Log file.
+ # Default is gitlab-shell.log in the root directory.
+-# log_file: "/home/git/gitlab-shell/gitlab-shell.log"
++log_file: "/var/log/gitlab/gitlab-shell.log"
+
+ # Log level. INFO by default
+ log_level: INFO
More information about the arch-commits
mailing list