[arch-commits] Commit in gitlab-shell/trunk (3 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Tue Feb 6 08:54:09 UTC 2018
Date: Tuesday, February 6, 2018 @ 08:54:08
Author: svenstaro
Revision: 289377
upgpkg: gitlab-shell 2:6.0.2-2
Use sysusers file
Added:
gitlab-shell/trunk/gitlab-shell.sysusers
Modified:
gitlab-shell/trunk/PKGBUILD
gitlab-shell/trunk/gitlab-shell.install
-----------------------+
PKGBUILD | 11 ++++++++---
gitlab-shell.install | 7 +++++--
gitlab-shell.sysusers | 1 +
3 files changed, 14 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-02-06 03:37:16 UTC (rev 289376)
+++ PKGBUILD 2018-02-06 08:54:08 UTC (rev 289377)
@@ -8,7 +8,7 @@
pkgname=gitlab-shell
pkgver=6.0.2
-pkgrel=1
+pkgrel=2
epoch=2
pkgdesc="Git management software"
arch=('x86_64')
@@ -24,9 +24,11 @@
"etc/webapps/${pkgname}/authorized_keys"
"etc/webapps/${pkgname}/")
source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=v${pkgver}"
- "gitlab-shell.gitconfig")
+ "gitlab-shell.gitconfig"
+ "gitlab-shell.sysusers")
sha512sums=('a154ab0817eeee327cd404116f1ec0b7109f1a5c0eb1185899b2d6630862f1ae62a91188dd715e6f60fbc5d0fcc13daa04b0552e5a40d6155f4d67504ccf1a19'
- '9428eaba40eb3ef52024bb01321de860e149242a15465543030317233486aa37b40c5b946aba57451d07cec98b35fcc95d60fd7b376f77c218034b6cf94d191d')
+ '9428eaba40eb3ef52024bb01321de860e149242a15465543030317233486aa37b40c5b946aba57451d07cec98b35fcc95d60fd7b376f77c218034b6cf94d191d'
+ '5c6306494694fdd07ee475a58a6e5b83613ac7ef294ebb13f52eaa5dbe72ffcee034726245206d7edbba4b5c5e808abdfe5be7631b722492d3334407fd69840f')
_datadir="/usr/share/webapps/${pkgname}"
_etcdir="/etc/webapps/${pkgname}"
@@ -66,6 +68,9 @@
install -dm750 -o 105 -g 105 "${pkgdir}${_etcdir}"
install -dm770 -o 105 -g root "${pkgdir}${_logdir}"
+ # sysusers
+ install -Dm644 "${srcdir}/gitlab-shell.sysusers" "${pkgdir}/usr/lib/sysusers.d/gitlab-shell.conf"
+
# .gitconfig
install -Dm644 -o 105 -g 105 "${srcdir}/gitlab-shell.gitconfig" "${pkgdir}${_etcdir}/.gitconfig"
ln -fs "${_etcdir}/.gitconfig" "${pkgdir}${_homedir}/.gitconfig"
Modified: gitlab-shell.install
===================================================================
--- gitlab-shell.install 2018-02-06 03:37:16 UTC (rev 289376)
+++ gitlab-shell.install 2018-02-06 08:54:08 UTC (rev 289377)
@@ -1,7 +1,10 @@
post_install() {
- getent group gitlab > /dev/null || groupadd -g 105 gitlab 1>/dev/null
- getent passwd gitlab > /dev/null || useradd -u 105 -d "/var/lib/gitlab" -g gitlab -s "/usr/share/webapps/gitlab-shell/bin/gitlab-shell" gitlab 1>/dev/null
+ # make sure the user exists...
+ systemd-sysusers gitlab-shell.conf
+ # ... and change the shell.
+ usermod -s "/usr/share/webapps/gitlab-shell/bin/gitlab-shell" gitlab
+
echo "Configure gitlab-shell in /etc/webapps/gitlab-shell/config.yml"
echo "Put a secret bytestring to /etc/webapps/gitlab-shell/secret"
}
Added: gitlab-shell.sysusers
===================================================================
--- gitlab-shell.sysusers (rev 0)
+++ gitlab-shell.sysusers 2018-02-06 08:54:08 UTC (rev 289377)
@@ -0,0 +1 @@
+u gitlab 105 - /var/lib/gitlab
More information about the arch-commits
mailing list