|
|
@ -1,8 +1,8 @@ |
|
|
|
%global _hardened_build 1 |
|
|
|
%global _hardened_build 1 |
|
|
|
%define gitea_user git |
|
|
|
%define _user git |
|
|
|
%define gitea_group git |
|
|
|
%define _group git |
|
|
|
%define gitea_home /var/lib/gitea/ |
|
|
|
%define _home /var/lib/lgtm/ |
|
|
|
%define gitea_logdir /var/log/gitea/ |
|
|
|
%define _logdir /var/log/lgtm/ |
|
|
|
|
|
|
|
|
|
|
|
Name : lgtm |
|
|
|
Name : lgtm |
|
|
|
Version : 1.0.0 |
|
|
|
Version : 1.0.0 |
|
|
@ -38,15 +38,15 @@ go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx |
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/%{name}.service |
|
|
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/%{name}.service |
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/env |
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_home}/env |
|
|
|
install -p -D -m 0555 go/src/github.com/go-gitea/lgtm/lgtm %{buildroot}%{_bindir}/%{name} |
|
|
|
install -p -D -m 0555 go/src/github.com/go-gitea/lgtm/lgtm %{buildroot}%{_home}/%{name} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%pre |
|
|
|
%pre |
|
|
|
getent group %{gitea_group} > /dev/null || groupadd -r %{gitea_group} |
|
|
|
getent group %{_group} > /dev/null || groupadd -r %{_group} |
|
|
|
getent passwd %{gitea_user} > /dev/null || \ |
|
|
|
getent passwd %{_user} > /dev/null || \ |
|
|
|
useradd -r -d %{gitea_home} -g %{gitea_group} \ |
|
|
|
useradd -r -d %{_home} -g %{_group} \ |
|
|
|
-s /bin/bash -c "git user" %{gitea_user} |
|
|
|
-s /bin/bash -c "git user" %{_user} |
|
|
|
exit 0 |
|
|
|
exit 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,9 +63,10 @@ exit 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
%files |
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/env |
|
|
|
%config(noreplace) %{_home}/env |
|
|
|
%{_bindir}/lgtm |
|
|
|
%{_home}/lgtm |
|
|
|
%{_unitdir}/lgtm.service |
|
|
|
%{_unitdir}/lgtm.service |
|
|
|
|
|
|
|
%attr(700,%{_user},%{_group}) %dir %{_home} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
%changelog |
|
|
|