use systemd instead of xinetd (bz 737183)
This commit is contained in:
parent
af4c4fa13c
commit
d7389e7fc0
9
git.service
Normal file
9
git.service
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Git Repositories Server Daemon
|
||||||
|
Documentation=man:git-daemon(1)
|
||||||
|
Wants=git.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=nobody
|
||||||
|
ExecStart=/usr/libexec/git-core/git-daemon --base-path=/var/lib/git --export-all --user-path=public_git --syslog --inetd --verbose
|
||||||
|
StandardInput=socket
|
9
git.socket
Normal file
9
git.socket
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Git Activation Socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=9418
|
||||||
|
Accept=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
39
git.spec
39
git.spec
@ -44,19 +44,20 @@
|
|||||||
|
|
||||||
Name: git
|
Name: git
|
||||||
Version: 1.8.2.1
|
Version: 1.8.2.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Fast Version Control System
|
Summary: Fast Version Control System
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://git-scm.com/
|
URL: http://git-scm.com/
|
||||||
Source0: http://git-core.googlecode.com/files/%{name}-%{version}.tar.gz
|
Source0: http://git-core.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||||
Source2: git-init.el
|
Source2: git-init.el
|
||||||
Source3: git.xinetd.in
|
|
||||||
Source4: git.conf.httpd
|
Source4: git.conf.httpd
|
||||||
Source5: git-gui.desktop
|
Source5: git-gui.desktop
|
||||||
Source6: gitweb.conf.in
|
Source6: gitweb.conf.in
|
||||||
Source10: http://git-core.googlecode.com/files/%{name}-manpages-%{version}.tar.gz
|
Source10: http://git-core.googlecode.com/files/%{name}-manpages-%{version}.tar.gz
|
||||||
Source11: http://git-core.googlecode.com/files/%{name}-htmldocs-%{version}.tar.gz
|
Source11: http://git-core.googlecode.com/files/%{name}-htmldocs-%{version}.tar.gz
|
||||||
|
Source12: git.service
|
||||||
|
Source13: git.socket
|
||||||
Patch0: git-1.5-gitweb-home-link.patch
|
Patch0: git-1.5-gitweb-home-link.patch
|
||||||
# https://bugzilla.redhat.com/490602
|
# https://bugzilla.redhat.com/490602
|
||||||
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
||||||
@ -84,6 +85,8 @@ BuildRequires: libgnome-keyring-devel
|
|||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: zlib-devel >= 1.2
|
BuildRequires: zlib-devel >= 1.2
|
||||||
|
# For macros
|
||||||
|
BuildRequires: systemd
|
||||||
|
|
||||||
Requires: less
|
Requires: less
|
||||||
Requires: openssh-clients
|
Requires: openssh-clients
|
||||||
@ -93,6 +96,10 @@ Requires: perl-Git = %{version}-%{release}
|
|||||||
Requires: rsync
|
Requires: rsync
|
||||||
Requires: zlib >= 1.2
|
Requires: zlib >= 1.2
|
||||||
|
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
|
||||||
Provides: git-core = %{version}-%{release}
|
Provides: git-core = %{version}-%{release}
|
||||||
Obsoletes: git-core <= 1.5.4.3
|
Obsoletes: git-core <= 1.5.4.3
|
||||||
|
|
||||||
@ -409,17 +416,8 @@ rm -rf %{buildroot}%{_mandir}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_var}/lib/git
|
mkdir -p %{buildroot}%{_var}/lib/git
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
# On EL <= 5, xinetd does not enable IPv6 by default
|
cp -a %{SOURCE12} %{SOURCE13} %{buildroot}%{_unitdir}
|
||||||
enable_ipv6=" # xinetd does not enable IPv6 by default
|
|
||||||
flags = IPv6"
|
|
||||||
perl -p \
|
|
||||||
-e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \
|
|
||||||
-e "s|\@BASE_PATH\@|%{_var}/lib/git|g;" \
|
|
||||||
%if %{enable_ipv6}
|
|
||||||
-e "s|^}|$enable_ipv6\n$&|;" \
|
|
||||||
%endif
|
|
||||||
%{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git
|
|
||||||
|
|
||||||
# Setup bash completion
|
# Setup bash completion
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||||
@ -465,6 +463,15 @@ find contrib -type f | xargs chmod -x
|
|||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post daemon
|
||||||
|
%systemd_post git.service
|
||||||
|
|
||||||
|
%preun daemon
|
||||||
|
%systemd_preun git.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart git.service
|
||||||
|
|
||||||
|
|
||||||
%files -f bin-man-doc-files
|
%files -f bin-man-doc-files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -546,7 +553,8 @@ rm -rf %{buildroot}
|
|||||||
%files daemon
|
%files daemon
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc Documentation/*daemon*.txt
|
%doc Documentation/*daemon*.txt
|
||||||
%config(noreplace)%{_sysconfdir}/xinetd.d/git
|
%{_unitdir}/git.socket
|
||||||
|
%{_unitdir}/git.service
|
||||||
%{gitcoredir}/git-daemon
|
%{gitcoredir}/git-daemon
|
||||||
%{_var}/lib/git
|
%{_var}/lib/git
|
||||||
%{!?_without_docs: %{_mandir}/man1/*daemon*.1*}
|
%{!?_without_docs: %{_mandir}/man1/*daemon*.1*}
|
||||||
@ -564,6 +572,9 @@ rm -rf %{buildroot}
|
|||||||
# No files for you!
|
# No files for you!
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 30 2013 Tom Callaway <spot@fedoraproject.org> - 1.8.2.1-2
|
||||||
|
- switch to systemd instead of xinetd (bz 737183)
|
||||||
|
|
||||||
* Sun Apr 14 2013 Todd Zullinger <tmz@pobox.com> - 1.8.2.1-1
|
* Sun Apr 14 2013 Todd Zullinger <tmz@pobox.com> - 1.8.2.1-1
|
||||||
- Update to 1.8.2.1
|
- Update to 1.8.2.1
|
||||||
- Exclude optional perl(YAML::Any) dependency on EL-5
|
- Exclude optional perl(YAML::Any) dependency on EL-5
|
||||||
|
Loading…
Reference in New Issue
Block a user