diff options
author | Todd Zullinger <tmz@fedoraproject.org> | 2009-02-05 23:31:32 +0000 |
---|---|---|
committer | Todd Zullinger <tmz@fedoraproject.org> | 2009-02-05 23:31:32 +0000 |
commit | bb141fdf7e9ecc4f9107f21f8603e3744e6a2a35 (patch) | |
tree | 7f493b94b3f84098972745a91792566b36f9fb7c | |
parent | 3fd4845fc0fef03c0a0477fa9d387e77a439e802 (diff) | |
download | cgit_EL6-cgit-0_8_2-1_el5.tar.gz |
Import cgit on EL-5 branchcgit-0_8_2-1_el5
-rw-r--r-- | .cvsignore | 3 | ||||
-rw-r--r-- | README.SELinux | 22 | ||||
-rw-r--r-- | cgit.httpd | 2 | ||||
-rw-r--r-- | cgit.spec | 90 | ||||
-rw-r--r-- | cgitrc | 54 | ||||
-rw-r--r-- | sources | 2 |
6 files changed, 173 insertions, 0 deletions
@@ -0,0 +1,3 @@ +*.rpm +*.tar.bz2 +clog diff --git a/README.SELinux b/README.SELinux new file mode 100644 index 0000000..b7e50f9 --- /dev/null +++ b/README.SELinux @@ -0,0 +1,22 @@ +If you use SELinux, there are a few things you'll need to take care of +for cgit to work smoothly. (Most of these should be fixed in a future +update of the official selinux-policy packages.) + +1. Enable the httpd_enable_cgi boolean + # setsebool -P httpd_enable_cgi 1 + +2. Set proper file contexts + + a) The cache dir needs to be writable by the cgi + # semanage fcontext -a -t httpd_sys_script_rw_t "/var/cache/cgit(/.*)?" + + b) The git repositories need to be readable by the cgi + # semanage fcontext -a -t httpd_sys_content_t "/srv/git(/.*)?" + + If your git repositories are somewhere other than /srv/git, use that + path in the command above. If you have other confined daemons that need + to access the git repositories, you may want to use public_content_t, or + public_content_rw_t instead of httpd_sys_content_t. + + c) Run restorecon to update the contexts + # restorecon -R /var/cache/cgit /srv/git diff --git a/cgit.httpd b/cgit.httpd new file mode 100644 index 0000000..791d01b --- /dev/null +++ b/cgit.httpd @@ -0,0 +1,2 @@ +Alias /cgit-data /usr/share/cgit +ScriptAlias /cgit /var/www/cgi-bin/cgit diff --git a/cgit.spec b/cgit.spec new file mode 100644 index 0000000..07486ed --- /dev/null +++ b/cgit.spec @@ -0,0 +1,90 @@ +# Review bug: https://bugzilla.redhat.com/479723 + +%define gitver 1.6.1.1 +%define cachedir %{_localstatedir}/cache/cgit +%define scriptdir %{_localstatedir}/www/cgi-bin +%define cgitdata %{_datadir}/cgit + +%define make_cgit \ +export CFLAGS="%{optflags}" \ +make V=1 %{?_smp_mflags} \\\ + DESTDIR=%{buildroot} \\\ + INSTALL="install -p" \\\ + CACHE_ROOT=%{cachedir} \\\ + CGIT_SCRIPT_PATH=%{scriptdir} \\\ + CGIT_SCRIPT_NAME=cgit \\\ + CGIT_DATA_PATH=%{cgitdata} + +Name: cgit +Version: 0.8.2 +Release: 1%{?dist} +Summary: A fast webinterface for git + +Group: Development/Tools +License: GPLv2 +URL: http://hjemli.net/git/cgit/ +Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2 +Source1: http://www.kernel.org/pub/software/scm/git/git-%{gitver}.tar.bz2 +Source2: cgitrc +Source3: cgit.httpd +Source4: README.SELinux +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +%if 0%{?fedora} +BuildRequires: libcurl-devel +%else +BuildRequires: curl-devel +%endif +BuildRequires: openssl-devel +Requires: httpd + +%description +This is an attempt to create a fast web interface for the git scm, +using a builtin cache to decrease server io-pressure. + +%prep +%setup -q -a 1 + +# setup the git dir +rm -rf git +mv git-%{gitver} git +sed -i 's/^\(CFLAGS = \).*/\1%{optflags}/' git/Makefile + +# add README.SELinux +cp -p %{SOURCE4} . + + +%build +%{make_cgit} + + +%install +rm -rf %{buildroot} +%{make_cgit} install +install -d -m0755 %{buildroot}%{_sysconfdir}/httpd/conf.d +install -p -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc +install -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf +install -d -m0755 %{buildroot}%{cachedir} + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc COPYING README* cgitrc.5.txt +%config(noreplace) %{_sysconfdir}/cgitrc +%config(noreplace) %{_sysconfdir}/httpd/conf.d/cgit.conf +%dir %attr(-,apache,root) %{cachedir} +%{cgitdata} +%{scriptdir}/* + + +%changelog +* Sun Feb 05 2009 Todd Zullinger <tmz@pobox.com> - 0.8.2-1 +- Update to 0.8.2 +- Drop upstreamed Makefile patch +- Build for EL-5 + +* Mon Jan 12 2009 Todd Zullinger <tmz@pobox.com> - 0.8.1-1 +- Initial package @@ -0,0 +1,54 @@ +# +# See /usr/share/doc/cgit-*/cgitrc.5.txt for details +# + +# Enable caching of up to 1000 output entries +cache-size=1000 + +# Specify some default clone prefixes +#clone-prefix=git://example.com ssh://example.com/pub/git http://example.com/git + +# Specify the css url +css=/cgit-data/cgit.css + +# Show extra links for each repository on the index page +enable-index-links=1 + +# Show number of affected files per commit on the log pages +enable-log-filecount=1 + +# Show number of added/removed lines per commit on the log pages +enable-log-linecount=1 + +# Add a cgit favicon +#favicon=/favicon.ico + +# Use a custom logo +logo=/cgit-data/cgit.png + +# Set the title and heading of the repository index page +#root-title=example.com git repositories + +# Set a subheading for the repository index page +#root-desc=tracking the foobar development + +# Include some more info about this site on the index page +#root-readme=/var/www/html/about.html + +# Allow download of tar.gz, tar.bz2 and zip-files +#snapshots=tar.gz tar.bz2 zip + +## +## List of repositories. +## PS: Any repositories listed when repo.group is unset will not be +## displayed under a group heading +## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos') +## and included like this: +## include=/etc/cgitrepos +## + +#repo.url=foo +#repo.path=/srv/git/foo.git +#repo.desc=the master foo repository +#repo.owner=fooman@example.com +#repo.readme=info/web/about.html @@ -0,0 +1,2 @@ +872fafaa1ea6bd9292f312878864b665 cgit-0.8.2.tar.bz2 +d2b6925cb03e1e33911fdf9392946747 git-1.6.1.1.tar.bz2 |