Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:mozilla/f1 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rafrombrc committed Apr 26, 2011
2 parents 885b303 + 0179722 commit d01b261
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ recursive-include linkdrop *
recursive-include grinder *
recursive-include docs *
recursive-include tools *
recursive-include web *
recursive-include wsgi *
9 changes: 4 additions & 5 deletions f1.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%global python_sitelib /lib/python%{python_version}/site-packages
%global python_sitearch /%{_lib}/python%{python_version}/site-packages

Name: %{f1_name_prefix}python%{pyver_sys}
Name: %{f1_name_prefix}python%{pyver}
Version: %%version%%
Release: 6%%git%%%{?dist}
Summary: Share Links Fast.
Expand Down Expand Up @@ -51,15 +51,13 @@ and love. F1 is made by Mozilla Messaging.

%build
export PYTHONPATH=$(pwd):%{f1_prefix}%{python_sitelib}:%{f1_prefix}%{python_sitearch}
mkdir web
CFLAGS="%{optflags}" %{__python}%{pyver} setup.py build
make web PYTHON=%{__python}%{pyver}

%install
export PYTHONPATH=$(pwd):%{f1_prefix}%{python_sitelib}:%{f1_prefix}%{python_sitearch}
rm -rf %{buildroot}
%{__python}%{pyver} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --prefix %{f1_prefix} --record=INSTALLED_FILES
%{__install} -m 755 -d %{buildroot}%{_var}/www/f1
rsync -a web/ %{buildroot}%{_var}/www/f1/
%{__install} -m 755 -d %{buildroot}%{_sysconfdir}/f1
%{__install} -m 644 *.ini %{buildroot}%{_sysconfdir}/f1/

Expand All @@ -73,12 +71,13 @@ rsync -a web/ %{buildroot}%{_var}/www/f1/
rm -rf %{buildroot}

%files -f INSTALLED_FILES
%{_var}/www/f1
%config(noreplace) %{_sysconfdir}/f1/*ini
%defattr(-,root,root,-)
%doc README.md LICENSE PKG-INFO docs/

%changelog
* Tue Apr 26 2011 Philippe M. Chiasson <gozer@mozillamessaging.com> - 0.3.7dev-7
- Remove web content, moved to mozilla-f1-web
* Wed Apr 20 2011 Philippe M. Chiasson <gozer@mozillamessaging.com> - 0.3.7dev-6
- Compile web content before packaging (make web)
* Thu Apr 14 2011 Philippe M. Chiasson <gozer@mozillamessaging.com> - 0.3.7dev-2
Expand Down
25 changes: 13 additions & 12 deletions production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ oauth.google.com.scope = https://mail.google.com/ http://www.google.com/m8/feeds
use = egg:Paste#http
host = 0.0.0.0
port = 5000
workers = 10
worker_class = gevent

[filter-app:main]
use = egg:Beaker#beaker_session
next = csrf
next = sessioned
beaker.session.key = linkdrop
beaker.session.secret = TMShmttWBvOMws810dW2nFB7k
beaker.session.cookie_expires = false
Expand All @@ -57,24 +59,22 @@ beaker.cache.data_dir = %(here)s/data/cache
beaker.session.data_dir = %(here)s/data/sessions
beaker.session.lock_dir = %(here)s/data/sessions/lock

[filter-app:csrf]
use = egg:linkdrop#csrf
# allow access to account api's for oauth, which will not have csrf token
# be sure to use the FULL path
csrf.unprotected_path = /account
next = api

[composite:sessioned]
[app:sessioned]
use = egg:Paste#urlmap
/ = home
/api = api

[app:home]
use = egg:Paste#static
document_root = %(here)s/web
use = egg:linkdrop#static
document_root = /var/www/f1

[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /api

[app:api]
use = egg:linkdrop
filter-with = proxy-prefix
full_stack = true
static_files = false
session_middleware = false
Expand Down Expand Up @@ -128,10 +128,11 @@ formatter = generic

[handler_file]
class = FileHandler
args = ('%(here)s/linkdrop.log', 'a')
args = ('/var/log/linkdrop.log', 'a')
level = INFO
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
datefmt = %H:%M:%S

0 comments on commit d01b261

Please sign in to comment.