From e546bde4b15c74a763f60edd60ab2c07f584a9c1 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:05:10 +0100 Subject: [PATCH] fix service file and require gitlab [release 8.65.0-2mamba;Mon Mar 29 2021] --- README.md | 2 ++ gitlab-workhorse.service | 22 ++++++++++++++ gitlab-workhorse.spec | 66 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 gitlab-workhorse.service create mode 100644 gitlab-workhorse.spec diff --git a/README.md b/README.md index f480dfc..50734ac 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # gitlab-workhorse +GitLab Workhorse is a smart reverse proxy for GitLab. It handles "large" HTTP requests such as file downloads, file uploads, Git push/pull and Git archive downloads. + diff --git a/gitlab-workhorse.service b/gitlab-workhorse.service new file mode 100644 index 0000000..4de853b --- /dev/null +++ b/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/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/gitlab/public +ExecStop=/usr/bin/kill -QUIT $MAINPID +ExecReload=/usr/bin/kill -USR2 $MAINPID +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target diff --git a/gitlab-workhorse.spec b/gitlab-workhorse.spec new file mode 100644 index 0000000..8b6dbe0 --- /dev/null +++ b/gitlab-workhorse.spec @@ -0,0 +1,66 @@ +Name: gitlab-workhorse +Version: 8.65.0 +Release: 2mamba +Summary: A smart reverse proxy for GitLab +Group: Applications/Web +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://gitlab.com/gitlab-org/gitlab/tree/master/workhorse +Source: https://gitlab.com/gitlab-org/gitlab-workhorse/-/archive/v%{version}/gitlab-workhorse-v%{version}.tar.bz2 +Source1: gitlab-workhorse.service +License: MIT +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +Requires: gitlab +BuildRequires: go + +%description +GitLab Workhorse is a smart reverse proxy for GitLab. It handles "large" HTTP requests such as file downloads, file uploads, Git push/pull and Git archive downloads. + +%debug_package + +%prep +%setup -q -n %{name}-v%{version} + +%build +make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +install -D -m755 gitlab-workhorse %{buildroot}%{_bindir}/gitlab-workhorse +install -D -m755 gitlab-zip-cat %{buildroot}%{_bindir}/gitlab-zip-cat +install -D -m755 gitlab-zip-metadata %{buildroot}%{_bindir}/gitlab-zip-metadata +install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/gitlab-workhorse.service + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%preun +%systemd_preun gitlab-workhorse +: + +%post +%systemd_post gitlab-workhorse +: + +%postun +%systemd_postun gitlab-workhorse +: + +%files +%defattr(-,root,root) +%{_bindir}/gitlab-workhorse +%{_bindir}/gitlab-zip-cat +%{_bindir}/gitlab-zip-metadata +%{_unitdir}/gitlab-workhorse.service +%doc LICENSE + +%changelog +* Mon Mar 29 2021 Silvan Calarco 8.65.0-2mamba +- fix service file and require gitlab + +* Mon Mar 29 2021 Silvan Calarco 8.65.0-1mamba +- package created using the webbuild interface