mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 11:06:06 +01:00
Enable contrib init file and RPM's spec file to run on RHEL 6/CentOS 6 as non root user.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Name: gitbucket
|
||||
Summary: GitHub clone written with Scala.
|
||||
Version: 1.7
|
||||
Version: 2.6
|
||||
Release: 1%{?dist}
|
||||
License: Apache
|
||||
URL: https://github.com/takezoe/gitbucket
|
||||
@@ -26,6 +26,25 @@ GitBucket is the easily installable GitHub clone written with Scala.
|
||||
%{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
touch %{buildroot}%{_localstatedir}/log/%{name}/run.log
|
||||
|
||||
%pre
|
||||
/usr/sbin/groupadd -r gitbucket &> /dev/null || :
|
||||
/usr/sbin/useradd -g gitbucket -s /bin/false -r -c "GitBucket GitHub clone" -d %{_sharedstatedir}/%{name} gitbucket &> /dev/null || :
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add gitbucket
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service gitbucket stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del gitbucket
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge 1 ]; then
|
||||
/sbin/service gitbucket restart > /dev/null 2>&1
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && %{__rm} -rf "%{buildroot}"
|
||||
@@ -34,12 +53,28 @@ touch %{buildroot}%{_localstatedir}/log/%{name}/run.log
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_datarootdir}/%{name}/lib/%{name}.war
|
||||
%{_sysconfdir}/init.d/%{name}
|
||||
%config %{_sysconfdir}/sysconfig/%{name}
|
||||
%{_localstatedir}/log/%{name}/run.log
|
||||
%config %{_sysconfdir}/init.d/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||
%attr(0755,gitbucket,gitbucket) %{_sharedstatedir}/%{name}
|
||||
%attr(0750,gitbucket,gitbucket) %{_localstatedir}/log/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 24 2014 Toru Takahashi <torutk at gmail.com>
|
||||
- Version bump to v2.6
|
||||
|
||||
* Sun Nov 09 2014 Toru Takahashi <torutk at gmail.com>
|
||||
- Version bump to v2.5
|
||||
|
||||
* Sun Oct 26 2014 Toru Takahashi <torutk at gmail.com>
|
||||
- Version bump to v2.4.1
|
||||
|
||||
* Mon Jul 21 2014 Toru Takahashi <torutk at gmail.com>
|
||||
- execute as gitbucket user
|
||||
|
||||
* Sun Jul 20 2014 Toru Takahashi <torutk at gmail.com>
|
||||
- Version bump to v2.1.
|
||||
|
||||
* Mon Oct 28 2013 Jiri Tyr <jiri_DOT_tyr at gmail.com>
|
||||
- Version bump to v1.7.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user