Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 1a092c6a5bb4446a43b2d33f1ead1ee5 > files > 3

gitolite3-3.04-3.mga3.src.rpm

%global gitolite_homedir %_datadir/%{name}

Name:           gitolite3
Version:        3.04
Release:        %mkrel 3
Summary:        Highly flexible server for git directory version tracker

Group:          System/Servers
License:        GPLv2 and CC-BY-SA
URL:            http://github.com/sitaramc/gitolite
Source0:        sitaramc-gitolite-v%version-0-gaf437c3.tar.gz
Source1:        gitolite3-README-mageia
Patch0:		0001-security-fix-bug-in-pattern-to-detect-path-traversal.patch

Requires:       git
Requires:       openssh-clients
Requires(pre):  shadow-utils
Suggests:       subversion

BuildArch:      noarch

%description
Gitolite allows a server to host many git repositories and provide access
to many developers, without having to give them real userids on the server.
The essential magic in doing this is ssh's pubkey access and the authorized
keys file, and the inspiration was an older program called gitosis.

Gitolite can restrict who can read from (clone/fetch) or write to (push) a
repository. It can also restrict who can push to what branch or tag, which
is very important in a corporate environment. Gitolite can be installed
without requiring root permissions, and with no additional software than git
itself and perl. It also has several other neat features described below and
elsewhere in the doc/ directory.


%prep
%setup -qn sitaramc-gitolite-84533d3
%patch0 -p1
cp %{SOURCE1} .


%build
#This page intentionally left blank.

%install
# Directory structure
install -d $RPM_BUILD_ROOT%{gitolite_homedir}
install -d $RPM_BUILD_ROOT%{gitolite_homedir}/.ssh
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{perl_vendorlib}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}

# Code
cp -pr src/lib/Gitolite $RPM_BUILD_ROOT%{perl_vendorlib}
echo "%{version}-%{release}" >src/VERSION
cp -a src/* $RPM_BUILD_ROOT%{_datadir}/%{name}
ln -s %{_datadir}/%{name}/gitolite $RPM_BUILD_ROOT%{_bindir}/gitolite

# empty authorized_keys file
touch $RPM_BUILD_ROOT%{gitolite_homedir}/.ssh/authorized_keys

%pre
%_pre_useradd %name %{gitolite_homedir} /sbin/nologin
exit 0


%files
%{_bindir}/*
%{perl_vendorlib}/*
%{_datadir}/%{name}
# make homedir non world readable
%attr(750,%{name},%{name}) %dir %{gitolite_homedir}
%attr(750,%{name},%{name}) %dir %{gitolite_homedir}/.ssh
%config(noreplace) %attr(640,%{name},%{name}) %{gitolite_homedir}/.ssh/authorized_keys
%doc gitolite3-README-mageia COPYING README.txt CHANGELOG




%changelog

* Sat Jan 12 2013 umeabot <umeabot> 3.04-3.mga3
+ Revision: 351604
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Oct 25 2012 luigiwalser <luigiwalser> 3.04-2.mga3
+ Revision: 309853
- add patch from fedora to fix CVE-2012-4506

* Sat Aug 04 2012 dmorgan <dmorgan> 3.04-1.mga3
+ Revision: 278374
- imported package gitolite3