www-servers/gitaly:

Add real ebuild for gitaly-0.10.0, base off the one from the gitlab overlay (v0.6.0)

Package-Manager: Portage-2.3.5, Repoman-2.3.1
This commit is contained in:
Manuel Friedli 2017-05-30 02:38:12 +02:00
parent 3a9d9dafd0
commit beb1099918
6 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,10 @@
diff --git a/Makefile b/Makefile
index c822059..342da88 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-PREFIX=/usr/local
+PREFIX=${DESTDIR}/usr
PKG=gitlab.com/gitlab-org/gitaly
BUILD_DIR=$(shell pwd)
BIN_BUILD_DIR=${BUILD_DIR}/_build/bin

View file

@ -0,0 +1,21 @@
diff --git a/config.toml.example b/config.toml.example
index 3a987f9..801d192 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -1,6 +1,6 @@
# Example Gitaly configuration file
-socket_path = "/home/git/gitlab/tmp/sockets/private/gitaly.socket"
+socket_path = "/run/gitlab/gitaly.socket"
# # Optional: listen on a TCP socket. This is insecure (no authentication)
# listen_addr = "localhost:9999"
@@ -12,7 +12,7 @@ socket_path = "/home/git/gitlab/tmp/sockets/private/gitaly.socket"
[[storage]]
name = "default"
-path = "/home/git/repositories"
+path = "/var/lib/git/repositories"
# # You can optionally configure more storages for this Gitaly instance to serve up
#

View file

@ -0,0 +1,8 @@
CONFIGFILE=/etc/gitlab/gitaly-config.toml
RUNAS_USER=git
RUNAS_GROUP=${RUNAS_USER}
LOGFILE=/var/log/gitlab/gitlab-gitaly.log
# This must match the setting in /etc/gitlab/gitaly-config.toml
# If not using a socket, simply comment out or delete the next line.
SOCKETDIR=/run/gitlab

View file

@ -0,0 +1,19 @@
#!/sbin/openrc-run
start() {
ebegin "Starting gitlab-gitaly"
checkpath -f -m 640 -o ${RUNAS_USER}:${RUNAS_GROUP} ${LOFGILE}
[ -z "${SOCKETDIR}" ] || checkpath -d ${SOCKETDIR}
start-stop-daemon --start --exec /usr/bin/gitlab-gitaly --pidfile /run/gitlab-gitaly.pid \
--make-pidfile --background --user ${RUNAS_USER}:${RUNAS_GROUP} --stdout "${LOGFILE}" --stderr "${LOGFILE}" \
-- ${CONFIGFILE}
eend $?
}
stop() {
ebegin "Stopping gitlab-gitaly"
start-stop-daemon --stop --exec /usr/bin/gitlab-gitaly --pidfile /run/gitlab-gitaly.pid --user ${RUNAS_USER}:${RUNAS_GROUP}
eend $?
}