rpms/loggerhead/F-12 README.mod_wsgi, NONE, 1.1 bazaar.conf, NONE, 1.1 import.log, NONE, 1.1 loggerhead-bzr-22-compat.patch, NONE, 1.1 loggerhead-get_revision_inventory-backport.patch, NONE, 1.1 loggerhead-int-to-bytes.patch, NONE, 1.1 loggerhead-transport-backport.patch, NONE, 1.1 loggerhead.conf, NONE, 1.1 loggerhead.spec, NONE, 1.1 loggerhead.wsgi, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Toshio くらとみ
toshio at fedoraproject.org
Mon Apr 12 22:49:53 UTC 2010
- Previous message: rpms/nss/devel .cvsignore, 1.32, 1.33 sources, 1.35, 1.36 nss.spec, 1.147, 1.148
- Next message: rpms/loggerhead/EL-5 README.mod_wsgi, NONE, 1.1 bazaar.conf, NONE, 1.1 import.log, NONE, 1.1 loggerhead-bzr-22-compat.patch, NONE, 1.1 loggerhead-get_revision_inventory-backport.patch, NONE, 1.1 loggerhead-int-to-bytes.patch, NONE, 1.1 loggerhead-transport-backport.patch, NONE, 1.1 loggerhead.conf, NONE, 1.1 loggerhead.spec, NONE, 1.1 loggerhead.wsgi, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: toshio
Update of /cvs/pkgs/rpms/loggerhead/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv29837/F-12
Modified Files:
.cvsignore sources
Added Files:
README.mod_wsgi bazaar.conf import.log
loggerhead-bzr-22-compat.patch
loggerhead-get_revision_inventory-backport.patch
loggerhead-int-to-bytes.patch
loggerhead-transport-backport.patch loggerhead.conf
loggerhead.spec loggerhead.wsgi
Log Message:
Initial import
--- NEW FILE README.mod_wsgi ---
To deploy loggerhead via mod_wsgi, you need to add configuration for apache and
for bazaar. Example config files are in the loggerhead doc directory as
loggerhead.conf and bazaar.conf. You can copy them into place and use them as
a starting point if you want.
1) Edit /etc/loggerhead/bazaar.conf. You need to set http_root_dir to the filesystem
path that you will find your bzr branches under. Note that normal
directories under that path will also be visible in loggerhead.
2) Install mod_wsgi::
# yum install mod_wsgi
3) Install the apache conf file::
# cp /usr/share/doc/loggerhead-*/loggerhead.conf /etc/httpd/conf.d/
4) Edit /etc/httpd/conf.d/loggerhead.conf to point to the url you desire to
serve loggerhead on. This should match with the setting for
http_user_prefix in bazaar.conf
5) Restart apache and you should be able to start browsing
--- NEW FILE bazaar.conf ---
# directory to serve bzr branches from
# Non-bzr directories under this path will also be visible in loggerhead
#http_root_dir = '/var/www/bzr'
# The url prefix for the bzr branches.
http_user_prefix = '/bzr'
--- NEW FILE import.log ---
loggerhead-1_17-4_fc12:F-12:loggerhead-1.17-4.fc12.src.rpm:1271112557
loggerhead-bzr-22-compat.patch:
__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE loggerhead-bzr-22-compat.patch ---
=== modified file '__init__.py'
--- __init__.py 2009-08-20 13:30:37 +0000
+++ __init__.py 2009-09-20 19:08:28 +0000
@@ -36,7 +36,9 @@
import bzrlib
from bzrlib.api import require_any_api
- require_any_api(bzrlib, [(1, 13, 0), (1, 15, 0), (1, 16, 0), (1, 17, 0)])
+ require_any_api(bzrlib, [
+ (1, 13, 0), (1, 15, 0), (1, 16, 0), (1, 17, 0), (1, 18, 0),
+ (2, 0, 0), (2, 1, 0), (2, 2, 0)])
# NB: Normally plugins should lazily load almost everything, but this
# seems reasonable to have in-line here: bzrlib.commands and options are
loggerhead-get_revision_inventory-backport.patch:
NEWS | 3 +++
loggerhead/history.py | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
--- NEW FILE loggerhead-get_revision_inventory-backport.patch ---
=== modified file 'NEWS'
--- NEWS 2010-01-11 14:17:45 +0000
+++ NEWS 2010-02-26 04:38:23 +0000
@@ -12,6 +12,9 @@
- Support FastCGI, SCGI and AJP using flup. (Denis Martinez)
+ - Repository.get_revision_inventory() was removed in bzr 2.2; use
+ Repository.get_inventory() instead. (Matt Nordhoff, #528194)
+
1.17 [20Aug2009]
---------------
=== modified file 'loggerhead/history.py'
--- loggerhead/history.py 2010-01-14 00:14:59 +0000
+++ loggerhead/history.py 2010-02-26 04:37:13 +0000
@@ -517,7 +517,7 @@
def get_inventory(self, revid):
if revid not in self._inventory_cache:
self._inventory_cache[revid] = (
- self._branch.repository.get_revision_inventory(revid))
+ self._branch.repository.get_inventory(revid))
return self._inventory_cache[revid]
def get_path(self, revid, file_id):
loggerhead-int-to-bytes.patch:
diff_ui.py | 2 +-
download_ui.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE loggerhead-int-to-bytes.patch ---
diff -up loggerhead/loggerhead/controllers/diff_ui.py.bak loggerhead/loggerhead/controllers/diff_ui.py
--- loggerhead/loggerhead/controllers/diff_ui.py.bak 2010-04-07 20:43:00.465262216 -0400
+++ loggerhead/loggerhead/controllers/diff_ui.py 2010-04-07 20:43:15.351261456 -0400
@@ -72,7 +72,7 @@ class DiffUI(TemplatedBranchView):
filename = '%s_%s.diff' % (revno1, revno2)
headers = [
('Content-Type', 'application/octet-stream'),
- ('Content-Length', len(content)),
+ ('Content-Length', str(len(content))),
('Content-Disposition', 'attachment; filename=%s' % filename),
]
start_response('200 OK', headers)
diff -up loggerhead/loggerhead/controllers/download_ui.py.bak loggerhead/loggerhead/controllers/download_ui.py
--- loggerhead/loggerhead/controllers/download_ui.py.bak 2010-04-07 20:40:21.059262081 -0400
+++ loggerhead/loggerhead/controllers/download_ui.py 2010-04-07 20:40:45.049262100 -0400
@@ -61,7 +61,7 @@ class DownloadUI (TemplatedBranchView):
encoded_filename = urllib.quote(filename.encode('utf-8'))
headers = [
('Content-Type', mime_type),
- ('Content-Length', len(content)),
+ ('Content-Length', str(len(content))),
('Content-Disposition',
'attachment; filename*=utf-8\'\'%s' % encoded_filename),
]
loggerhead-transport-backport.patch:
__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE loggerhead-transport-backport.patch ---
=== modified file '__init__.py'
--- __init__.py 2009-09-20 19:08:28 +0000
+++ __init__.py 2009-10-09 16:23:47 +0000
@@ -79,7 +79,7 @@
if not transport.is_readonly():
argv.insert(0, '--allow-writes')
config = LoggerheadConfig(argv)
- app = BranchesFromTransportRoot(transport, config)
+ app = BranchesFromTransportRoot(transport.base, config)
app = HTTPExceptionHandler(app)
serve(app, host=host, port=port)
--- NEW FILE loggerhead.conf ---
Alias /bzr/static /usr/share/loggerhead/static
RewriteEngine On
RewriteRule ^/bzr$ /bzr/ [R]
WSGIDaemonProcess loggerhead user=apache group=apache maximum-requests=1000 display-name=loggerhead processes=4 threads=1
WSGISocketPrefix run/wsgi
WSGIRestrictStdout On
WSGIRestrictSignal Off
WSGIScriptAlias /bzr /usr/bin/loggerhead.wsgi
<Location /bzr>
WSGIProcessGroup loggerhead
Order deny,allow
Allow from all
</Location>
--- NEW FILE loggerhead.spec ---
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
Name: loggerhead
Version: 1.17
Release: 4%{?dist}
Summary: Web viewer for the Bazaar version control system
Group: Development/Tools
License: GPLv2+
URL: https://launchpad.net/loggerhead
Source0: http://launchpad.net/loggerhead/%{version}/%{version}/+download/loggerhead-%{version}.tar.gz
Source1: loggerhead.conf
Source2: README.mod_wsgi
Source3: bazaar.conf
Source4: loggerhead.wsgi
# Upstream patch to fix a traceback with bzr serve --http
Patch0: loggerhead-transport-backport.patch
# Patch to convert int to byte in header
# Submitted and applied upstream: https://bugs.launchpad.net/loggerhead/+bug/557737
Patch1: loggerhead-int-to-bytes.patch
# Two backported patches for bzr-2.2 compatibility
Patch2: loggerhead-get_revision_inventory-backport.patch
Patch3: loggerhead-bzr-22-compat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-paste
BuildRequires: python-paste-deploy
Requires: python-setuptools
Requires: python-paste-deploy
Requires: python-simpletal
Requires: python-simplejson
Requires: python-paste
Requires: python-paste-deploy
Requires: bzr
%description
Loggerhead is a WSGI app that provides a web interface to the Bazaar version
control system. It can be used to navigate a branch history, view who
changed lines in a file, look at patches, and perform searches.
%prep
%setup -q -n %{name}
%patch0 -p0
%patch1 -p1
%patch2 -p0
%patch3 -p0
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
# We'll add this in %%doc
rm %{buildroot}%{_docdir}/loggerhead/loggerhead.conf.example
# We're just going to put this in docs
chmod 0644 loggerheadd
# FHS Compliance:
mkdir -p %{buildroot}/%{_datadir}/loggerhead
mv %{buildroot}%{python_sitelib}/loggerhead/static %{buildroot}%{_datadir}/loggerhead
ln -s %{_datadir}/loggerhead/static %{buildroot}%{python_sitelib}/loggerhead/static
# These are deprecated in favour of serve-branches. No sense shipping unneeded stuff
rm %{buildroot}/%{_bindir}/{start,stop}-loggerhead
rm %{buildroot}/%{_mandir}/man1/{start,stop}-loggerhead*
install -m 0644 -p %{SOURCE1} .
install -m 0644 -p %{SOURCE2} .
install -D -m 0644 -p %{SOURCE3} %{buildroot}/%{_sysconfdir}/loggerhead/bazaar.conf
install -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/loggerhead.wsgi
# Link the bazaar configs to apache's home dir
mkdir -p %{buildroot}/%{_var}/www
ln -s %{_sysconfdir}/loggerhead/ %{buildroot}%{_var}/www/.bazaar
%post
chcon system_u:object_r:httpd_config_t:s0 %{_sysconfdir}/loggerhead
chcon system_u:object_r:httpd_config_t:s0 %{_sysconfdir}/loggerhead/bazaar.conf
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README NEWS COPYING.txt loggerheadd loggerhead.conf.example
%doc loggerhead.conf README.mod_wsgi
%{_bindir}/*
%{_mandir}/man1/*
%dir %{_sysconfdir}/loggerhead
%config(noreplace) %{_sysconfdir}/loggerhead/bazaar.conf
%{python_sitelib}/bzrlib/plugins/*
%{python_sitelib}/loggerhead/
%if 0%{?fedora} || 0%{?rhel} > 5
%{python_sitelib}/*egg-info
%endif
%{_datadir}/loggerhead
%{_var}/www/.bazaar
%changelog
* Sat Apr 10 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.17-4
- Compatibility with bzr-2.1 and bzr-2.2b1
- Properly label the loggerhead config files -- will ask dwalsh about the best
way to do this.
* Fri Apr 9 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.17-3
- Fix build on RHEL5
* Wed Apr 7 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.17-2
- Fix comments in review.
- Fix a traceback for the download and diff ui pages.
* Tue Apr 6 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.17-1
- Initial Fedora build
--- NEW FILE loggerhead.wsgi ---
#!/usr/bin/python -tt
import sys
import os
import pwd
sys.path.insert(0, os.path.dirname(__file__))
from paste.httpexceptions import HTTPExceptionHandler
from loggerhead.apps.transport import BranchesFromTransportRoot
from loggerhead.apps.error import ErrorHandlerApp
from loggerhead.config import LoggerheadConfig
from bzrlib import config as bzrconfig
from paste.deploy.config import PrefixMiddleware
from bzrlib.plugin import load_plugins
class NotConfiguredError(Exception):
pass
load_plugins()
config = LoggerheadConfig()
prefix = config.get_option('user_prefix') or ''
root_dir = bzrconfig.GlobalConfig().get_user_option('http_root_dir')
if not root_dir:
raise NotConfiguredError('You must have a ~/.bazaar/bazaar.conf file for'
' %(user)s with http_root_dir set to the base directory you want'
' to serve bazaar repositories from' %
{'user': pwd.getpwuid(os.geteuid()).pw_name})
prefix = prefix.encode('utf-8', 'ignore')
root_dir = root_dir.encode('utf-8', 'ignore')
app = BranchesFromTransportRoot(root_dir, config)
app = PrefixMiddleware(app, prefix=prefix)
app = HTTPExceptionHandler(app)
application = ErrorHandlerApp(app)
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/loggerhead/F-12/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 11 Apr 2010 19:24:45 -0000 1.1
+++ .cvsignore 12 Apr 2010 22:49:51 -0000 1.2
@@ -0,0 +1 @@
+loggerhead-1.17.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/loggerhead/F-12/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 11 Apr 2010 19:24:45 -0000 1.1
+++ sources 12 Apr 2010 22:49:53 -0000 1.2
@@ -0,0 +1 @@
+cdddaf4497bb9632f9c9ea90b4713c09 loggerhead-1.17.tar.gz
- Previous message: rpms/nss/devel .cvsignore, 1.32, 1.33 sources, 1.35, 1.36 nss.spec, 1.147, 1.148
- Next message: rpms/loggerhead/EL-5 README.mod_wsgi, NONE, 1.1 bazaar.conf, NONE, 1.1 import.log, NONE, 1.1 loggerhead-bzr-22-compat.patch, NONE, 1.1 loggerhead-get_revision_inventory-backport.patch, NONE, 1.1 loggerhead-int-to-bytes.patch, NONE, 1.1 loggerhead-transport-backport.patch, NONE, 1.1 loggerhead.conf, NONE, 1.1 loggerhead.spec, NONE, 1.1 loggerhead.wsgi, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list