Commit 7b79c9d1 authored by ale's avatar ale

Add Debian packaging metadata

parent 048f7940
#!/bin/sh
if [ -z "$GITLAB_URL" ]; then
echo "Gitlab-deps is not configured (GITLAB_URL empty)" >&2
exit 0
fi
if [ ! -e /var/lib/gitlab-deps/deps.json ]; then
echo "No deps.json file, executing update..." >&2
/usr/sbin/update-gitlab-deps
if [ $? -gt 0 ]; then
echo "update-gitlab-deps failed" >&2
exit 1
fi
fi
exec /usr/bin/gitlab-deps server \
--token-file=$GITLAB_TOKEN_FILE --url=$GITLAB_URL \
< /var/lib/gitlab-deps/deps.json
#!/bin/sh
[ -e /etc/default/gitlab-deps ] && . /etc/default/gitlab-deps
if [ -z "$GITLAB_URL" -o -z "$GITLAB_TOKEN_FILE" ]; then
echo "Gitlab-deps is not configured" >&2
exit 2
fi
opts="--token-file=$GITLAB_TOKEN_FILE --url=$GITLAB_URL"
gitlab-deps list-projects $opts \
| egrep "${PROJECT_REGEXP:-.*}" \
| gitlab-deps deps $opts \
> $deps_file
[Unit]
Description=A/I account server
After=slapd.service
[Service]
EnvironmentFile=-/etc/default/accountserver
ExecStart=/usr/bin/accountserver $DAEMON_OPTS
Restart=always
[Install]
WantedBy=multi-user.target
gitlab-deps (0.1) unstable; urgency=low
* First packaged release.
-- Autistici/Inventati <debian@autistici.org> Sat, 22 Aug 2020 17:21:02 +0100
Source: gitlab-deps
Section: net
Priority: extra
Maintainer: Autistici/Inventati <debian@autistici.org>
Build-Depends: debhelper (>= 11), dh-python, python3,
Standards-Version: 4.1.3
Package: gitlab-deps
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}
Description: Gitlab dependencies tool
Build dependency maps between Gitlab projects and
automatically trigger rebuilds on pipeline completion.
# Set to the public URL of your Gitlab repository.
GITLAB_URL=
# File with the authorization token.
GITLAB_TOKEN_FILE=/var/lib/gitlab-deps/auth_token
# Set to a regular expression (extended) if you want to filter the
# project list.
#PROJECT_REGEXP=
[Unit]
Description=gitlab-deps server
After=network.target
[Service]
Type=simple
Restart=on-failure
EnvironmentFile=/etc/default/gitlab-deps
ExecStart=/usr/sbin/gitlab-deps-server-wrapper
User=gitlab-deps
Group=gitlab-deps
LimitNOFILE=16384
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
[Install]
WantedBy=multi-user.target
#!/bin/sh
set -e
case "$1" in
configure)
addgroup --system --quiet gitlab-deps
adduser --system --no-create-home --home /var/lib/gitlab-deps \
--disabled-password --disabled-login \
--quiet --ingroup gitlab-deps gitlab-deps
mkdir /var/lib/gitlab-deps
chown gitlab-deps:gitlab-deps /var/lib/gitlab-deps
chmod 0700 /var/lib/gitlab-deps
;;
esac
#DEBHELPER#
exit 0
#!/usr/bin/make -f
# -*- makefile -*-
export PYBUILD_NAME=gitlab-deps
%:
dh $@ --with=python3 --buildsystem=pybuild
override_dh_auto_install:
dh_auto_install
install -o root -g root -m 755 $(CURDIR)/contrib/start-server.sh \
$(CURDIR)/debian/gitlab-deps/usr/sbin/gitlab-deps-server-wrapper
install -o root -g root -m 755 $(CURDIR)/contrib/update.sh \
$(CURDIR)/debian/gitlab-deps/usr/sbin/update-gitlab-deps
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment