summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-06-26 01:38:17 -0700
committerroot <root@rshg054.dnsready.net>2013-06-26 01:38:17 -0700
commit02e1f1221ec9570de0aaec8f15edb6d2af336bff (patch)
tree94b0e68a309f5fa68c667b8125553f445df021ac
parentf566ab403132b1bb3eb3a5b2e604c117bc0630c7 (diff)
Wed Jun 26 01:37:43 PDT 2013
-rw-r--r--community/couchdb/PKGBUILD30
-rw-r--r--community/couchdb/build-fix.patch5568
-rw-r--r--community/couchdb/erlang-r16b01.patch12
-rw-r--r--community/ejabberd/PKGBUILD12
-rw-r--r--community/lua-zlib/PKGBUILD21
-rw-r--r--community/parole/PKGBUILD7
-rw-r--r--community/processing/PKGBUILD22
-rw-r--r--community/qcad/PKGBUILD25
-rw-r--r--community/winff/PKGBUILD56
-rw-r--r--community/winff/winff.install14
-rw-r--r--core/cronie/PKGBUILD27
-rw-r--r--core/cronie/deny (renamed from core/cronie/cron.deny)0
-rw-r--r--core/cronie/service2
-rw-r--r--core/procps-ng/PKGBUILD6
-rw-r--r--core/procps-ng/sysctl.conf3
-rw-r--r--extra/dovecot/PKGBUILD6
-rw-r--r--extra/freetype2/PKGBUILD30
-rw-r--r--extra/freetype2/freetype-2.4.11-enable-sph.patch13
-rw-r--r--extra/gedit/PKGBUILD6
-rw-r--r--extra/pigeonhole/PKGBUILD6
-rw-r--r--extra/xf86-video-intel/PKGBUILD19
-rw-r--r--extra/xf86-video-intel/firefox_image_fix.diff30
-rw-r--r--extra/xorg-server/PKGBUILD6
-rwxr-xr-xjava/apache-ant/PKGBUILD14
-rw-r--r--java/beanshell/PKGBUILD45
-rw-r--r--java/java-commons-bsf2/PKGBUILD (renamed from java/java-commons-bsf/PKGBUILD)0
-rw-r--r--java/java-jarjar/PKGBUILD31
-rw-r--r--java/java-rxtx/PKGBUILD10
-rw-r--r--java/java-sonatype-oss-parent/PKGBUILD12
-rw-r--r--[-rwxr-xr-x]java/maven/PKGBUILD (renamed from java-ugly/maven/PKGBUILD)0
-rw-r--r--[-rwxr-xr-x]java/maven/maven.csh (renamed from java-ugly/maven/maven.csh)0
-rw-r--r--[-rwxr-xr-x]java/maven/maven.sh (renamed from java-ugly/maven/maven.sh)0
-rw-r--r--java/not-working/java-bnd/PKGBUILD (renamed from java-ugly/not-working/java-bnd/PKGBUILD)0
-rw-r--r--libre/django13/PKGBUILD47
-rw-r--r--libre/django13/PKGBUILD.orig40
-rw-r--r--libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff1573
-rw-r--r--libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff1575
-rw-r--r--libre/grub/PKGBUILD84
-rw-r--r--libre/grub/grub_bzr_export.sh113
-rw-r--r--libre/grub/parabola_grub_mkconfig_fixes.patch12
-rw-r--r--libre/liferea-libre/PKGBUILD6
-rw-r--r--libre/python2-bencode/PKGBUILD24
-rw-r--r--libre/python2-bencode/bittorrent-osl.txt510
-rw-r--r--libre/python2-cssmin-fredj/PKGBUILD9
-rw-r--r--libre/python2-jsmin/PKGBUILD27
-rw-r--r--pcr/amsynth/PKGBUILD19
-rw-r--r--pcr/perl-crypt-dh/PKGBUILD47
-rw-r--r--pcr/perl-math-bigint-gmp/PKGBUILD37
-rw-r--r--pcr/wuala/copyright16
-rw-r--r--pcr/wuala/loader3.jarbin338969 -> 0 bytes
-rw-r--r--pcr/wuala/readme.txt17
-rwxr-xr-xpcr/wuala/wuala23
-rwxr-xr-xpcr/wuala/wualacmd2
53 files changed, 1007 insertions, 9207 deletions
diff --git a/community/couchdb/PKGBUILD b/community/couchdb/PKGBUILD
index 276e62de3..9ea90c437 100644
--- a/community/couchdb/PKGBUILD
+++ b/community/couchdb/PKGBUILD
@@ -1,37 +1,33 @@
-# $Id: PKGBUILD 93089 2013-06-24 09:55:10Z spupykin $
+# $Id: PKGBUILD 93137 2013-06-25 15:46:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
pkgname=couchdb
-pkgver=1.2.2
-pkgrel=4
+pkgver=1.4.0pre
+pkgrel=1
pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
arch=('i686' 'x86_64')
url="http://couchdb.apache.org"
license=('APACHE')
-depends=('icu' 'erlang' 'js185' 'openssl' 'curl')
+depends=('icu' 'erlang-nox' 'js185' 'openssl' 'curl')
+makedepends=('autoconf-archive' 'git')
install=couchdb.install
options=('!libtool')
backup=('etc/couchdb/local.ini'
'etc/conf.d/couchdb'
'etc/logrotate.d/couchdb')
-source=("http://www.sai.msu.su/apache/couchdb/source/$pkgver/apache-couchdb-$pkgver.tar.gz"{,.asc}
+#source=("http://www.sai.msu.su/apache/couchdb/source/$pkgver/apache-couchdb-$pkgver.tar.gz"{,.asc}
+source=("git://github.com/apache/couchdb.git#commit=8d7ab8b18dd20f8785e69f4420c6f93a2edbfa60"
"couchdb.service"
- "couchdb.tmpfiles"
- "build-fix.patch"
- "erlang-r16b01.patch")
-md5sums=('6cc49c22fadcf7d8cf8aa34dae71b203'
- 'SKIP'
+ "couchdb.tmpfiles")
+md5sums=('SKIP'
'8914a7ffc6745f94106d96206709acb4'
- '1e254ebe32eeb061be64193bafa35dbf'
- '71afe48505dfc07ba2091786b4650fa2'
- '5ee0105a72b841de4d9c19d0fd2508e0')
+ '1e254ebe32eeb061be64193bafa35dbf')
build() {
- cd "$srcdir/apache-$pkgname-$pkgver"
- patch -p1 <$srcdir/build-fix.patch
- patch -p1 <$srcdir/erlang-r16b01.patch
+ cd "$srcdir/couchdb"
+ ./bootstrap
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
@@ -39,7 +35,7 @@ build() {
}
package() {
- cd "$srcdir/apache-$pkgname-$pkgver"
+ cd "$srcdir/couchdb"
make DESTDIR="$pkgdir" install
install -Dm644 etc/default/couchdb $pkgdir/etc/conf.d/couchdb
diff --git a/community/couchdb/build-fix.patch b/community/couchdb/build-fix.patch
deleted file mode 100644
index d847b3cf2..000000000
--- a/community/couchdb/build-fix.patch
+++ /dev/null
@@ -1,5568 +0,0 @@
-diff -wbBur apache-couchdb-1.2.1/src/Makefile.am apache-couchdb-1.2.1.q/src/Makefile.am
---- apache-couchdb-1.2.1/src/Makefile.am 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/Makefile.am 2013-03-22 15:28:06.836935634 +0400
-@@ -10,4 +10,4 @@
- ## License for the specific language governing permissions and limitations under
- ## the License.
-
--SUBDIRS = couchdb ejson erlang-oauth etap ibrowse mochiweb snappy
-+SUBDIRS = couchdb ejson erlang-oauth ibrowse mochiweb snappy
-diff -wbBur apache-couchdb-1.2.1/src/Makefile.in apache-couchdb-1.2.1.q/src/Makefile.in
---- apache-couchdb-1.2.1/src/Makefile.in 2012-12-21 01:28:49.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/Makefile.in 2013-03-22 15:28:11.563602246 +0400
-@@ -267,7 +267,7 @@
- version_release = @version_release@
- version_revision = @version_revision@
- version_stage = @version_stage@
--SUBDIRS = couchdb ejson erlang-oauth etap ibrowse mochiweb snappy
-+SUBDIRS = couchdb ejson erlang-oauth ibrowse mochiweb snappy
- all: all-recursive
-
- .SUFFIXES:
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochifmt.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -369,8 +369,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- tokenize_test() ->
- {?MODULE, [{raw, "ABC"}]} = tokenize("ABC"),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt_records.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_records.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochifmt_records.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_records.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -9,11 +9,15 @@
- %% M:format("{0.bar}", [#rec{bar=foo}]).
- %% foo
-
---module(mochifmt_records, [Recs]).
-+-module(mochifmt_records).
- -author('bob@mochimedia.com').
---export([get_value/2]).
-+-export([new/1, get_value/3]).
-
--get_value(Key, Rec) when is_tuple(Rec) and is_atom(element(1, Rec)) ->
-+new([{_Rec, RecFields}]=Recs) when is_list(RecFields) ->
-+ {?MODULE, Recs}.
-+
-+get_value(Key, Rec, {?MODULE, Recs})
-+ when is_tuple(Rec) and is_atom(element(1, Rec)) ->
- try begin
- Atom = list_to_existing_atom(Key),
- {_, Fields} = proplists:lookup(element(1, Rec), Recs),
-@@ -21,7 +25,7 @@
- end
- catch error:_ -> mochifmt:get_value(Key, Rec)
- end;
--get_value(Key, Args) ->
-+get_value(Key, Args, {?MODULE, _Recs}) ->
- mochifmt:get_value(Key, Args).
-
- get_rec_index(Atom, [Atom | _], Index) ->
-@@ -33,6 +37,6 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt_std.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_std.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochifmt_std.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_std.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -3,28 +3,31 @@
-
- %% @doc Template module for a mochifmt formatter.
-
---module(mochifmt_std, []).
-+-module(mochifmt_std).
- -author('bob@mochimedia.com').
---export([format/2, get_value/2, format_field/2, get_field/2, convert_field/2]).
-+-export([new/0, format/3, get_value/3, format_field/3, get_field/3, convert_field/3]).
-
--format(Format, Args) ->
-+new() ->
-+ {?MODULE}.
-+
-+format(Format, Args, {?MODULE}=THIS) ->
- mochifmt:format(Format, Args, THIS).
-
--get_field(Key, Args) ->
-+get_field(Key, Args, {?MODULE}=THIS) ->
- mochifmt:get_field(Key, Args, THIS).
-
--convert_field(Key, Args) ->
-+convert_field(Key, Args, {?MODULE}) ->
- mochifmt:convert_field(Key, Args).
-
--get_value(Key, Args) ->
-+get_value(Key, Args, {?MODULE}) ->
- mochifmt:get_value(Key, Args).
-
--format_field(Arg, Format) ->
-+format_field(Arg, Format, {?MODULE}=THIS) ->
- mochifmt:format_field(Arg, Format, THIS).
-
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiglobal.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiglobal.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiglobal.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiglobal.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -30,7 +30,7 @@
- put(_K, V, Mod) ->
- Bin = compile(Mod, V),
- code:purge(Mod),
-- code:load_binary(Mod, atom_to_list(Mod) ++ ".erl", Bin),
-+ {module, Mod} = code:load_binary(Mod, atom_to_list(Mod) ++ ".erl", Bin),
- ok.
-
- -spec delete(atom()) -> boolean().
-@@ -77,8 +77,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- get_put_delete_test() ->
- K = '$$test$$mochiglobal',
- delete(K),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochihex.erl apache-couchdb-1.2.1.q/src/mochiweb/mochihex.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochihex.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochihex.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -8,9 +8,6 @@
-
- -export([to_hex/1, to_bin/1, to_int/1, dehex/1, hexdigit/1]).
-
--%% @type iolist() = [char() | binary() | iolist()]
--%% @type iodata() = iolist() | binary()
--
- %% @spec to_hex(integer | iolist()) -> string()
- %% @doc Convert an iolist to a hexadecimal string.
- to_hex(0) ->
-@@ -68,8 +65,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- to_hex_test() ->
- "ff000ff1" = to_hex([255, 0, 15, 241]),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochijson2.erl apache-couchdb-1.2.1.q/src/mochiweb/mochijson2.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochijson2.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochijson2.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -40,9 +40,9 @@
- -module(mochijson2).
- -author('bob@mochimedia.com').
- -export([encoder/1, encode/1]).
---export([decoder/1, decode/1]).
-+-export([decoder/1, decode/1, decode/2]).
-
--% This is a macro to placate syntax highlighters..
-+%% This is a macro to placate syntax highlighters..
- -define(Q, $\").
- -define(ADV_COL(S, N), S#decoder{offset=N+S#decoder.offset,
- column=N+S#decoder.column}).
-@@ -64,15 +64,14 @@
- -define(IS_WHITESPACE(C),
- (C =:= $\s orelse C =:= $\t orelse C =:= $\r orelse C =:= $\n)).
-
--%% @type iolist() = [char() | binary() | iolist()]
--%% @type iodata() = iolist() | binary()
- %% @type json_string() = atom | binary()
- %% @type json_number() = integer() | float()
- %% @type json_array() = [json_term()]
- %% @type json_object() = {struct, [{json_string(), json_term()}]}
-+%% @type json_eep18_object() = {[{json_string(), json_term()}]}
- %% @type json_iolist() = {json, iolist()}
- %% @type json_term() = json_string() | json_number() | json_array() |
--%% json_object() | json_iolist()
-+%% json_object() | json_eep18_object() | json_iolist()
-
- -record(encoder, {handler=null,
- utf8=false}).
-@@ -102,6 +101,14 @@
- State = parse_decoder_options(Options, #decoder{}),
- fun (O) -> json_decode(O, State) end.
-
-+%% @spec decode(iolist(), [{format, proplist | eep18 | struct}]) -> json_term()
-+%% @doc Decode the given iolist to Erlang terms using the given object format
-+%% for decoding, where proplist returns JSON objects as [{binary(), json_term()}]
-+%% proplists, eep18 returns JSON objects as {[binary(), json_term()]}, and struct
-+%% returns them as-is.
-+decode(S, Options) ->
-+ json_decode(S, parse_decoder_options(Options, #decoder{})).
-+
- %% @spec decode(iolist()) -> json_term()
- %% @doc Decode the given iolist to Erlang terms.
- decode(S) ->
-@@ -119,7 +126,10 @@
- parse_decoder_options([], State) ->
- State;
- parse_decoder_options([{object_hook, Hook} | Rest], State) ->
-- parse_decoder_options(Rest, State#decoder{object_hook=Hook}).
-+ parse_decoder_options(Rest, State#decoder{object_hook=Hook});
-+parse_decoder_options([{format, Format} | Rest], State)
-+ when Format =:= struct orelse Format =:= eep18 orelse Format =:= proplist ->
-+ parse_decoder_options(Rest, State#decoder{object_hook=Format}).
-
- json_encode(true, _State) ->
- <<"true">>;
-@@ -139,6 +149,10 @@
- json_encode_proplist(Props, State);
- json_encode({struct, Props}, State) when is_list(Props) ->
- json_encode_proplist(Props, State);
-+json_encode({Props}, State) when is_list(Props) ->
-+ json_encode_proplist(Props, State);
-+json_encode({}, State) ->
-+ json_encode_proplist([], State);
- json_encode(Array, State) when is_list(Array) ->
- json_encode_array(Array, State);
- json_encode({array, Array}, State) when is_list(Array) ->
-@@ -318,8 +332,12 @@
- decode_object(B, S1)
- end.
-
--make_object(V, #decoder{object_hook=null}) ->
-+make_object(V, #decoder{object_hook=N}) when N =:= null orelse N =:= struct ->
- V;
-+make_object({struct, P}, #decoder{object_hook=eep18}) ->
-+ {P};
-+make_object({struct, P}, #decoder{object_hook=proplist}) ->
-+ P;
- make_object(V, #decoder{object_hook=Hook}) ->
- Hook(V).
-
-@@ -559,8 +577,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
-
- %% testing constructs borrowed from the Yaws JSON implementation.
-@@ -838,12 +856,34 @@
-
- handler_test() ->
- ?assertEqual(
-- {'EXIT',{json_encode,{bad_term,{}}}},
-- catch encode({})),
-- F = fun ({}) -> [] end,
-+ {'EXIT',{json_encode,{bad_term,{x,y}}}},
-+ catch encode({x,y})),
-+ F = fun ({x,y}) -> [] end,
- ?assertEqual(
- <<"[]">>,
-- iolist_to_binary((encoder([{handler, F}]))({}))),
-+ iolist_to_binary((encoder([{handler, F}]))({x, y}))),
- ok.
-
-+encode_empty_test_() ->
-+ [{A, ?_assertEqual(<<"{}">>, iolist_to_binary(encode(B)))}
-+ || {A, B} <- [{"eep18 {}", {}},
-+ {"eep18 {[]}", {[]}},
-+ {"{struct, []}", {struct, []}}]].
-+
-+encode_test_() ->
-+ P = [{<<"k">>, <<"v">>}],
-+ JSON = iolist_to_binary(encode({struct, P})),
-+ [{atom_to_list(F),
-+ ?_assertEqual(JSON, iolist_to_binary(encode(decode(JSON, [{format, F}]))))}
-+ || F <- [struct, eep18, proplist]].
-+
-+format_test_() ->
-+ P = [{<<"k">>, <<"v">>}],
-+ JSON = iolist_to_binary(encode({struct, P})),
-+ [{atom_to_list(F),
-+ ?_assertEqual(A, decode(JSON, [{format, F}]))}
-+ || {F, A} <- [{struct, {struct, P}},
-+ {eep18, {P}},
-+ {proplist, P}]].
-+
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochijson.erl apache-couchdb-1.2.1.q/src/mochiweb/mochijson.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochijson.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochijson.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -15,8 +15,6 @@
- -define(INC_COL(S), S#decoder{column=1+S#decoder.column}).
- -define(INC_LINE(S), S#decoder{column=1, line=1+S#decoder.line}).
-
--%% @type iolist() = [char() | binary() | iolist()]
--%% @type iodata() = iolist() | binary()
- %% @type json_string() = atom | string() | binary()
- %% @type json_number() = integer() | float()
- %% @type json_array() = {array, [json_term()]}
-@@ -406,8 +404,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- %% testing constructs borrowed from the Yaws JSON implementation.
-
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochilists.erl apache-couchdb-1.2.1.q/src/mochiweb/mochilists.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochilists.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochilists.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -55,8 +55,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- set_defaults_test() ->
- ?assertEqual(
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochilogfile2.erl apache-couchdb-1.2.1.q/src/mochiweb/mochilogfile2.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochilogfile2.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochilogfile2.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -57,8 +57,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- name_test() ->
- D = mochitemp:mkdtemp(),
- FileName = filename:join(D, "open_close_test.log"),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochinum.erl apache-couchdb-1.2.1.q/src/mochiweb/mochinum.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochinum.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochinum.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -243,8 +243,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- int_ceil_test() ->
- ?assertEqual(1, int_ceil(0.0001)),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochitemp.erl apache-couchdb-1.2.1.q/src/mochiweb/mochitemp.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochitemp.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochitemp.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -135,8 +135,9 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-+
- pushenv(L) ->
- [{K, os:getenv(K)} || K <- L].
- popenv(L) ->
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiutf8.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiutf8.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiutf8.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiutf8.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -5,8 +5,9 @@
- %% invalid bytes.
-
- -module(mochiutf8).
---export([valid_utf8_bytes/1, codepoint_to_bytes/1, bytes_to_codepoints/1]).
---export([bytes_foldl/3, codepoint_foldl/3, read_codepoint/1, len/1]).
-+-export([valid_utf8_bytes/1, codepoint_to_bytes/1, codepoints_to_bytes/1]).
-+-export([bytes_to_codepoints/1, bytes_foldl/3, codepoint_foldl/3]).
-+-export([read_codepoint/1, len/1]).
-
- %% External API
-
-@@ -192,8 +193,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- binary_skip_bytes_test() ->
- ?assertEqual(<<"foo">>,
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_acceptor.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_acceptor.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_acceptor.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_acceptor.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -14,10 +14,10 @@
- proc_lib:spawn_link(?MODULE, init, [Server, Listen, Loop]).
-
- init(Server, Listen, Loop) ->
-- T1 = now(),
-+ T1 = os:timestamp(),
- case catch mochiweb_socket:accept(Listen) of
- {ok, Socket} ->
-- gen_server:cast(Server, {accepted, self(), timer:now_diff(now(), T1)}),
-+ gen_server:cast(Server, {accepted, self(), timer:now_diff(os:timestamp(), T1)}),
- call_loop(Loop, Socket);
- {error, closed} ->
- exit(normal);
-@@ -35,6 +35,8 @@
-
- call_loop({M, F}, Socket) ->
- M:F(Socket);
-+call_loop({M, F, [A1]}, Socket) ->
-+ M:F(Socket, A1);
- call_loop({M, F, A}, Socket) ->
- erlang:apply(M, F, [Socket | A]);
- call_loop(Loop, Socket) ->
-@@ -43,6 +45,6 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb.app.src apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.app.src
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb.app.src 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.app.src 2013-03-22 15:26:58.000000000 +0400
-@@ -1,9 +1,9 @@
- %% This is generated from src/mochiweb.app.src
- {application, mochiweb,
- [{description, "MochiMedia Web Server"},
-- {vsn, "1.4.1"},
-+ {vsn, "2.5.0"},
- {modules, []},
- {registered, []},
-- {mod, {mochiweb_app, []}},
- {env, []},
-- {applications, [kernel, stdlib, crypto, inets]}]}.
-+ {applications, [kernel, stdlib, crypto, inets, ssl, xmerl,
-+ compiler, syntax_tools]}]}.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_charref.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_charref.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_charref.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_charref.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -1,17 +1,17 @@
- %% @author Bob Ippolito <bob@mochimedia.com>
- %% @copyright 2007 Mochi Media, Inc.
-
--%% @doc Converts HTML 4 charrefs and entities to codepoints.
-+%% @doc Converts HTML 5 charrefs and entities to codepoints (or lists of code points).
- -module(mochiweb_charref).
- -export([charref/1]).
-
- %% External API.
-
--%% @spec charref(S) -> integer() | undefined
- %% @doc Convert a decimal charref, hex charref, or html entity to a unicode
- %% codepoint, or return undefined on failure.
- %% The input should not include an ampersand or semicolon.
- %% charref("#38") = 38, charref("#x26") = 38, charref("amp") = 38.
-+-spec charref(binary() | string()) -> integer() | [integer()] | undefined.
- charref(B) when is_binary(B) ->
- charref(binary_to_list(B));
- charref([$#, C | L]) when C =:= $x orelse C =:= $X ->
-@@ -29,266 +29,2141 @@
-
- %% Internal API.
-
--entity("nbsp") -> 160;
--entity("iexcl") -> 161;
--entity("cent") -> 162;
--entity("pound") -> 163;
--entity("curren") -> 164;
--entity("yen") -> 165;
--entity("brvbar") -> 166;
--entity("sect") -> 167;
--entity("uml") -> 168;
--entity("copy") -> 169;
--entity("ordf") -> 170;
--entity("laquo") -> 171;
--entity("not") -> 172;
--entity("shy") -> 173;
--entity("reg") -> 174;
--entity("macr") -> 175;
--entity("deg") -> 176;
--entity("plusmn") -> 177;
--entity("sup2") -> 178;
--entity("sup3") -> 179;
--entity("acute") -> 180;
--entity("micro") -> 181;
--entity("para") -> 182;
--entity("middot") -> 183;
--entity("cedil") -> 184;
--entity("sup1") -> 185;
--entity("ordm") -> 186;
--entity("raquo") -> 187;
--entity("frac14") -> 188;
--entity("frac12") -> 189;
--entity("frac34") -> 190;
--entity("iquest") -> 191;
--entity("Agrave") -> 192;
--entity("Aacute") -> 193;
--entity("Acirc") -> 194;
--entity("Atilde") -> 195;
--entity("Auml") -> 196;
--entity("Aring") -> 197;
--entity("AElig") -> 198;
--entity("Ccedil") -> 199;
--entity("Egrave") -> 200;
--entity("Eacute") -> 201;
--entity("Ecirc") -> 202;
--entity("Euml") -> 203;
--entity("Igrave") -> 204;
--entity("Iacute") -> 205;
--entity("Icirc") -> 206;
--entity("Iuml") -> 207;
--entity("ETH") -> 208;
--entity("Ntilde") -> 209;
--entity("Ograve") -> 210;
--entity("Oacute") -> 211;
--entity("Ocirc") -> 212;
--entity("Otilde") -> 213;
--entity("Ouml") -> 214;
--entity("times") -> 215;
--entity("Oslash") -> 216;
--entity("Ugrave") -> 217;
--entity("Uacute") -> 218;
--entity("Ucirc") -> 219;
--entity("Uuml") -> 220;
--entity("Yacute") -> 221;
--entity("THORN") -> 222;
--entity("szlig") -> 223;
--entity("agrave") -> 224;
--entity("aacute") -> 225;
--entity("acirc") -> 226;
--entity("atilde") -> 227;
--entity("auml") -> 228;
--entity("aring") -> 229;
--entity("aelig") -> 230;
--entity("ccedil") -> 231;
--entity("egrave") -> 232;
--entity("eacute") -> 233;
--entity("ecirc") -> 234;
--entity("euml") -> 235;
--entity("igrave") -> 236;
--entity("iacute") -> 237;
--entity("icirc") -> 238;
--entity("iuml") -> 239;
--entity("eth") -> 240;
--entity("ntilde") -> 241;
--entity("ograve") -> 242;
--entity("oacute") -> 243;
--entity("ocirc") -> 244;
--entity("otilde") -> 245;
--entity("ouml") -> 246;
--entity("divide") -> 247;
--entity("oslash") -> 248;
--entity("ugrave") -> 249;
--entity("uacute") -> 250;
--entity("ucirc") -> 251;
--entity("uuml") -> 252;
--entity("yacute") -> 253;
--entity("thorn") -> 254;
--entity("yuml") -> 255;
--entity("fnof") -> 402;
--entity("Alpha") -> 913;
--entity("Beta") -> 914;
--entity("Gamma") -> 915;
--entity("Delta") -> 916;
--entity("Epsilon") -> 917;
--entity("Zeta") -> 918;
--entity("Eta") -> 919;
--entity("Theta") -> 920;
--entity("Iota") -> 921;
--entity("Kappa") -> 922;
--entity("Lambda") -> 923;
--entity("Mu") -> 924;
--entity("Nu") -> 925;
--entity("Xi") -> 926;
--entity("Omicron") -> 927;
--entity("Pi") -> 928;
--entity("Rho") -> 929;
--entity("Sigma") -> 931;
--entity("Tau") -> 932;
--entity("Upsilon") -> 933;
--entity("Phi") -> 934;
--entity("Chi") -> 935;
--entity("Psi") -> 936;
--entity("Omega") -> 937;
--entity("alpha") -> 945;
--entity("beta") -> 946;
--entity("gamma") -> 947;
--entity("delta") -> 948;
--entity("epsilon") -> 949;
--entity("zeta") -> 950;
--entity("eta") -> 951;
--entity("theta") -> 952;
--entity("iota") -> 953;
--entity("kappa") -> 954;
--entity("lambda") -> 955;
--entity("mu") -> 956;
--entity("nu") -> 957;
--entity("xi") -> 958;
--entity("omicron") -> 959;
--entity("pi") -> 960;
--entity("rho") -> 961;
--entity("sigmaf") -> 962;
--entity("sigma") -> 963;
--entity("tau") -> 964;
--entity("upsilon") -> 965;
--entity("phi") -> 966;
--entity("chi") -> 967;
--entity("psi") -> 968;
--entity("omega") -> 969;
--entity("thetasym") -> 977;
--entity("upsih") -> 978;
--entity("piv") -> 982;
--entity("bull") -> 8226;
--entity("hellip") -> 8230;
--entity("prime") -> 8242;
--entity("Prime") -> 8243;
--entity("oline") -> 8254;
--entity("frasl") -> 8260;
--entity("weierp") -> 8472;
--entity("image") -> 8465;
--entity("real") -> 8476;
--entity("trade") -> 8482;
--entity("alefsym") -> 8501;
--entity("larr") -> 8592;
--entity("uarr") -> 8593;
--entity("rarr") -> 8594;
--entity("darr") -> 8595;
--entity("harr") -> 8596;
--entity("crarr") -> 8629;
--entity("lArr") -> 8656;
--entity("uArr") -> 8657;
--entity("rArr") -> 8658;
--entity("dArr") -> 8659;
--entity("hArr") -> 8660;
--entity("forall") -> 8704;
--entity("part") -> 8706;
--entity("exist") -> 8707;
--entity("empty") -> 8709;
--entity("nabla") -> 8711;
--entity("isin") -> 8712;
--entity("notin") -> 8713;
--entity("ni") -> 8715;
--entity("prod") -> 8719;
--entity("sum") -> 8721;
--entity("minus") -> 8722;
--entity("lowast") -> 8727;
--entity("radic") -> 8730;
--entity("prop") -> 8733;
--entity("infin") -> 8734;
--entity("ang") -> 8736;
--entity("and") -> 8743;
--entity("or") -> 8744;
--entity("cap") -> 8745;
--entity("cup") -> 8746;
--entity("int") -> 8747;
--entity("there4") -> 8756;
--entity("sim") -> 8764;
--entity("cong") -> 8773;
--entity("asymp") -> 8776;
--entity("ne") -> 8800;
--entity("equiv") -> 8801;
--entity("le") -> 8804;
--entity("ge") -> 8805;
--entity("sub") -> 8834;
--entity("sup") -> 8835;
--entity("nsub") -> 8836;
--entity("sube") -> 8838;
--entity("supe") -> 8839;
--entity("oplus") -> 8853;
--entity("otimes") -> 8855;
--entity("perp") -> 8869;
--entity("sdot") -> 8901;
--entity("lceil") -> 8968;
--entity("rceil") -> 8969;
--entity("lfloor") -> 8970;
--entity("rfloor") -> 8971;
--entity("lang") -> 9001;
--entity("rang") -> 9002;
--entity("loz") -> 9674;
--entity("spades") -> 9824;
--entity("clubs") -> 9827;
--entity("hearts") -> 9829;
--entity("diams") -> 9830;
--entity("quot") -> 34;
--entity("amp") -> 38;
--entity("lt") -> 60;
--entity("gt") -> 62;
--entity("OElig") -> 338;
--entity("oelig") -> 339;
--entity("Scaron") -> 352;
--entity("scaron") -> 353;
--entity("Yuml") -> 376;
--entity("circ") -> 710;
--entity("tilde") -> 732;
--entity("ensp") -> 8194;
--entity("emsp") -> 8195;
--entity("thinsp") -> 8201;
--entity("zwnj") -> 8204;
--entity("zwj") -> 8205;
--entity("lrm") -> 8206;
--entity("rlm") -> 8207;
--entity("ndash") -> 8211;
--entity("mdash") -> 8212;
--entity("lsquo") -> 8216;
--entity("rsquo") -> 8217;
--entity("sbquo") -> 8218;
--entity("ldquo") -> 8220;
--entity("rdquo") -> 8221;
--entity("bdquo") -> 8222;
--entity("dagger") -> 8224;
--entity("Dagger") -> 8225;
--entity("permil") -> 8240;
--entity("lsaquo") -> 8249;
--entity("rsaquo") -> 8250;
--entity("euro") -> 8364;
--entity(_) -> undefined.
-+%% [2011-10-14] Generated from:
-+%% http://www.w3.org/TR/html5/named-character-references.html
-
-+entity("AElig") -> 16#000C6;
-+entity("AMP") -> 16#00026;
-+entity("Aacute") -> 16#000C1;
-+entity("Abreve") -> 16#00102;
-+entity("Acirc") -> 16#000C2;
-+entity("Acy") -> 16#00410;
-+entity("Afr") -> 16#1D504;
-+entity("Agrave") -> 16#000C0;
-+entity("Alpha") -> 16#00391;
-+entity("Amacr") -> 16#00100;
-+entity("And") -> 16#02A53;
-+entity("Aogon") -> 16#00104;
-+entity("Aopf") -> 16#1D538;
-+entity("ApplyFunction") -> 16#02061;
-+entity("Aring") -> 16#000C5;
-+entity("Ascr") -> 16#1D49C;
-+entity("Assign") -> 16#02254;
-+entity("Atilde") -> 16#000C3;
-+entity("Auml") -> 16#000C4;
-+entity("Backslash") -> 16#02216;
-+entity("Barv") -> 16#02AE7;
-+entity("Barwed") -> 16#02306;
-+entity("Bcy") -> 16#00411;
-+entity("Because") -> 16#02235;
-+entity("Bernoullis") -> 16#0212C;
-+entity("Beta") -> 16#00392;
-+entity("Bfr") -> 16#1D505;
-+entity("Bopf") -> 16#1D539;
-+entity("Breve") -> 16#002D8;
-+entity("Bscr") -> 16#0212C;
-+entity("Bumpeq") -> 16#0224E;
-+entity("CHcy") -> 16#00427;
-+entity("COPY") -> 16#000A9;
-+entity("Cacute") -> 16#00106;
-+entity("Cap") -> 16#022D2;
-+entity("CapitalDifferentialD") -> 16#02145;
-+entity("Cayleys") -> 16#0212D;
-+entity("Ccaron") -> 16#0010C;
-+entity("Ccedil") -> 16#000C7;
-+entity("Ccirc") -> 16#00108;
-+entity("Cconint") -> 16#02230;
-+entity("Cdot") -> 16#0010A;
-+entity("Cedilla") -> 16#000B8;
-+entity("CenterDot") -> 16#000B7;
-+entity("Cfr") -> 16#0212D;
-+entity("Chi") -> 16#003A7;
-+entity("CircleDot") -> 16#02299;
-+entity("CircleMinus") -> 16#02296;
-+entity("CirclePlus") -> 16#02295;
-+entity("CircleTimes") -> 16#02297;
-+entity("ClockwiseContourIntegral") -> 16#02232;
-+entity("CloseCurlyDoubleQuote") -> 16#0201D;
-+entity("CloseCurlyQuote") -> 16#02019;
-+entity("Colon") -> 16#02237;
-+entity("Colone") -> 16#02A74;
-+entity("Congruent") -> 16#02261;
-+entity("Conint") -> 16#0222F;
-+entity("ContourIntegral") -> 16#0222E;
-+entity("Copf") -> 16#02102;
-+entity("Coproduct") -> 16#02210;
-+entity("CounterClockwiseContourIntegral") -> 16#02233;
-+entity("Cross") -> 16#02A2F;
-+entity("Cscr") -> 16#1D49E;
-+entity("Cup") -> 16#022D3;
-+entity("CupCap") -> 16#0224D;
-+entity("DD") -> 16#02145;
-+entity("DDotrahd") -> 16#02911;
-+entity("DJcy") -> 16#00402;
-+entity("DScy") -> 16#00405;
-+entity("DZcy") -> 16#0040F;
-+entity("Dagger") -> 16#02021;
-+entity("Darr") -> 16#021A1;
-+entity("Dashv") -> 16#02AE4;
-+entity("Dcaron") -> 16#0010E;
-+entity("Dcy") -> 16#00414;
-+entity("Del") -> 16#02207;
-+entity("Delta") -> 16#00394;
-+entity("Dfr") -> 16#1D507;
-+entity("DiacriticalAcute") -> 16#000B4;
-+entity("DiacriticalDot") -> 16#002D9;
-+entity("DiacriticalDoubleAcute") -> 16#002DD;
-+entity("DiacriticalGrave") -> 16#00060;
-+entity("DiacriticalTilde") -> 16#002DC;
-+entity("Diamond") -> 16#022C4;
-+entity("DifferentialD") -> 16#02146;
-+entity("Dopf") -> 16#1D53B;
-+entity("Dot") -> 16#000A8;
-+entity("DotDot") -> 16#020DC;
-+entity("DotEqual") -> 16#02250;
-+entity("DoubleContourIntegral") -> 16#0222F;
-+entity("DoubleDot") -> 16#000A8;
-+entity("DoubleDownArrow") -> 16#021D3;
-+entity("DoubleLeftArrow") -> 16#021D0;
-+entity("DoubleLeftRightArrow") -> 16#021D4;
-+entity("DoubleLeftTee") -> 16#02AE4;
-+entity("DoubleLongLeftArrow") -> 16#027F8;
-+entity("DoubleLongLeftRightArrow") -> 16#027FA;
-+entity("DoubleLongRightArrow") -> 16#027F9;
-+entity("DoubleRightArrow") -> 16#021D2;
-+entity("DoubleRightTee") -> 16#022A8;
-+entity("DoubleUpArrow") -> 16#021D1;
-+entity("DoubleUpDownArrow") -> 16#021D5;
-+entity("DoubleVerticalBar") -> 16#02225;
-+entity("DownArrow") -> 16#02193;
-+entity("DownArrowBar") -> 16#02913;
-+entity("DownArrowUpArrow") -> 16#021F5;
-+entity("DownBreve") -> 16#00311;
-+entity("DownLeftRightVector") -> 16#02950;
-+entity("DownLeftTeeVector") -> 16#0295E;
-+entity("DownLeftVector") -> 16#021BD;
-+entity("DownLeftVectorBar") -> 16#02956;
-+entity("DownRightTeeVector") -> 16#0295F;
-+entity("DownRightVector") -> 16#021C1;
-+entity("DownRightVectorBar") -> 16#02957;
-+entity("DownTee") -> 16#022A4;
-+entity("DownTeeArrow") -> 16#021A7;
-+entity("Downarrow") -> 16#021D3;
-+entity("Dscr") -> 16#1D49F;
-+entity("Dstrok") -> 16#00110;
-+entity("ENG") -> 16#0014A;
-+entity("ETH") -> 16#000D0;
-+entity("Eacute") -> 16#000C9;
-+entity("Ecaron") -> 16#0011A;
-+entity("Ecirc") -> 16#000CA;
-+entity("Ecy") -> 16#0042D;
-+entity("Edot") -> 16#00116;
-+entity("Efr") -> 16#1D508;
-+entity("Egrave") -> 16#000C8;
-+entity("Element") -> 16#02208;
-+entity("Emacr") -> 16#00112;
-+entity("EmptySmallSquare") -> 16#025FB;
-+entity("EmptyVerySmallSquare") -> 16#025AB;
-+entity("Eogon") -> 16#00118;
-+entity("Eopf") -> 16#1D53C;
-+entity("Epsilon") -> 16#00395;
-+entity("Equal") -> 16#02A75;
-+entity("EqualTilde") -> 16#02242;
-+entity("Equilibrium") -> 16#021CC;
-+entity("Escr") -> 16#02130;
-+entity("Esim") -> 16#02A73;
-+entity("Eta") -> 16#00397;
-+entity("Euml") -> 16#000CB;
-+entity("Exists") -> 16#02203;
-+entity("ExponentialE") -> 16#02147;
-+entity("Fcy") -> 16#00424;
-+entity("Ffr") -> 16#1D509;
-+entity("FilledSmallSquare") -> 16#025FC;
-+entity("FilledVerySmallSquare") -> 16#025AA;
-+entity("Fopf") -> 16#1D53D;
-+entity("ForAll") -> 16#02200;
-+entity("Fouriertrf") -> 16#02131;
-+entity("Fscr") -> 16#02131;
-+entity("GJcy") -> 16#00403;
-+entity("GT") -> 16#0003E;
-+entity("Gamma") -> 16#00393;
-+entity("Gammad") -> 16#003DC;
-+entity("Gbreve") -> 16#0011E;
-+entity("Gcedil") -> 16#00122;
-+entity("Gcirc") -> 16#0011C;
-+entity("Gcy") -> 16#00413;
-+entity("Gdot") -> 16#00120;
-+entity("Gfr") -> 16#1D50A;
-+entity("Gg") -> 16#022D9;
-+entity("Gopf") -> 16#1D53E;
-+entity("GreaterEqual") -> 16#02265;
-+entity("GreaterEqualLess") -> 16#022DB;
-+entity("GreaterFullEqual") -> 16#02267;
-+entity("GreaterGreater") -> 16#02AA2;
-+entity("GreaterLess") -> 16#02277;
-+entity("GreaterSlantEqual") -> 16#02A7E;
-+entity("GreaterTilde") -> 16#02273;
-+entity("Gscr") -> 16#1D4A2;
-+entity("Gt") -> 16#0226B;
-+entity("HARDcy") -> 16#0042A;
-+entity("Hacek") -> 16#002C7;
-+entity("Hat") -> 16#0005E;
-+entity("Hcirc") -> 16#00124;
-+entity("Hfr") -> 16#0210C;
-+entity("HilbertSpace") -> 16#0210B;
-+entity("Hopf") -> 16#0210D;
-+entity("HorizontalLine") -> 16#02500;
-+entity("Hscr") -> 16#0210B;
-+entity("Hstrok") -> 16#00126;
-+entity("HumpDownHump") -> 16#0224E;
-+entity("HumpEqual") -> 16#0224F;
-+entity("IEcy") -> 16#00415;
-+entity("IJlig") -> 16#00132;
-+entity("IOcy") -> 16#00401;
-+entity("Iacute") -> 16#000CD;
-+entity("Icirc") -> 16#000CE;
-+entity("Icy") -> 16#00418;
-+entity("Idot") -> 16#00130;
-+entity("Ifr") -> 16#02111;
-+entity("Igrave") -> 16#000CC;
-+entity("Im") -> 16#02111;
-+entity("Imacr") -> 16#0012A;
-+entity("ImaginaryI") -> 16#02148;
-+entity("Implies") -> 16#021D2;
-+entity("Int") -> 16#0222C;
-+entity("Integral") -> 16#0222B;
-+entity("Intersection") -> 16#022C2;
-+entity("InvisibleComma") -> 16#02063;
-+entity("InvisibleTimes") -> 16#02062;
-+entity("Iogon") -> 16#0012E;
-+entity("Iopf") -> 16#1D540;
-+entity("Iota") -> 16#00399;
-+entity("Iscr") -> 16#02110;
-+entity("Itilde") -> 16#00128;
-+entity("Iukcy") -> 16#00406;
-+entity("Iuml") -> 16#000CF;
-+entity("Jcirc") -> 16#00134;
-+entity("Jcy") -> 16#00419;
-+entity("Jfr") -> 16#1D50D;
-+entity("Jopf") -> 16#1D541;
-+entity("Jscr") -> 16#1D4A5;
-+entity("Jsercy") -> 16#00408;
-+entity("Jukcy") -> 16#00404;
-+entity("KHcy") -> 16#00425;
-+entity("KJcy") -> 16#0040C;
-+entity("Kappa") -> 16#0039A;
-+entity("Kcedil") -> 16#00136;
-+entity("Kcy") -> 16#0041A;
-+entity("Kfr") -> 16#1D50E;
-+entity("Kopf") -> 16#1D542;
-+entity("Kscr") -> 16#1D4A6;
-+entity("LJcy") -> 16#00409;
-+entity("LT") -> 16#0003C;
-+entity("Lacute") -> 16#00139;
-+entity("Lambda") -> 16#0039B;
-+entity("Lang") -> 16#027EA;
-+entity("Laplacetrf") -> 16#02112;
-+entity("Larr") -> 16#0219E;
-+entity("Lcaron") -> 16#0013D;
-+entity("Lcedil") -> 16#0013B;
-+entity("Lcy") -> 16#0041B;
-+entity("LeftAngleBracket") -> 16#027E8;
-+entity("LeftArrow") -> 16#02190;
-+entity("LeftArrowBar") -> 16#021E4;
-+entity("LeftArrowRightArrow") -> 16#021C6;
-+entity("LeftCeiling") -> 16#02308;
-+entity("LeftDoubleBracket") -> 16#027E6;
-+entity("LeftDownTeeVector") -> 16#02961;
-+entity("LeftDownVector") -> 16#021C3;
-+entity("LeftDownVectorBar") -> 16#02959;
-+entity("LeftFloor") -> 16#0230A;
-+entity("LeftRightArrow") -> 16#02194;
-+entity("LeftRightVector") -> 16#0294E;
-+entity("LeftTee") -> 16#022A3;
-+entity("LeftTeeArrow") -> 16#021A4;
-+entity("LeftTeeVector") -> 16#0295A;
-+entity("LeftTriangle") -> 16#022B2;
-+entity("LeftTriangleBar") -> 16#029CF;
-+entity("LeftTriangleEqual") -> 16#022B4;
-+entity("LeftUpDownVector") -> 16#02951;
-+entity("LeftUpTeeVector") -> 16#02960;
-+entity("LeftUpVector") -> 16#021BF;
-+entity("LeftUpVectorBar") -> 16#02958;
-+entity("LeftVector") -> 16#021BC;
-+entity("LeftVectorBar") -> 16#02952;
-+entity("Leftarrow") -> 16#021D0;
-+entity("Leftrightarrow") -> 16#021D4;
-+entity("LessEqualGreater") -> 16#022DA;
-+entity("LessFullEqual") -> 16#02266;
-+entity("LessGreater") -> 16#02276;
-+entity("LessLess") -> 16#02AA1;
-+entity("LessSlantEqual") -> 16#02A7D;
-+entity("LessTilde") -> 16#02272;
-+entity("Lfr") -> 16#1D50F;
-+entity("Ll") -> 16#022D8;
-+entity("Lleftarrow") -> 16#021DA;
-+entity("Lmidot") -> 16#0013F;
-+entity("LongLeftArrow") -> 16#027F5;
-+entity("LongLeftRightArrow") -> 16#027F7;
-+entity("LongRightArrow") -> 16#027F6;
-+entity("Longleftarrow") -> 16#027F8;
-+entity("Longleftrightarrow") -> 16#027FA;
-+entity("Longrightarrow") -> 16#027F9;
-+entity("Lopf") -> 16#1D543;
-+entity("LowerLeftArrow") -> 16#02199;
-+entity("LowerRightArrow") -> 16#02198;
-+entity("Lscr") -> 16#02112;
-+entity("Lsh") -> 16#021B0;
-+entity("Lstrok") -> 16#00141;
-+entity("Lt") -> 16#0226A;
-+entity("Map") -> 16#02905;
-+entity("Mcy") -> 16#0041C;
-+entity("MediumSpace") -> 16#0205F;
-+entity("Mellintrf") -> 16#02133;
-+entity("Mfr") -> 16#1D510;
-+entity("MinusPlus") -> 16#02213;
-+entity("Mopf") -> 16#1D544;
-+entity("Mscr") -> 16#02133;
-+entity("Mu") -> 16#0039C;
-+entity("NJcy") -> 16#0040A;
-+entity("Nacute") -> 16#00143;
-+entity("Ncaron") -> 16#00147;
-+entity("Ncedil") -> 16#00145;
-+entity("Ncy") -> 16#0041D;
-+entity("NegativeMediumSpace") -> 16#0200B;
-+entity("NegativeThickSpace") -> 16#0200B;
-+entity("NegativeThinSpace") -> 16#0200B;
-+entity("NegativeVeryThinSpace") -> 16#0200B;
-+entity("NestedGreaterGreater") -> 16#0226B;
-+entity("NestedLessLess") -> 16#0226A;
-+entity("NewLine") -> 16#0000A;
-+entity("Nfr") -> 16#1D511;
-+entity("NoBreak") -> 16#02060;
-+entity("NonBreakingSpace") -> 16#000A0;
-+entity("Nopf") -> 16#02115;
-+entity("Not") -> 16#02AEC;
-+entity("NotCongruent") -> 16#02262;
-+entity("NotCupCap") -> 16#0226D;
-+entity("NotDoubleVerticalBar") -> 16#02226;
-+entity("NotElement") -> 16#02209;
-+entity("NotEqual") -> 16#02260;
-+entity("NotEqualTilde") -> [16#02242, 16#00338];
-+entity("NotExists") -> 16#02204;
-+entity("NotGreater") -> 16#0226F;
-+entity("NotGreaterEqual") -> 16#02271;
-+entity("NotGreaterFullEqual") -> [16#02267, 16#00338];
-+entity("NotGreaterGreater") -> [16#0226B, 16#00338];
-+entity("NotGreaterLess") -> 16#02279;
-+entity("NotGreaterSlantEqual") -> [16#02A7E, 16#00338];
-+entity("NotGreaterTilde") -> 16#02275;
-+entity("NotHumpDownHump") -> [16#0224E, 16#00338];
-+entity("NotHumpEqual") -> [16#0224F, 16#00338];
-+entity("NotLeftTriangle") -> 16#022EA;
-+entity("NotLeftTriangleBar") -> [16#029CF, 16#00338];
-+entity("NotLeftTriangleEqual") -> 16#022EC;
-+entity("NotLess") -> 16#0226E;
-+entity("NotLessEqual") -> 16#02270;
-+entity("NotLessGreater") -> 16#02278;
-+entity("NotLessLess") -> [16#0226A, 16#00338];
-+entity("NotLessSlantEqual") -> [16#02A7D, 16#00338];
-+entity("NotLessTilde") -> 16#02274;
-+entity("NotNestedGreaterGreater") -> [16#02AA2, 16#00338];
-+entity("NotNestedLessLess") -> [16#02AA1, 16#00338];
-+entity("NotPrecedes") -> 16#02280;
-+entity("NotPrecedesEqual") -> [16#02AAF, 16#00338];
-+entity("NotPrecedesSlantEqual") -> 16#022E0;
-+entity("NotReverseElement") -> 16#0220C;
-+entity("NotRightTriangle") -> 16#022EB;
-+entity("NotRightTriangleBar") -> [16#029D0, 16#00338];
-+entity("NotRightTriangleEqual") -> 16#022ED;
-+entity("NotSquareSubset") -> [16#0228F, 16#00338];
-+entity("NotSquareSubsetEqual") -> 16#022E2;
-+entity("NotSquareSuperset") -> [16#02290, 16#00338];
-+entity("NotSquareSupersetEqual") -> 16#022E3;
-+entity("NotSubset") -> [16#02282, 16#020D2];
-+entity("NotSubsetEqual") -> 16#02288;
-+entity("NotSucceeds") -> 16#02281;
-+entity("NotSucceedsEqual") -> [16#02AB0, 16#00338];
-+entity("NotSucceedsSlantEqual") -> 16#022E1;
-+entity("NotSucceedsTilde") -> [16#0227F, 16#00338];
-+entity("NotSuperset") -> [16#02283, 16#020D2];
-+entity("NotSupersetEqual") -> 16#02289;
-+entity("NotTilde") -> 16#02241;
-+entity("NotTildeEqual") -> 16#02244;
-+entity("NotTildeFullEqual") -> 16#02247;
-+entity("NotTildeTilde") -> 16#02249;
-+entity("NotVerticalBar") -> 16#02224;
-+entity("Nscr") -> 16#1D4A9;
-+entity("Ntilde") -> 16#000D1;
-+entity("Nu") -> 16#0039D;
-+entity("OElig") -> 16#00152;
-+entity("Oacute") -> 16#000D3;
-+entity("Ocirc") -> 16#000D4;
-+entity("Ocy") -> 16#0041E;
-+entity("Odblac") -> 16#00150;
-+entity("Ofr") -> 16#1D512;
-+entity("Ograve") -> 16#000D2;
-+entity("Omacr") -> 16#0014C;
-+entity("Omega") -> 16#003A9;
-+entity("Omicron") -> 16#0039F;
-+entity("Oopf") -> 16#1D546;
-+entity("OpenCurlyDoubleQuote") -> 16#0201C;
-+entity("OpenCurlyQuote") -> 16#02018;
-+entity("Or") -> 16#02A54;
-+entity("Oscr") -> 16#1D4AA;
-+entity("Oslash") -> 16#000D8;
-+entity("Otilde") -> 16#000D5;
-+entity("Otimes") -> 16#02A37;
-+entity("Ouml") -> 16#000D6;
-+entity("OverBar") -> 16#0203E;
-+entity("OverBrace") -> 16#023DE;
-+entity("OverBracket") -> 16#023B4;
-+entity("OverParenthesis") -> 16#023DC;
-+entity("PartialD") -> 16#02202;
-+entity("Pcy") -> 16#0041F;
-+entity("Pfr") -> 16#1D513;
-+entity("Phi") -> 16#003A6;
-+entity("Pi") -> 16#003A0;
-+entity("PlusMinus") -> 16#000B1;
-+entity("Poincareplane") -> 16#0210C;
-+entity("Popf") -> 16#02119;
-+entity("Pr") -> 16#02ABB;
-+entity("Precedes") -> 16#0227A;
-+entity("PrecedesEqual") -> 16#02AAF;
-+entity("PrecedesSlantEqual") -> 16#0227C;
-+entity("PrecedesTilde") -> 16#0227E;
-+entity("Prime") -> 16#02033;
-+entity("Product") -> 16#0220F;
-+entity("Proportion") -> 16#02237;
-+entity("Proportional") -> 16#0221D;
-+entity("Pscr") -> 16#1D4AB;
-+entity("Psi") -> 16#003A8;
-+entity("QUOT") -> 16#00022;
-+entity("Qfr") -> 16#1D514;
-+entity("Qopf") -> 16#0211A;
-+entity("Qscr") -> 16#1D4AC;
-+entity("RBarr") -> 16#02910;
-+entity("REG") -> 16#000AE;
-+entity("Racute") -> 16#00154;
-+entity("Rang") -> 16#027EB;
-+entity("Rarr") -> 16#021A0;
-+entity("Rarrtl") -> 16#02916;
-+entity("Rcaron") -> 16#00158;
-+entity("Rcedil") -> 16#00156;
-+entity("Rcy") -> 16#00420;
-+entity("Re") -> 16#0211C;
-+entity("ReverseElement") -> 16#0220B;
-+entity("ReverseEquilibrium") -> 16#021CB;
-+entity("ReverseUpEquilibrium") -> 16#0296F;
-+entity("Rfr") -> 16#0211C;
-+entity("Rho") -> 16#003A1;
-+entity("RightAngleBracket") -> 16#027E9;
-+entity("RightArrow") -> 16#02192;
-+entity("RightArrowBar") -> 16#021E5;
-+entity("RightArrowLeftArrow") -> 16#021C4;
-+entity("RightCeiling") -> 16#02309;
-+entity("RightDoubleBracket") -> 16#027E7;
-+entity("RightDownTeeVector") -> 16#0295D;
-+entity("RightDownVector") -> 16#021C2;
-+entity("RightDownVectorBar") -> 16#02955;
-+entity("RightFloor") -> 16#0230B;
-+entity("RightTee") -> 16#022A2;
-+entity("RightTeeArrow") -> 16#021A6;
-+entity("RightTeeVector") -> 16#0295B;
-+entity("RightTriangle") -> 16#022B3;
-+entity("RightTriangleBar") -> 16#029D0;
-+entity("RightTriangleEqual") -> 16#022B5;
-+entity("RightUpDownVector") -> 16#0294F;
-+entity("RightUpTeeVector") -> 16#0295C;
-+entity("RightUpVector") -> 16#021BE;
-+entity("RightUpVectorBar") -> 16#02954;
-+entity("RightVector") -> 16#021C0;
-+entity("RightVectorBar") -> 16#02953;
-+entity("Rightarrow") -> 16#021D2;
-+entity("Ropf") -> 16#0211D;
-+entity("RoundImplies") -> 16#02970;
-+entity("Rrightarrow") -> 16#021DB;
-+entity("Rscr") -> 16#0211B;
-+entity("Rsh") -> 16#021B1;
-+entity("RuleDelayed") -> 16#029F4;
-+entity("SHCHcy") -> 16#00429;
-+entity("SHcy") -> 16#00428;
-+entity("SOFTcy") -> 16#0042C;
-+entity("Sacute") -> 16#0015A;
-+entity("Sc") -> 16#02ABC;
-+entity("Scaron") -> 16#00160;
-+entity("Scedil") -> 16#0015E;
-+entity("Scirc") -> 16#0015C;
-+entity("Scy") -> 16#00421;
-+entity("Sfr") -> 16#1D516;
-+entity("ShortDownArrow") -> 16#02193;
-+entity("ShortLeftArrow") -> 16#02190;
-+entity("ShortRightArrow") -> 16#02192;
-+entity("ShortUpArrow") -> 16#02191;
-+entity("Sigma") -> 16#003A3;
-+entity("SmallCircle") -> 16#02218;
-+entity("Sopf") -> 16#1D54A;
-+entity("Sqrt") -> 16#0221A;
-+entity("Square") -> 16#025A1;
-+entity("SquareIntersection") -> 16#02293;
-+entity("SquareSubset") -> 16#0228F;
-+entity("SquareSubsetEqual") -> 16#02291;
-+entity("SquareSuperset") -> 16#02290;
-+entity("SquareSupersetEqual") -> 16#02292;
-+entity("SquareUnion") -> 16#02294;
-+entity("Sscr") -> 16#1D4AE;
-+entity("Star") -> 16#022C6;
-+entity("Sub") -> 16#022D0;
-+entity("Subset") -> 16#022D0;
-+entity("SubsetEqual") -> 16#02286;
-+entity("Succeeds") -> 16#0227B;
-+entity("SucceedsEqual") -> 16#02AB0;
-+entity("SucceedsSlantEqual") -> 16#0227D;
-+entity("SucceedsTilde") -> 16#0227F;
-+entity("SuchThat") -> 16#0220B;
-+entity("Sum") -> 16#02211;
-+entity("Sup") -> 16#022D1;
-+entity("Superset") -> 16#02283;
-+entity("SupersetEqual") -> 16#02287;
-+entity("Supset") -> 16#022D1;
-+entity("THORN") -> 16#000DE;
-+entity("TRADE") -> 16#02122;
-+entity("TSHcy") -> 16#0040B;
-+entity("TScy") -> 16#00426;
-+entity("Tab") -> 16#00009;
-+entity("Tau") -> 16#003A4;
-+entity("Tcaron") -> 16#00164;
-+entity("Tcedil") -> 16#00162;
-+entity("Tcy") -> 16#00422;
-+entity("Tfr") -> 16#1D517;
-+entity("Therefore") -> 16#02234;
-+entity("Theta") -> 16#00398;
-+entity("ThickSpace") -> [16#0205F, 16#0200A];
-+entity("ThinSpace") -> 16#02009;
-+entity("Tilde") -> 16#0223C;
-+entity("TildeEqual") -> 16#02243;
-+entity("TildeFullEqual") -> 16#02245;
-+entity("TildeTilde") -> 16#02248;
-+entity("Topf") -> 16#1D54B;
-+entity("TripleDot") -> 16#020DB;
-+entity("Tscr") -> 16#1D4AF;
-+entity("Tstrok") -> 16#00166;
-+entity("Uacute") -> 16#000DA;
-+entity("Uarr") -> 16#0219F;
-+entity("Uarrocir") -> 16#02949;
-+entity("Ubrcy") -> 16#0040E;
-+entity("Ubreve") -> 16#0016C;
-+entity("Ucirc") -> 16#000DB;
-+entity("Ucy") -> 16#00423;
-+entity("Udblac") -> 16#00170;
-+entity("Ufr") -> 16#1D518;
-+entity("Ugrave") -> 16#000D9;
-+entity("Umacr") -> 16#0016A;
-+entity("UnderBar") -> 16#0005F;
-+entity("UnderBrace") -> 16#023DF;
-+entity("UnderBracket") -> 16#023B5;
-+entity("UnderParenthesis") -> 16#023DD;
-+entity("Union") -> 16#022C3;
-+entity("UnionPlus") -> 16#0228E;
-+entity("Uogon") -> 16#00172;
-+entity("Uopf") -> 16#1D54C;
-+entity("UpArrow") -> 16#02191;
-+entity("UpArrowBar") -> 16#02912;
-+entity("UpArrowDownArrow") -> 16#021C5;
-+entity("UpDownArrow") -> 16#02195;
-+entity("UpEquilibrium") -> 16#0296E;
-+entity("UpTee") -> 16#022A5;
-+entity("UpTeeArrow") -> 16#021A5;
-+entity("Uparrow") -> 16#021D1;
-+entity("Updownarrow") -> 16#021D5;
-+entity("UpperLeftArrow") -> 16#02196;
-+entity("UpperRightArrow") -> 16#02197;
-+entity("Upsi") -> 16#003D2;
-+entity("Upsilon") -> 16#003A5;
-+entity("Uring") -> 16#0016E;
-+entity("Uscr") -> 16#1D4B0;
-+entity("Utilde") -> 16#00168;
-+entity("Uuml") -> 16#000DC;
-+entity("VDash") -> 16#022AB;
-+entity("Vbar") -> 16#02AEB;
-+entity("Vcy") -> 16#00412;
-+entity("Vdash") -> 16#022A9;
-+entity("Vdashl") -> 16#02AE6;
-+entity("Vee") -> 16#022C1;
-+entity("Verbar") -> 16#02016;
-+entity("Vert") -> 16#02016;
-+entity("VerticalBar") -> 16#02223;
-+entity("VerticalLine") -> 16#0007C;
-+entity("VerticalSeparator") -> 16#02758;
-+entity("VerticalTilde") -> 16#02240;
-+entity("VeryThinSpace") -> 16#0200A;
-+entity("Vfr") -> 16#1D519;
-+entity("Vopf") -> 16#1D54D;
-+entity("Vscr") -> 16#1D4B1;
-+entity("Vvdash") -> 16#022AA;
-+entity("Wcirc") -> 16#00174;
-+entity("Wedge") -> 16#022C0;
-+entity("Wfr") -> 16#1D51A;
-+entity("Wopf") -> 16#1D54E;
-+entity("Wscr") -> 16#1D4B2;
-+entity("Xfr") -> 16#1D51B;
-+entity("Xi") -> 16#0039E;
-+entity("Xopf") -> 16#1D54F;
-+entity("Xscr") -> 16#1D4B3;
-+entity("YAcy") -> 16#0042F;
-+entity("YIcy") -> 16#00407;
-+entity("YUcy") -> 16#0042E;
-+entity("Yacute") -> 16#000DD;
-+entity("Ycirc") -> 16#00176;
-+entity("Ycy") -> 16#0042B;
-+entity("Yfr") -> 16#1D51C;
-+entity("Yopf") -> 16#1D550;
-+entity("Yscr") -> 16#1D4B4;
-+entity("Yuml") -> 16#00178;
-+entity("ZHcy") -> 16#00416;
-+entity("Zacute") -> 16#00179;
-+entity("Zcaron") -> 16#0017D;
-+entity("Zcy") -> 16#00417;
-+entity("Zdot") -> 16#0017B;
-+entity("ZeroWidthSpace") -> 16#0200B;
-+entity("Zeta") -> 16#00396;
-+entity("Zfr") -> 16#02128;
-+entity("Zopf") -> 16#02124;
-+entity("Zscr") -> 16#1D4B5;
-+entity("aacute") -> 16#000E1;
-+entity("abreve") -> 16#00103;
-+entity("ac") -> 16#0223E;
-+entity("acE") -> [16#0223E, 16#00333];
-+entity("acd") -> 16#0223F;
-+entity("acirc") -> 16#000E2;
-+entity("acute") -> 16#000B4;
-+entity("acy") -> 16#00430;
-+entity("aelig") -> 16#000E6;
-+entity("af") -> 16#02061;
-+entity("afr") -> 16#1D51E;
-+entity("agrave") -> 16#000E0;
-+entity("alefsym") -> 16#02135;
-+entity("aleph") -> 16#02135;
-+entity("alpha") -> 16#003B1;
-+entity("amacr") -> 16#00101;
-+entity("amalg") -> 16#02A3F;
-+entity("amp") -> 16#00026;
-+entity("and") -> 16#02227;
-+entity("andand") -> 16#02A55;
-+entity("andd") -> 16#02A5C;
-+entity("andslope") -> 16#02A58;
-+entity("andv") -> 16#02A5A;
-+entity("ang") -> 16#02220;
-+entity("ange") -> 16#029A4;
-+entity("angle") -> 16#02220;
-+entity("angmsd") -> 16#02221;
-+entity("angmsdaa") -> 16#029A8;
-+entity("angmsdab") -> 16#029A9;
-+entity("angmsdac") -> 16#029AA;
-+entity("angmsdad") -> 16#029AB;
-+entity("angmsdae") -> 16#029AC;
-+entity("angmsdaf") -> 16#029AD;
-+entity("angmsdag") -> 16#029AE;
-+entity("angmsdah") -> 16#029AF;
-+entity("angrt") -> 16#0221F;
-+entity("angrtvb") -> 16#022BE;
-+entity("angrtvbd") -> 16#0299D;
-+entity("angsph") -> 16#02222;
-+entity("angst") -> 16#000C5;
-+entity("angzarr") -> 16#0237C;
-+entity("aogon") -> 16#00105;
-+entity("aopf") -> 16#1D552;
-+entity("ap") -> 16#02248;
-+entity("apE") -> 16#02A70;
-+entity("apacir") -> 16#02A6F;
-+entity("ape") -> 16#0224A;
-+entity("apid") -> 16#0224B;
-+entity("apos") -> 16#00027;
-+entity("approx") -> 16#02248;
-+entity("approxeq") -> 16#0224A;
-+entity("aring") -> 16#000E5;
-+entity("ascr") -> 16#1D4B6;
-+entity("ast") -> 16#0002A;
-+entity("asymp") -> 16#02248;
-+entity("asympeq") -> 16#0224D;
-+entity("atilde") -> 16#000E3;
-+entity("auml") -> 16#000E4;
-+entity("awconint") -> 16#02233;
-+entity("awint") -> 16#02A11;
-+entity("bNot") -> 16#02AED;
-+entity("backcong") -> 16#0224C;
-+entity("backepsilon") -> 16#003F6;
-+entity("backprime") -> 16#02035;
-+entity("backsim") -> 16#0223D;
-+entity("backsimeq") -> 16#022CD;
-+entity("barvee") -> 16#022BD;
-+entity("barwed") -> 16#02305;
-+entity("barwedge") -> 16#02305;
-+entity("bbrk") -> 16#023B5;
-+entity("bbrktbrk") -> 16#023B6;
-+entity("bcong") -> 16#0224C;
-+entity("bcy") -> 16#00431;
-+entity("bdquo") -> 16#0201E;
-+entity("becaus") -> 16#02235;
-+entity("because") -> 16#02235;
-+entity("bemptyv") -> 16#029B0;
-+entity("bepsi") -> 16#003F6;
-+entity("bernou") -> 16#0212C;
-+entity("beta") -> 16#003B2;
-+entity("beth") -> 16#02136;
-+entity("between") -> 16#0226C;
-+entity("bfr") -> 16#1D51F;
-+entity("bigcap") -> 16#022C2;
-+entity("bigcirc") -> 16#025EF;
-+entity("bigcup") -> 16#022C3;
-+entity("bigodot") -> 16#02A00;
-+entity("bigoplus") -> 16#02A01;
-+entity("bigotimes") -> 16#02A02;
-+entity("bigsqcup") -> 16#02A06;
-+entity("bigstar") -> 16#02605;
-+entity("bigtriangledown") -> 16#025BD;
-+entity("bigtriangleup") -> 16#025B3;
-+entity("biguplus") -> 16#02A04;
-+entity("bigvee") -> 16#022C1;
-+entity("bigwedge") -> 16#022C0;
-+entity("bkarow") -> 16#0290D;
-+entity("blacklozenge") -> 16#029EB;
-+entity("blacksquare") -> 16#025AA;
-+entity("blacktriangle") -> 16#025B4;
-+entity("blacktriangledown") -> 16#025BE;
-+entity("blacktriangleleft") -> 16#025C2;
-+entity("blacktriangleright") -> 16#025B8;
-+entity("blank") -> 16#02423;
-+entity("blk12") -> 16#02592;
-+entity("blk14") -> 16#02591;
-+entity("blk34") -> 16#02593;
-+entity("block") -> 16#02588;
-+entity("bne") -> [16#0003D, 16#020E5];
-+entity("bnequiv") -> [16#02261, 16#020E5];
-+entity("bnot") -> 16#02310;
-+entity("bopf") -> 16#1D553;
-+entity("bot") -> 16#022A5;
-+entity("bottom") -> 16#022A5;
-+entity("bowtie") -> 16#022C8;
-+entity("boxDL") -> 16#02557;
-+entity("boxDR") -> 16#02554;
-+entity("boxDl") -> 16#02556;
-+entity("boxDr") -> 16#02553;
-+entity("boxH") -> 16#02550;
-+entity("boxHD") -> 16#02566;
-+entity("boxHU") -> 16#02569;
-+entity("boxHd") -> 16#02564;
-+entity("boxHu") -> 16#02567;
-+entity("boxUL") -> 16#0255D;
-+entity("boxUR") -> 16#0255A;
-+entity("boxUl") -> 16#0255C;
-+entity("boxUr") -> 16#02559;
-+entity("boxV") -> 16#02551;
-+entity("boxVH") -> 16#0256C;
-+entity("boxVL") -> 16#02563;
-+entity("boxVR") -> 16#02560;
-+entity("boxVh") -> 16#0256B;
-+entity("boxVl") -> 16#02562;
-+entity("boxVr") -> 16#0255F;
-+entity("boxbox") -> 16#029C9;
-+entity("boxdL") -> 16#02555;
-+entity("boxdR") -> 16#02552;
-+entity("boxdl") -> 16#02510;
-+entity("boxdr") -> 16#0250C;
-+entity("boxh") -> 16#02500;
-+entity("boxhD") -> 16#02565;
-+entity("boxhU") -> 16#02568;
-+entity("boxhd") -> 16#0252C;
-+entity("boxhu") -> 16#02534;
-+entity("boxminus") -> 16#0229F;
-+entity("boxplus") -> 16#0229E;
-+entity("boxtimes") -> 16#022A0;
-+entity("boxuL") -> 16#0255B;
-+entity("boxuR") -> 16#02558;
-+entity("boxul") -> 16#02518;
-+entity("boxur") -> 16#02514;
-+entity("boxv") -> 16#02502;
-+entity("boxvH") -> 16#0256A;
-+entity("boxvL") -> 16#02561;
-+entity("boxvR") -> 16#0255E;
-+entity("boxvh") -> 16#0253C;
-+entity("boxvl") -> 16#02524;
-+entity("boxvr") -> 16#0251C;
-+entity("bprime") -> 16#02035;
-+entity("breve") -> 16#002D8;
-+entity("brvbar") -> 16#000A6;
-+entity("bscr") -> 16#1D4B7;
-+entity("bsemi") -> 16#0204F;
-+entity("bsim") -> 16#0223D;
-+entity("bsime") -> 16#022CD;
-+entity("bsol") -> 16#0005C;
-+entity("bsolb") -> 16#029C5;
-+entity("bsolhsub") -> 16#027C8;
-+entity("bull") -> 16#02022;
-+entity("bullet") -> 16#02022;
-+entity("bump") -> 16#0224E;
-+entity("bumpE") -> 16#02AAE;
-+entity("bumpe") -> 16#0224F;
-+entity("bumpeq") -> 16#0224F;
-+entity("cacute") -> 16#00107;
-+entity("cap") -> 16#02229;
-+entity("capand") -> 16#02A44;
-+entity("capbrcup") -> 16#02A49;
-+entity("capcap") -> 16#02A4B;
-+entity("capcup") -> 16#02A47;
-+entity("capdot") -> 16#02A40;
-+entity("caps") -> [16#02229, 16#0FE00];
-+entity("caret") -> 16#02041;
-+entity("caron") -> 16#002C7;
-+entity("ccaps") -> 16#02A4D;
-+entity("ccaron") -> 16#0010D;
-+entity("ccedil") -> 16#000E7;
-+entity("ccirc") -> 16#00109;
-+entity("ccups") -> 16#02A4C;
-+entity("ccupssm") -> 16#02A50;
-+entity("cdot") -> 16#0010B;
-+entity("cedil") -> 16#000B8;
-+entity("cemptyv") -> 16#029B2;
-+entity("cent") -> 16#000A2;
-+entity("centerdot") -> 16#000B7;
-+entity("cfr") -> 16#1D520;
-+entity("chcy") -> 16#00447;
-+entity("check") -> 16#02713;
-+entity("checkmark") -> 16#02713;
-+entity("chi") -> 16#003C7;
-+entity("cir") -> 16#025CB;
-+entity("cirE") -> 16#029C3;
-+entity("circ") -> 16#002C6;
-+entity("circeq") -> 16#02257;
-+entity("circlearrowleft") -> 16#021BA;
-+entity("circlearrowright") -> 16#021BB;
-+entity("circledR") -> 16#000AE;
-+entity("circledS") -> 16#024C8;
-+entity("circledast") -> 16#0229B;
-+entity("circledcirc") -> 16#0229A;
-+entity("circleddash") -> 16#0229D;
-+entity("cire") -> 16#02257;
-+entity("cirfnint") -> 16#02A10;
-+entity("cirmid") -> 16#02AEF;
-+entity("cirscir") -> 16#029C2;
-+entity("clubs") -> 16#02663;
-+entity("clubsuit") -> 16#02663;
-+entity("colon") -> 16#0003A;
-+entity("colone") -> 16#02254;
-+entity("coloneq") -> 16#02254;
-+entity("comma") -> 16#0002C;
-+entity("commat") -> 16#00040;
-+entity("comp") -> 16#02201;
-+entity("compfn") -> 16#02218;
-+entity("complement") -> 16#02201;
-+entity("complexes") -> 16#02102;
-+entity("cong") -> 16#02245;
-+entity("congdot") -> 16#02A6D;
-+entity("conint") -> 16#0222E;
-+entity("copf") -> 16#1D554;
-+entity("coprod") -> 16#02210;
-+entity("copy") -> 16#000A9;
-+entity("copysr") -> 16#02117;
-+entity("crarr") -> 16#021B5;
-+entity("cross") -> 16#02717;
-+entity("cscr") -> 16#1D4B8;
-+entity("csub") -> 16#02ACF;
-+entity("csube") -> 16#02AD1;
-+entity("csup") -> 16#02AD0;
-+entity("csupe") -> 16#02AD2;
-+entity("ctdot") -> 16#022EF;
-+entity("cudarrl") -> 16#02938;
-+entity("cudarrr") -> 16#02935;
-+entity("cuepr") -> 16#022DE;
-+entity("cuesc") -> 16#022DF;
-+entity("cularr") -> 16#021B6;
-+entity("cularrp") -> 16#0293D;
-+entity("cup") -> 16#0222A;
-+entity("cupbrcap") -> 16#02A48;
-+entity("cupcap") -> 16#02A46;
-+entity("cupcup") -> 16#02A4A;
-+entity("cupdot") -> 16#0228D;
-+entity("cupor") -> 16#02A45;
-+entity("cups") -> [16#0222A, 16#0FE00];
-+entity("curarr") -> 16#021B7;
-+entity("curarrm") -> 16#0293C;
-+entity("curlyeqprec") -> 16#022DE;
-+entity("curlyeqsucc") -> 16#022DF;
-+entity("curlyvee") -> 16#022CE;
-+entity("curlywedge") -> 16#022CF;
-+entity("curren") -> 16#000A4;
-+entity("curvearrowleft") -> 16#021B6;
-+entity("curvearrowright") -> 16#021B7;
-+entity("cuvee") -> 16#022CE;
-+entity("cuwed") -> 16#022CF;
-+entity("cwconint") -> 16#02232;
-+entity("cwint") -> 16#02231;
-+entity("cylcty") -> 16#0232D;
-+entity("dArr") -> 16#021D3;
-+entity("dHar") -> 16#02965;
-+entity("dagger") -> 16#02020;
-+entity("daleth") -> 16#02138;
-+entity("darr") -> 16#02193;
-+entity("dash") -> 16#02010;
-+entity("dashv") -> 16#022A3;
-+entity("dbkarow") -> 16#0290F;
-+entity("dblac") -> 16#002DD;
-+entity("dcaron") -> 16#0010F;
-+entity("dcy") -> 16#00434;
-+entity("dd") -> 16#02146;
-+entity("ddagger") -> 16#02021;
-+entity("ddarr") -> 16#021CA;
-+entity("ddotseq") -> 16#02A77;
-+entity("deg") -> 16#000B0;
-+entity("delta") -> 16#003B4;
-+entity("demptyv") -> 16#029B1;
-+entity("dfisht") -> 16#0297F;
-+entity("dfr") -> 16#1D521;
-+entity("dharl") -> 16#021C3;
-+entity("dharr") -> 16#021C2;
-+entity("diam") -> 16#022C4;
-+entity("diamond") -> 16#022C4;
-+entity("diamondsuit") -> 16#02666;
-+entity("diams") -> 16#02666;
-+entity("die") -> 16#000A8;
-+entity("digamma") -> 16#003DD;
-+entity("disin") -> 16#022F2;
-+entity("div") -> 16#000F7;
-+entity("divide") -> 16#000F7;
-+entity("divideontimes") -> 16#022C7;
-+entity("divonx") -> 16#022C7;
-+entity("djcy") -> 16#00452;
-+entity("dlcorn") -> 16#0231E;
-+entity("dlcrop") -> 16#0230D;
-+entity("dollar") -> 16#00024;
-+entity("dopf") -> 16#1D555;
-+entity("dot") -> 16#002D9;
-+entity("doteq") -> 16#02250;
-+entity("doteqdot") -> 16#02251;
-+entity("dotminus") -> 16#02238;
-+entity("dotplus") -> 16#02214;
-+entity("dotsquare") -> 16#022A1;
-+entity("doublebarwedge") -> 16#02306;
-+entity("downarrow") -> 16#02193;
-+entity("downdownarrows") -> 16#021CA;
-+entity("downharpoonleft") -> 16#021C3;
-+entity("downharpoonright") -> 16#021C2;
-+entity("drbkarow") -> 16#02910;
-+entity("drcorn") -> 16#0231F;
-+entity("drcrop") -> 16#0230C;
-+entity("dscr") -> 16#1D4B9;
-+entity("dscy") -> 16#00455;
-+entity("dsol") -> 16#029F6;
-+entity("dstrok") -> 16#00111;
-+entity("dtdot") -> 16#022F1;
-+entity("dtri") -> 16#025BF;
-+entity("dtrif") -> 16#025BE;
-+entity("duarr") -> 16#021F5;
-+entity("duhar") -> 16#0296F;
-+entity("dwangle") -> 16#029A6;
-+entity("dzcy") -> 16#0045F;
-+entity("dzigrarr") -> 16#027FF;
-+entity("eDDot") -> 16#02A77;
-+entity("eDot") -> 16#02251;
-+entity("eacute") -> 16#000E9;
-+entity("easter") -> 16#02A6E;
-+entity("ecaron") -> 16#0011B;
-+entity("ecir") -> 16#02256;
-+entity("ecirc") -> 16#000EA;
-+entity("ecolon") -> 16#02255;
-+entity("ecy") -> 16#0044D;
-+entity("edot") -> 16#00117;
-+entity("ee") -> 16#02147;
-+entity("efDot") -> 16#02252;
-+entity("efr") -> 16#1D522;
-+entity("eg") -> 16#02A9A;
-+entity("egrave") -> 16#000E8;
-+entity("egs") -> 16#02A96;
-+entity("egsdot") -> 16#02A98;
-+entity("el") -> 16#02A99;
-+entity("elinters") -> 16#023E7;
-+entity("ell") -> 16#02113;
-+entity("els") -> 16#02A95;
-+entity("elsdot") -> 16#02A97;
-+entity("emacr") -> 16#00113;
-+entity("empty") -> 16#02205;
-+entity("emptyset") -> 16#02205;
-+entity("emptyv") -> 16#02205;
-+entity("emsp") -> 16#02003;
-+entity("emsp13") -> 16#02004;
-+entity("emsp14") -> 16#02005;
-+entity("eng") -> 16#0014B;
-+entity("ensp") -> 16#02002;
-+entity("eogon") -> 16#00119;
-+entity("eopf") -> 16#1D556;
-+entity("epar") -> 16#022D5;
-+entity("eparsl") -> 16#029E3;
-+entity("eplus") -> 16#02A71;
-+entity("epsi") -> 16#003B5;
-+entity("epsilon") -> 16#003B5;
-+entity("epsiv") -> 16#003F5;
-+entity("eqcirc") -> 16#02256;
-+entity("eqcolon") -> 16#02255;
-+entity("eqsim") -> 16#02242;
-+entity("eqslantgtr") -> 16#02A96;
-+entity("eqslantless") -> 16#02A95;
-+entity("equals") -> 16#0003D;
-+entity("equest") -> 16#0225F;
-+entity("equiv") -> 16#02261;
-+entity("equivDD") -> 16#02A78;
-+entity("eqvparsl") -> 16#029E5;
-+entity("erDot") -> 16#02253;
-+entity("erarr") -> 16#02971;
-+entity("escr") -> 16#0212F;
-+entity("esdot") -> 16#02250;
-+entity("esim") -> 16#02242;
-+entity("eta") -> 16#003B7;
-+entity("eth") -> 16#000F0;
-+entity("euml") -> 16#000EB;
-+entity("euro") -> 16#020AC;
-+entity("excl") -> 16#00021;
-+entity("exist") -> 16#02203;
-+entity("expectation") -> 16#02130;
-+entity("exponentiale") -> 16#02147;
-+entity("fallingdotseq") -> 16#02252;
-+entity("fcy") -> 16#00444;
-+entity("female") -> 16#02640;
-+entity("ffilig") -> 16#0FB03;
-+entity("fflig") -> 16#0FB00;
-+entity("ffllig") -> 16#0FB04;
-+entity("ffr") -> 16#1D523;
-+entity("filig") -> 16#0FB01;
-+entity("fjlig") -> [16#00066, 16#0006A];
-+entity("flat") -> 16#0266D;
-+entity("fllig") -> 16#0FB02;
-+entity("fltns") -> 16#025B1;
-+entity("fnof") -> 16#00192;
-+entity("fopf") -> 16#1D557;
-+entity("forall") -> 16#02200;
-+entity("fork") -> 16#022D4;
-+entity("forkv") -> 16#02AD9;
-+entity("fpartint") -> 16#02A0D;
-+entity("frac12") -> 16#000BD;
-+entity("frac13") -> 16#02153;
-+entity("frac14") -> 16#000BC;
-+entity("frac15") -> 16#02155;
-+entity("frac16") -> 16#02159;
-+entity("frac18") -> 16#0215B;
-+entity("frac23") -> 16#02154;
-+entity("frac25") -> 16#02156;
-+entity("frac34") -> 16#000BE;
-+entity("frac35") -> 16#02157;
-+entity("frac38") -> 16#0215C;
-+entity("frac45") -> 16#02158;
-+entity("frac56") -> 16#0215A;
-+entity("frac58") -> 16#0215D;
-+entity("frac78") -> 16#0215E;
-+entity("frasl") -> 16#02044;
-+entity("frown") -> 16#02322;
-+entity("fscr") -> 16#1D4BB;
-+entity("gE") -> 16#02267;
-+entity("gEl") -> 16#02A8C;
-+entity("gacute") -> 16#001F5;
-+entity("gamma") -> 16#003B3;
-+entity("gammad") -> 16#003DD;
-+entity("gap") -> 16#02A86;
-+entity("gbreve") -> 16#0011F;
-+entity("gcirc") -> 16#0011D;
-+entity("gcy") -> 16#00433;
-+entity("gdot") -> 16#00121;
-+entity("ge") -> 16#02265;
-+entity("gel") -> 16#022DB;
-+entity("geq") -> 16#02265;
-+entity("geqq") -> 16#02267;
-+entity("geqslant") -> 16#02A7E;
-+entity("ges") -> 16#02A7E;
-+entity("gescc") -> 16#02AA9;
-+entity("gesdot") -> 16#02A80;
-+entity("gesdoto") -> 16#02A82;
-+entity("gesdotol") -> 16#02A84;
-+entity("gesl") -> [16#022DB, 16#0FE00];
-+entity("gesles") -> 16#02A94;
-+entity("gfr") -> 16#1D524;
-+entity("gg") -> 16#0226B;
-+entity("ggg") -> 16#022D9;
-+entity("gimel") -> 16#02137;
-+entity("gjcy") -> 16#00453;
-+entity("gl") -> 16#02277;
-+entity("glE") -> 16#02A92;
-+entity("gla") -> 16#02AA5;
-+entity("glj") -> 16#02AA4;
-+entity("gnE") -> 16#02269;
-+entity("gnap") -> 16#02A8A;
-+entity("gnapprox") -> 16#02A8A;
-+entity("gne") -> 16#02A88;
-+entity("gneq") -> 16#02A88;
-+entity("gneqq") -> 16#02269;
-+entity("gnsim") -> 16#022E7;
-+entity("gopf") -> 16#1D558;
-+entity("grave") -> 16#00060;
-+entity("gscr") -> 16#0210A;
-+entity("gsim") -> 16#02273;
-+entity("gsime") -> 16#02A8E;
-+entity("gsiml") -> 16#02A90;
-+entity("gt") -> 16#0003E;
-+entity("gtcc") -> 16#02AA7;
-+entity("gtcir") -> 16#02A7A;
-+entity("gtdot") -> 16#022D7;
-+entity("gtlPar") -> 16#02995;
-+entity("gtquest") -> 16#02A7C;
-+entity("gtrapprox") -> 16#02A86;
-+entity("gtrarr") -> 16#02978;
-+entity("gtrdot") -> 16#022D7;
-+entity("gtreqless") -> 16#022DB;
-+entity("gtreqqless") -> 16#02A8C;
-+entity("gtrless") -> 16#02277;
-+entity("gtrsim") -> 16#02273;
-+entity("gvertneqq") -> [16#02269, 16#0FE00];
-+entity("gvnE") -> [16#02269, 16#0FE00];
-+entity("hArr") -> 16#021D4;
-+entity("hairsp") -> 16#0200A;
-+entity("half") -> 16#000BD;
-+entity("hamilt") -> 16#0210B;
-+entity("hardcy") -> 16#0044A;
-+entity("harr") -> 16#02194;
-+entity("harrcir") -> 16#02948;
-+entity("harrw") -> 16#021AD;
-+entity("hbar") -> 16#0210F;
-+entity("hcirc") -> 16#00125;
-+entity("hearts") -> 16#02665;
-+entity("heartsuit") -> 16#02665;
-+entity("hellip") -> 16#02026;
-+entity("hercon") -> 16#022B9;
-+entity("hfr") -> 16#1D525;
-+entity("hksearow") -> 16#02925;
-+entity("hkswarow") -> 16#02926;
-+entity("hoarr") -> 16#021FF;
-+entity("homtht") -> 16#0223B;
-+entity("hookleftarrow") -> 16#021A9;
-+entity("hookrightarrow") -> 16#021AA;
-+entity("hopf") -> 16#1D559;
-+entity("horbar") -> 16#02015;
-+entity("hscr") -> 16#1D4BD;
-+entity("hslash") -> 16#0210F;
-+entity("hstrok") -> 16#00127;
-+entity("hybull") -> 16#02043;
-+entity("hyphen") -> 16#02010;
-+entity("iacute") -> 16#000ED;
-+entity("ic") -> 16#02063;
-+entity("icirc") -> 16#000EE;
-+entity("icy") -> 16#00438;
-+entity("iecy") -> 16#00435;
-+entity("iexcl") -> 16#000A1;
-+entity("iff") -> 16#021D4;
-+entity("ifr") -> 16#1D526;
-+entity("igrave") -> 16#000EC;
-+entity("ii") -> 16#02148;
-+entity("iiiint") -> 16#02A0C;
-+entity("iiint") -> 16#0222D;
-+entity("iinfin") -> 16#029DC;
-+entity("iiota") -> 16#02129;
-+entity("ijlig") -> 16#00133;
-+entity("imacr") -> 16#0012B;
-+entity("image") -> 16#02111;
-+entity("imagline") -> 16#02110;
-+entity("imagpart") -> 16#02111;
-+entity("imath") -> 16#00131;
-+entity("imof") -> 16#022B7;
-+entity("imped") -> 16#001B5;
-+entity("in") -> 16#02208;
-+entity("incare") -> 16#02105;
-+entity("infin") -> 16#0221E;
-+entity("infintie") -> 16#029DD;
-+entity("inodot") -> 16#00131;
-+entity("int") -> 16#0222B;
-+entity("intcal") -> 16#022BA;
-+entity("integers") -> 16#02124;
-+entity("intercal") -> 16#022BA;
-+entity("intlarhk") -> 16#02A17;
-+entity("intprod") -> 16#02A3C;
-+entity("iocy") -> 16#00451;
-+entity("iogon") -> 16#0012F;
-+entity("iopf") -> 16#1D55A;
-+entity("iota") -> 16#003B9;
-+entity("iprod") -> 16#02A3C;
-+entity("iquest") -> 16#000BF;
-+entity("iscr") -> 16#1D4BE;
-+entity("isin") -> 16#02208;
-+entity("isinE") -> 16#022F9;
-+entity("isindot") -> 16#022F5;
-+entity("isins") -> 16#022F4;
-+entity("isinsv") -> 16#022F3;
-+entity("isinv") -> 16#02208;
-+entity("it") -> 16#02062;
-+entity("itilde") -> 16#00129;
-+entity("iukcy") -> 16#00456;
-+entity("iuml") -> 16#000EF;
-+entity("jcirc") -> 16#00135;
-+entity("jcy") -> 16#00439;
-+entity("jfr") -> 16#1D527;
-+entity("jmath") -> 16#00237;
-+entity("jopf") -> 16#1D55B;
-+entity("jscr") -> 16#1D4BF;
-+entity("jsercy") -> 16#00458;
-+entity("jukcy") -> 16#00454;
-+entity("kappa") -> 16#003BA;
-+entity("kappav") -> 16#003F0;
-+entity("kcedil") -> 16#00137;
-+entity("kcy") -> 16#0043A;
-+entity("kfr") -> 16#1D528;
-+entity("kgreen") -> 16#00138;
-+entity("khcy") -> 16#00445;
-+entity("kjcy") -> 16#0045C;
-+entity("kopf") -> 16#1D55C;
-+entity("kscr") -> 16#1D4C0;
-+entity("lAarr") -> 16#021DA;
-+entity("lArr") -> 16#021D0;
-+entity("lAtail") -> 16#0291B;
-+entity("lBarr") -> 16#0290E;
-+entity("lE") -> 16#02266;
-+entity("lEg") -> 16#02A8B;
-+entity("lHar") -> 16#02962;
-+entity("lacute") -> 16#0013A;
-+entity("laemptyv") -> 16#029B4;
-+entity("lagran") -> 16#02112;
-+entity("lambda") -> 16#003BB;
-+entity("lang") -> 16#027E8;
-+entity("langd") -> 16#02991;
-+entity("langle") -> 16#027E8;
-+entity("lap") -> 16#02A85;
-+entity("laquo") -> 16#000AB;
-+entity("larr") -> 16#02190;
-+entity("larrb") -> 16#021E4;
-+entity("larrbfs") -> 16#0291F;
-+entity("larrfs") -> 16#0291D;
-+entity("larrhk") -> 16#021A9;
-+entity("larrlp") -> 16#021AB;
-+entity("larrpl") -> 16#02939;
-+entity("larrsim") -> 16#02973;
-+entity("larrtl") -> 16#021A2;
-+entity("lat") -> 16#02AAB;
-+entity("latail") -> 16#02919;
-+entity("late") -> 16#02AAD;
-+entity("lates") -> [16#02AAD, 16#0FE00];
-+entity("lbarr") -> 16#0290C;
-+entity("lbbrk") -> 16#02772;
-+entity("lbrace") -> 16#0007B;
-+entity("lbrack") -> 16#0005B;
-+entity("lbrke") -> 16#0298B;
-+entity("lbrksld") -> 16#0298F;
-+entity("lbrkslu") -> 16#0298D;
-+entity("lcaron") -> 16#0013E;
-+entity("lcedil") -> 16#0013C;
-+entity("lceil") -> 16#02308;
-+entity("lcub") -> 16#0007B;
-+entity("lcy") -> 16#0043B;
-+entity("ldca") -> 16#02936;
-+entity("ldquo") -> 16#0201C;
-+entity("ldquor") -> 16#0201E;
-+entity("ldrdhar") -> 16#02967;
-+entity("ldrushar") -> 16#0294B;
-+entity("ldsh") -> 16#021B2;
-+entity("le") -> 16#02264;
-+entity("leftarrow") -> 16#02190;
-+entity("leftarrowtail") -> 16#021A2;
-+entity("leftharpoondown") -> 16#021BD;
-+entity("leftharpoonup") -> 16#021BC;
-+entity("leftleftarrows") -> 16#021C7;
-+entity("leftrightarrow") -> 16#02194;
-+entity("leftrightarrows") -> 16#021C6;
-+entity("leftrightharpoons") -> 16#021CB;
-+entity("leftrightsquigarrow") -> 16#021AD;
-+entity("leftthreetimes") -> 16#022CB;
-+entity("leg") -> 16#022DA;
-+entity("leq") -> 16#02264;
-+entity("leqq") -> 16#02266;
-+entity("leqslant") -> 16#02A7D;
-+entity("les") -> 16#02A7D;
-+entity("lescc") -> 16#02AA8;
-+entity("lesdot") -> 16#02A7F;
-+entity("lesdoto") -> 16#02A81;
-+entity("lesdotor") -> 16#02A83;
-+entity("lesg") -> [16#022DA, 16#0FE00];
-+entity("lesges") -> 16#02A93;
-+entity("lessapprox") -> 16#02A85;
-+entity("lessdot") -> 16#022D6;
-+entity("lesseqgtr") -> 16#022DA;
-+entity("lesseqqgtr") -> 16#02A8B;
-+entity("lessgtr") -> 16#02276;
-+entity("lesssim") -> 16#02272;
-+entity("lfisht") -> 16#0297C;
-+entity("lfloor") -> 16#0230A;
-+entity("lfr") -> 16#1D529;
-+entity("lg") -> 16#02276;
-+entity("lgE") -> 16#02A91;
-+entity("lhard") -> 16#021BD;
-+entity("lharu") -> 16#021BC;
-+entity("lharul") -> 16#0296A;
-+entity("lhblk") -> 16#02584;
-+entity("ljcy") -> 16#00459;
-+entity("ll") -> 16#0226A;
-+entity("llarr") -> 16#021C7;
-+entity("llcorner") -> 16#0231E;
-+entity("llhard") -> 16#0296B;
-+entity("lltri") -> 16#025FA;
-+entity("lmidot") -> 16#00140;
-+entity("lmoust") -> 16#023B0;
-+entity("lmoustache") -> 16#023B0;
-+entity("lnE") -> 16#02268;
-+entity("lnap") -> 16#02A89;
-+entity("lnapprox") -> 16#02A89;
-+entity("lne") -> 16#02A87;
-+entity("lneq") -> 16#02A87;
-+entity("lneqq") -> 16#02268;
-+entity("lnsim") -> 16#022E6;
-+entity("loang") -> 16#027EC;
-+entity("loarr") -> 16#021FD;
-+entity("lobrk") -> 16#027E6;
-+entity("longleftarrow") -> 16#027F5;
-+entity("longleftrightarrow") -> 16#027F7;
-+entity("longmapsto") -> 16#027FC;
-+entity("longrightarrow") -> 16#027F6;
-+entity("looparrowleft") -> 16#021AB;
-+entity("looparrowright") -> 16#021AC;
-+entity("lopar") -> 16#02985;
-+entity("lopf") -> 16#1D55D;
-+entity("loplus") -> 16#02A2D;
-+entity("lotimes") -> 16#02A34;
-+entity("lowast") -> 16#02217;
-+entity("lowbar") -> 16#0005F;
-+entity("loz") -> 16#025CA;
-+entity("lozenge") -> 16#025CA;
-+entity("lozf") -> 16#029EB;
-+entity("lpar") -> 16#00028;
-+entity("lparlt") -> 16#02993;
-+entity("lrarr") -> 16#021C6;
-+entity("lrcorner") -> 16#0231F;
-+entity("lrhar") -> 16#021CB;
-+entity("lrhard") -> 16#0296D;
-+entity("lrm") -> 16#0200E;
-+entity("lrtri") -> 16#022BF;
-+entity("lsaquo") -> 16#02039;
-+entity("lscr") -> 16#1D4C1;
-+entity("lsh") -> 16#021B0;
-+entity("lsim") -> 16#02272;
-+entity("lsime") -> 16#02A8D;
-+entity("lsimg") -> 16#02A8F;
-+entity("lsqb") -> 16#0005B;
-+entity("lsquo") -> 16#02018;
-+entity("lsquor") -> 16#0201A;
-+entity("lstrok") -> 16#00142;
-+entity("lt") -> 16#0003C;
-+entity("ltcc") -> 16#02AA6;
-+entity("ltcir") -> 16#02A79;
-+entity("ltdot") -> 16#022D6;
-+entity("lthree") -> 16#022CB;
-+entity("ltimes") -> 16#022C9;
-+entity("ltlarr") -> 16#02976;
-+entity("ltquest") -> 16#02A7B;
-+entity("ltrPar") -> 16#02996;
-+entity("ltri") -> 16#025C3;
-+entity("ltrie") -> 16#022B4;
-+entity("ltrif") -> 16#025C2;
-+entity("lurdshar") -> 16#0294A;
-+entity("luruhar") -> 16#02966;
-+entity("lvertneqq") -> [16#02268, 16#0FE00];
-+entity("lvnE") -> [16#02268, 16#0FE00];
-+entity("mDDot") -> 16#0223A;
-+entity("macr") -> 16#000AF;
-+entity("male") -> 16#02642;
-+entity("malt") -> 16#02720;
-+entity("maltese") -> 16#02720;
-+entity("map") -> 16#021A6;
-+entity("mapsto") -> 16#021A6;
-+entity("mapstodown") -> 16#021A7;
-+entity("mapstoleft") -> 16#021A4;
-+entity("mapstoup") -> 16#021A5;
-+entity("marker") -> 16#025AE;
-+entity("mcomma") -> 16#02A29;
-+entity("mcy") -> 16#0043C;
-+entity("mdash") -> 16#02014;
-+entity("measuredangle") -> 16#02221;
-+entity("mfr") -> 16#1D52A;
-+entity("mho") -> 16#02127;
-+entity("micro") -> 16#000B5;
-+entity("mid") -> 16#02223;
-+entity("midast") -> 16#0002A;
-+entity("midcir") -> 16#02AF0;
-+entity("middot") -> 16#000B7;
-+entity("minus") -> 16#02212;
-+entity("minusb") -> 16#0229F;
-+entity("minusd") -> 16#02238;
-+entity("minusdu") -> 16#02A2A;
-+entity("mlcp") -> 16#02ADB;
-+entity("mldr") -> 16#02026;
-+entity("mnplus") -> 16#02213;
-+entity("models") -> 16#022A7;
-+entity("mopf") -> 16#1D55E;
-+entity("mp") -> 16#02213;
-+entity("mscr") -> 16#1D4C2;
-+entity("mstpos") -> 16#0223E;
-+entity("mu") -> 16#003BC;
-+entity("multimap") -> 16#022B8;
-+entity("mumap") -> 16#022B8;
-+entity("nGg") -> [16#022D9, 16#00338];
-+entity("nGt") -> [16#0226B, 16#020D2];
-+entity("nGtv") -> [16#0226B, 16#00338];
-+entity("nLeftarrow") -> 16#021CD;
-+entity("nLeftrightarrow") -> 16#021CE;
-+entity("nLl") -> [16#022D8, 16#00338];
-+entity("nLt") -> [16#0226A, 16#020D2];
-+entity("nLtv") -> [16#0226A, 16#00338];
-+entity("nRightarrow") -> 16#021CF;
-+entity("nVDash") -> 16#022AF;
-+entity("nVdash") -> 16#022AE;
-+entity("nabla") -> 16#02207;
-+entity("nacute") -> 16#00144;
-+entity("nang") -> [16#02220, 16#020D2];
-+entity("nap") -> 16#02249;
-+entity("napE") -> [16#02A70, 16#00338];
-+entity("napid") -> [16#0224B, 16#00338];
-+entity("napos") -> 16#00149;
-+entity("napprox") -> 16#02249;
-+entity("natur") -> 16#0266E;
-+entity("natural") -> 16#0266E;
-+entity("naturals") -> 16#02115;
-+entity("nbsp") -> 16#000A0;
-+entity("nbump") -> [16#0224E, 16#00338];
-+entity("nbumpe") -> [16#0224F, 16#00338];
-+entity("ncap") -> 16#02A43;
-+entity("ncaron") -> 16#00148;
-+entity("ncedil") -> 16#00146;
-+entity("ncong") -> 16#02247;
-+entity("ncongdot") -> [16#02A6D, 16#00338];
-+entity("ncup") -> 16#02A42;
-+entity("ncy") -> 16#0043D;
-+entity("ndash") -> 16#02013;
-+entity("ne") -> 16#02260;
-+entity("neArr") -> 16#021D7;
-+entity("nearhk") -> 16#02924;
-+entity("nearr") -> 16#02197;
-+entity("nearrow") -> 16#02197;
-+entity("nedot") -> [16#02250, 16#00338];
-+entity("nequiv") -> 16#02262;
-+entity("nesear") -> 16#02928;
-+entity("nesim") -> [16#02242, 16#00338];
-+entity("nexist") -> 16#02204;
-+entity("nexists") -> 16#02204;
-+entity("nfr") -> 16#1D52B;
-+entity("ngE") -> [16#02267, 16#00338];
-+entity("nge") -> 16#02271;
-+entity("ngeq") -> 16#02271;
-+entity("ngeqq") -> [16#02267, 16#00338];
-+entity("ngeqslant") -> [16#02A7E, 16#00338];
-+entity("nges") -> [16#02A7E, 16#00338];
-+entity("ngsim") -> 16#02275;
-+entity("ngt") -> 16#0226F;
-+entity("ngtr") -> 16#0226F;
-+entity("nhArr") -> 16#021CE;
-+entity("nharr") -> 16#021AE;
-+entity("nhpar") -> 16#02AF2;
-+entity("ni") -> 16#0220B;
-+entity("nis") -> 16#022FC;
-+entity("nisd") -> 16#022FA;
-+entity("niv") -> 16#0220B;
-+entity("njcy") -> 16#0045A;
-+entity("nlArr") -> 16#021CD;
-+entity("nlE") -> [16#02266, 16#00338];
-+entity("nlarr") -> 16#0219A;
-+entity("nldr") -> 16#02025;
-+entity("nle") -> 16#02270;
-+entity("nleftarrow") -> 16#0219A;
-+entity("nleftrightarrow") -> 16#021AE;
-+entity("nleq") -> 16#02270;
-+entity("nleqq") -> [16#02266, 16#00338];
-+entity("nleqslant") -> [16#02A7D, 16#00338];
-+entity("nles") -> [16#02A7D, 16#00338];
-+entity("nless") -> 16#0226E;
-+entity("nlsim") -> 16#02274;
-+entity("nlt") -> 16#0226E;
-+entity("nltri") -> 16#022EA;
-+entity("nltrie") -> 16#022EC;
-+entity("nmid") -> 16#02224;
-+entity("nopf") -> 16#1D55F;
-+entity("not") -> 16#000AC;
-+entity("notin") -> 16#02209;
-+entity("notinE") -> [16#022F9, 16#00338];
-+entity("notindot") -> [16#022F5, 16#00338];
-+entity("notinva") -> 16#02209;
-+entity("notinvb") -> 16#022F7;
-+entity("notinvc") -> 16#022F6;
-+entity("notni") -> 16#0220C;
-+entity("notniva") -> 16#0220C;
-+entity("notnivb") -> 16#022FE;
-+entity("notnivc") -> 16#022FD;
-+entity("npar") -> 16#02226;
-+entity("nparallel") -> 16#02226;
-+entity("nparsl") -> [16#02AFD, 16#020E5];
-+entity("npart") -> [16#02202, 16#00338];
-+entity("npolint") -> 16#02A14;
-+entity("npr") -> 16#02280;
-+entity("nprcue") -> 16#022E0;
-+entity("npre") -> [16#02AAF, 16#00338];
-+entity("nprec") -> 16#02280;
-+entity("npreceq") -> [16#02AAF, 16#00338];
-+entity("nrArr") -> 16#021CF;
-+entity("nrarr") -> 16#0219B;
-+entity("nrarrc") -> [16#02933, 16#00338];
-+entity("nrarrw") -> [16#0219D, 16#00338];
-+entity("nrightarrow") -> 16#0219B;
-+entity("nrtri") -> 16#022EB;
-+entity("nrtrie") -> 16#022ED;
-+entity("nsc") -> 16#02281;
-+entity("nsccue") -> 16#022E1;
-+entity("nsce") -> [16#02AB0, 16#00338];
-+entity("nscr") -> 16#1D4C3;
-+entity("nshortmid") -> 16#02224;
-+entity("nshortparallel") -> 16#02226;
-+entity("nsim") -> 16#02241;
-+entity("nsime") -> 16#02244;
-+entity("nsimeq") -> 16#02244;
-+entity("nsmid") -> 16#02224;
-+entity("nspar") -> 16#02226;
-+entity("nsqsube") -> 16#022E2;
-+entity("nsqsupe") -> 16#022E3;
-+entity("nsub") -> 16#02284;
-+entity("nsubE") -> [16#02AC5, 16#00338];
-+entity("nsube") -> 16#02288;
-+entity("nsubset") -> [16#02282, 16#020D2];
-+entity("nsubseteq") -> 16#02288;
-+entity("nsubseteqq") -> [16#02AC5, 16#00338];
-+entity("nsucc") -> 16#02281;
-+entity("nsucceq") -> [16#02AB0, 16#00338];
-+entity("nsup") -> 16#02285;
-+entity("nsupE") -> [16#02AC6, 16#00338];
-+entity("nsupe") -> 16#02289;
-+entity("nsupset") -> [16#02283, 16#020D2];
-+entity("nsupseteq") -> 16#02289;
-+entity("nsupseteqq") -> [16#02AC6, 16#00338];
-+entity("ntgl") -> 16#02279;
-+entity("ntilde") -> 16#000F1;
-+entity("ntlg") -> 16#02278;
-+entity("ntriangleleft") -> 16#022EA;
-+entity("ntrianglelefteq") -> 16#022EC;
-+entity("ntriangleright") -> 16#022EB;
-+entity("ntrianglerighteq") -> 16#022ED;
-+entity("nu") -> 16#003BD;
-+entity("num") -> 16#00023;
-+entity("numero") -> 16#02116;
-+entity("numsp") -> 16#02007;
-+entity("nvDash") -> 16#022AD;
-+entity("nvHarr") -> 16#02904;
-+entity("nvap") -> [16#0224D, 16#020D2];
-+entity("nvdash") -> 16#022AC;
-+entity("nvge") -> [16#02265, 16#020D2];
-+entity("nvgt") -> [16#0003E, 16#020D2];
-+entity("nvinfin") -> 16#029DE;
-+entity("nvlArr") -> 16#02902;
-+entity("nvle") -> [16#02264, 16#020D2];
-+entity("nvlt") -> [16#0003C, 16#020D2];
-+entity("nvltrie") -> [16#022B4, 16#020D2];
-+entity("nvrArr") -> 16#02903;
-+entity("nvrtrie") -> [16#022B5, 16#020D2];
-+entity("nvsim") -> [16#0223C, 16#020D2];
-+entity("nwArr") -> 16#021D6;
-+entity("nwarhk") -> 16#02923;
-+entity("nwarr") -> 16#02196;
-+entity("nwarrow") -> 16#02196;
-+entity("nwnear") -> 16#02927;
-+entity("oS") -> 16#024C8;
-+entity("oacute") -> 16#000F3;
-+entity("oast") -> 16#0229B;
-+entity("ocir") -> 16#0229A;
-+entity("ocirc") -> 16#000F4;
-+entity("ocy") -> 16#0043E;
-+entity("odash") -> 16#0229D;
-+entity("odblac") -> 16#00151;
-+entity("odiv") -> 16#02A38;
-+entity("odot") -> 16#02299;
-+entity("odsold") -> 16#029BC;
-+entity("oelig") -> 16#00153;
-+entity("ofcir") -> 16#029BF;
-+entity("ofr") -> 16#1D52C;
-+entity("ogon") -> 16#002DB;
-+entity("ograve") -> 16#000F2;
-+entity("ogt") -> 16#029C1;
-+entity("ohbar") -> 16#029B5;
-+entity("ohm") -> 16#003A9;
-+entity("oint") -> 16#0222E;
-+entity("olarr") -> 16#021BA;
-+entity("olcir") -> 16#029BE;
-+entity("olcross") -> 16#029BB;
-+entity("oline") -> 16#0203E;
-+entity("olt") -> 16#029C0;
-+entity("omacr") -> 16#0014D;
-+entity("omega") -> 16#003C9;
-+entity("omicron") -> 16#003BF;
-+entity("omid") -> 16#029B6;
-+entity("ominus") -> 16#02296;
-+entity("oopf") -> 16#1D560;
-+entity("opar") -> 16#029B7;
-+entity("operp") -> 16#029B9;
-+entity("oplus") -> 16#02295;
-+entity("or") -> 16#02228;
-+entity("orarr") -> 16#021BB;
-+entity("ord") -> 16#02A5D;
-+entity("order") -> 16#02134;
-+entity("orderof") -> 16#02134;
-+entity("ordf") -> 16#000AA;
-+entity("ordm") -> 16#000BA;
-+entity("origof") -> 16#022B6;
-+entity("oror") -> 16#02A56;
-+entity("orslope") -> 16#02A57;
-+entity("orv") -> 16#02A5B;
-+entity("oscr") -> 16#02134;
-+entity("oslash") -> 16#000F8;
-+entity("osol") -> 16#02298;
-+entity("otilde") -> 16#000F5;
-+entity("otimes") -> 16#02297;
-+entity("otimesas") -> 16#02A36;
-+entity("ouml") -> 16#000F6;
-+entity("ovbar") -> 16#0233D;
-+entity("par") -> 16#02225;
-+entity("para") -> 16#000B6;
-+entity("parallel") -> 16#02225;
-+entity("parsim") -> 16#02AF3;
-+entity("parsl") -> 16#02AFD;
-+entity("part") -> 16#02202;
-+entity("pcy") -> 16#0043F;
-+entity("percnt") -> 16#00025;
-+entity("period") -> 16#0002E;
-+entity("permil") -> 16#02030;
-+entity("perp") -> 16#022A5;
-+entity("pertenk") -> 16#02031;
-+entity("pfr") -> 16#1D52D;
-+entity("phi") -> 16#003C6;
-+entity("phiv") -> 16#003D5;
-+entity("phmmat") -> 16#02133;
-+entity("phone") -> 16#0260E;
-+entity("pi") -> 16#003C0;
-+entity("pitchfork") -> 16#022D4;
-+entity("piv") -> 16#003D6;
-+entity("planck") -> 16#0210F;
-+entity("planckh") -> 16#0210E;
-+entity("plankv") -> 16#0210F;
-+entity("plus") -> 16#0002B;
-+entity("plusacir") -> 16#02A23;
-+entity("plusb") -> 16#0229E;
-+entity("pluscir") -> 16#02A22;
-+entity("plusdo") -> 16#02214;
-+entity("plusdu") -> 16#02A25;
-+entity("pluse") -> 16#02A72;
-+entity("plusmn") -> 16#000B1;
-+entity("plussim") -> 16#02A26;
-+entity("plustwo") -> 16#02A27;
-+entity("pm") -> 16#000B1;
-+entity("pointint") -> 16#02A15;
-+entity("popf") -> 16#1D561;
-+entity("pound") -> 16#000A3;
-+entity("pr") -> 16#0227A;
-+entity("prE") -> 16#02AB3;
-+entity("prap") -> 16#02AB7;
-+entity("prcue") -> 16#0227C;
-+entity("pre") -> 16#02AAF;
-+entity("prec") -> 16#0227A;
-+entity("precapprox") -> 16#02AB7;
-+entity("preccurlyeq") -> 16#0227C;
-+entity("preceq") -> 16#02AAF;
-+entity("precnapprox") -> 16#02AB9;
-+entity("precneqq") -> 16#02AB5;
-+entity("precnsim") -> 16#022E8;
-+entity("precsim") -> 16#0227E;
-+entity("prime") -> 16#02032;
-+entity("primes") -> 16#02119;
-+entity("prnE") -> 16#02AB5;
-+entity("prnap") -> 16#02AB9;
-+entity("prnsim") -> 16#022E8;
-+entity("prod") -> 16#0220F;
-+entity("profalar") -> 16#0232E;
-+entity("profline") -> 16#02312;
-+entity("profsurf") -> 16#02313;
-+entity("prop") -> 16#0221D;
-+entity("propto") -> 16#0221D;
-+entity("prsim") -> 16#0227E;
-+entity("prurel") -> 16#022B0;
-+entity("pscr") -> 16#1D4C5;
-+entity("psi") -> 16#003C8;
-+entity("puncsp") -> 16#02008;
-+entity("qfr") -> 16#1D52E;
-+entity("qint") -> 16#02A0C;
-+entity("qopf") -> 16#1D562;
-+entity("qprime") -> 16#02057;
-+entity("qscr") -> 16#1D4C6;
-+entity("quaternions") -> 16#0210D;
-+entity("quatint") -> 16#02A16;
-+entity("quest") -> 16#0003F;
-+entity("questeq") -> 16#0225F;
-+entity("quot") -> 16#00022;
-+entity("rAarr") -> 16#021DB;
-+entity("rArr") -> 16#021D2;
-+entity("rAtail") -> 16#0291C;
-+entity("rBarr") -> 16#0290F;
-+entity("rHar") -> 16#02964;
-+entity("race") -> [16#0223D, 16#00331];
-+entity("racute") -> 16#00155;
-+entity("radic") -> 16#0221A;
-+entity("raemptyv") -> 16#029B3;
-+entity("rang") -> 16#027E9;
-+entity("rangd") -> 16#02992;
-+entity("range") -> 16#029A5;
-+entity("rangle") -> 16#027E9;
-+entity("raquo") -> 16#000BB;
-+entity("rarr") -> 16#02192;
-+entity("rarrap") -> 16#02975;
-+entity("rarrb") -> 16#021E5;
-+entity("rarrbfs") -> 16#02920;
-+entity("rarrc") -> 16#02933;
-+entity("rarrfs") -> 16#0291E;
-+entity("rarrhk") -> 16#021AA;
-+entity("rarrlp") -> 16#021AC;
-+entity("rarrpl") -> 16#02945;
-+entity("rarrsim") -> 16#02974;
-+entity("rarrtl") -> 16#021A3;
-+entity("rarrw") -> 16#0219D;
-+entity("ratail") -> 16#0291A;
-+entity("ratio") -> 16#02236;
-+entity("rationals") -> 16#0211A;
-+entity("rbarr") -> 16#0290D;
-+entity("rbbrk") -> 16#02773;
-+entity("rbrace") -> 16#0007D;
-+entity("rbrack") -> 16#0005D;
-+entity("rbrke") -> 16#0298C;
-+entity("rbrksld") -> 16#0298E;
-+entity("rbrkslu") -> 16#02990;
-+entity("rcaron") -> 16#00159;
-+entity("rcedil") -> 16#00157;
-+entity("rceil") -> 16#02309;
-+entity("rcub") -> 16#0007D;
-+entity("rcy") -> 16#00440;
-+entity("rdca") -> 16#02937;
-+entity("rdldhar") -> 16#02969;
-+entity("rdquo") -> 16#0201D;
-+entity("rdquor") -> 16#0201D;
-+entity("rdsh") -> 16#021B3;
-+entity("real") -> 16#0211C;
-+entity("realine") -> 16#0211B;
-+entity("realpart") -> 16#0211C;
-+entity("reals") -> 16#0211D;
-+entity("rect") -> 16#025AD;
-+entity("reg") -> 16#000AE;
-+entity("rfisht") -> 16#0297D;
-+entity("rfloor") -> 16#0230B;
-+entity("rfr") -> 16#1D52F;
-+entity("rhard") -> 16#021C1;
-+entity("rharu") -> 16#021C0;
-+entity("rharul") -> 16#0296C;
-+entity("rho") -> 16#003C1;
-+entity("rhov") -> 16#003F1;
-+entity("rightarrow") -> 16#02192;
-+entity("rightarrowtail") -> 16#021A3;
-+entity("rightharpoondown") -> 16#021C1;
-+entity("rightharpoonup") -> 16#021C0;
-+entity("rightleftarrows") -> 16#021C4;
-+entity("rightleftharpoons") -> 16#021CC;
-+entity("rightrightarrows") -> 16#021C9;
-+entity("rightsquigarrow") -> 16#0219D;
-+entity("rightthreetimes") -> 16#022CC;
-+entity("ring") -> 16#002DA;
-+entity("risingdotseq") -> 16#02253;
-+entity("rlarr") -> 16#021C4;
-+entity("rlhar") -> 16#021CC;
-+entity("rlm") -> 16#0200F;
-+entity("rmoust") -> 16#023B1;
-+entity("rmoustache") -> 16#023B1;
-+entity("rnmid") -> 16#02AEE;
-+entity("roang") -> 16#027ED;
-+entity("roarr") -> 16#021FE;
-+entity("robrk") -> 16#027E7;
-+entity("ropar") -> 16#02986;
-+entity("ropf") -> 16#1D563;
-+entity("roplus") -> 16#02A2E;
-+entity("rotimes") -> 16#02A35;
-+entity("rpar") -> 16#00029;
-+entity("rpargt") -> 16#02994;
-+entity("rppolint") -> 16#02A12;
-+entity("rrarr") -> 16#021C9;
-+entity("rsaquo") -> 16#0203A;
-+entity("rscr") -> 16#1D4C7;
-+entity("rsh") -> 16#021B1;
-+entity("rsqb") -> 16#0005D;
-+entity("rsquo") -> 16#02019;
-+entity("rsquor") -> 16#02019;
-+entity("rthree") -> 16#022CC;
-+entity("rtimes") -> 16#022CA;
-+entity("rtri") -> 16#025B9;
-+entity("rtrie") -> 16#022B5;
-+entity("rtrif") -> 16#025B8;
-+entity("rtriltri") -> 16#029CE;
-+entity("ruluhar") -> 16#02968;
-+entity("rx") -> 16#0211E;
-+entity("sacute") -> 16#0015B;
-+entity("sbquo") -> 16#0201A;
-+entity("sc") -> 16#0227B;
-+entity("scE") -> 16#02AB4;
-+entity("scap") -> 16#02AB8;
-+entity("scaron") -> 16#00161;
-+entity("sccue") -> 16#0227D;
-+entity("sce") -> 16#02AB0;
-+entity("scedil") -> 16#0015F;
-+entity("scirc") -> 16#0015D;
-+entity("scnE") -> 16#02AB6;
-+entity("scnap") -> 16#02ABA;
-+entity("scnsim") -> 16#022E9;
-+entity("scpolint") -> 16#02A13;
-+entity("scsim") -> 16#0227F;
-+entity("scy") -> 16#00441;
-+entity("sdot") -> 16#022C5;
-+entity("sdotb") -> 16#022A1;
-+entity("sdote") -> 16#02A66;
-+entity("seArr") -> 16#021D8;
-+entity("searhk") -> 16#02925;
-+entity("searr") -> 16#02198;
-+entity("searrow") -> 16#02198;
-+entity("sect") -> 16#000A7;
-+entity("semi") -> 16#0003B;
-+entity("seswar") -> 16#02929;
-+entity("setminus") -> 16#02216;
-+entity("setmn") -> 16#02216;
-+entity("sext") -> 16#02736;
-+entity("sfr") -> 16#1D530;
-+entity("sfrown") -> 16#02322;
-+entity("sharp") -> 16#0266F;
-+entity("shchcy") -> 16#00449;
-+entity("shcy") -> 16#00448;
-+entity("shortmid") -> 16#02223;
-+entity("shortparallel") -> 16#02225;
-+entity("shy") -> 16#000AD;
-+entity("sigma") -> 16#003C3;
-+entity("sigmaf") -> 16#003C2;
-+entity("sigmav") -> 16#003C2;
-+entity("sim") -> 16#0223C;
-+entity("simdot") -> 16#02A6A;
-+entity("sime") -> 16#02243;
-+entity("simeq") -> 16#02243;
-+entity("simg") -> 16#02A9E;
-+entity("simgE") -> 16#02AA0;
-+entity("siml") -> 16#02A9D;
-+entity("simlE") -> 16#02A9F;
-+entity("simne") -> 16#02246;
-+entity("simplus") -> 16#02A24;
-+entity("simrarr") -> 16#02972;
-+entity("slarr") -> 16#02190;
-+entity("smallsetminus") -> 16#02216;
-+entity("smashp") -> 16#02A33;
-+entity("smeparsl") -> 16#029E4;
-+entity("smid") -> 16#02223;
-+entity("smile") -> 16#02323;
-+entity("smt") -> 16#02AAA;
-+entity("smte") -> 16#02AAC;
-+entity("smtes") -> [16#02AAC, 16#0FE00];
-+entity("softcy") -> 16#0044C;
-+entity("sol") -> 16#0002F;
-+entity("solb") -> 16#029C4;
-+entity("solbar") -> 16#0233F;
-+entity("sopf") -> 16#1D564;
-+entity("spades") -> 16#02660;
-+entity("spadesuit") -> 16#02660;
-+entity("spar") -> 16#02225;
-+entity("sqcap") -> 16#02293;
-+entity("sqcaps") -> [16#02293, 16#0FE00];
-+entity("sqcup") -> 16#02294;
-+entity("sqcups") -> [16#02294, 16#0FE00];
-+entity("sqsub") -> 16#0228F;
-+entity("sqsube") -> 16#02291;
-+entity("sqsubset") -> 16#0228F;
-+entity("sqsubseteq") -> 16#02291;
-+entity("sqsup") -> 16#02290;
-+entity("sqsupe") -> 16#02292;
-+entity("sqsupset") -> 16#02290;
-+entity("sqsupseteq") -> 16#02292;
-+entity("squ") -> 16#025A1;
-+entity("square") -> 16#025A1;
-+entity("squarf") -> 16#025AA;
-+entity("squf") -> 16#025AA;
-+entity("srarr") -> 16#02192;
-+entity("sscr") -> 16#1D4C8;
-+entity("ssetmn") -> 16#02216;
-+entity("ssmile") -> 16#02323;
-+entity("sstarf") -> 16#022C6;
-+entity("star") -> 16#02606;
-+entity("starf") -> 16#02605;
-+entity("straightepsilon") -> 16#003F5;
-+entity("straightphi") -> 16#003D5;
-+entity("strns") -> 16#000AF;
-+entity("sub") -> 16#02282;
-+entity("subE") -> 16#02AC5;
-+entity("subdot") -> 16#02ABD;
-+entity("sube") -> 16#02286;
-+entity("subedot") -> 16#02AC3;
-+entity("submult") -> 16#02AC1;
-+entity("subnE") -> 16#02ACB;
-+entity("subne") -> 16#0228A;
-+entity("subplus") -> 16#02ABF;
-+entity("subrarr") -> 16#02979;
-+entity("subset") -> 16#02282;
-+entity("subseteq") -> 16#02286;
-+entity("subseteqq") -> 16#02AC5;
-+entity("subsetneq") -> 16#0228A;
-+entity("subsetneqq") -> 16#02ACB;
-+entity("subsim") -> 16#02AC7;
-+entity("subsub") -> 16#02AD5;
-+entity("subsup") -> 16#02AD3;
-+entity("succ") -> 16#0227B;
-+entity("succapprox") -> 16#02AB8;
-+entity("succcurlyeq") -> 16#0227D;
-+entity("succeq") -> 16#02AB0;
-+entity("succnapprox") -> 16#02ABA;
-+entity("succneqq") -> 16#02AB6;
-+entity("succnsim") -> 16#022E9;
-+entity("succsim") -> 16#0227F;
-+entity("sum") -> 16#02211;
-+entity("sung") -> 16#0266A;
-+entity("sup") -> 16#02283;
-+entity("sup1") -> 16#000B9;
-+entity("sup2") -> 16#000B2;
-+entity("sup3") -> 16#000B3;
-+entity("supE") -> 16#02AC6;
-+entity("supdot") -> 16#02ABE;
-+entity("supdsub") -> 16#02AD8;
-+entity("supe") -> 16#02287;
-+entity("supedot") -> 16#02AC4;
-+entity("suphsol") -> 16#027C9;
-+entity("suphsub") -> 16#02AD7;
-+entity("suplarr") -> 16#0297B;
-+entity("supmult") -> 16#02AC2;
-+entity("supnE") -> 16#02ACC;
-+entity("supne") -> 16#0228B;
-+entity("supplus") -> 16#02AC0;
-+entity("supset") -> 16#02283;
-+entity("supseteq") -> 16#02287;
-+entity("supseteqq") -> 16#02AC6;
-+entity("supsetneq") -> 16#0228B;
-+entity("supsetneqq") -> 16#02ACC;
-+entity("supsim") -> 16#02AC8;
-+entity("supsub") -> 16#02AD4;
-+entity("supsup") -> 16#02AD6;
-+entity("swArr") -> 16#021D9;
-+entity("swarhk") -> 16#02926;
-+entity("swarr") -> 16#02199;
-+entity("swarrow") -> 16#02199;
-+entity("swnwar") -> 16#0292A;
-+entity("szlig") -> 16#000DF;
-+entity("target") -> 16#02316;
-+entity("tau") -> 16#003C4;
-+entity("tbrk") -> 16#023B4;
-+entity("tcaron") -> 16#00165;
-+entity("tcedil") -> 16#00163;
-+entity("tcy") -> 16#00442;
-+entity("tdot") -> 16#020DB;
-+entity("telrec") -> 16#02315;
-+entity("tfr") -> 16#1D531;
-+entity("there4") -> 16#02234;
-+entity("therefore") -> 16#02234;
-+entity("theta") -> 16#003B8;
-+entity("thetasym") -> 16#003D1;
-+entity("thetav") -> 16#003D1;
-+entity("thickapprox") -> 16#02248;
-+entity("thicksim") -> 16#0223C;
-+entity("thinsp") -> 16#02009;
-+entity("thkap") -> 16#02248;
-+entity("thksim") -> 16#0223C;
-+entity("thorn") -> 16#000FE;
-+entity("tilde") -> 16#002DC;
-+entity("times") -> 16#000D7;
-+entity("timesb") -> 16#022A0;
-+entity("timesbar") -> 16#02A31;
-+entity("timesd") -> 16#02A30;
-+entity("tint") -> 16#0222D;
-+entity("toea") -> 16#02928;
-+entity("top") -> 16#022A4;
-+entity("topbot") -> 16#02336;
-+entity("topcir") -> 16#02AF1;
-+entity("topf") -> 16#1D565;
-+entity("topfork") -> 16#02ADA;
-+entity("tosa") -> 16#02929;
-+entity("tprime") -> 16#02034;
-+entity("trade") -> 16#02122;
-+entity("triangle") -> 16#025B5;
-+entity("triangledown") -> 16#025BF;
-+entity("triangleleft") -> 16#025C3;
-+entity("trianglelefteq") -> 16#022B4;
-+entity("triangleq") -> 16#0225C;
-+entity("triangleright") -> 16#025B9;
-+entity("trianglerighteq") -> 16#022B5;
-+entity("tridot") -> 16#025EC;
-+entity("trie") -> 16#0225C;
-+entity("triminus") -> 16#02A3A;
-+entity("triplus") -> 16#02A39;
-+entity("trisb") -> 16#029CD;
-+entity("tritime") -> 16#02A3B;
-+entity("trpezium") -> 16#023E2;
-+entity("tscr") -> 16#1D4C9;
-+entity("tscy") -> 16#00446;
-+entity("tshcy") -> 16#0045B;
-+entity("tstrok") -> 16#00167;
-+entity("twixt") -> 16#0226C;
-+entity("twoheadleftarrow") -> 16#0219E;
-+entity("twoheadrightarrow") -> 16#021A0;
-+entity("uArr") -> 16#021D1;
-+entity("uHar") -> 16#02963;
-+entity("uacute") -> 16#000FA;
-+entity("uarr") -> 16#02191;
-+entity("ubrcy") -> 16#0045E;
-+entity("ubreve") -> 16#0016D;
-+entity("ucirc") -> 16#000FB;
-+entity("ucy") -> 16#00443;
-+entity("udarr") -> 16#021C5;
-+entity("udblac") -> 16#00171;
-+entity("udhar") -> 16#0296E;
-+entity("ufisht") -> 16#0297E;
-+entity("ufr") -> 16#1D532;
-+entity("ugrave") -> 16#000F9;
-+entity("uharl") -> 16#021BF;
-+entity("uharr") -> 16#021BE;
-+entity("uhblk") -> 16#02580;
-+entity("ulcorn") -> 16#0231C;
-+entity("ulcorner") -> 16#0231C;
-+entity("ulcrop") -> 16#0230F;
-+entity("ultri") -> 16#025F8;
-+entity("umacr") -> 16#0016B;
-+entity("uml") -> 16#000A8;
-+entity("uogon") -> 16#00173;
-+entity("uopf") -> 16#1D566;
-+entity("uparrow") -> 16#02191;
-+entity("updownarrow") -> 16#02195;
-+entity("upharpoonleft") -> 16#021BF;
-+entity("upharpoonright") -> 16#021BE;
-+entity("uplus") -> 16#0228E;
-+entity("upsi") -> 16#003C5;
-+entity("upsih") -> 16#003D2;
-+entity("upsilon") -> 16#003C5;
-+entity("upuparrows") -> 16#021C8;
-+entity("urcorn") -> 16#0231D;
-+entity("urcorner") -> 16#0231D;
-+entity("urcrop") -> 16#0230E;
-+entity("uring") -> 16#0016F;
-+entity("urtri") -> 16#025F9;
-+entity("uscr") -> 16#1D4CA;
-+entity("utdot") -> 16#022F0;
-+entity("utilde") -> 16#00169;
-+entity("utri") -> 16#025B5;
-+entity("utrif") -> 16#025B4;
-+entity("uuarr") -> 16#021C8;
-+entity("uuml") -> 16#000FC;
-+entity("uwangle") -> 16#029A7;
-+entity("vArr") -> 16#021D5;
-+entity("vBar") -> 16#02AE8;
-+entity("vBarv") -> 16#02AE9;
-+entity("vDash") -> 16#022A8;
-+entity("vangrt") -> 16#0299C;
-+entity("varepsilon") -> 16#003F5;
-+entity("varkappa") -> 16#003F0;
-+entity("varnothing") -> 16#02205;
-+entity("varphi") -> 16#003D5;
-+entity("varpi") -> 16#003D6;
-+entity("varpropto") -> 16#0221D;
-+entity("varr") -> 16#02195;
-+entity("varrho") -> 16#003F1;
-+entity("varsigma") -> 16#003C2;
-+entity("varsubsetneq") -> [16#0228A, 16#0FE00];
-+entity("varsubsetneqq") -> [16#02ACB, 16#0FE00];
-+entity("varsupsetneq") -> [16#0228B, 16#0FE00];
-+entity("varsupsetneqq") -> [16#02ACC, 16#0FE00];
-+entity("vartheta") -> 16#003D1;
-+entity("vartriangleleft") -> 16#022B2;
-+entity("vartriangleright") -> 16#022B3;
-+entity("vcy") -> 16#00432;
-+entity("vdash") -> 16#022A2;
-+entity("vee") -> 16#02228;
-+entity("veebar") -> 16#022BB;
-+entity("veeeq") -> 16#0225A;
-+entity("vellip") -> 16#022EE;
-+entity("verbar") -> 16#0007C;
-+entity("vert") -> 16#0007C;
-+entity("vfr") -> 16#1D533;
-+entity("vltri") -> 16#022B2;
-+entity("vnsub") -> [16#02282, 16#020D2];
-+entity("vnsup") -> [16#02283, 16#020D2];
-+entity("vopf") -> 16#1D567;
-+entity("vprop") -> 16#0221D;
-+entity("vrtri") -> 16#022B3;
-+entity("vscr") -> 16#1D4CB;
-+entity("vsubnE") -> [16#02ACB, 16#0FE00];
-+entity("vsubne") -> [16#0228A, 16#0FE00];
-+entity("vsupnE") -> [16#02ACC, 16#0FE00];
-+entity("vsupne") -> [16#0228B, 16#0FE00];
-+entity("vzigzag") -> 16#0299A;
-+entity("wcirc") -> 16#00175;
-+entity("wedbar") -> 16#02A5F;
-+entity("wedge") -> 16#02227;
-+entity("wedgeq") -> 16#02259;
-+entity("weierp") -> 16#02118;
-+entity("wfr") -> 16#1D534;
-+entity("wopf") -> 16#1D568;
-+entity("wp") -> 16#02118;
-+entity("wr") -> 16#02240;
-+entity("wreath") -> 16#02240;
-+entity("wscr") -> 16#1D4CC;
-+entity("xcap") -> 16#022C2;
-+entity("xcirc") -> 16#025EF;
-+entity("xcup") -> 16#022C3;
-+entity("xdtri") -> 16#025BD;
-+entity("xfr") -> 16#1D535;
-+entity("xhArr") -> 16#027FA;
-+entity("xharr") -> 16#027F7;
-+entity("xi") -> 16#003BE;
-+entity("xlArr") -> 16#027F8;
-+entity("xlarr") -> 16#027F5;
-+entity("xmap") -> 16#027FC;
-+entity("xnis") -> 16#022FB;
-+entity("xodot") -> 16#02A00;
-+entity("xopf") -> 16#1D569;
-+entity("xoplus") -> 16#02A01;
-+entity("xotime") -> 16#02A02;
-+entity("xrArr") -> 16#027F9;
-+entity("xrarr") -> 16#027F6;
-+entity("xscr") -> 16#1D4CD;
-+entity("xsqcup") -> 16#02A06;
-+entity("xuplus") -> 16#02A04;
-+entity("xutri") -> 16#025B3;
-+entity("xvee") -> 16#022C1;
-+entity("xwedge") -> 16#022C0;
-+entity("yacute") -> 16#000FD;
-+entity("yacy") -> 16#0044F;
-+entity("ycirc") -> 16#00177;
-+entity("ycy") -> 16#0044B;
-+entity("yen") -> 16#000A5;
-+entity("yfr") -> 16#1D536;
-+entity("yicy") -> 16#00457;
-+entity("yopf") -> 16#1D56A;
-+entity("yscr") -> 16#1D4CE;
-+entity("yucy") -> 16#0044E;
-+entity("yuml") -> 16#000FF;
-+entity("zacute") -> 16#0017A;
-+entity("zcaron") -> 16#0017E;
-+entity("zcy") -> 16#00437;
-+entity("zdot") -> 16#0017C;
-+entity("zeetrf") -> 16#02128;
-+entity("zeta") -> 16#003B6;
-+entity("zfr") -> 16#1D537;
-+entity("zhcy") -> 16#00436;
-+entity("zigrarr") -> 16#021DD;
-+entity("zopf") -> 16#1D56B;
-+entity("zscr") -> 16#1D4CF;
-+entity("zwj") -> 16#0200D;
-+entity("zwnj") -> 16#0200C;
-+entity(_) -> undefined.
-
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- exhaustive_entity_test() ->
- T = mochiweb_cover:clause_lookup_table(?MODULE, entity),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_cookies.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cookies.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_cookies.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cookies.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -23,6 +23,7 @@
-
- %% @type proplist() = [{Key::string(), Value::string()}].
- %% @type header() = {Name::string(), Value::string()}.
-+%% @type int_seconds() = integer().
-
- %% @spec cookie(Key::string(), Value::string()) -> header()
- %% @doc Short-hand for <code>cookie(Key, Value, [])</code>.
-@@ -30,7 +31,7 @@
- cookie(Key, Value, []).
-
- %% @spec cookie(Key::string(), Value::string(), Options::[Option]) -> header()
--%% where Option = {max_age, integer()} | {local_time, {date(), time()}}
-+%% where Option = {max_age, int_seconds()} | {local_time, {date(), time()}}
- %% | {domain, string()} | {path, string()}
- %% | {secure, true | false} | {http_only, true | false}
- %%
-@@ -115,12 +116,33 @@
- orelse erlang:error({cookie_quoting_required, V}),
- V.
-
-+
-+%% Return a date in the form of: Wdy, DD-Mon-YYYY HH:MM:SS GMT
-+%% See also: rfc2109: 10.1.2
-+rfc2109_cookie_expires_date(LocalTime) ->
-+ {{YYYY,MM,DD},{Hour,Min,Sec}} =
-+ case calendar:local_time_to_universal_time_dst(LocalTime) of
-+ [] ->
-+ {Date, {Hour1, Min1, Sec1}} = LocalTime,
-+ LocalTime2 = {Date, {Hour1 + 1, Min1, Sec1}},
-+ case calendar:local_time_to_universal_time_dst(LocalTime2) of
-+ [Gmt] -> Gmt;
-+ [_,Gmt] -> Gmt
-+ end;
-+ [Gmt] -> Gmt;
-+ [_,Gmt] -> Gmt
-+ end,
-+ DayNumber = calendar:day_of_the_week({YYYY,MM,DD}),
-+ lists:flatten(
-+ io_lib:format("~s, ~2.2.0w-~3.s-~4.4.0w ~2.2.0w:~2.2.0w:~2.2.0w GMT",
-+ [httpd_util:day(DayNumber),DD,httpd_util:month(MM),YYYY,Hour,Min,Sec])).
-+
- add_seconds(Secs, LocalTime) ->
- Greg = calendar:datetime_to_gregorian_seconds(LocalTime),
- calendar:gregorian_seconds_to_datetime(Greg + Secs).
-
- age_to_cookie_date(Age, LocalTime) ->
-- httpd_util:rfc1123_date(add_seconds(Age, LocalTime)).
-+ rfc2109_cookie_expires_date(add_seconds(Age, LocalTime)).
-
- %% @spec parse_cookie(string()) -> [{K::string(), V::string()}]
- %% @doc Parse the contents of a Cookie header field, ignoring cookie
-@@ -203,8 +225,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- quote_test() ->
- %% ?assertError eunit macro is not compatible with coverage module
-@@ -293,14 +315,14 @@
- C2 = {"Set-Cookie",
- "Customer=WILE_E_COYOTE; "
- "Version=1; "
-- "Expires=Tue, 15 May 2007 13:45:33 GMT; "
-+ "Expires=Tue, 15-May-2007 13:45:33 GMT; "
- "Max-Age=0"},
- C2 = cookie("Customer", "WILE_E_COYOTE",
- [{max_age, -111}, {local_time, LocalTime}]),
- C3 = {"Set-Cookie",
- "Customer=WILE_E_COYOTE; "
- "Version=1; "
-- "Expires=Wed, 16 May 2007 13:45:50 GMT; "
-+ "Expires=Wed, 16-May-2007 13:45:50 GMT; "
- "Max-Age=86417"},
- C3 = cookie("Customer", "WILE_E_COYOTE",
- [{max_age, 86417}, {local_time, LocalTime}]),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_cover.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cover.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_cover.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cover.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -46,8 +46,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- foo_table(a) -> b;
- foo_table("a") -> <<"b">>;
- foo_table(123) -> {4, 3, 2};
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_echo.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_echo.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_echo.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_echo.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -11,11 +11,14 @@
- mochiweb_socket_server:stop(?MODULE).
-
- start() ->
-- mochiweb_socket_server:start([{name, ?MODULE},
-+ mochiweb_socket_server:start([{link, false} | options()]).
-+
-+options() ->
-+ [{name, ?MODULE},
- {port, 6789},
- {ip, "127.0.0.1"},
- {max, 1},
-- {loop, {?MODULE, loop}}]).
-+ {loop, {?MODULE, loop}}].
-
- loop(Socket) ->
- case mochiweb_socket:recv(Socket, 0, 30000) of
-@@ -33,6 +36,6 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -6,22 +6,9 @@
- -module(mochiweb).
- -author('bob@mochimedia.com').
-
---export([start/0, stop/0]).
- -export([new_request/1, new_response/1]).
- -export([all_loaded/0, all_loaded/1, reload/0]).
--
--%% @spec start() -> ok
--%% @doc Start the MochiWeb server.
--start() ->
-- ensure_started(crypto),
-- application:start(mochiweb).
--
--%% @spec stop() -> ok
--%% @doc Stop the MochiWeb server.
--stop() ->
-- Res = application:stop(mochiweb),
-- application:stop(crypto),
-- Res.
-+-export([ensure_started/1]).
-
- reload() ->
- [c:l(Module) || Module <- all_loaded()].
-@@ -78,8 +65,8 @@
- Code,
- mochiweb_headers:make(Headers)).
-
--%% Internal API
--
-+%% @spec ensure_started(App::atom()) -> ok
-+%% @doc Start the given App if it has not been started already.
- ensure_started(App) ->
- case application:start(App) of
- ok ->
-@@ -92,8 +78,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- -record(treq, {path, body= <<>>, xreply= <<>>}).
-
-@@ -112,7 +98,7 @@
- ssl ->
- ServerOpts0 ++ [{ssl, true}, {ssl_opts, ssl_cert_opts()}]
- end,
-- {ok, Server} = mochiweb_http:start(ServerOpts),
-+ {ok, Server} = mochiweb_http:start_link(ServerOpts),
- Port = mochiweb_socket_server:get(Server, port),
- Res = (catch ClientFun(Transport, Port)),
- mochiweb_http:stop(Server),
-@@ -123,6 +109,8 @@
- "/foo/bar/baz wibble quux" = R:get(path),
- ok.
-
-+-define(LARGE_TIMEOUT, 60).
-+
- single_http_GET_test() ->
- do_GET(plain, 1).
-
-@@ -135,11 +123,13 @@
- multiple_https_GET_test() ->
- do_GET(ssl, 3).
-
--hundred_http_GET_test() ->
-- do_GET(plain, 100).
--
--hundred_https_GET_test() ->
-- do_GET(ssl, 100).
-+hundred_http_GET_test_() -> % note the underscore
-+ {timeout, ?LARGE_TIMEOUT,
-+ fun() -> ?assertEqual(ok, do_GET(plain,100)) end}.
-+
-+hundred_https_GET_test_() -> % note the underscore
-+ {timeout, ?LARGE_TIMEOUT,
-+ fun() -> ?assertEqual(ok, do_GET(ssl,100)) end}.
-
- single_128_http_POST_test() ->
- do_POST(plain, 128, 1).
-@@ -165,11 +155,13 @@
- multiple_100K_https_POST_test() ->
- do_POST(ssl, 102400, 3).
-
--hundred_128_http_POST_test() ->
-- do_POST(plain, 128, 100).
--
--hundred_128_https_POST_test() ->
-- do_POST(ssl, 128, 100).
-+hundred_128_http_POST_test_() -> % note the underscore
-+ {timeout, ?LARGE_TIMEOUT,
-+ fun() -> ?assertEqual(ok, do_POST(plain, 128, 100)) end}.
-+
-+hundred_128_https_POST_test_() -> % note the underscore
-+ {timeout, ?LARGE_TIMEOUT,
-+ fun() -> ?assertEqual(ok, do_POST(ssl, 128, 100)) end}.
-
- do_GET(Transport, Times) ->
- PathPrefix = "/whatever/",
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_headers.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_headers.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_headers.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_headers.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -6,7 +6,7 @@
- -module(mochiweb_headers).
- -author('bob@mochimedia.com').
- -export([empty/0, from_list/1, insert/3, enter/3, get_value/2, lookup/2]).
---export([delete_any/2, get_primary_value/2]).
-+-export([delete_any/2, get_primary_value/2, get_combined_value/2]).
- -export([default/3, enter_from_list/2, default_from_list/2]).
- -export([to_list/1, make/1]).
- -export([from_binary/1]).
-@@ -24,8 +24,8 @@
- %% @doc Construct a headers() from the given list.
- make(L) when is_list(L) ->
- from_list(L);
--%% assume a tuple is already mochiweb_headers.
--make(T) when is_tuple(T) ->
-+%% assume a non-list is already mochiweb_headers.
-+make(T) ->
- T.
-
- %% @spec from_binary(iolist()) -> headers()
-@@ -112,6 +112,34 @@
- lists:takewhile(fun (C) -> C =/= $; end, V)
- end.
-
-+%% @spec get_combined_value(key(), headers()) -> string() | undefined
-+%% @doc Return the value from the given header using a case insensitive search.
-+%% If the value of the header is a comma-separated list where holds values
-+%% are all identical, the identical value will be returned.
-+%% undefined will be returned for keys that are not present or the
-+%% values in the list are not the same.
-+%%
-+%% NOTE: The process isn't designed for a general purpose. If you need
-+%% to access all values in the combined header, please refer to
-+%% '''tokenize_header_value/1'''.
-+%%
-+%% Section 4.2 of the RFC 2616 (HTTP 1.1) describes multiple message-header
-+%% fields with the same field-name may be present in a message if and only
-+%% if the entire field-value for that header field is defined as a
-+%% comma-separated list [i.e., #(values)].
-+get_combined_value(K, T) ->
-+ case get_value(K, T) of
-+ undefined ->
-+ undefined;
-+ V ->
-+ case sets:to_list(sets:from_list(tokenize_header_value(V))) of
-+ [Val] ->
-+ Val;
-+ _ ->
-+ undefined
-+ end
-+ end.
-+
- %% @spec lookup(key(), headers()) -> {value, {key(), string()}} | none
- %% @doc Return the case preserved key and value for the given header using
- %% a case insensitive search. none will be returned for keys that are
-@@ -164,6 +192,49 @@
-
- %% Internal API
-
-+tokenize_header_value(undefined) ->
-+ undefined;
-+tokenize_header_value(V) ->
-+ reversed_tokens(trim_and_reverse(V, false), [], []).
-+
-+trim_and_reverse([S | Rest], Reversed) when S=:=$ ; S=:=$\n; S=:=$\t ->
-+ trim_and_reverse(Rest, Reversed);
-+trim_and_reverse(V, false) ->
-+ trim_and_reverse(lists:reverse(V), true);
-+trim_and_reverse(V, true) ->
-+ V.
-+
-+reversed_tokens([], [], Acc) ->
-+ Acc;
-+reversed_tokens([], Token, Acc) ->
-+ [Token | Acc];
-+reversed_tokens("\"" ++ Rest, [], Acc) ->
-+ case extract_quoted_string(Rest, []) of
-+ {String, NewRest} ->
-+ reversed_tokens(NewRest, [], [String | Acc]);
-+ undefined ->
-+ undefined
-+ end;
-+reversed_tokens("\"" ++ _Rest, _Token, _Acc) ->
-+ undefined;
-+reversed_tokens([C | Rest], [], Acc) when C=:=$ ;C=:=$\n;C=:=$\t;C=:=$, ->
-+ reversed_tokens(Rest, [], Acc);
-+reversed_tokens([C | Rest], Token, Acc) when C=:=$ ;C=:=$\n;C=:=$\t;C=:=$, ->
-+ reversed_tokens(Rest, [], [Token | Acc]);
-+reversed_tokens([C | Rest], Token, Acc) ->
-+ reversed_tokens(Rest, [C | Token], Acc);
-+reversed_tokens(_, _, _) ->
-+ undefeined.
-+
-+extract_quoted_string([], _Acc) ->
-+ undefined;
-+extract_quoted_string("\"\\" ++ Rest, Acc) ->
-+ extract_quoted_string(Rest, "\"" ++ Acc);
-+extract_quoted_string("\"" ++ Rest, Acc) ->
-+ {Acc, Rest};
-+extract_quoted_string([C | Rest], Acc) ->
-+ extract_quoted_string(Rest, [C | Acc]).
-+
- expand({array, L}) ->
- mochiweb_util:join(lists:reverse(L), ", ");
- expand(V) ->
-@@ -195,8 +266,8 @@
- %%
- %% Tests.
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- make_test() ->
- Identity = make([{hdr, foo}]),
-@@ -237,6 +308,37 @@
- get_primary_value(<<"baz">>, H)),
- ok.
-
-+get_combined_value_test() ->
-+ H = make([{hdr, foo}, {baz, <<"wibble,taco">>}, {content_length, "123, 123"},
-+ {test, " 123, 123, 123 , 123,123 "},
-+ {test2, "456, 123, 123 , 123"},
-+ {test3, "123"}, {test4, " 123, "}]),
-+ ?assertEqual(
-+ "foo",
-+ get_combined_value(hdr, H)),
-+ ?assertEqual(
-+ undefined,
-+ get_combined_value(bar, H)),
-+ ?assertEqual(
-+ undefined,
-+ get_combined_value(<<"baz">>, H)),
-+ ?assertEqual(
-+ "123",
-+ get_combined_value(<<"content_length">>, H)),
-+ ?assertEqual(
-+ "123",
-+ get_combined_value(<<"test">>, H)),
-+ ?assertEqual(
-+ undefined,
-+ get_combined_value(<<"test2">>, H)),
-+ ?assertEqual(
-+ "123",
-+ get_combined_value(<<"test3">>, H)),
-+ ?assertEqual(
-+ "123",
-+ get_combined_value(<<"test4">>, H)),
-+ ok.
-+
- set_cookie_test() ->
- H = make([{"set-cookie", foo}, {"set-cookie", bar}, {"set-cookie", baz}]),
- ?assertEqual(
-@@ -296,4 +398,23 @@
- [] = ?MODULE:to_list(?MODULE:from_binary([<<"\r\n\r\n">>])),
- ok.
-
-+tokenize_header_value_test() ->
-+ ?assertEqual(["a quote in a \"quote\"."],
-+ tokenize_header_value("\"a quote in a \\\"quote\\\".\"")),
-+ ?assertEqual(["abc"], tokenize_header_value("abc")),
-+ ?assertEqual(["abc", "def"], tokenize_header_value("abc def")),
-+ ?assertEqual(["abc", "def"], tokenize_header_value("abc , def")),
-+ ?assertEqual(["abc", "def"], tokenize_header_value(",abc ,, def,,")),
-+ ?assertEqual(["abc def"], tokenize_header_value("\"abc def\" ")),
-+ ?assertEqual(["abc, def"], tokenize_header_value("\"abc, def\"")),
-+ ?assertEqual(["\\a\\$"], tokenize_header_value("\"\\a\\$\"")),
-+ ?assertEqual(["abc def", "foo, bar", "12345", ""],
-+ tokenize_header_value("\"abc def\" \"foo, bar\" , 12345, \"\"")),
-+ ?assertEqual(undefined,
-+ tokenize_header_value(undefined)),
-+ ?assertEqual(undefined,
-+ tokenize_header_value("umatched quote\"")),
-+ ?assertEqual(undefined,
-+ tokenize_header_value("\"unmatched quote")).
-+
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_html.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_html.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_html.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_html.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -95,7 +95,12 @@
- to_tokens({Tag0, [], Acc});
- to_tokens({Tag0, Attrs, Acc}) ->
- Tag = to_tag(Tag0),
-- to_tokens([{Tag, Acc}], [{start_tag, Tag, Attrs, is_singleton(Tag)}]).
-+ case is_singleton(Tag) of
-+ true ->
-+ to_tokens([], [{start_tag, Tag, Attrs, true}]);
-+ false ->
-+ to_tokens([{Tag, Acc}], [{start_tag, Tag, Attrs, false}])
-+ end.
-
- %% @spec to_html([html_token()] | html_node()) -> iolist()
- %% @doc Convert a list of html_token() to a HTML document.
-@@ -312,7 +317,8 @@
- {Tag, S1} = tokenize_literal(B, ?ADV_COL(S, 2)),
- {S2, _} = find_gt(B, S1),
- {{end_tag, Tag}, S2};
-- <<_:O/binary, "<", C, _/binary>> when ?IS_WHITESPACE(C) ->
-+ <<_:O/binary, "<", C, _/binary>>
-+ when ?IS_WHITESPACE(C); not ?IS_LITERAL_SAFE(C) ->
- %% This isn't really strict HTML
- {{data, Data, _Whitespace}, S1} = tokenize_data(B, ?INC_COL(S)),
- {{data, <<$<, Data/binary>>, false}, S1};
-@@ -501,8 +507,6 @@
- tokenize_quoted_attr_value(B, S1, [Data|Acc], Q);
- <<_:O/binary, Q, _/binary>> ->
- { iolist_to_binary(lists:reverse(Acc)), ?INC_COL(S) };
-- <<_:O/binary, $\n, _/binary>> ->
-- { iolist_to_binary(lists:reverse(Acc)), ?INC_LINE(S) };
- <<_:O/binary, C, _/binary>> ->
- tokenize_quoted_attr_value(B, ?INC_COL(S), [C|Acc], Q)
- end.
-@@ -603,32 +607,33 @@
- end.
-
- tokenize_charref(Bin, S=#decoder{offset=O}) ->
-- tokenize_charref(Bin, S, O).
-+ try
-+ tokenize_charref(Bin, S, O)
-+ catch
-+ throw:invalid_charref ->
-+ {{data, <<"&">>, false}, S}
-+ end.
-
- tokenize_charref(Bin, S=#decoder{offset=O}, Start) ->
- case Bin of
- <<_:O/binary>> ->
-- <<_:Start/binary, Raw/binary>> = Bin,
-- {{data, Raw, false}, S};
-+ throw(invalid_charref);
- <<_:O/binary, C, _/binary>> when ?IS_WHITESPACE(C)
- orelse C =:= ?SQUOTE
- orelse C =:= ?QUOTE
- orelse C =:= $/
- orelse C =:= $> ->
-- Len = O - Start,
-- <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin,
-- {{data, Raw, false}, S};
-+ throw(invalid_charref);
- <<_:O/binary, $;, _/binary>> ->
- Len = O - Start,
- <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin,
- Data = case mochiweb_charref:charref(Raw) of
- undefined ->
-- Start1 = Start - 1,
-- Len1 = Len + 2,
-- <<_:Start1/binary, R:Len1/binary, _/binary>> = Bin,
-- R;
-- Unichar ->
-- mochiutf8:codepoint_to_bytes(Unichar)
-+ throw(invalid_charref);
-+ Unichar when is_integer(Unichar) ->
-+ mochiutf8:codepoint_to_bytes(Unichar);
-+ Unichars when is_list(Unichars) ->
-+ unicode:characters_to_binary(Unichars)
- end,
- {{data, Data, false}, ?INC_COL(S)};
- _ ->
-@@ -759,8 +764,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- to_html_test() ->
- ?assertEqual(
-@@ -1232,6 +1237,14 @@
- { <<"img">>, [ { <<"src">>, <<"/images/icon>.png">> } ], [] }
- ]},
- mochiweb_html:parse(D2)),
-+
-+ %% Quoted attributes can contain whitespace and newlines
-+ D3 = <<"<html><a href=\"#\" onclick=\"javascript: test(1,\ntrue);\"></html>">>,
-+ ?assertEqual(
-+ {<<"html">>,[],[
-+ { <<"a">>, [ { <<"href">>, <<"#">> }, {<<"onclick">>, <<"javascript: test(1,\ntrue);">>} ], [] }
-+ ]},
-+ mochiweb_html:parse(D3)),
- ok.
-
- parse_missing_attr_name_test() ->
-@@ -1261,4 +1274,59 @@
- mochiweb_html:parse(D0)),
- ok.
-
-+to_html_singleton_test() ->
-+ D0 = <<"<link />">>,
-+ T0 = {<<"link">>,[],[]},
-+ ?assertEqual(D0, iolist_to_binary(to_html(T0))),
-+
-+ D1 = <<"<head><link /></head>">>,
-+ T1 = {<<"head">>,[],[{<<"link">>,[],[]}]},
-+ ?assertEqual(D1, iolist_to_binary(to_html(T1))),
-+
-+ D2 = <<"<head><link /><link /></head>">>,
-+ T2 = {<<"head">>,[],[{<<"link">>,[],[]}, {<<"link">>,[],[]}]},
-+ ?assertEqual(D2, iolist_to_binary(to_html(T2))),
-+
-+ %% Make sure singletons are converted to singletons.
-+ D3 = <<"<head><link /></head>">>,
-+ T3 = {<<"head">>,[],[{<<"link">>,[],[<<"funny">>]}]},
-+ ?assertEqual(D3, iolist_to_binary(to_html(T3))),
-+
-+ D4 = <<"<link />">>,
-+ T4 = {<<"link">>,[],[<<"funny">>]},
-+ ?assertEqual(D4, iolist_to_binary(to_html(T4))),
-+
-+ ok.
-+
-+parse_amp_test_() ->
-+ [?_assertEqual(
-+ {<<"html">>,[],
-+ [{<<"body">>,[{<<"onload">>,<<"javascript:A('1&2')">>}],[]}]},
-+ mochiweb_html:parse("<html><body onload=\"javascript:A('1&2')\"></body></html>")),
-+ ?_assertEqual(
-+ {<<"html">>,[],
-+ [{<<"body">>,[{<<"onload">>,<<"javascript:A('1& 2')">>}],[]}]},
-+ mochiweb_html:parse("<html><body onload=\"javascript:A('1& 2')\"></body></html>")),
-+ ?_assertEqual(
-+ {<<"html">>,[],
-+ [{<<"body">>,[],[<<"& ">>]}]},
-+ mochiweb_html:parse("<html><body>& </body></html>")),
-+ ?_assertEqual(
-+ {<<"html">>,[],
-+ [{<<"body">>,[],[<<"&">>]}]},
-+ mochiweb_html:parse("<html><body>&</body></html>"))].
-+
-+parse_unescaped_lt_test() ->
-+ D1 = <<"<div> < < <a href=\"/\">Back</a></div>">>,
-+ ?assertEqual(
-+ {<<"div">>, [], [<<" < < ">>, {<<"a">>, [{<<"href">>, <<"/">>}],
-+ [<<"Back">>]}]},
-+ mochiweb_html:parse(D1)),
-+
-+ D2 = <<"<div> << <a href=\"/\">Back</a></div>">>,
-+ ?assertEqual(
-+ {<<"div">>, [], [<<" << ">>, {<<"a">>, [{<<"href">>, <<"/">>}],
-+ [<<"Back">>]}]},
-+ mochiweb_html:parse(D2)).
-+
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_http.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_http.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_http.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_http.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -5,13 +5,13 @@
-
- -module(mochiweb_http).
- -author('bob@mochimedia.com').
---export([start/0, start/1, stop/0, stop/1]).
---export([loop/2, default_body/1]).
-+-export([start/1, start_link/1, stop/0, stop/1]).
-+-export([loop/2]).
- -export([after_response/2, reentry/1]).
- -export([parse_range_request/1, range_skip_length/2]).
-
---define(REQUEST_RECV_TIMEOUT, 300000). % timeout waiting for request line
---define(HEADERS_RECV_TIMEOUT, 30000). % timeout waiting for headers
-+-define(REQUEST_RECV_TIMEOUT, 300000). %% timeout waiting for request line
-+-define(HEADERS_RECV_TIMEOUT, 30000). %% timeout waiting for headers
-
- -define(MAX_HEADERS, 1000).
- -define(DEFAULTS, [{name, ?MODULE},
-@@ -19,9 +19,7 @@
-
- parse_options(Options) ->
- {loop, HttpLoop} = proplists:lookup(loop, Options),
-- Loop = fun (S) ->
-- ?MODULE:loop(S, HttpLoop)
-- end,
-+ Loop = {?MODULE, loop, [HttpLoop]},
- Options1 = [{loop, Loop} | proplists:delete(loop, Options)],
- mochilists:set_defaults(?DEFAULTS, Options1).
-
-@@ -31,15 +29,12 @@
- stop(Name) ->
- mochiweb_socket_server:stop(Name).
-
--start() ->
-- start([{ip, "127.0.0.1"},
-- {loop, {?MODULE, default_body}}]).
--
- %% @spec start(Options) -> ServerRet
- %% Options = [option()]
- %% Option = {name, atom()} | {ip, string() | tuple()} | {backlog, integer()}
- %% | {nodelay, boolean()} | {acceptor_pool_size, integer()}
- %% | {ssl, boolean()} | {profile_fun, undefined | (Props) -> ok}
-+%% | {link, false}
- %% @doc Start a mochiweb server.
- %% profile_fun is used to profile accept timing.
- %% After each accept, if defined, profile_fun is called with a proplist of a subset of the mochiweb_socket_server state and timing information.
-@@ -48,62 +43,18 @@
- start(Options) ->
- mochiweb_socket_server:start(parse_options(Options)).
-
--frm(Body) ->
-- ["<html><head></head><body>"
-- "<form method=\"POST\">"
-- "<input type=\"hidden\" value=\"message\" name=\"hidden\"/>"
-- "<input type=\"submit\" value=\"regular POST\">"
-- "</form>"
-- "<br />"
-- "<form method=\"POST\" enctype=\"multipart/form-data\""
-- " action=\"/multipart\">"
-- "<input type=\"hidden\" value=\"multipart message\" name=\"hidden\"/>"
-- "<input type=\"file\" name=\"file\"/>"
-- "<input type=\"submit\" value=\"multipart POST\" />"
-- "</form>"
-- "<pre>", Body, "</pre>"
-- "</body></html>"].
--
--default_body(Req, M, "/chunked") when M =:= 'GET'; M =:= 'HEAD' ->
-- Res = Req:ok({"text/plain", [], chunked}),
-- Res:write_chunk("First chunk\r\n"),
-- timer:sleep(5000),
-- Res:write_chunk("Last chunk\r\n"),
-- Res:write_chunk("");
--default_body(Req, M, _Path) when M =:= 'GET'; M =:= 'HEAD' ->
-- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()},
-- {parse_cookie, Req:parse_cookie()},
-- Req:dump()]]),
-- Req:ok({"text/html",
-- [mochiweb_cookies:cookie("mochiweb_http", "test_cookie")],
-- frm(Body)});
--default_body(Req, 'POST', "/multipart") ->
-- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()},
-- {parse_cookie, Req:parse_cookie()},
-- {body, Req:recv_body()},
-- Req:dump()]]),
-- Req:ok({"text/html", [], frm(Body)});
--default_body(Req, 'POST', _Path) ->
-- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()},
-- {parse_cookie, Req:parse_cookie()},
-- {parse_post, Req:parse_post()},
-- Req:dump()]]),
-- Req:ok({"text/html", [], frm(Body)});
--default_body(Req, _Method, _Path) ->
-- Req:respond({501, [], []}).
--
--default_body(Req) ->
-- default_body(Req, Req:get(method), Req:get(path)).
-+start_link(Options) ->
-+ mochiweb_socket_server:start_link(parse_options(Options)).
-
- loop(Socket, Body) ->
-- mochiweb_socket:setopts(Socket, [{packet, http}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, http}]),
- request(Socket, Body).
-
- request(Socket, Body) ->
-- mochiweb_socket:setopts(Socket, [{active, once}]),
-+ ok = mochiweb_socket:setopts(Socket, [{active, once}]),
- receive
- {Protocol, _, {http_request, Method, Path, Version}} when Protocol == http orelse Protocol == ssl ->
-- mochiweb_socket:setopts(Socket, [{packet, httph}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, httph}]),
- headers(Socket, {Method, Path, Version}, [], Body, 0);
- {Protocol, _, {http_error, "\r\n"}} when Protocol == http orelse Protocol == ssl ->
- request(Socket, Body);
-@@ -112,6 +63,13 @@
- {tcp_closed, _} ->
- mochiweb_socket:close(Socket),
- exit(normal);
-+ {ssl_closed, _} ->
-+ mochiweb_socket:close(Socket),
-+ exit(normal);
-+ {tcp_error,_,emsgsize} ->
-+ % R15B02 returns this then closes the socket, so close and exit
-+ mochiweb_socket:close(Socket),
-+ exit(normal);
- _Other ->
- handle_invalid_request(Socket)
- after ?REQUEST_RECV_TIMEOUT ->
-@@ -126,10 +84,10 @@
-
- headers(Socket, Request, Headers, _Body, ?MAX_HEADERS) ->
- %% Too many headers sent, bad request.
-- mochiweb_socket:setopts(Socket, [{packet, raw}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]),
- handle_invalid_request(Socket, Request, Headers);
- headers(Socket, Request, Headers, Body, HeaderCount) ->
-- mochiweb_socket:setopts(Socket, [{active, once}]),
-+ ok = mochiweb_socket:setopts(Socket, [{active, once}]),
- receive
- {Protocol, _, http_eoh} when Protocol == http orelse Protocol == ssl ->
- Req = new_request(Socket, Request, Headers),
-@@ -141,6 +99,10 @@
- {tcp_closed, _} ->
- mochiweb_socket:close(Socket),
- exit(normal);
-+ {tcp_error,_,emsgsize} ->
-+ % R15B02 returns this then closes the socket, so close and exit
-+ mochiweb_socket:close(Socket),
-+ exit(normal);
- _Other ->
- handle_invalid_request(Socket, Request, Headers)
- after ?HEADERS_RECV_TIMEOUT ->
-@@ -148,14 +110,19 @@
- exit(normal)
- end.
-
-+call_body({M, F, A}, Req) ->
-+ erlang:apply(M, F, [Req | A]);
- call_body({M, F}, Req) ->
- M:F(Req);
- call_body(Body, Req) ->
- Body(Req).
-
-+-spec handle_invalid_request(term()) -> no_return().
- handle_invalid_request(Socket) ->
-- handle_invalid_request(Socket, {'GET', {abs_path, "/"}, {0,9}}, []).
-+ handle_invalid_request(Socket, {'GET', {abs_path, "/"}, {0,9}}, []),
-+ exit(normal).
-
-+-spec handle_invalid_request(term(), term(), term()) -> no_return().
- handle_invalid_request(Socket, Request, RevHeaders) ->
- Req = new_request(Socket, Request, RevHeaders),
- Req:respond({400, [], []}),
-@@ -163,7 +130,7 @@
- exit(normal).
-
- new_request(Socket, Request, RevHeaders) ->
-- mochiweb_socket:setopts(Socket, [{packet, raw}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]),
- mochiweb:new_request({Socket, Request, lists:reverse(RevHeaders)}).
-
- after_response(Body, Req) ->
-@@ -174,6 +141,7 @@
- exit(normal);
- false ->
- Req:cleanup(),
-+ erlang:garbage_collect(),
- ?MODULE:loop(Socket, Body)
- end.
-
-@@ -211,6 +179,8 @@
- invalid_range;
- {Start, End} when 0 =< Start, Start =< End, End < Size ->
- {Start, End - Start + 1};
-+ {Start, End} when 0 =< Start, Start =< End, End >= Size ->
-+ {Start, Size - Start};
- {_OutOfRange, _End} ->
- invalid_range
- end.
-@@ -218,8 +188,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- range_test() ->
- %% valid, single ranges
-@@ -265,19 +235,23 @@
- BodySizeLess1 = BodySize - 1,
- ?assertEqual({BodySizeLess1, 1},
- range_skip_length({BodySize - 1, none}, BodySize)),
-+ ?assertEqual({BodySizeLess1, 1},
-+ range_skip_length({BodySize - 1, BodySize+5}, BodySize)),
-+ ?assertEqual({BodySizeLess1, 1},
-+ range_skip_length({BodySize - 1, BodySize}, BodySize)),
-
- %% out of range, return whole thing
- ?assertEqual({0, BodySize},
- range_skip_length({none, BodySize + 1}, BodySize)),
- ?assertEqual({0, BodySize},
- range_skip_length({none, -1}, BodySize)),
-+ ?assertEqual({0, BodySize},
-+ range_skip_length({0, BodySize + 1}, BodySize)),
-
- %% invalid ranges
- ?assertEqual(invalid_range,
- range_skip_length({-1, 30}, BodySize)),
- ?assertEqual(invalid_range,
-- range_skip_length({0, BodySize + 1}, BodySize)),
-- ?assertEqual(invalid_range,
- range_skip_length({-1, BodySize + 1}, BodySize)),
- ?assertEqual(invalid_range,
- range_skip_length({BodySize, 40}, BodySize)),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_io.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_io.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_io.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_io.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -38,9 +38,6 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
--
--
--
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_mime.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_mime.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_mime.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_mime.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -11,72 +11,393 @@
- %% @doc Given a filename extension (e.g. ".html") return a guess for the MIME
- %% type such as "text/html". Will return the atom undefined if no good
- %% guess is available.
--from_extension(".html") ->
-- "text/html";
--from_extension(".xhtml") ->
-- "application/xhtml+xml";
--from_extension(".xml") ->
-- "application/xml";
--from_extension(".css") ->
-- "text/css";
-+
-+from_extension(".stl") ->
-+ "application/SLA";
-+from_extension(".stp") ->
-+ "application/STEP";
-+from_extension(".step") ->
-+ "application/STEP";
-+from_extension(".dwg") ->
-+ "application/acad";
-+from_extension(".ez") ->
-+ "application/andrew-inset";
-+from_extension(".ccad") ->
-+ "application/clariscad";
-+from_extension(".drw") ->
-+ "application/drafting";
-+from_extension(".tsp") ->
-+ "application/dsptype";
-+from_extension(".dxf") ->
-+ "application/dxf";
-+from_extension(".xls") ->
-+ "application/excel";
-+from_extension(".unv") ->
-+ "application/i-deas";
-+from_extension(".jar") ->
-+ "application/java-archive";
-+from_extension(".hqx") ->
-+ "application/mac-binhex40";
-+from_extension(".cpt") ->
-+ "application/mac-compactpro";
-+from_extension(".pot") ->
-+ "application/vnd.ms-powerpoint";
-+from_extension(".ppt") ->
-+ "application/vnd.ms-powerpoint";
-+from_extension(".dms") ->
-+ "application/octet-stream";
-+from_extension(".lha") ->
-+ "application/octet-stream";
-+from_extension(".lzh") ->
-+ "application/octet-stream";
-+from_extension(".oda") ->
-+ "application/oda";
-+from_extension(".ogg") ->
-+ "application/ogg";
-+from_extension(".ogm") ->
-+ "application/ogg";
-+from_extension(".pdf") ->
-+ "application/pdf";
-+from_extension(".pgp") ->
-+ "application/pgp";
-+from_extension(".ai") ->
-+ "application/postscript";
-+from_extension(".eps") ->
-+ "application/postscript";
-+from_extension(".ps") ->
-+ "application/postscript";
-+from_extension(".prt") ->
-+ "application/pro_eng";
-+from_extension(".rtf") ->
-+ "application/rtf";
-+from_extension(".smi") ->
-+ "application/smil";
-+from_extension(".smil") ->
-+ "application/smil";
-+from_extension(".sol") ->
-+ "application/solids";
-+from_extension(".vda") ->
-+ "application/vda";
-+from_extension(".xlm") ->
-+ "application/vnd.ms-excel";
-+from_extension(".cod") ->
-+ "application/vnd.rim.cod";
-+from_extension(".pgn") ->
-+ "application/x-chess-pgn";
-+from_extension(".cpio") ->
-+ "application/x-cpio";
-+from_extension(".csh") ->
-+ "application/x-csh";
-+from_extension(".deb") ->
-+ "application/x-debian-package";
-+from_extension(".dcr") ->
-+ "application/x-director";
-+from_extension(".dir") ->
-+ "application/x-director";
-+from_extension(".dxr") ->
-+ "application/x-director";
-+from_extension(".gz") ->
-+ "application/x-gzip";
-+from_extension(".hdf") ->
-+ "application/x-hdf";
-+from_extension(".ipx") ->
-+ "application/x-ipix";
-+from_extension(".ips") ->
-+ "application/x-ipscript";
- from_extension(".js") ->
- "application/x-javascript";
--from_extension(".jpg") ->
-- "image/jpeg";
--from_extension(".gif") ->
-- "image/gif";
--from_extension(".png") ->
-- "image/png";
-+from_extension(".skd") ->
-+ "application/x-koan";
-+from_extension(".skm") ->
-+ "application/x-koan";
-+from_extension(".skp") ->
-+ "application/x-koan";
-+from_extension(".skt") ->
-+ "application/x-koan";
-+from_extension(".latex") ->
-+ "application/x-latex";
-+from_extension(".lsp") ->
-+ "application/x-lisp";
-+from_extension(".scm") ->
-+ "application/x-lotusscreencam";
-+from_extension(".mif") ->
-+ "application/x-mif";
-+from_extension(".com") ->
-+ "application/x-msdos-program";
-+from_extension(".exe") ->
-+ "application/octet-stream";
-+from_extension(".cdf") ->
-+ "application/x-netcdf";
-+from_extension(".nc") ->
-+ "application/x-netcdf";
-+from_extension(".pl") ->
-+ "application/x-perl";
-+from_extension(".pm") ->
-+ "application/x-perl";
-+from_extension(".rar") ->
-+ "application/x-rar-compressed";
-+from_extension(".sh") ->
-+ "application/x-sh";
-+from_extension(".shar") ->
-+ "application/x-shar";
- from_extension(".swf") ->
- "application/x-shockwave-flash";
--from_extension(".zip") ->
-- "application/zip";
--from_extension(".bz2") ->
-- "application/x-bzip2";
--from_extension(".gz") ->
-- "application/x-gzip";
-+from_extension(".sit") ->
-+ "application/x-stuffit";
-+from_extension(".sv4cpio") ->
-+ "application/x-sv4cpio";
-+from_extension(".sv4crc") ->
-+ "application/x-sv4crc";
-+from_extension(".tar.gz") ->
-+ "application/x-tar-gz";
-+from_extension(".tgz") ->
-+ "application/x-tar-gz";
- from_extension(".tar") ->
- "application/x-tar";
--from_extension(".tgz") ->
-- "application/x-gzip";
-+from_extension(".tcl") ->
-+ "application/x-tcl";
-+from_extension(".texi") ->
-+ "application/x-texinfo";
-+from_extension(".texinfo") ->
-+ "application/x-texinfo";
-+from_extension(".man") ->
-+ "application/x-troff-man";
-+from_extension(".me") ->
-+ "application/x-troff-me";
-+from_extension(".ms") ->
-+ "application/x-troff-ms";
-+from_extension(".roff") ->
-+ "application/x-troff";
-+from_extension(".t") ->
-+ "application/x-troff";
-+from_extension(".tr") ->
-+ "application/x-troff";
-+from_extension(".ustar") ->
-+ "application/x-ustar";
-+from_extension(".src") ->
-+ "application/x-wais-source";
-+from_extension(".zip") ->
-+ "application/zip";
-+from_extension(".tsi") ->
-+ "audio/TSP-audio";
-+from_extension(".au") ->
-+ "audio/basic";
-+from_extension(".snd") ->
-+ "audio/basic";
-+from_extension(".kar") ->
-+ "audio/midi";
-+from_extension(".mid") ->
-+ "audio/midi";
-+from_extension(".midi") ->
-+ "audio/midi";
-+from_extension(".mp2") ->
-+ "audio/mpeg";
-+from_extension(".mp3") ->
-+ "audio/mpeg";
-+from_extension(".mpga") ->
-+ "audio/mpeg";
-+from_extension(".aif") ->
-+ "audio/x-aiff";
-+from_extension(".aifc") ->
-+ "audio/x-aiff";
-+from_extension(".aiff") ->
-+ "audio/x-aiff";
-+from_extension(".m3u") ->
-+ "audio/x-mpegurl";
-+from_extension(".wax") ->
-+ "audio/x-ms-wax";
-+from_extension(".wma") ->
-+ "audio/x-ms-wma";
-+from_extension(".rpm") ->
-+ "audio/x-pn-realaudio-plugin";
-+from_extension(".ram") ->
-+ "audio/x-pn-realaudio";
-+from_extension(".rm") ->
-+ "audio/x-pn-realaudio";
-+from_extension(".ra") ->
-+ "audio/x-realaudio";
-+from_extension(".wav") ->
-+ "audio/x-wav";
-+from_extension(".pdb") ->
-+ "chemical/x-pdb";
-+from_extension(".ras") ->
-+ "image/cmu-raster";
-+from_extension(".gif") ->
-+ "image/gif";
-+from_extension(".ief") ->
-+ "image/ief";
-+from_extension(".jpe") ->
-+ "image/jpeg";
-+from_extension(".jpeg") ->
-+ "image/jpeg";
-+from_extension(".jpg") ->
-+ "image/jpeg";
-+from_extension(".jp2") ->
-+ "image/jp2";
-+from_extension(".png") ->
-+ "image/png";
-+from_extension(".tif") ->
-+ "image/tiff";
-+from_extension(".tiff") ->
-+ "image/tiff";
-+from_extension(".pnm") ->
-+ "image/x-portable-anymap";
-+from_extension(".pbm") ->
-+ "image/x-portable-bitmap";
-+from_extension(".pgm") ->
-+ "image/x-portable-graymap";
-+from_extension(".ppm") ->
-+ "image/x-portable-pixmap";
-+from_extension(".rgb") ->
-+ "image/x-rgb";
-+from_extension(".xbm") ->
-+ "image/x-xbitmap";
-+from_extension(".xwd") ->
-+ "image/x-xwindowdump";
-+from_extension(".iges") ->
-+ "model/iges";
-+from_extension(".igs") ->
-+ "model/iges";
-+from_extension(".mesh") ->
-+ "model/mesh";
-+from_extension(".") ->
-+ "";
-+from_extension(".msh") ->
-+ "model/mesh";
-+from_extension(".silo") ->
-+ "model/mesh";
-+from_extension(".vrml") ->
-+ "model/vrml";
-+from_extension(".wrl") ->
-+ "model/vrml";
-+from_extension(".css") ->
-+ "text/css";
-+from_extension(".htm") ->
-+ "text/html";
-+from_extension(".html") ->
-+ "text/html";
-+from_extension(".asc") ->
-+ "text/plain";
-+from_extension(".c") ->
-+ "text/plain";
-+from_extension(".cc") ->
-+ "text/plain";
-+from_extension(".f90") ->
-+ "text/plain";
-+from_extension(".f") ->
-+ "text/plain";
-+from_extension(".hh") ->
-+ "text/plain";
-+from_extension(".m") ->
-+ "text/plain";
- from_extension(".txt") ->
- "text/plain";
--from_extension(".doc") ->
-- "application/msword";
--from_extension(".pdf") ->
-- "application/pdf";
--from_extension(".xls") ->
-- "application/vnd.ms-excel";
--from_extension(".rtf") ->
-- "application/rtf";
-+from_extension(".rtx") ->
-+ "text/richtext";
-+from_extension(".sgm") ->
-+ "text/sgml";
-+from_extension(".sgml") ->
-+ "text/sgml";
-+from_extension(".tsv") ->
-+ "text/tab-separated-values";
-+from_extension(".jad") ->
-+ "text/vnd.sun.j2me.app-descriptor";
-+from_extension(".etx") ->
-+ "text/x-setext";
-+from_extension(".xml") ->
-+ "application/xml";
-+from_extension(".dl") ->
-+ "video/dl";
-+from_extension(".fli") ->
-+ "video/fli";
-+from_extension(".flv") ->
-+ "video/x-flv";
-+from_extension(".gl") ->
-+ "video/gl";
-+from_extension(".mp4") ->
-+ "video/mp4";
-+from_extension(".mpe") ->
-+ "video/mpeg";
-+from_extension(".mpeg") ->
-+ "video/mpeg";
-+from_extension(".mpg") ->
-+ "video/mpeg";
- from_extension(".mov") ->
- "video/quicktime";
--from_extension(".mp3") ->
-- "audio/mpeg";
-+from_extension(".qt") ->
-+ "video/quicktime";
-+from_extension(".viv") ->
-+ "video/vnd.vivo";
-+from_extension(".vivo") ->
-+ "video/vnd.vivo";
-+from_extension(".asf") ->
-+ "video/x-ms-asf";
-+from_extension(".asx") ->
-+ "video/x-ms-asx";
-+from_extension(".wmv") ->
-+ "video/x-ms-wmv";
-+from_extension(".wmx") ->
-+ "video/x-ms-wmx";
-+from_extension(".wvx") ->
-+ "video/x-ms-wvx";
-+from_extension(".avi") ->
-+ "video/x-msvideo";
-+from_extension(".movie") ->
-+ "video/x-sgi-movie";
-+from_extension(".mime") ->
-+ "www/mime";
-+from_extension(".ice") ->
-+ "x-conference/x-cooltalk";
-+from_extension(".vrm") ->
-+ "x-world/x-vrml";
-+from_extension(".spx") ->
-+ "audio/ogg";
-+from_extension(".xhtml") ->
-+ "application/xhtml+xml";
-+from_extension(".bz2") ->
-+ "application/x-bzip2";
-+from_extension(".doc") ->
-+ "application/msword";
- from_extension(".z") ->
- "application/x-compress";
--from_extension(".wav") ->
-- "audio/x-wav";
- from_extension(".ico") ->
- "image/x-icon";
- from_extension(".bmp") ->
- "image/bmp";
- from_extension(".m4a") ->
- "audio/mpeg";
--from_extension(".m3u") ->
-- "audio/x-mpegurl";
--from_extension(".exe") ->
-- "application/octet-stream";
- from_extension(".csv") ->
- "text/csv";
-+from_extension(".eot") ->
-+ "application/vnd.ms-fontobject";
-+from_extension(".m4v") ->
-+ "video/mp4";
-+from_extension(".svg") ->
-+ "image/svg+xml";
-+from_extension(".svgz") ->
-+ "image/svg+xml";
-+from_extension(".ttc") ->
-+ "application/x-font-ttf";
-+from_extension(".ttf") ->
-+ "application/x-font-ttf";
-+from_extension(".vcf") ->
-+ "text/x-vcard";
-+from_extension(".webm") ->
-+ "video/web";
-+from_extension(".webp") ->
-+ "image/web";
-+from_extension(".woff") ->
-+ "application/x-font-woff";
-+from_extension(".otf") ->
-+ "font/opentype";
- from_extension(_) ->
- undefined.
-
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- exhaustive_from_extension_test() ->
- T = mochiweb_cover:clause_lookup_table(?MODULE, from_extension),
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_multipart.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_multipart.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_multipart.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_multipart.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -128,7 +128,7 @@
-
- parse_multipart_request(Req, Callback) ->
- %% TODO: Support chunked?
-- Length = list_to_integer(Req:get_header_value("content-length")),
-+ Length = list_to_integer(Req:get_combined_header_value("content-length")),
- Boundary = iolist_to_binary(
- get_boundary(Req:get_header_value("content-type"))),
- Prefix = <<"\r\n--", Boundary/binary>>,
-@@ -240,24 +240,22 @@
- S
- end.
-
--find_in_binary(B, Data) when size(B) > 0 ->
-- case size(Data) - size(B) of
-+%% @spec find_in_binary(Pattern::binary(), Data::binary()) ->
-+%% {exact, N} | {partial, N, K} | not_found
-+%% @doc Searches for the given pattern in the given binary.
-+find_in_binary(P, Data) when size(P) > 0 ->
-+ PS = size(P),
-+ DS = size(Data),
-+ case DS - PS of
- Last when Last < 0 ->
-- partial_find(B, Data, 0, size(Data));
-+ partial_find(P, Data, 0, DS);
- Last ->
-- find_in_binary(B, size(B), Data, 0, Last)
-+ case binary:match(Data, P) of
-+ {Pos, _} -> {exact, Pos};
-+ nomatch -> partial_find(P, Data, Last+1, PS-1)
-+ end
- end.
-
--find_in_binary(B, BS, D, N, Last) when N =< Last->
-- case D of
-- <<_:N/binary, B:BS/binary, _/binary>> ->
-- {exact, N};
-- _ ->
-- find_in_binary(B, BS, D, 1 + N, Last)
-- end;
--find_in_binary(B, BS, D, N, Last) when N =:= 1 + Last ->
-- partial_find(B, D, N, BS - 1).
--
- partial_find(_B, _D, _N, 0) ->
- not_found;
- partial_find(B, D, N, K) ->
-@@ -295,8 +293,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- ssl_cert_opts() ->
- EbinDir = filename:dirname(code:which(?MODULE)),
-@@ -313,7 +311,7 @@
- ssl ->
- ServerOpts0 ++ [{ssl, true}, {ssl_opts, ssl_cert_opts()}]
- end,
-- {ok, Server} = mochiweb_socket_server:start(ServerOpts),
-+ {ok, Server} = mochiweb_socket_server:start_link(ServerOpts),
- Port = mochiweb_socket_server:get(Server, port),
- ClientOpts = [binary, {active, false}],
- {ok, Client} = case Transport of
-@@ -821,4 +819,54 @@
- 10))),
- ok.
-
-+%% @todo Move somewhere more appropriate than in the test suite
-+
-+multipart_parsing_benchmark_test() ->
-+ run_multipart_parsing_benchmark(1).
-+
-+run_multipart_parsing_benchmark(0) -> ok;
-+run_multipart_parsing_benchmark(N) ->
-+ multipart_parsing_benchmark(),
-+ run_multipart_parsing_benchmark(N-1).
-+
-+multipart_parsing_benchmark() ->
-+ ContentType = "multipart/form-data; boundary=----------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5",
-+ Chunk = binary:copy(<<"This Is_%Some=Quite0Long4String2Used9For7BenchmarKing.5">>, 102400),
-+ BinContent = <<"------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"Filename\"\r\n\r\nhello.txt\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"success_action_status\"\r\n\r\n201\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"file\"; filename=\"hello.txt\"\r\nContent-Type: application/octet-stream\r\n\r\n", Chunk/binary, "\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"Upload\"\r\n\r\nSubmit Query\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5--">>,
-+ Expect = [{headers,
-+ [{"content-disposition",
-+ {"form-data", [{"name", "Filename"}]}}]},
-+ {body, <<"hello.txt">>},
-+ body_end,
-+ {headers,
-+ [{"content-disposition",
-+ {"form-data", [{"name", "success_action_status"}]}}]},
-+ {body, <<"201">>},
-+ body_end,
-+ {headers,
-+ [{"content-disposition",
-+ {"form-data", [{"name", "file"}, {"filename", "hello.txt"}]}},
-+ {"content-type", {"application/octet-stream", []}}]},
-+ {body, Chunk},
-+ body_end,
-+ {headers,
-+ [{"content-disposition",
-+ {"form-data", [{"name", "Upload"}]}}]},
-+ {body, <<"Submit Query">>},
-+ body_end,
-+ eof],
-+ TestCallback = fun (Next) -> test_callback(Next, Expect) end,
-+ ServerFun = fun (Socket) ->
-+ ok = mochiweb_socket:send(Socket, BinContent),
-+ exit(normal)
-+ end,
-+ ClientFun = fun (Socket) ->
-+ Req = fake_request(Socket, ContentType,
-+ byte_size(BinContent)),
-+ Res = parse_multipart_request(Req, TestCallback),
-+ {0, <<>>, ok} = Res,
-+ ok
-+ end,
-+ ok = with_socket_server(plain, ServerFun, ClientFun),
-+ ok.
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_request.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_request.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -3,7 +3,7 @@
-
- %% @doc MochiWeb HTTP Request abstraction.
-
---module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]).
-+-module(mochiweb_request).
- -author('bob@mochimedia.com').
-
- -include_lib("kernel/include/file.hrl").
-@@ -11,17 +11,18 @@
-
- -define(QUIP, "Any of you quaids got a smint?").
-
---export([get_header_value/1, get_primary_header_value/1, get/1, dump/0]).
---export([send/1, recv/1, recv/2, recv_body/0, recv_body/1, stream_body/3]).
---export([start_response/1, start_response_length/1, start_raw_response/1]).
---export([respond/1, ok/1]).
---export([not_found/0, not_found/1]).
---export([parse_post/0, parse_qs/0]).
---export([should_close/0, cleanup/0]).
---export([parse_cookie/0, get_cookie_value/1]).
---export([serve_file/2, serve_file/3]).
---export([accepted_encodings/1]).
---export([accepts_content_type/1]).
-+-export([new/5]).
-+-export([get_header_value/2, get_primary_header_value/2, get_combined_header_value/2, get/2, dump/1]).
-+-export([send/2, recv/2, recv/3, recv_body/1, recv_body/2, stream_body/4]).
-+-export([start_response/2, start_response_length/2, start_raw_response/2]).
-+-export([respond/2, ok/2]).
-+-export([not_found/1, not_found/2]).
-+-export([parse_post/1, parse_qs/1]).
-+-export([should_close/1, cleanup/1]).
-+-export([parse_cookie/1, get_cookie_value/2]).
-+-export([serve_file/3, serve_file/4]).
-+-export([accepted_encodings/2]).
-+-export([accepts_content_type/2, accepted_content_types/2]).
-
- -define(SAVE_QS, mochiweb_request_qs).
- -define(SAVE_PATH, mochiweb_request_path).
-@@ -32,11 +33,10 @@
- -define(SAVE_COOKIE, mochiweb_request_cookie).
- -define(SAVE_FORCE_CLOSE, mochiweb_request_force_close).
-
--%% @type iolist() = [iolist() | binary() | char()].
--%% @type iodata() = binary() | iolist().
- %% @type key() = atom() | string() | binary()
- %% @type value() = atom() | string() | binary() | integer()
- %% @type headers(). A mochiweb_headers structure.
-+%% @type request(). A mochiweb_request parameterized module instance.
- %% @type response(). A mochiweb_response parameterized module instance.
- %% @type ioheaders() = headers() | [{key(), value()}].
-
-@@ -46,50 +46,58 @@
- % Maximum recv_body() length of 1MB
- -define(MAX_RECV_BODY, (1024*1024)).
-
--%% @spec get_header_value(K) -> undefined | Value
-+%% @spec new(Socket, Method, RawPath, Version, headers()) -> request()
-+%% @doc Create a new request instance.
-+new(Socket, Method, RawPath, Version, Headers) ->
-+ {?MODULE, [Socket, Method, RawPath, Version, Headers]}.
-+
-+%% @spec get_header_value(K, request()) -> undefined | Value
- %% @doc Get the value of a given request header.
--get_header_value(K) ->
-+get_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) ->
- mochiweb_headers:get_value(K, Headers).
-
--get_primary_header_value(K) ->
-+get_primary_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) ->
- mochiweb_headers:get_primary_value(K, Headers).
-
-+get_combined_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) ->
-+ mochiweb_headers:get_combined_value(K, Headers).
-+
- %% @type field() = socket | scheme | method | raw_path | version | headers | peer | path | body_length | range
-
--%% @spec get(field()) -> term()
-+%% @spec get(field(), request()) -> term()
- %% @doc Return the internal representation of the given field. If
- %% <code>socket</code> is requested on a HTTPS connection, then
- %% an ssl socket will be returned as <code>{ssl, SslSocket}</code>.
- %% You can use <code>SslSocket</code> with the <code>ssl</code>
- %% application, eg: <code>ssl:peercert(SslSocket)</code>.
--get(socket) ->
-+get(socket, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
- Socket;
--get(scheme) ->
-+get(scheme, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
- case mochiweb_socket:type(Socket) of
- plain ->
- http;
- ssl ->
- https
- end;
--get(method) ->
-+get(method, {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}) ->
- Method;
--get(raw_path) ->
-+get(raw_path, {?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) ->
- RawPath;
--get(version) ->
-+get(version, {?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}) ->
- Version;
--get(headers) ->
-+get(headers, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) ->
- Headers;
--get(peer) ->
-+get(peer, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case mochiweb_socket:peername(Socket) of
- {ok, {Addr={10, _, _, _}, _Port}} ->
-- case get_header_value("x-forwarded-for") of
-+ case get_header_value("x-forwarded-for", THIS) of
- undefined ->
- inet_parse:ntoa(Addr);
- Hosts ->
- string:strip(lists:last(string:tokens(Hosts, ",")))
- end;
- {ok, {{127, 0, 0, 1}, _Port}} ->
-- case get_header_value("x-forwarded-for") of
-+ case get_header_value("x-forwarded-for", THIS) of
- undefined ->
- "127.0.0.1";
- Hosts ->
-@@ -100,7 +108,7 @@
- {error, enotconn} ->
- exit(normal)
- end;
--get(path) ->
-+get(path, {?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) ->
- case erlang:get(?SAVE_PATH) of
- undefined ->
- {Path0, _, _} = mochiweb_util:urlsplit_path(RawPath),
-@@ -110,35 +118,35 @@
- Cached ->
- Cached
- end;
--get(body_length) ->
-+get(body_length, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case erlang:get(?SAVE_BODY_LENGTH) of
- undefined ->
-- BodyLength = body_length(),
-+ BodyLength = body_length(THIS),
- put(?SAVE_BODY_LENGTH, {cached, BodyLength}),
- BodyLength;
- {cached, Cached} ->
- Cached
- end;
--get(range) ->
-- case get_header_value(range) of
-+get(range, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ case get_header_value(range, THIS) of
- undefined ->
- undefined;
- RawRange ->
- mochiweb_http:parse_range_request(RawRange)
- end.
-
--%% @spec dump() -> {mochiweb_request, [{atom(), term()}]}
-+%% @spec dump(request()) -> {mochiweb_request, [{atom(), term()}]}
- %% @doc Dump the internal representation to a "human readable" set of terms
- %% for debugging/inspection purposes.
--dump() ->
-+dump({?MODULE, [_Socket, Method, RawPath, Version, Headers]}) ->
- {?MODULE, [{method, Method},
- {version, Version},
- {raw_path, RawPath},
- {headers, mochiweb_headers:to_list(Headers)}]}.
-
--%% @spec send(iodata()) -> ok
-+%% @spec send(iodata(), request()) -> ok
- %% @doc Send data over the socket.
--send(Data) ->
-+send(Data, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
- case mochiweb_socket:send(Socket, Data) of
- ok ->
- ok;
-@@ -146,16 +154,16 @@
- exit(normal)
- end.
-
--%% @spec recv(integer()) -> binary()
-+%% @spec recv(integer(), request()) -> binary()
- %% @doc Receive Length bytes from the client as a binary, with the default
- %% idle timeout.
--recv(Length) ->
-- recv(Length, ?IDLE_TIMEOUT).
-+recv(Length, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ recv(Length, ?IDLE_TIMEOUT, THIS).
-
--%% @spec recv(integer(), integer()) -> binary()
-+%% @spec recv(integer(), integer(), request()) -> binary()
- %% @doc Receive Length bytes from the client as a binary, with the given
- %% Timeout in msec.
--recv(Length, Timeout) ->
-+recv(Length, Timeout, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
- case mochiweb_socket:recv(Socket, Length, Timeout) of
- {ok, Data} ->
- put(?SAVE_RECV, true),
-@@ -164,12 +172,12 @@
- exit(normal)
- end.
-
--%% @spec body_length() -> undefined | chunked | unknown_transfer_encoding | integer()
-+%% @spec body_length(request()) -> undefined | chunked | unknown_transfer_encoding | integer()
- %% @doc Infer body length from transfer-encoding and content-length headers.
--body_length() ->
-- case get_header_value("transfer-encoding") of
-+body_length({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ case get_header_value("transfer-encoding", THIS) of
- undefined ->
-- case get_header_value("content-length") of
-+ case get_combined_header_value("content-length", THIS) of
- undefined ->
- undefined;
- Length ->
-@@ -182,16 +190,16 @@
- end.
-
-
--%% @spec recv_body() -> binary()
-+%% @spec recv_body(request()) -> binary()
- %% @doc Receive the body of the HTTP request (defined by Content-Length).
- %% Will only receive up to the default max-body length of 1MB.
--recv_body() ->
-- recv_body(?MAX_RECV_BODY).
-+recv_body({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ recv_body(?MAX_RECV_BODY, THIS).
-
--%% @spec recv_body(integer()) -> binary()
-+%% @spec recv_body(integer(), request()) -> binary()
- %% @doc Receive the body of the HTTP request (defined by Content-Length).
- %% Will receive up to MaxBody bytes.
--recv_body(MaxBody) ->
-+recv_body(MaxBody, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case erlang:get(?SAVE_BODY) of
- undefined ->
- % we could use a sane constant for max chunk size
-@@ -205,17 +213,18 @@
- true ->
- {NewLength, [Bin | BinAcc]}
- end
-- end, {0, []}, MaxBody),
-+ end, {0, []}, MaxBody, THIS),
- put(?SAVE_BODY, Body),
- Body;
- Cached -> Cached
- end.
-
--stream_body(MaxChunkSize, ChunkFun, FunState) ->
-- stream_body(MaxChunkSize, ChunkFun, FunState, undefined).
-+stream_body(MaxChunkSize, ChunkFun, FunState, {?MODULE,[_Socket,_Method,_RawPath,_Version,_Headers]}=THIS) ->
-+ stream_body(MaxChunkSize, ChunkFun, FunState, undefined, THIS).
-
--stream_body(MaxChunkSize, ChunkFun, FunState, MaxBodyLength) ->
-- Expect = case get_header_value("expect") of
-+stream_body(MaxChunkSize, ChunkFun, FunState, MaxBodyLength,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ Expect = case get_header_value("expect", THIS) of
- undefined ->
- undefined;
- Value when is_list(Value) ->
-@@ -223,11 +232,12 @@
- end,
- case Expect of
- "100-continue" ->
-- start_raw_response({100, gb_trees:empty()});
-+ _ = start_raw_response({100, gb_trees:empty()}, THIS),
-+ ok;
- _Else ->
- ok
- end,
-- case body_length() of
-+ case body_length(THIS) of
- undefined ->
- undefined;
- {unknown_transfer_encoding, Unknown} ->
-@@ -236,7 +246,7 @@
- % In this case the MaxBody is actually used to
- % determine the maximum allowed size of a single
- % chunk.
-- stream_chunked_body(MaxChunkSize, ChunkFun, FunState);
-+ stream_chunked_body(MaxChunkSize, ChunkFun, FunState, THIS);
- 0 ->
- <<>>;
- Length when is_integer(Length) ->
-@@ -244,62 +254,64 @@
- MaxBodyLength when is_integer(MaxBodyLength), MaxBodyLength < Length ->
- exit({body_too_large, content_length});
- _ ->
-- stream_unchunked_body(Length, ChunkFun, FunState)
-- end;
-- Length ->
-- exit({length_not_integer, Length})
-+ stream_unchunked_body(Length, ChunkFun, FunState, THIS)
-+ end
- end.
-
-
--%% @spec start_response({integer(), ioheaders()}) -> response()
-+%% @spec start_response({integer(), ioheaders()}, request()) -> response()
- %% @doc Start the HTTP response by sending the Code HTTP response and
- %% ResponseHeaders. The server will set header defaults such as Server
- %% and Date if not present in ResponseHeaders.
--start_response({Code, ResponseHeaders}) ->
-+start_response({Code, ResponseHeaders}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- HResponse = mochiweb_headers:make(ResponseHeaders),
- HResponse1 = mochiweb_headers:default_from_list(server_headers(),
- HResponse),
-- start_raw_response({Code, HResponse1}).
-+ start_raw_response({Code, HResponse1}, THIS).
-
--%% @spec start_raw_response({integer(), headers()}) -> response()
-+%% @spec start_raw_response({integer(), headers()}, request()) -> response()
- %% @doc Start the HTTP response by sending the Code HTTP response and
- %% ResponseHeaders.
--start_raw_response({Code, ResponseHeaders}) ->
-+start_raw_response({Code, ResponseHeaders}, {?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}=THIS) ->
- F = fun ({K, V}, Acc) ->
- [mochiweb_util:make_io(K), <<": ">>, V, <<"\r\n">> | Acc]
- end,
- End = lists:foldl(F, [<<"\r\n">>],
- mochiweb_headers:to_list(ResponseHeaders)),
-- send([make_version(Version), make_code(Code), <<"\r\n">> | End]),
-+ send([make_version(Version), make_code(Code), <<"\r\n">> | End], THIS),
- mochiweb:new_response({THIS, Code, ResponseHeaders}).
-
-
--%% @spec start_response_length({integer(), ioheaders(), integer()}) -> response()
-+%% @spec start_response_length({integer(), ioheaders(), integer()}, request()) -> response()
- %% @doc Start the HTTP response by sending the Code HTTP response and
- %% ResponseHeaders including a Content-Length of Length. The server
- %% will set header defaults such as Server
- %% and Date if not present in ResponseHeaders.
--start_response_length({Code, ResponseHeaders, Length}) ->
-+start_response_length({Code, ResponseHeaders, Length},
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- HResponse = mochiweb_headers:make(ResponseHeaders),
- HResponse1 = mochiweb_headers:enter("Content-Length", Length, HResponse),
-- start_response({Code, HResponse1}).
-+ start_response({Code, HResponse1}, THIS).
-
--%% @spec respond({integer(), ioheaders(), iodata() | chunked | {file, IoDevice}}) -> response()
-+%% @spec respond({integer(), ioheaders(), iodata() | chunked | {file, IoDevice}}, request()) -> response()
- %% @doc Start the HTTP response with start_response, and send Body to the
- %% client (if the get(method) /= 'HEAD'). The Content-Length header
- %% will be set by the Body length, and the server will insert header
- %% defaults.
--respond({Code, ResponseHeaders, {file, IoDevice}}) ->
-+respond({Code, ResponseHeaders, {file, IoDevice}},
-+ {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}=THIS) ->
- Length = mochiweb_io:iodevice_size(IoDevice),
-- Response = start_response_length({Code, ResponseHeaders, Length}),
-+ Response = start_response_length({Code, ResponseHeaders, Length}, THIS),
- case Method of
- 'HEAD' ->
- ok;
- _ ->
-- mochiweb_io:iodevice_stream(fun send/1, IoDevice)
-+ mochiweb_io:iodevice_stream(
-+ fun (Body) -> send(Body, THIS) end,
-+ IoDevice)
- end,
- Response;
--respond({Code, ResponseHeaders, chunked}) ->
-+respond({Code, ResponseHeaders, chunked}, {?MODULE, [_Socket, Method, _RawPath, Version, _Headers]}=THIS) ->
- HResponse = mochiweb_headers:make(ResponseHeaders),
- HResponse1 = case Method of
- 'HEAD' ->
-@@ -320,35 +332,35 @@
- put(?SAVE_FORCE_CLOSE, true),
- HResponse
- end,
-- start_response({Code, HResponse1});
--respond({Code, ResponseHeaders, Body}) ->
-- Response = start_response_length({Code, ResponseHeaders, iolist_size(Body)}),
-+ start_response({Code, HResponse1}, THIS);
-+respond({Code, ResponseHeaders, Body}, {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ Response = start_response_length({Code, ResponseHeaders, iolist_size(Body)}, THIS),
- case Method of
- 'HEAD' ->
- ok;
- _ ->
-- send(Body)
-+ send(Body, THIS)
- end,
- Response.
-
--%% @spec not_found() -> response()
-+%% @spec not_found(request()) -> response()
- %% @doc Alias for <code>not_found([])</code>.
--not_found() ->
-- not_found([]).
-+not_found({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ not_found([], THIS).
-
--%% @spec not_found(ExtraHeaders) -> response()
-+%% @spec not_found(ExtraHeaders, request()) -> response()
- %% @doc Alias for <code>respond({404, [{"Content-Type", "text/plain"}
- %% | ExtraHeaders], &lt;&lt;"Not found."&gt;&gt;})</code>.
--not_found(ExtraHeaders) ->
-+not_found(ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- respond({404, [{"Content-Type", "text/plain"} | ExtraHeaders],
-- <<"Not found.">>}).
-+ <<"Not found.">>}, THIS).
-
--%% @spec ok({value(), iodata()} | {value(), ioheaders(), iodata() | {file, IoDevice}}) ->
-+%% @spec ok({value(), iodata()} | {value(), ioheaders(), iodata() | {file, IoDevice}}, request()) ->
- %% response()
- %% @doc respond({200, [{"Content-Type", ContentType} | Headers], Body}).
--ok({ContentType, Body}) ->
-- ok({ContentType, [], Body});
--ok({ContentType, ResponseHeaders, Body}) ->
-+ok({ContentType, Body}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ ok({ContentType, [], Body}, THIS);
-+ok({ContentType, ResponseHeaders, Body}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- HResponse = mochiweb_headers:make(ResponseHeaders),
- case THIS:get(range) of
- X when (X =:= undefined orelse X =:= fail) orelse Body =:= chunked ->
-@@ -357,7 +369,7 @@
- %% full response.
- HResponse1 = mochiweb_headers:enter("Content-Type", ContentType,
- HResponse),
-- respond({200, HResponse1, Body});
-+ respond({200, HResponse1, Body}, THIS);
- Ranges ->
- {PartList, Size} = range_parts(Body, Ranges),
- case PartList of
-@@ -366,7 +378,7 @@
- ContentType,
- HResponse),
- %% could be 416, for now we'll just return 200
-- respond({200, HResponse1, Body});
-+ respond({200, HResponse1, Body}, THIS);
- PartList ->
- {RangeHeaders, RangeBody} =
- mochiweb_multipart:parts_to_body(PartList, ContentType, Size),
-@@ -374,46 +386,50 @@
- [{"Accept-Ranges", "bytes"} |
- RangeHeaders],
- HResponse),
-- respond({206, HResponse1, RangeBody})
-+ respond({206, HResponse1, RangeBody}, THIS)
- end
- end.
-
--%% @spec should_close() -> bool()
-+%% @spec should_close(request()) -> bool()
- %% @doc Return true if the connection must be closed. If false, using
- %% Keep-Alive should be safe.
--should_close() ->
-+should_close({?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}=THIS) ->
- ForceClose = erlang:get(?SAVE_FORCE_CLOSE) =/= undefined,
- DidNotRecv = erlang:get(?SAVE_RECV) =:= undefined,
- ForceClose orelse Version < {1, 0}
- %% Connection: close
-- orelse get_header_value("connection") =:= "close"
-+ orelse is_close(get_header_value("connection", THIS))
- %% HTTP 1.0 requires Connection: Keep-Alive
- orelse (Version =:= {1, 0}
-- andalso get_header_value("connection") =/= "Keep-Alive")
-+ andalso get_header_value("connection", THIS) =/= "Keep-Alive")
- %% unread data left on the socket, can't safely continue
- orelse (DidNotRecv
-- andalso get_header_value("content-length") =/= undefined
-- andalso list_to_integer(get_header_value("content-length")) > 0)
-+ andalso get_combined_header_value("content-length", THIS) =/= undefined
-+ andalso list_to_integer(get_combined_header_value("content-length", THIS)) > 0)
- orelse (DidNotRecv
-- andalso get_header_value("transfer-encoding") =:= "chunked").
-+ andalso get_header_value("transfer-encoding", THIS) =:= "chunked").
-+
-+is_close("close") ->
-+ true;
-+is_close(S=[_C, _L, _O, _S, _E]) ->
-+ string:to_lower(S) =:= "close";
-+is_close(_) ->
-+ false.
-
--%% @spec cleanup() -> ok
-+%% @spec cleanup(request()) -> ok
- %% @doc Clean up any junk in the process dictionary, required before continuing
- %% a Keep-Alive request.
--cleanup() ->
-- [erase(K) || K <- [?SAVE_QS,
-- ?SAVE_PATH,
-- ?SAVE_RECV,
-- ?SAVE_BODY,
-- ?SAVE_BODY_LENGTH,
-- ?SAVE_POST,
-- ?SAVE_COOKIE,
-- ?SAVE_FORCE_CLOSE]],
-+cleanup({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}) ->
-+ L = [?SAVE_QS, ?SAVE_PATH, ?SAVE_RECV, ?SAVE_BODY, ?SAVE_BODY_LENGTH,
-+ ?SAVE_POST, ?SAVE_COOKIE, ?SAVE_FORCE_CLOSE],
-+ lists:foreach(fun(K) ->
-+ erase(K)
-+ end, L),
- ok.
-
--%% @spec parse_qs() -> [{Key::string(), Value::string()}]
-+%% @spec parse_qs(request()) -> [{Key::string(), Value::string()}]
- %% @doc Parse the query string of the URL.
--parse_qs() ->
-+parse_qs({?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) ->
- case erlang:get(?SAVE_QS) of
- undefined ->
- {_, QueryString, _} = mochiweb_util:urlsplit_path(RawPath),
-@@ -424,17 +440,17 @@
- Cached
- end.
-
--%% @spec get_cookie_value(Key::string) -> string() | undefined
-+%% @spec get_cookie_value(Key::string, request()) -> string() | undefined
- %% @doc Get the value of the given cookie.
--get_cookie_value(Key) ->
-- proplists:get_value(Key, parse_cookie()).
-+get_cookie_value(Key, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ proplists:get_value(Key, parse_cookie(THIS)).
-
--%% @spec parse_cookie() -> [{Key::string(), Value::string()}]
-+%% @spec parse_cookie(request()) -> [{Key::string(), Value::string()}]
- %% @doc Parse the cookie header.
--parse_cookie() ->
-+parse_cookie({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case erlang:get(?SAVE_COOKIE) of
- undefined ->
-- Cookies = case get_header_value("cookie") of
-+ Cookies = case get_header_value("cookie", THIS) of
- undefined ->
- [];
- Value ->
-@@ -446,17 +462,17 @@
- Cached
- end.
-
--%% @spec parse_post() -> [{Key::string(), Value::string()}]
-+%% @spec parse_post(request()) -> [{Key::string(), Value::string()}]
- %% @doc Parse an application/x-www-form-urlencoded form POST. This
- %% has the side-effect of calling recv_body().
--parse_post() ->
-+parse_post({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case erlang:get(?SAVE_POST) of
- undefined ->
-- Parsed = case recv_body() of
-+ Parsed = case recv_body(THIS) of
- undefined ->
- [];
- Binary ->
-- case get_primary_header_value("content-type") of
-+ case get_primary_header_value("content-type",THIS) of
- "application/x-www-form-urlencoded" ++ _ ->
- mochiweb_util:parse_qs(Binary);
- _ ->
-@@ -469,41 +485,43 @@
- Cached
- end.
-
--%% @spec stream_chunked_body(integer(), fun(), term()) -> term()
-+%% @spec stream_chunked_body(integer(), fun(), term(), request()) -> term()
- %% @doc The function is called for each chunk.
- %% Used internally by read_chunked_body.
--stream_chunked_body(MaxChunkSize, Fun, FunState) ->
-- case read_chunk_length() of
-+stream_chunked_body(MaxChunkSize, Fun, FunState,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ case read_chunk_length(THIS) of
- 0 ->
-- Fun({0, read_chunk(0)}, FunState);
-+ Fun({0, read_chunk(0, THIS)}, FunState);
- Length when Length > MaxChunkSize ->
-- NewState = read_sub_chunks(Length, MaxChunkSize, Fun, FunState),
-- stream_chunked_body(MaxChunkSize, Fun, NewState);
-+ NewState = read_sub_chunks(Length, MaxChunkSize, Fun, FunState, THIS),
-+ stream_chunked_body(MaxChunkSize, Fun, NewState, THIS);
- Length ->
-- NewState = Fun({Length, read_chunk(Length)}, FunState),
-- stream_chunked_body(MaxChunkSize, Fun, NewState)
-+ NewState = Fun({Length, read_chunk(Length, THIS)}, FunState),
-+ stream_chunked_body(MaxChunkSize, Fun, NewState, THIS)
- end.
-
--stream_unchunked_body(0, Fun, FunState) ->
-+stream_unchunked_body(0, Fun, FunState, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}) ->
- Fun({0, <<>>}, FunState);
--stream_unchunked_body(Length, Fun, FunState) when Length > 0 ->
-+stream_unchunked_body(Length, Fun, FunState,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) when Length > 0 ->
- PktSize = case Length > ?RECBUF_SIZE of
- true ->
- ?RECBUF_SIZE;
- false ->
- Length
- end,
-- Bin = recv(PktSize),
-+ Bin = recv(PktSize, THIS),
- NewState = Fun({PktSize, Bin}, FunState),
-- stream_unchunked_body(Length - PktSize, Fun, NewState).
-+ stream_unchunked_body(Length - PktSize, Fun, NewState, THIS).
-
--%% @spec read_chunk_length() -> integer()
-+%% @spec read_chunk_length(request()) -> integer()
- %% @doc Read the length of the next HTTP chunk.
--read_chunk_length() ->
-- mochiweb_socket:setopts(Socket, [{packet, line}]),
-+read_chunk_length({?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
-+ ok = mochiweb_socket:setopts(Socket, [{packet, line}]),
- case mochiweb_socket:recv(Socket, 0, ?IDLE_TIMEOUT) of
- {ok, Header} ->
-- mochiweb_socket:setopts(Socket, [{packet, raw}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]),
- Splitter = fun (C) ->
- C =/= $\r andalso C =/= $\n andalso C =/= $
- end,
-@@ -513,11 +531,11 @@
- exit(normal)
- end.
-
--%% @spec read_chunk(integer()) -> Chunk::binary() | [Footer::binary()]
-+%% @spec read_chunk(integer(), request()) -> Chunk::binary() | [Footer::binary()]
- %% @doc Read in a HTTP chunk of the given length. If Length is 0, then read the
- %% HTTP footers (as a list of binaries, since they're nominal).
--read_chunk(0) ->
-- mochiweb_socket:setopts(Socket, [{packet, line}]),
-+read_chunk(0, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
-+ ok = mochiweb_socket:setopts(Socket, [{packet, line}]),
- F = fun (F1, Acc) ->
- case mochiweb_socket:recv(Socket, 0, ?IDLE_TIMEOUT) of
- {ok, <<"\r\n">>} ->
-@@ -529,10 +547,10 @@
- end
- end,
- Footers = F(F, []),
-- mochiweb_socket:setopts(Socket, [{packet, raw}]),
-+ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]),
- put(?SAVE_RECV, true),
- Footers;
--read_chunk(Length) ->
-+read_chunk(Length, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) ->
- case mochiweb_socket:recv(Socket, 2 + Length, ?IDLE_TIMEOUT) of
- {ok, <<Chunk:Length/binary, "\r\n">>} ->
- Chunk;
-@@ -540,32 +558,34 @@
- exit(normal)
- end.
-
--read_sub_chunks(Length, MaxChunkSize, Fun, FunState) when Length > MaxChunkSize ->
-- Bin = recv(MaxChunkSize),
-+read_sub_chunks(Length, MaxChunkSize, Fun, FunState,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) when Length > MaxChunkSize ->
-+ Bin = recv(MaxChunkSize, THIS),
- NewState = Fun({size(Bin), Bin}, FunState),
-- read_sub_chunks(Length - MaxChunkSize, MaxChunkSize, Fun, NewState);
-+ read_sub_chunks(Length - MaxChunkSize, MaxChunkSize, Fun, NewState, THIS);
-
--read_sub_chunks(Length, _MaxChunkSize, Fun, FunState) ->
-- Fun({Length, read_chunk(Length)}, FunState).
-+read_sub_chunks(Length, _MaxChunkSize, Fun, FunState,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ Fun({Length, read_chunk(Length, THIS)}, FunState).
-
--%% @spec serve_file(Path, DocRoot) -> Response
-+%% @spec serve_file(Path, DocRoot, request()) -> Response
- %% @doc Serve a file relative to DocRoot.
--serve_file(Path, DocRoot) ->
-- serve_file(Path, DocRoot, []).
-+serve_file(Path, DocRoot, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ serve_file(Path, DocRoot, [], THIS).
-
--%% @spec serve_file(Path, DocRoot, ExtraHeaders) -> Response
-+%% @spec serve_file(Path, DocRoot, ExtraHeaders, request()) -> Response
- %% @doc Serve a file relative to DocRoot.
--serve_file(Path, DocRoot, ExtraHeaders) ->
-+serve_file(Path, DocRoot, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case mochiweb_util:safe_relative_path(Path) of
- undefined ->
-- not_found(ExtraHeaders);
-+ not_found(ExtraHeaders, THIS);
- RelPath ->
- FullPath = filename:join([DocRoot, RelPath]),
- case filelib:is_dir(FullPath) of
- true ->
-- maybe_redirect(RelPath, FullPath, ExtraHeaders);
-+ maybe_redirect(RelPath, FullPath, ExtraHeaders, THIS);
- false ->
-- maybe_serve_file(FullPath, ExtraHeaders)
-+ maybe_serve_file(FullPath, ExtraHeaders, THIS)
- end
- end.
-
-@@ -575,13 +595,14 @@
- directory_index(FullPath) ->
- filename:join([FullPath, "index.html"]).
-
--maybe_redirect([], FullPath, ExtraHeaders) ->
-- maybe_serve_file(directory_index(FullPath), ExtraHeaders);
-+maybe_redirect([], FullPath, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ maybe_serve_file(directory_index(FullPath), ExtraHeaders, THIS);
-
--maybe_redirect(RelPath, FullPath, ExtraHeaders) ->
-+maybe_redirect(RelPath, FullPath, ExtraHeaders,
-+ {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}=THIS) ->
- case string:right(RelPath, 1) of
- "/" ->
-- maybe_serve_file(directory_index(FullPath), ExtraHeaders);
-+ maybe_serve_file(directory_index(FullPath), ExtraHeaders, THIS);
- _ ->
- Host = mochiweb_headers:get_value("host", Headers),
- Location = "http://" ++ Host ++ "/" ++ RelPath ++ "/",
-@@ -596,16 +617,16 @@
- "<p>The document has moved <a href=\"">>,
- Bottom = <<">here</a>.</p></body></html>\n">>,
- Body = <<Top/binary, LocationBin/binary, Bottom/binary>>,
-- respond({301, MoreHeaders, Body})
-+ respond({301, MoreHeaders, Body}, THIS)
- end.
-
--maybe_serve_file(File, ExtraHeaders) ->
-+maybe_serve_file(File, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- case file:read_file_info(File) of
- {ok, FileInfo} ->
- LastModified = httpd_util:rfc1123_date(FileInfo#file_info.mtime),
-- case get_header_value("if-modified-since") of
-+ case get_header_value("if-modified-since", THIS) of
- LastModified ->
-- respond({304, ExtraHeaders, ""});
-+ respond({304, ExtraHeaders, ""}, THIS);
- _ ->
- case file:open(File, [raw, binary]) of
- {ok, IoDevice} ->
-@@ -613,15 +634,15 @@
- Res = ok({ContentType,
- [{"last-modified", LastModified}
- | ExtraHeaders],
-- {file, IoDevice}}),
-- file:close(IoDevice),
-+ {file, IoDevice}}, THIS),
-+ ok = file:close(IoDevice),
- Res;
- _ ->
-- not_found(ExtraHeaders)
-+ not_found(ExtraHeaders, THIS)
- end
- end;
- {error, _} ->
-- not_found(ExtraHeaders)
-+ not_found(ExtraHeaders, THIS)
- end.
-
- server_headers() ->
-@@ -669,7 +690,7 @@
- end,
- {lists:foldr(F, [], Ranges), Size}.
-
--%% @spec accepted_encodings([encoding()]) -> [encoding()] | bad_accept_encoding_value
-+%% @spec accepted_encodings([encoding()], request()) -> [encoding()] | bad_accept_encoding_value
- %% @type encoding() = string().
- %%
- %% @doc Returns a list of encodings accepted by a request. Encodings that are
-@@ -693,8 +714,8 @@
- %% accepted_encodings(["gzip", "deflate", "identity"]) ->
- %% ["deflate", "gzip", "identity"]
- %%
--accepted_encodings(SupportedEncodings) ->
-- AcceptEncodingHeader = case get_header_value("Accept-Encoding") of
-+accepted_encodings(SupportedEncodings, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ AcceptEncodingHeader = case get_header_value("Accept-Encoding", THIS) of
- undefined ->
- "";
- Value ->
-@@ -709,7 +730,7 @@
- )
- end.
-
--%% @spec accepts_content_type(string() | binary()) -> boolean() | bad_accept_header
-+%% @spec accepts_content_type(string() | binary(), request()) -> boolean() | bad_accept_header
- %%
- %% @doc Determines whether a request accepts a given media type by analyzing its
- %% "Accept" header.
-@@ -731,16 +752,9 @@
- %% 5) For an "Accept" header with value "text/*; q=0.0, */*":
- %% accepts_content_type("text/plain") -> false
- %%
--accepts_content_type(ContentType) when is_binary(ContentType) ->
-- accepts_content_type(binary_to_list(ContentType));
--accepts_content_type(ContentType1) ->
-+accepts_content_type(ContentType1, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
- ContentType = re:replace(ContentType1, "\\s", "", [global, {return, list}]),
-- AcceptHeader = case get_header_value("Accept") of
-- undefined ->
-- "*/*";
-- Value ->
-- Value
-- end,
-+ AcceptHeader = accept_header(THIS),
- case mochiweb_util:parse_qvalues(AcceptHeader) of
- invalid_qvalue_string ->
- bad_accept_header;
-@@ -761,9 +775,83 @@
- (not lists:member({SuperType, 0.0}, QList))
- end.
-
-+%% @spec accepted_content_types([string() | binary()], request()) -> [string()] | bad_accept_header
-+%%
-+%% @doc Filters which of the given media types this request accepts. This filtering
-+%% is performed by analyzing the "Accept" header. The returned list is sorted
-+%% according to the preferences specified in the "Accept" header (higher Q values
-+%% first). If two or more types have the same preference (Q value), they're order
-+%% in the returned list is the same as they're order in the input list.
-+%%
-+%% Examples
-+%%
-+%% 1) For a missing "Accept" header:
-+%% accepted_content_types(["text/html", "application/json"]) ->
-+%% ["text/html", "application/json"]
-+%%
-+%% 2) For an "Accept" header with value "text/html, application/*":
-+%% accepted_content_types(["application/json", "text/html"]) ->
-+%% ["application/json", "text/html"]
-+%%
-+%% 3) For an "Accept" header with value "text/html, */*; q=0.0":
-+%% accepted_content_types(["text/html", "application/json"]) ->
-+%% ["text/html"]
-+%%
-+%% 4) For an "Accept" header with value "text/html; q=0.5, */*; q=0.1":
-+%% accepts_content_types(["application/json", "text/html"]) ->
-+%% ["text/html", "application/json"]
-+%%
-+accepted_content_types(Types1, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ Types = lists:map(
-+ fun(T) -> re:replace(T, "\\s", "", [global, {return, list}]) end,
-+ Types1),
-+ AcceptHeader = accept_header(THIS),
-+ case mochiweb_util:parse_qvalues(AcceptHeader) of
-+ invalid_qvalue_string ->
-+ bad_accept_header;
-+ QList ->
-+ TypesQ = lists:foldr(
-+ fun(T, Acc) ->
-+ case proplists:get_value(T, QList) of
-+ undefined ->
-+ [MainType, _SubType] = string:tokens(T, "/"),
-+ case proplists:get_value(MainType ++ "/*", QList) of
-+ undefined ->
-+ case proplists:get_value("*/*", QList) of
-+ Q when is_float(Q), Q > 0.0 ->
-+ [{Q, T} | Acc];
-+ _ ->
-+ Acc
-+ end;
-+ Q when Q > 0.0 ->
-+ [{Q, T} | Acc];
-+ _ ->
-+ Acc
-+ end;
-+ Q when Q > 0.0 ->
-+ [{Q, T} | Acc];
-+ _ ->
-+ Acc
-+ end
-+ end,
-+ [], Types),
-+ % Note: Stable sort. If 2 types have the same Q value we leave them in the
-+ % same order as in the input list.
-+ SortFun = fun({Q1, _}, {Q2, _}) -> Q1 >= Q2 end,
-+ [Type || {_Q, Type} <- lists:sort(SortFun, TypesQ)]
-+ end.
-+
-+accept_header({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) ->
-+ case get_header_value("Accept", THIS) of
-+ undefined ->
-+ "*/*";
-+ Value ->
-+ Value
-+ end.
-+
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_request_tests.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request_tests.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_request_tests.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request_tests.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -1,12 +1,13 @@
- -module(mochiweb_request_tests).
-
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- accepts_content_type_test() ->
- Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
- mochiweb_headers:make([{"Accept", "multipart/related"}])),
- ?assertEqual(true, Req1:accepts_content_type("multipart/related")),
-+ ?assertEqual(true, Req1:accepts_content_type(<<"multipart/related">>)),
-
- Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
- mochiweb_headers:make([{"Accept", "text/html"}])),
-@@ -60,4 +61,122 @@
- mochiweb_headers:make([{"Accept", "text/html;level=1;q=0.1, text/html"}])),
- ?assertEqual(true, Req14:accepts_content_type("text/html; level=1")).
-
-+accepted_encodings_test() ->
-+ Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([])),
-+ ?assertEqual(["identity"],
-+ Req1:accepted_encodings(["gzip", "identity"])),
-+
-+ Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "gzip, deflate"}])),
-+ ?assertEqual(["gzip", "identity"],
-+ Req2:accepted_encodings(["gzip", "identity"])),
-+
-+ Req3 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "gzip;q=0.5, deflate"}])),
-+ ?assertEqual(["deflate", "gzip", "identity"],
-+ Req3:accepted_encodings(["gzip", "deflate", "identity"])),
-+
-+ Req4 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "identity, *;q=0"}])),
-+ ?assertEqual(["identity"],
-+ Req4:accepted_encodings(["gzip", "deflate", "identity"])),
-+
-+ Req5 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "gzip; q=0.1, *;q=0"}])),
-+ ?assertEqual(["gzip"],
-+ Req5:accepted_encodings(["gzip", "deflate", "identity"])),
-+
-+ Req6 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "gzip; q=, *;q=0"}])),
-+ ?assertEqual(bad_accept_encoding_value,
-+ Req6:accepted_encodings(["gzip", "deflate", "identity"])),
-+
-+ Req7 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "gzip;q=2.0, *;q=0"}])),
-+ ?assertEqual(bad_accept_encoding_value,
-+ Req7:accepted_encodings(["gzip", "identity"])),
-+
-+ Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept-Encoding", "deflate, *;q=0.0"}])),
-+ ?assertEqual([],
-+ Req8:accepted_encodings(["gzip", "identity"])).
-+
-+accepted_content_types_test() ->
-+ Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/html"}])),
-+ ?assertEqual(["text/html"],
-+ Req1:accepted_content_types(["text/html", "application/json"])),
-+
-+ Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/html, */*;q=0"}])),
-+ ?assertEqual(["text/html"],
-+ Req2:accepted_content_types(["text/html", "application/json"])),
-+
-+ Req3 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/*, */*;q=0"}])),
-+ ?assertEqual(["text/html"],
-+ Req3:accepted_content_types(["text/html", "application/json"])),
-+
-+ Req4 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/*;q=0.8, */*;q=0.5"}])),
-+ ?assertEqual(["text/html", "application/json"],
-+ Req4:accepted_content_types(["application/json", "text/html"])),
-+
-+ Req5 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/*;q=0.8, */*;q=0.5"}])),
-+ ?assertEqual(["text/html", "application/json"],
-+ Req5:accepted_content_types(["text/html", "application/json"])),
-+
-+ Req6 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/*;q=0.5, */*;q=0.5"}])),
-+ ?assertEqual(["application/json", "text/html"],
-+ Req6:accepted_content_types(["application/json", "text/html"])),
-+
-+ Req7 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make(
-+ [{"Accept", "text/html;q=0.5, application/json;q=0.5"}])),
-+ ?assertEqual(["application/json", "text/html"],
-+ Req7:accepted_content_types(["application/json", "text/html"])),
-+
-+ Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/html"}])),
-+ ?assertEqual([],
-+ Req8:accepted_content_types(["application/json"])),
-+
-+ Req9 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
-+ mochiweb_headers:make([{"Accept", "text/*;q=0.9, text/html;q=0.5, */*;q=0.7"}])),
-+ ?assertEqual(["application/json", "text/html"],
-+ Req9:accepted_content_types(["text/html", "application/json"])).
-+
-+should_close_test() ->
-+ F = fun (V, H) ->
-+ (mochiweb_request:new(
-+ nil, 'GET', "/", V,
-+ mochiweb_headers:make(H)
-+ )):should_close()
-+ end,
-+ ?assertEqual(
-+ true,
-+ F({1, 1}, [{"Connection", "close"}])),
-+ ?assertEqual(
-+ true,
-+ F({1, 0}, [{"Connection", "close"}])),
-+ ?assertEqual(
-+ true,
-+ F({1, 1}, [{"Connection", "ClOSe"}])),
-+ ?assertEqual(
-+ false,
-+ F({1, 1}, [{"Connection", "closer"}])),
-+ ?assertEqual(
-+ false,
-+ F({1, 1}, [])),
-+ ?assertEqual(
-+ true,
-+ F({1, 0}, [])),
-+ ?assertEqual(
-+ false,
-+ F({1, 0}, [{"Connection", "Keep-Alive"}])),
-+ ok.
-+
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_response.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_response.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_response.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_response.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -3,39 +3,47 @@
-
- %% @doc Response abstraction.
-
---module(mochiweb_response, [Request, Code, Headers]).
-+-module(mochiweb_response).
- -author('bob@mochimedia.com').
-
- -define(QUIP, "Any of you quaids got a smint?").
-
---export([get_header_value/1, get/1, dump/0]).
---export([send/1, write_chunk/1]).
-+-export([new/3, get_header_value/2, get/2, dump/1]).
-+-export([send/2, write_chunk/2]).
-
--%% @spec get_header_value(string() | atom() | binary()) -> string() | undefined
-+%% @type response(). A mochiweb_response parameterized module instance.
-+
-+%% @spec new(Request, Code, Headers) -> response()
-+%% @doc Create a new mochiweb_response instance.
-+new(Request, Code, Headers) ->
-+ {?MODULE, [Request, Code, Headers]}.
-+
-+%% @spec get_header_value(string() | atom() | binary(), response()) ->
-+%% string() | undefined
- %% @doc Get the value of the given response header.
--get_header_value(K) ->
-+get_header_value(K, {?MODULE, [_Request, _Code, Headers]}) ->
- mochiweb_headers:get_value(K, Headers).
-
--%% @spec get(request | code | headers) -> term()
-+%% @spec get(request | code | headers, response()) -> term()
- %% @doc Return the internal representation of the given field.
--get(request) ->
-+get(request, {?MODULE, [Request, _Code, _Headers]}) ->
- Request;
--get(code) ->
-+get(code, {?MODULE, [_Request, Code, _Headers]}) ->
- Code;
--get(headers) ->
-+get(headers, {?MODULE, [_Request, _Code, Headers]}) ->
- Headers.
-
--%% @spec dump() -> {mochiweb_request, [{atom(), term()}]}
-+%% @spec dump(response()) -> {mochiweb_request, [{atom(), term()}]}
- %% @doc Dump the internal representation to a "human readable" set of terms
- %% for debugging/inspection purposes.
--dump() ->
-+dump({?MODULE, [Request, Code, Headers]}) ->
- [{request, Request:dump()},
- {code, Code},
- {headers, mochiweb_headers:to_list(Headers)}].
-
--%% @spec send(iodata()) -> ok
-+%% @spec send(iodata(), response()) -> ok
- %% @doc Send data over the socket if the method is not HEAD.
--send(Data) ->
-+send(Data, {?MODULE, [Request, _Code, _Headers]}) ->
- case Request:get(method) of
- 'HEAD' ->
- ok;
-@@ -43,22 +51,22 @@
- Request:send(Data)
- end.
-
--%% @spec write_chunk(iodata()) -> ok
-+%% @spec write_chunk(iodata(), response()) -> ok
- %% @doc Write a chunk of a HTTP chunked response. If Data is zero length,
- %% then the chunked response will be finished.
--write_chunk(Data) ->
-+write_chunk(Data, {?MODULE, [Request, _Code, _Headers]}=THIS) ->
- case Request:get(version) of
- Version when Version >= {1, 1} ->
- Length = iolist_size(Data),
-- send([io_lib:format("~.16b\r\n", [Length]), Data, <<"\r\n">>]);
-+ send([io_lib:format("~.16b\r\n", [Length]), Data, <<"\r\n">>], THIS);
- _ ->
-- send(Data)
-+ send(Data, THIS)
- end.
-
-
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_socket_server.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_socket_server.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_socket_server.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_socket_server.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -9,7 +9,7 @@
-
- -include("internal.hrl").
-
---export([start/1, stop/1]).
-+-export([start/1, start_link/1, stop/1]).
- -export([init/1, handle_call/3, handle_cast/2, terminate/2, code_change/3,
- handle_info/2]).
- -export([get/2, set/3]).
-@@ -33,10 +33,22 @@
-
- -define(is_old_state(State), not is_record(State, mochiweb_socket_server)).
-
--start(State=#mochiweb_socket_server{}) ->
-- start_server(State);
-+start_link(Options) ->
-+ start_server(start_link, parse_options(Options)).
-+
- start(Options) ->
-- start(parse_options(Options)).
-+ case lists:keytake(link, 1, Options) of
-+ {value, {_Key, false}, Options1} ->
-+ start_server(start, parse_options(Options1));
-+ _ ->
-+ %% TODO: https://github.com/mochi/mochiweb/issues/58
-+ %% [X] Phase 1: Add new APIs (Sep 2011)
-+ %% [_] Phase 2: Add deprecation warning
-+ %% [_] Phase 3: Change default to {link, false} and ignore link
-+ %% [_] Phase 4: Add deprecation warning for {link, _} option
-+ %% [_] Phase 5: Remove support for {link, _} option
-+ start_link(Options)
-+ end.
-
- get(Name, Property) ->
- gen_server:call(Name, {get, Property}).
-@@ -61,6 +73,8 @@
-
- %% Internal API
-
-+parse_options(State=#mochiweb_socket_server{}) ->
-+ State;
- parse_options(Options) ->
- parse_options(Options, #mochiweb_socket_server{}).
-
-@@ -116,22 +130,22 @@
- parse_options(Rest, State#mochiweb_socket_server{profile_fun=ProfileFun}).
-
-
--start_server(State=#mochiweb_socket_server{ssl=Ssl, name=Name}) ->
-- case Ssl of
-- true ->
-- application:start(crypto),
-- application:start(public_key),
-- application:start(ssl);
-- false ->
-- void
-- end,
-+start_server(F, State=#mochiweb_socket_server{ssl=Ssl, name=Name}) ->
-+ ok = prep_ssl(Ssl),
- case Name of
- undefined ->
-- gen_server:start_link(?MODULE, State, []);
-+ gen_server:F(?MODULE, State, []);
- _ ->
-- gen_server:start_link(Name, ?MODULE, State, [])
-+ gen_server:F(Name, ?MODULE, State, [])
- end.
-
-+prep_ssl(true) ->
-+ ok = mochiweb:ensure_started(crypto),
-+ ok = mochiweb:ensure_started(public_key),
-+ ok = mochiweb:ensure_started(ssl);
-+prep_ssl(false) ->
-+ ok.
-+
- ensure_int(N) when is_integer(N) ->
- N;
- ensure_int(S) when is_list(S) ->
-@@ -165,27 +179,7 @@
- {_, _, _, _, _, _, _, _} -> % IPv6
- [inet6, {ip, Ip} | BaseOpts]
- end,
-- case listen(Port, Opts, State) of
-- {stop, eacces} ->
-- case Port < 1024 of
-- true ->
-- case catch fdsrv:start() of
-- {ok, _} ->
-- case fdsrv:bind_socket(tcp, Port) of
-- {ok, Fd} ->
-- listen(Port, [{fd, Fd} | Opts], State);
-- _ ->
-- {stop, fdsrv_bind_failed}
-- end;
-- _ ->
-- {stop, fdsrv_start_failed}
-- end;
-- false ->
-- {stop, eacces}
-- end;
-- Other ->
-- Other
-- end.
-+ listen(Port, Opts, State).
-
- new_acceptor_pool(Listen,
- State=#mochiweb_socket_server{acceptor_pool=Pool,
-@@ -271,15 +265,8 @@
-
- terminate(Reason, State) when ?is_old_state(State) ->
- terminate(Reason, upgrade_state(State));
--terminate(_Reason, #mochiweb_socket_server{listen=Listen, port=Port}) ->
-- mochiweb_socket:close(Listen),
-- case Port < 1024 of
-- true ->
-- catch fdsrv:stop(),
-- ok;
-- false ->
-- ok
-- end.
-+terminate(_Reason, #mochiweb_socket_server{listen=Listen}) ->
-+ mochiweb_socket:close(Listen).
-
- code_change(_OldVsn, State, _Extra) ->
- State.
-@@ -337,8 +324,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- upgrade_state_test() ->
- OldState = {mochiweb_socket_server,
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_util.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_util.erl
---- apache-couchdb-1.2.1/src/mochiweb/mochiweb_util.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_util.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -9,7 +9,7 @@
- -export([path_split/1]).
- -export([urlsplit/1, urlsplit_path/1, urlunsplit/1, urlunsplit_path/1]).
- -export([guess_mime/1, parse_header/1]).
---export([shell_quote/1, cmd/1, cmd_string/1, cmd_port/2, cmd_status/1]).
-+-export([shell_quote/1, cmd/1, cmd_string/1, cmd_port/2, cmd_status/1, cmd_status/2]).
- -export([record_to_proplist/2, record_to_proplist/3]).
- -export([safe_relative_path/1, partition/2]).
- -export([parse_qvalues/1, pick_accepted_encodings/3]).
-@@ -124,11 +124,17 @@
- string:join([shell_quote(X) || X <- Argv], " ").
-
- %% @spec cmd_status([string()]) -> {ExitStatus::integer(), Stdout::binary()}
--%% @doc Accumulate the output and exit status from the given application, will be
--%% spawned with cmd_port/2.
-+%% @doc Accumulate the output and exit status from the given application,
-+%% will be spawned with cmd_port/2.
- cmd_status(Argv) ->
-+ cmd_status(Argv, []).
-+
-+%% @spec cmd_status([string()], [atom()]) -> {ExitStatus::integer(), Stdout::binary()}
-+%% @doc Accumulate the output and exit status from the given application,
-+%% will be spawned with cmd_port/2.
-+cmd_status(Argv, Options) ->
- Port = cmd_port(Argv, [exit_status, stderr_to_stdout,
-- use_stdio, binary]),
-+ use_stdio, binary | Options]),
- try cmd_loop(Port, [])
- after catch port_close(Port)
- end.
-@@ -578,8 +584,8 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
-
- make_io_test() ->
- ?assertEqual(
-diff -wbBur apache-couchdb-1.2.1/src/mochiweb/reloader.erl apache-couchdb-1.2.1.q/src/mochiweb/reloader.erl
---- apache-couchdb-1.2.1/src/mochiweb/reloader.erl 2012-12-21 01:24:07.000000000 +0400
-+++ apache-couchdb-1.2.1.q/src/mochiweb/reloader.erl 2013-03-22 15:26:58.000000000 +0400
-@@ -59,7 +59,7 @@
- %% @doc gen_server callback.
- handle_info(doit, State) ->
- Now = stamp(),
-- doit(State#state.last, Now),
-+ _ = doit(State#state.last, Now),
- {noreply, State#state{last = Now}};
- handle_info(_Info, State) ->
- {noreply, State}.
-@@ -156,6 +156,6 @@
- %%
- %% Tests
- %%
---include_lib("eunit/include/eunit.hrl").
- -ifdef(TEST).
-+-include_lib("eunit/include/eunit.hrl").
- -endif.
diff --git a/community/couchdb/erlang-r16b01.patch b/community/couchdb/erlang-r16b01.patch
deleted file mode 100644
index f10bc6cf9..000000000
--- a/community/couchdb/erlang-r16b01.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -wbBur apache-couchdb-1.2.2/src/couchdb/couch_app.erl apache-couchdb-1.2.2.q/src/couchdb/couch_app.erl
---- apache-couchdb-1.2.2/src/couchdb/couch_app.erl 2013-03-24 00:33:33.000000000 +0400
-+++ apache-couchdb-1.2.2.q/src/couchdb/couch_app.erl 2013-06-21 19:30:30.083579366 +0400
-@@ -20,7 +20,7 @@
-
- start(_Type, DefaultIniFiles) ->
- IniFiles = get_ini_files(DefaultIniFiles),
-- case start_apps([crypto, public_key, sasl, inets, oauth, ssl, ibrowse, mochiweb, os_mon]) of
-+ case start_apps([crypto, asn1, public_key, sasl, inets, oauth, ssl, ibrowse, mochiweb, os_mon]) of
- ok ->
- couch_server_sup:start_link(IniFiles);
- {error, Reason} ->
diff --git a/community/ejabberd/PKGBUILD b/community/ejabberd/PKGBUILD
index 0b414feb2..189209940 100644
--- a/community/ejabberd/PKGBUILD
+++ b/community/ejabberd/PKGBUILD
@@ -1,24 +1,24 @@
-# $Id: PKGBUILD 91490 2013-05-23 10:12:55Z spupykin $
+# $Id: PKGBUILD 93139 2013-06-25 15:54:26Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
pkgname=ejabberd
-pkgver=2.1.12
-pkgrel=4
+pkgver=2.1.13
+pkgrel=1
pkgdesc="Jabber server written in Erlang"
arch=('x86_64' 'i686')
url="http://www.ejabberd.im/"
license=("GPL")
-depends=('expat' 'openssl' 'zlib' 'erlang' 'pam' 'iproute2')
+depends=('expat' 'openssl' 'zlib' 'erlang-nox' 'pam' 'iproute2')
backup=('etc/ejabberd/ejabberd.cfg'
'etc/ejabberd/ejabberdctl.cfg'
'etc/logrotate.d/ejabberd')
install=$pkgname.install
-source=("http://www.process-one.net/downloads/ejabberd/${pkgver/_/-}/ejabberd-${pkgver}.tgz"
+source=("$pkgname-$pkgver.tar.gz::https://github.com/processone/ejabberd/archive/v$pkgver.tar.gz"
"$pkgname.logrotate"
"ejabberd.service")
-md5sums=('7d49242cf04282f3c4cebfafa2cc2f46'
+md5sums=('2a7c3b711b4f7091f811c51b52beb735'
'f97c8a96160f30e0aecc9526c12e6606'
'df32aa17e40a7bc5d9946d3ba6fe5e16')
diff --git a/community/lua-zlib/PKGBUILD b/community/lua-zlib/PKGBUILD
index 4b1d715ac..8243438d4 100644
--- a/community/lua-zlib/PKGBUILD
+++ b/community/lua-zlib/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 92720 2013-06-13 12:58:26Z spupykin $
+# $Id: PKGBUILD 93120 2013-06-25 09:38:45Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=(lua-zlib lua51-zlib)
pkgbase=lua-zlib
pkgver=0.2
-pkgrel=5
+pkgrel=6
_gitver=8d07669
url="http://github.com/brimworks/lua-zlib"
pkgdesc='Simple streaming interface to zlib for Lua.'
@@ -19,31 +19,24 @@ build() {
cp -a $srcdir/brimworks-lua-zlib-${_gitver} $srcdir/brimworks-lua51-zlib-${_gitver}
cd $srcdir/brimworks-lua-zlib-${_gitver}
- sed -i "s#share/lua/cmod#lib/lua/5.2#" CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr .
- make
+ gcc -o zlib.so -O2 -fPIC -shared lua_zlib.c -llua
cd $srcdir/brimworks-lua51-zlib-${_gitver}
-# sed -i "s#share/lua/cmod#lib/lua/5.1#" CMakeLists.txt
-# cmake -DCMAKE_BUILD_TYPE=Release \
-# -DCMAKE_INSTALL_PREFIX=/usr .
- make linux
+ gcc -o zlib.so -O2 -fPIC -shared -I/usr/include/lua5.1 lua_zlib.c -llua5.1
}
package_lua-zlib() {
depends=('zlib' 'lua')
cd $srcdir/brimworks-lua-zlib-${_gitver}
- make DESTDIR="$pkgdir" install
- install -D -m644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
+ install -Dm0755 zlib.so $pkgdir/usr/lib/lua/5.2/zlib.so
+ install -Dm644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
}
package_lua51-zlib() {
depends=('zlib' 'lua51')
cd $srcdir/brimworks-lua51-zlib-${_gitver}
- mkdir -p $pkgdir/usr/lib/lua/5.1
- make DESTDIR="$pkgdir" LUACPATH=$pkgdir/usr/lib/lua/5.1 install
+ install -Dm0755 zlib.so $pkgdir/usr/lib/lua/5.1/zlib.so
install -D -m644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
}
diff --git a/community/parole/PKGBUILD b/community/parole/PKGBUILD
index 7946cbd63..e7e52123f 100644
--- a/community/parole/PKGBUILD
+++ b/community/parole/PKGBUILD
@@ -1,22 +1,21 @@
-# $Id: PKGBUILD 92376 2013-06-04 12:32:38Z spupykin $
+# $Id: PKGBUILD 93130 2013-06-25 14:39:40Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: TDY <tdy@gmx.com>
pkgname=parole
pkgver=0.5.1
-pkgrel=1
+pkgrel=2
pkgdesc="A modern media player based on the GStreamer framework"
arch=('i686' 'x86_64')
url="http://goodies.xfce.org/projects/applications/parole/"
license=('GPL')
depends=('gstreamer' 'gst-plugins-base-libs' 'hicolor-icon-theme' 'libnotify>=0.4.1'
- 'libxfce4ui>=4.7.0' 'taglib>=1.4' 'desktop-file-utils')
+ 'libxfce4ui>=4.7.0' 'taglib>=1.4' 'desktop-file-utils' 'gst-plugins-good')
makedepends=('pkgconfig>=0.9.0' 'xfce4-dev-tools')
optdepends=('xulrunner: browser plugin'
'gst-libav'
'gst-plugins-bad'
'gst-plugins-base'
- 'gst-plugins-good'
'gst-plugins-ugly')
conflicts=('parole-media-player-git')
options=('!libtool')
diff --git a/community/processing/PKGBUILD b/community/processing/PKGBUILD
index 59bff2498..7950df9c0 100644
--- a/community/processing/PKGBUILD
+++ b/community/processing/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 92422 2013-06-04 20:05:04Z arodseth $
+# $Id: PKGBUILD 93145 2013-06-25 20:18:20Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
pkgname=processing
-pkgver=2.0
+pkgver=2.0.1
pkgrel=1
arch=('x86_64' 'i686')
pkgdesc='Programming language and environment for creating images, animations and interactions'
@@ -12,17 +12,17 @@ depends=('libgl' 'sh' 'libxxf86vm')
makedepends=('gendesk')
options=(!strip)
-if [ "$CARCH" == "x86_64" ]; then
- source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver-linux64.tgz"
+#if [ "$CARCH" == "x86_64" ]; then
+ source=("http://download.$pkgname.org/$pkgname-$pkgver-linux64.tgz"
"$pkgname.png::http://wiki.$pkgname.org/skins/${pkgname}skin/${pkgname}_wiki_logo.png")
- sha256sums=('91b218d69bfe681c671d029346c671612f443f429ea68b63e0e08ae3aa2ffcf6'
+ sha256sums=('cd1c723e3521b679b8e36d4f04718adcf515d759cb69fc9dfe9020e1a1b2ad1b'
'019ae700333409acbc628779747ab8f153f6647de25e4de3a9bd4a42d0d8056a')
-else
- source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver-linux32.tgz"
- "$pkgname.png::http://wiki.$pkgname.org/skins/${pkgname}skin/${pkgname}_wiki_logo.png")
- sha256sums=('5f09d79b13ec24384d64385c625b559cc24f2682d5ca3d6a8944ce95873e8e26'
- '019ae700333409acbc628779747ab8f153f6647de25e4de3a9bd4a42d0d8056a')
-fi
+#else
+# source=("http://download.$pkgname.org/$pkgname-$pkgver-linux32.tgz"
+# "$pkgname.png::http://wiki.$pkgname.org/skins/${pkgname}skin/${pkgname}_wiki_logo.png")
+# sha256sums=('99c3e49d235a70c59da3f032c59ca5271177b076aa8f2bff1735a14b7c4adfec'
+# '019ae700333409acbc628779747ab8f153f6647de25e4de3a9bd4a42d0d8056a')
+#fi
prepare() {
cd "$srcdir"
diff --git a/community/qcad/PKGBUILD b/community/qcad/PKGBUILD
index 8ca516d98..563c7c266 100644
--- a/community/qcad/PKGBUILD
+++ b/community/qcad/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 92285 2013-06-03 13:57:13Z spupykin $
+# $Id: PKGBUILD 93132 2013-06-25 14:39:54Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Giovanni Scafora <linuxmania@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=qcad
-pkgver=3.0.14.0
-pkgrel=2
+pkgver=3.1.2.0
+pkgrel=1
pkgdesc="A 2D CAD package based upon Qt"
arch=('i686' 'x86_64')
url="http://www.ribbonsoft.com/qcad.html"
@@ -14,23 +14,21 @@ license=('GPL3')
depends=('qtwebkit')
makedepends=('glu')
options=(libtool)
-source=($pkgname-$pkgver.zip::https://github.com/qcad/qcad/archive/v${pkgver}.zip
+source=($pkgname-$pkgver.tar.gz::https://github.com/qcad/qcad/archive/v${pkgver}.tar.gz
QCad.desktop)
-md5sums=('2c460838235a95a4d969e508a75b8206'
+md5sums=('9741d2e4f01b59107a50c0c95af7b972'
'8c4288986b78b14a813b005e81b6ba53')
prepare() {
cd ${srcdir}/qcad-$pkgver
-
sed -i '1,1i#include <unistd.h>' src/core/{RLocalPeer,RS}.cpp
sed -i '1,1i#include <sys/sysinfo.h>' src/core/{RScriptHandler,RS}.cpp
}
build() {
cd ${srcdir}/qcad-$pkgver
-
qmake-qt4
- make PREFIX=/usr CXX="g++ -fpermissive"
+ make all -j1
}
package() {
@@ -42,27 +40,26 @@ package() {
install -dm755 ${pkgdir}/usr/share/{qcad,pixmaps,applications}
cp -r examples fonts libraries patterns plugins scripts ts ${pkgdir}/usr/share/qcad
- cp release/* ${pkgdir}/usr/share/qcad
+ cp debug/* ${pkgdir}/usr/share/qcad
- install -m755 qcad ${pkgdir}/usr/share/qcad/qcad
install -m755 readme.txt ${pkgdir}/usr/share/qcad/readme.txt
# qtwebkit
- ln -s /usr/lib/qt4/plugins/designer/libqwebview.so ${pkgdir}/usr/share/qcad/plugins/designer/libqwebview.so
+ ln -sf /usr/lib/qt4/plugins/designer/libqwebview.so ${pkgdir}/usr/share/qcad/plugins/designer/libqwebview.so
# qt
for sofiles in /usr/lib/qt4/plugins/imageformats/*.so
do
- ln -s ${sofiles} ${pkgdir}/usr/share/qcad/plugins/imageformats/${sofiles##/*/}
+ ln -sf ${sofiles} ${pkgdir}/usr/share/qcad/plugins/imageformats/${sofiles##/*/}
done
for sofiles in /usr/lib/qt4/plugins/sqldrivers/*.so
do
- ln -s ${sofiles} ${pkgdir}/usr/share/qcad/plugins/sqldrivers/${sofiles##/*/}
+ ln -sf ${sofiles} ${pkgdir}/usr/share/qcad/plugins/sqldrivers/${sofiles##/*/}
done
install -Dm644 scripts/qcad_icon.png ${pkgdir}/usr/share/pixmaps/qcad_icon.png
install -Dm644 $srcdir/QCad.desktop ${pkgdir}/usr/share/applications/QCad.desktop
install -dm0755 $pkgdir/usr/bin
- echo -e '#!/bin/sh\ncd /usr/share/qcad\nexec ./qcad' >$pkgdir/usr/bin/qcad
+ echo -e '#!/bin/sh\ncd /usr/share/qcad\nLD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH exec ./qcad-bin' >$pkgdir/usr/bin/qcad
chmod 0755 $pkgdir/usr/bin/qcad
}
diff --git a/community/winff/PKGBUILD b/community/winff/PKGBUILD
new file mode 100644
index 000000000..f342c14de
--- /dev/null
+++ b/community/winff/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 93143 2013-06-25 18:51:28Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: yugrotavele <yugrotavele at archlinux dot us>
+# Contributor: Paolo Stivanin <admin AT polslinux DOT it>
+
+pkgname=winff
+pkgver=1.5.0
+pkgrel=1
+pkgdesc='GUI for ffmpeg'
+url='http://code.google.com/p/winff/'
+license=('GPL3')
+arch=('x86_64' 'i686')
+depends=('ffmpeg' 'gtk2' 'xterm' 'hicolor-icon-theme')
+makedepends=('lazarus' 'lazarus-gtk2' 'gendesk')
+install="$pkgname.install"
+source=("http://winff.googlecode.com/files/winff-$pkgver-source.tar.gz")
+sha256sums=('e94e5a4c11038e9a30fc3f5ea9094f86415d02bd1f1a746808513bbd47ea5766')
+
+prepare() {
+ cd "$srcdir"
+
+ gendesk -n \
+ --pkgname "$pkgname" \
+ --pkgdesc "$pkgdesc" \
+ --genericname 'Video converter' \
+ --categories 'AudioVideo;AudioVideoEditing;GTK'
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ lazbuild --lazarusdir=/usr/lib/lazarus winff.lpr --ws=gtk2
+}
+
+package() {
+ cd "$srcdir"
+
+ install -Dm755 "$srcdir/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -dm755 "$pkgdir/usr/share/winff/"
+ find . -name "*.xml" \
+ -exec install -Dm644 {} "$pkgdir/usr/share/winff/" \; &> /dev/null
+ install -Dm644 "$srcdir/winff.desktop" \
+ "$pkgdir/usr/share/applications/winff.desktop"
+ install -Dm644 "$srcdir/$pkgname/winff-icons/48x48/winff.png" \
+ "$pkgdir/usr/share/pixmaps/winff.png"
+ for size in 16x16 24x24 32x32 48x48; do
+ install -Dm644 "$srcdir/$pkgname/winff-icons/$size/winff.png" \
+ "$pkgdir/usr/share/icons/hicolor/$size/apps/winff.png"
+ done
+ install -dm755 "$pkgdir/usr/share/winff/languages/"
+ find . -name "*.po" \
+ -exec install -Dm644 {} "$pkgdir/usr/share/winff/languages/" \; &> /dev/null
+ rm -f "$srcdir/$pkgname/presets.xml"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/winff/winff.install b/community/winff/winff.install
new file mode 100644
index 000000000..92e6750ef
--- /dev/null
+++ b/community/winff/winff.install
@@ -0,0 +1,14 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &>/dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/core/cronie/PKGBUILD b/core/cronie/PKGBUILD
index e45d47fa8..128087d4e 100644
--- a/core/cronie/PKGBUILD
+++ b/core/cronie/PKGBUILD
@@ -3,7 +3,7 @@
pkgname='cronie'
pkgver=1.4.9
-pkgrel=4
+pkgrel=5
pkgdesc='Daemon that runs specified programs at scheduled times and related tools'
url='https://fedorahosted.org/cronie/'
license=('custom:BSD')
@@ -14,31 +14,25 @@ optdepends=('pm-utils: defer anacron on battery power'
'smtp-forwarder: forward job output to email server')
source=("https://fedorahosted.org/releases/c/r/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'cron.deny'
'service'
- 'pam.d')
+ 'pam.d'
+ 'deny')
sha1sums=('40405cb30b62bd60323e4daf5198f26f0e65c4c4'
- '0f279b8fb820340267d578dc85511c980715f91e'
- 'de455f11a310e64d6930390e57726ed70f3295d0'
- '5eff7fb31f6bc0a924243ff046704726cf20c221')
+ 'eb8ed1e22dbe9c02075fe4bbe925b6eeb9954649'
+ '5eff7fb31f6bc0a924243ff046704726cf20c221'
+ '0f279b8fb820340267d578dc85511c980715f91e')
-backup=('etc/anacrontab'
- 'etc/conf.d/crond'
+backup=('etc/cron.deny'
'etc/pam.d/crond'
- 'etc/cron.deny')
+ 'etc/cron.d/0hourly'
+ 'etc/anacrontab')
conflicts=('cron')
provides=('cron')
groups=('base')
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- sed 's:usr/sbin:usr/bin:g' -i contrib/0anacron
-}
-
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
-
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@@ -60,11 +54,10 @@ package() {
install -d "${pkgdir}"/var/spool/{ana,}cron
install -d "${pkgdir}"/etc/cron.{d,hourly,daily,weekly,monthly}
+ install -Dm644 ../deny "${pkgdir}"/etc/cron.deny
install -Dm644 ../pam.d "${pkgdir}"/etc/pam.d/crond
- install -Dm644 ../cron.deny "${pkgdir}"/etc/cron.deny
install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/cronie.service
- install -Dm644 crond.sysconfig "${pkgdir}"/etc/conf.d/crond
install -Dm644 contrib/anacrontab "${pkgdir}"/etc/anacrontab
install -Dm644 contrib/0hourly "${pkgdir}"/etc/cron.d/0hourly
install -Dm755 contrib/0anacron "${pkgdir}"/etc/cron.hourly/0anacron
diff --git a/core/cronie/cron.deny b/core/cronie/deny
index 06e685cc8..06e685cc8 100644
--- a/core/cronie/cron.deny
+++ b/core/cronie/deny
diff --git a/core/cronie/service b/core/cronie/service
index cc671f7b6..84145251c 100644
--- a/core/cronie/service
+++ b/core/cronie/service
@@ -3,7 +3,7 @@ Description=Periodic Command Scheduler
[Service]
ExecStart=/usr/bin/crond -n
-ExecReload=/bin/kill -HUP $MAINPID
+ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
diff --git a/core/procps-ng/PKGBUILD b/core/procps-ng/PKGBUILD
index e2f1a9751..c08ca8b5b 100644
--- a/core/procps-ng/PKGBUILD
+++ b/core/procps-ng/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 186686 2013-05-30 13:43:55Z bisson $
+# $Id: PKGBUILD 188912 2013-06-25 10:40:52Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
pkgname=procps-ng
pkgver=3.3.8
-pkgrel=1
+pkgrel=2
pkgdesc='Utilities for monitoring your system and its processes'
url='http://gitorious.org/procps'
license=('GPL' 'LGPL')
@@ -15,7 +15,7 @@ backup=('etc/sysctl.conf')
source=("${pkgname}-${pkgver}.tar.gz::http://gitorious.org/procps/procps/archive-tarball/v${pkgver}"
'sysctl.conf')
sha1sums=('63aed46ba4b5b05698beb25d2aa3eee6779d7f45'
- '97ff07bab9aa5daa8d54a1346f73ba74f8e12a53')
+ 'bc4e929a0ddcdcd627e8d15d30abcf185aa33fab')
conflicts=('procps')
provides=('procps')
diff --git a/core/procps-ng/sysctl.conf b/core/procps-ng/sysctl.conf
index 4695cdd92..fae2c6082 100644
--- a/core/procps-ng/sysctl.conf
+++ b/core/procps-ng/sysctl.conf
@@ -36,6 +36,3 @@ net.ipv6.conf.all.forwarding = 0
# Reboot 600 seconds after kernel panic or oops.
#kernel.panic_on_oops = 1
#kernel.panic = 600
-
-# Disable SysRq key to avoid console security issues.
-kernel.sysrq = 0
diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD
index 282da69ac..8551ab565 100644
--- a/extra/dovecot/PKGBUILD
+++ b/extra/dovecot/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 188728 2013-06-18 15:46:35Z andyrtr $
+# $Id: PKGBUILD 188926 2013-06-25 16:51:14Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
@@ -8,7 +8,7 @@
# --->>> remember to rebuild/bump pigeonhole in one step <<<---
pkgname=dovecot
-pkgver=2.2.3
+pkgver=2.2.4
pkgrel=1
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
arch=('i686' 'x86_64')
@@ -24,7 +24,7 @@ options=('!libtool')
install=$pkgname.install
source=(http://dovecot.org/releases/2.2/${pkgname}-${pkgver}.tar.gz{,.sig}
dovecot.tmpfilesd)
-md5sums=('306664f09560d2c6515ba80e1dd7f353'
+md5sums=('984cfc921a83c580c52c86e128e9dac2'
'SKIP'
'342a28251d40f983c98c0d1f1bf3d07d')
diff --git a/extra/freetype2/PKGBUILD b/extra/freetype2/PKGBUILD
index 69233cf8c..618a08d28 100644
--- a/extra/freetype2/PKGBUILD
+++ b/extra/freetype2/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 185748 2013-05-18 10:42:24Z andyrtr $
+# $Id: PKGBUILD 188918 2013-06-25 14:14:01Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=freetype2
-pkgver=2.4.12
+pkgver=2.5.0.1
pkgrel=1
pkgdesc="TrueType font rendering library"
arch=(i686 x86_64)
@@ -11,18 +11,32 @@ url="http://freetype.sourceforge.net"
depends=('zlib' 'bzip2' 'sh')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2
+ freetype-2.2.1-enable-valid.patch
freetype-2.3.0-enable-spr.patch
- freetype-2.2.1-enable-valid.patch)
-md5sums=('3463102764315eb86c0d3c2e1f3ffb7d'
+ freetype-2.4.11-enable-sph.patch)
+md5sums=('c72e9010b1d986d556fc0b2b5fcbf31a'
+ '214119610444c9b02766ccee5e220680'
'816dc8619a6904a7385769433c0a8653'
- '214119610444c9b02766ccee5e220680')
+ '2422f8902224fedb46ae9eec08c8ceac')
-build() {
+prepare() {
cd "${srcdir}/freetype-${pkgver}"
- patch -Np1 -i "${srcdir}/freetype-2.3.0-enable-spr.patch"
patch -Np1 -i "${srcdir}/freetype-2.2.1-enable-valid.patch"
+ patch -Np1 -i "${srcdir}/freetype-2.3.0-enable-spr.patch"
+
+ # Disabled for now due to resistance
+ # Kept here for easier rebuilds via ABS
+ # https://bugs.archlinux.org/task/35274
+ #patch -Np1 -i "${srcdir}/freetype-2.4.11-enable-sph.patch"
+}
+
+build() {
+ cd "${srcdir}/freetype-${pkgver}"
+
+ # PNG support is useless if FT_CONFIG_OPTION_USE_PNG is disabled
+ ./configure --prefix=/usr --disable-static \
+ --without-png
- ./configure --prefix=/usr
make
}
diff --git a/extra/freetype2/freetype-2.4.11-enable-sph.patch b/extra/freetype2/freetype-2.4.11-enable-sph.patch
new file mode 100644
index 000000000..34c8d63bf
--- /dev/null
+++ b/extra/freetype2/freetype-2.4.11-enable-sph.patch
@@ -0,0 +1,13 @@
+diff --git i/include/freetype/config/ftoption.h w/include/freetype/config/ftoption.h
+index a73fff4..0a081bf 100644
+--- i/include/freetype/config/ftoption.h
++++ w/include/freetype/config/ftoption.h
+@@ -577,7 +577,7 @@ FT_BEGIN_HEADER
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+
+ /*************************************************************************/
diff --git a/extra/gedit/PKGBUILD b/extra/gedit/PKGBUILD
index f5f4aa392..4540abee8 100644
--- a/extra/gedit/PKGBUILD
+++ b/extra/gedit/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 185365 2013-05-13 17:49:32Z heftig $
+# $Id: PKGBUILD 188910 2013-06-25 07:42:51Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gedit
-pkgver=3.8.2
+pkgver=3.8.3
pkgrel=1
pkgdesc="A text editor for GNOME"
arch=(i686 x86_64)
@@ -16,7 +16,7 @@ options=('!libtool' '!emptydirs')
url="http://www.gnome.org"
install=gedit.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('1b7450cb194d4dadb7a82635d0e7f92da2b65a8487341e0410b676d9f33e19d2')
+sha256sums=('dfbc2d9cf975b247c6a6b8bd1ae1b72d8e8a1f862f5f3d084a404853092cf9d3')
build() {
cd $pkgname-$pkgver
diff --git a/extra/pigeonhole/PKGBUILD b/extra/pigeonhole/PKGBUILD
index 4caacad2b..75557252a 100644
--- a/extra/pigeonhole/PKGBUILD
+++ b/extra/pigeonhole/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 188729 2013-06-18 15:46:36Z andyrtr $
+# $Id: PKGBUILD 188927 2013-06-25 16:51:15Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributorr: Peter Lewis <plewis@aur.archlinux.org>
@@ -7,12 +7,12 @@
# This must be built against the version of dovecot being used,
# else mail delivery will fail.
# Specify the version of dovecot to be used here:
-_dcpkgver=2.2.3
+_dcpkgver=2.2.4
# Make sure to bump pkgrel if changing this.
pkgname=pigeonhole
pkgver=0.4.0
-pkgrel=4
+pkgrel=5
pkgdesc="Sieve implementation for Dovecot"
arch=('i686' 'x86_64')
url="http://pigeonhole.dovecot.org/"
diff --git a/extra/xf86-video-intel/PKGBUILD b/extra/xf86-video-intel/PKGBUILD
index c936481fc..205ef1547 100644
--- a/extra/xf86-video-intel/PKGBUILD
+++ b/extra/xf86-video-intel/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 187885 2013-06-07 20:50:17Z lcarlier $
+# $Id: PKGBUILD 188921 2013-06-25 16:24:01Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-intel
-pkgver=2.21.9
-pkgrel=1
+pkgver=2.21.10
+pkgrel=2
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
license=('custom')
@@ -18,19 +18,28 @@ conflicts=('xorg-server<1.14.0' 'X-ABI-VIDEODRV_VERSION<14' 'X-ABI-VIDEODRV_VERS
'xf86-video-intel-sna' 'xf86-video-intel-uxa' 'xf86-video-i810' 'xf86-video-intel-legacy')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
-source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('1359cbc9e494a284faa52d1db83e7388cb8ab590b660e29e78e6e7f5ee7ff189')
+source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ firefox_image_fix.diff)
+sha256sums=('7a4bcad83e8153ab1eec46dfee2412b7b20d087f438af4bf97f460f67c5ca9b6'
+ '33465c66b0a4bca2dfd242c86cb8cb882fbf841e1c2da632a5aa76f9d04b84d1')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # fix image issues in FF+TB, https://bugs.freedesktop.org/show_bug.cgi?id=66059
+ patch -Np1 -i ${srcdir}/firefox_image_fix.diff
+
./configure --prefix=/usr \
--enable-dri
+
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
make DESTDIR="${pkgdir}" install
+
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
diff --git a/extra/xf86-video-intel/firefox_image_fix.diff b/extra/xf86-video-intel/firefox_image_fix.diff
new file mode 100644
index 000000000..653295dab
--- /dev/null
+++ b/extra/xf86-video-intel/firefox_image_fix.diff
@@ -0,0 +1,30 @@
+From 77ddadf0ec6b867a0638660bf06c82ad31577795 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun, 23 Jun 2013 21:01:12 +0000
+Subject: sna: Clear 'clear' hint upon uploading into tiled
+
+Fixes regression from
+commit 53c113c3cc2f8527debc185f0819139ca8637637 [2.21.10]
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri Jun 21 19:27:24 2013 +0100
+
+ sna: Allow PutImage to write inplace using manual tiling
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66059
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
+index 0994c33..43d6a67 100644
+--- a/src/sna/sna_accel.c
++++ b/src/sna/sna_accel.c
+@@ -4000,6 +4000,8 @@ try_upload_tiled_x(PixmapPtr pixmap, RegionRec *region,
+ } while (--n);
+ __kgem_bo_unmap__cpu(&sna->kgem, priv->gpu_bo, dst);
+
++ priv->clear = false;
++ priv->cpu = false;
+ return true;
+ }
+
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD
index 77ce16d88..c864253f4 100644
--- a/extra/xorg-server/PKGBUILD
+++ b/extra/xorg-server/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 183085 2013-04-17 12:51:32Z andyrtr $
+# $Id: PKGBUILD 188929 2013-06-25 17:07:01Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=xorg-server
pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
-pkgver=1.14.1
+pkgver=1.14.2
pkgrel=1
arch=('i686' 'x86_64')
license=('custom')
@@ -23,7 +23,7 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
xvfb-run.1
10-quirks.conf
git-fixes.patch)
-sha256sums=('a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa'
+sha256sums=('f6ddfb3f1cfff2d69d45657aec626ebe8b5847810154ff7df7ed2072b076c86b'
'66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162'
'd027776fac1f7675b0a9ee817502290b1c45f9c09b0f0a6bb058c35f92361e84'
'e033f9bcc21980f7f0428e6ed6c362a3d55ad293b05fd6e6c6c1933b86f9e63a'
diff --git a/java/apache-ant/PKGBUILD b/java/apache-ant/PKGBUILD
index 9f9c77c28..dfda3c28d 100755
--- a/java/apache-ant/PKGBUILD
+++ b/java/apache-ant/PKGBUILD
@@ -12,9 +12,10 @@ provides=("apache-ant-libre=$pkgver")
replaces=("apache-ant-libre")
conflicts=("apache-ant-libre")
-pkgrel=2
+pkgrel=3
arch=('any')
depends=('java-environment')
+makedepends=('jh')
_mirror=http://archive.apache.org/dist
source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2
@@ -98,9 +99,18 @@ package() {
install -d "${pkgdir}"/usr/share/doc/${pkgname}
install -d "${pkgdir}"/usr/share/licenses/${pkgname}
+ cd "${pkgdir}"/${ANT_HOME}/lib
+ for pom in *.pom; do
+ a=${pom%.pom}
+ base=$(jh mvn-basename org.apache.ant $a $pkgver)
+ install -d "${pkgdir}${base%/*}"
+ ln -sf ${ANT_HOME}/lib/$a.pom "${pkgdir}${base}".pom
+ ln -sf ${ANT_HOME}/lib/$a.jar "${pkgdir}${base}".jar
+ done
+
cd "${pkgdir}"/${ANT_HOME}
for prog in bin/*; do
- ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin
+ ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin
done
ln -sf ${ANT_HOME}/{README,WHATSNEW} "${pkgdir}"/usr/share/doc/${pkgname}
ln -sf ${ANT_HOME}/docs "${pkgdir}"/usr/share/doc/${pkgname}/html
diff --git a/java/beanshell/PKGBUILD b/java/beanshell/PKGBUILD
new file mode 100644
index 000000000..95b14d379
--- /dev/null
+++ b/java/beanshell/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): AndyRTR <andyrtr at archlinux.org>
+
+pkgname=beanshell
+pkgver=2.0b4
+pkgrel=2.1
+pkgdesc="Lightweight scripting for Java"
+url="http://www.beanshell.org/"
+license=('LGPL')
+
+provides=('bsh')
+
+arch=('any')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-commons-bsf2' 'javacc' 'java-servlet3.0-tomcat')
+source=("http://www.beanshell.org/bsh-${pkgver}-src.jar")
+
+prepare() {
+ cd "$srcdir"/BeanShell-$pkgver
+
+ rm lib/*.jar
+ ln -s /usr/share/java/bsf2.jar lib/
+ ln -s /usr/share/java/javacc.jar lib/
+ ln -s /usr/share/java/servlet-api.jar lib/servlet.jar
+}
+
+build() {
+ cd "$srcdir"/BeanShell-$pkgver
+ ant dist
+}
+
+check() {
+ cd "$srcdir"/BeanShell-$pkgver
+ ant test
+}
+
+package() {
+ cd "$srcdir"/BeanShell-$pkgver/dist
+ install -d "${pkgdir}"/usr/share/java/
+ for artifact in $(printf '%s\n' *.jar|sed 's/-[0-9b.]*\.jar$//'); do
+ install -m644 $artifact-$pkgver.jar "${pkgdir}"/usr/share/java/$artifact.jar
+ done
+}
+
+sha1sums=('69b36df249654a04e777ab899046c50b8cc844ac')
diff --git a/java/java-commons-bsf/PKGBUILD b/java/java-commons-bsf2/PKGBUILD
index 57a9dfc1a..57a9dfc1a 100644
--- a/java/java-commons-bsf/PKGBUILD
+++ b/java/java-commons-bsf2/PKGBUILD
diff --git a/java/java-jarjar/PKGBUILD b/java/java-jarjar/PKGBUILD
index 8d1d1120b..c78d5539e 100644
--- a/java/java-jarjar/PKGBUILD
+++ b/java/java-jarjar/PKGBUILD
@@ -9,30 +9,28 @@ pkgver=1.2
_pkgrev=132 # v1.2 wasn't tagged, but this is clearly it
pkgdesc="Java static linker (instead of the normal dynamic linking)"
url="https://code.google.com/p/jarjar/"
-license=('Apache2')
+license=('Apache')
-pkgrel=1
+pkgrel=2
arch=('any')
depends=('java-runtime')
-makedepends=('apache-ant' 'java-asm3' 'junit' 'maven' 'jh')
-source=("svn+http://jarjar.googlecode.com/svn/trunk/jarjar#revision=$_pkgrev")
+makedepends=('apache-ant' 'java-asm3' 'junit' 'maven')
+source=("libre://${_pkgname}-${pkgver}.tar.gz")
+mksource=("${_pkgname}-${pkgver}::svn+http://jarjar.googlecode.com/svn/trunk/jarjar#revision=$_pkgrev")
mksource() {
- cd "$srcdir/$_pkgname"
- rm -f src/test/*.{class,jar}
+ cd "$srcdir/$_pkgname-$pkgver"
rm -f lib/*.jar
}
build() {
- cd "$srcdir/$_pkgname"
- eval `jh mksource`
+ cd "$srcdir/$_pkgname-$pkgver"
- ln -s /usr/share/java/asm-3.jar lib/asm-3.3.1.jar
- ln -s /usr/share/java/asm-commons-3.jar lib/asm-commons-3.3.1.jar
- ln -s /usr/share/java/junit.jar lib/junit-4.8.1.jar
- ln -s /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
-
- ln -s /opt/apache-ant/lib/ant.jar lib/
+ ln -sf /usr/share/java/asm-3.jar lib/asm-3.3.1.jar
+ ln -sf /usr/share/java/asm-commons-3.jar lib/asm-commons-3.3.1.jar
+ ln -sf /usr/share/java/junit.jar lib/junit-4.8.1.jar
+ ln -sf /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
+ ln -sf /opt/apache-ant/lib/ant.jar lib/ant.jar
export CLASSPATH=/usr/share/java/asm-3.jar
echo 'includeantruntime false' > build.properties
@@ -40,10 +38,11 @@ build() {
}
package() {
- cd "$srcdir/$_pkgname"
+ cd "$srcdir/$_pkgname-$pkgver"
install -d "$pkgdir/usr/share/java/$_pkgname"
install -D "dist/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname"
ln -s "$_pkgname/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname.jar"
}
-md5sums=('SKIP')
+mkmd5sums=('SKIP')
+md5sums=('cc2698a58f93cdb22c51f039a1b8a56e')
diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD
index 4fcabe2a4..ceb0d9bab 100644
--- a/java/java-rxtx/PKGBUILD
+++ b/java/java-rxtx/PKGBUILD
@@ -10,16 +10,18 @@ pkgver=${_pkgver//-/.}
pkgdesc="A native library providing serial and parallel communication for Java"
license=(LGPL2.1)
-pkgrel=3
+pkgrel=4
arch=('i686' 'x86_64')
depends=('java-runtime')
-makedepends=('java-environment' 'pacman>4.0.3')
+makedepends=('java-environment')
case "$_pkgver" in
*arduino*)
url="https://github.com/arduino/RXTX"
- source=("git://github.com/arduino/RXTX.git#${_gitver}")
- md5sums=('SKIP')
+ source=("libre://RXTX-$pkgver.tar.gz")
+ md5sums=('a71156587dc8d28d1ff4ece376bc0140')
+ mksource=("git://github.com/arduino/RXTX.git#${_gitver}")
+ mkmd5sums=('SKIP')
_dirname=RXTX
;;
*)
diff --git a/java/java-sonatype-oss-parent/PKGBUILD b/java/java-sonatype-oss-parent/PKGBUILD
index f42f6adc5..b62c971ac 100644
--- a/java/java-sonatype-oss-parent/PKGBUILD
+++ b/java/java-sonatype-oss-parent/PKGBUILD
@@ -5,23 +5,17 @@ pkgver=7
pkgdesc="Metadata file for Maven-based build systems to inherit from"
license='Apache2'
-_groupId=org/sonatype/oss
+_groupId=org.sonatype.oss
_artifactId=oss-parent
pkgrel=1
arch=('any')
-depends=('maven')
-makedepends=('java-sonatype-oss-parent=7' 'jh')
+makedepends=('jh')
source=("http://search.maven.org/remotecontent?filepath=$_groupId/$_artifactId/$pkgver/$_artifactId-$pkgver.pom")
-build() {
- :
-}
-
package() {
cd "$srcdir"
- install -Dm644 $_artifactId-$pkgver.pom \
- "$pkgdir/`jh mvn-basename $_groupId $_artifactId $pkgver`".pom
+ DESTDIR=$pkgdir jh mvn-install $_groupId $_artifactId $pkgver $_artifactId-$pkgver.pom
}
md5sums=('3e418cf7f2607bf359e6c514a992cb38')
diff --git a/java-ugly/maven/PKGBUILD b/java/maven/PKGBUILD
index 3f8e5071d..3f8e5071d 100755..100644
--- a/java-ugly/maven/PKGBUILD
+++ b/java/maven/PKGBUILD
diff --git a/java-ugly/maven/maven.csh b/java/maven/maven.csh
index f5750cfc8..f5750cfc8 100755..100644
--- a/java-ugly/maven/maven.csh
+++ b/java/maven/maven.csh
diff --git a/java-ugly/maven/maven.sh b/java/maven/maven.sh
index b6655cc22..b6655cc22 100755..100644
--- a/java-ugly/maven/maven.sh
+++ b/java/maven/maven.sh
diff --git a/java-ugly/not-working/java-bnd/PKGBUILD b/java/not-working/java-bnd/PKGBUILD
index 86820469a..86820469a 100644
--- a/java-ugly/not-working/java-bnd/PKGBUILD
+++ b/java/not-working/java-bnd/PKGBUILD
diff --git a/libre/django13/PKGBUILD b/libre/django13/PKGBUILD
deleted file mode 100644
index 554acccc7..000000000
--- a/libre/django13/PKGBUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# $Id$
-# Maintainer: Dan McGee <dan@archlinux.org>
-# Contributor: Shahar Weiss <sweiss4@gmx.net>
-
-pkgname=django
-pkgver=1.3.1
-pkgrel=2
-pkgdesc="A high-level Python Web framework."
-arch=('any')
-license=('BSD')
-url="http://www.djangoproject.com/"
-depends=('python2')
-makedepends=('python2-distribute')
-optdepends=('mysql-python: for MySQL backend'
- 'python2-psycopg2: for PostgreSQL backend')
-source=("https://www.djangoproject.com/m/releases/1.3/Django-$pkgver.tar.gz"
- diff-django_branches_releases_1.3.X-from-16768-to-17460.diff)
-md5sums=('62d8642fd06b9a0bf8544178f8500767'
- 'd09d8f9e156b9aa1b580a1b43209b99f')
-sha256sums=('af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b'
- '8e08b5b5bbe7c042a1df4d5615a9d068ec6718fd00bef627c0a9a9e48ee58c15')
-
-build() {
- cd "$srcdir/Django-$pkgver"
- patch -Np1 -i ../diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
- python2 setup.py build
-}
-
-package() {
- cd "$srcdir/Django-$pkgver"
- python2 setup.py install --root="$pkgdir" --optimize=1
-
- install -Dm644 extras/django_bash_completion \
- "$pkgdir"/etc/bash_completion.d/django
-
- find "$pkgdir"/usr/lib/python2.7/site-packages/django/ -name '*.py' | \
- xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
-
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-_pkgname=$pkgname
-pkgname=django13
-pkgdesc+=" (legacy version for ParabolaWeb)"
-pkgrel+=.1
-provides=("$_pkgname=$pkgver")
-conflicts=("$_pkgname")
diff --git a/libre/django13/PKGBUILD.orig b/libre/django13/PKGBUILD.orig
deleted file mode 100644
index c593c5626..000000000
--- a/libre/django13/PKGBUILD.orig
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Id$
-# Maintainer: Dan McGee <dan@archlinux.org>
-# Contributor: Shahar Weiss <sweiss4@gmx.net>
-
-pkgname=django
-pkgver=1.3.1
-pkgrel=2
-pkgdesc="A high-level Python Web framework."
-arch=('any')
-license=('BSD')
-url="http://www.djangoproject.com/"
-depends=('python2')
-makedepends=('python2-distribute')
-optdepends=('mysql-python: for MySQL backend'
- 'python2-psycopg2: for PostgreSQL backend')
-source=("http://media.djangoproject.com/releases/1.3/Django-$pkgver.tar.gz"
- diff-django_branches_releases_1.3.X-from-16771-to-17460.diff)
-md5sums=('62d8642fd06b9a0bf8544178f8500767'
- 'ea3d6cbde2fc2332ffe7f901cb60a974')
-sha256sums=('af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b'
- '84e2652a8249e58fdbbd43bce7cd8d6bb2159058be6a675ebe15661ca3ee9ffc')
-
-build() {
- cd "$srcdir/Django-$pkgver"
- patch -Np0 < ../diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
- python2 setup.py build
-}
-
-package() {
- cd "$srcdir/Django-$pkgver"
- python2 setup.py install --root="$pkgdir" --optimize=1
-
- install -Dm644 extras/django_bash_completion \
- "$pkgdir"/etc/bash_completion.d/django
-
- find "$pkgdir"/usr/lib/python2.7/site-packages/django/ -name '*.py' | \
- xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
-
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
diff --git a/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff b/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
deleted file mode 100644
index c6819c1ab..000000000
--- a/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
+++ /dev/null
@@ -1,1573 +0,0 @@
-diff --git a/README b/README
-index c7d225c..47bfd33 100644
---- a/README
-+++ b/README
-@@ -28,7 +28,7 @@ http://code.djangoproject.com/newticket
- To get more help:
-
- * Join the #django channel on irc.freenode.net. Lots of helpful people
-- hang out there. Read the archives at http://botland.oebfare.com/logger/django/.
-+ hang out there. Read the archives at http://django-irc-logs.com/.
-
- * Join the django-users mailing list, or read the archives, at
- http://groups.google.com/group/django-users.
-diff --git a/django/contrib/admin/media/css/forms.css b/django/contrib/admin/media/css/forms.css
-index 1cedf24..35d0ed7 100644
---- a/django/contrib/admin/media/css/forms.css
-+++ b/django/contrib/admin/media/css/forms.css
-@@ -352,9 +352,3 @@ fieldset.monospace textarea {
- .empty-form {
- display: none;
- }
--
--/* IE7 specific bug fixes */
--
--.submit-row input {
-- float: right;
--}
-\ No newline at end of file
-diff --git a/django/contrib/gis/db/backends/spatialite/compiler.py b/django/contrib/gis/db/backends/spatialite/compiler.py
-deleted file mode 100644
-index 3f81ae6..0000000
---- a/django/contrib/gis/db/backends/spatialite/compiler.py
-+++ /dev/null
-@@ -1,32 +0,0 @@
--from django.db.backends.util import typecast_timestamp
--from django.db.models.sql import compiler
--from django.db.models.sql.constants import MULTI
--from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler
--
--SQLCompiler = compiler.SQLCompiler
--
--class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):
-- pass
--
--class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler):
-- pass
--
--class SQLDeleteCompiler(compiler.SQLDeleteCompiler, GeoSQLCompiler):
-- pass
--
--class SQLUpdateCompiler(compiler.SQLUpdateCompiler, GeoSQLCompiler):
-- pass
--
--class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
-- pass
--
--class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
-- """
-- This is overridden for GeoDjango to properly cast date columns, see #16757.
-- """
-- def results_iter(self):
-- offset = len(self.query.extra_select)
-- for rows in self.execute_sql(MULTI):
-- for row in rows:
-- date = typecast_timestamp(str(row[offset]))
-- yield date
-diff --git a/django/contrib/gis/db/backends/spatialite/creation.py b/django/contrib/gis/db/backends/spatialite/creation.py
-index c107d96..ee5f9db 100644
---- a/django/contrib/gis/db/backends/spatialite/creation.py
-+++ b/django/contrib/gis/db/backends/spatialite/creation.py
-@@ -56,14 +56,6 @@ class SpatiaLiteCreation(DatabaseCreation):
- interactive=False,
- database=self.connection.alias)
-
-- # One effect of calling syncdb followed by flush is that the id of the
-- # default site may or may not be 1, depending on how the sequence was
-- # reset. If the sites app is loaded, then we coerce it.
-- from django.db.models import get_model
-- Site = get_model('sites', 'Site')
-- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
-- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
--
- from django.core.cache import get_cache
- from django.core.cache.backends.db import BaseDatabaseCache
- for cache_alias in settings.CACHES:
-diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
-index 1dc612c..e6f8409 100644
---- a/django/contrib/gis/db/backends/spatialite/operations.py
-+++ b/django/contrib/gis/db/backends/spatialite/operations.py
-@@ -48,7 +48,7 @@ def get_dist_ops(operator):
- return (SpatiaLiteDistance(operator),)
-
- class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
-- compiler_module = 'django.contrib.gis.db.backends.spatialite.compiler'
-+ compiler_module = 'django.contrib.gis.db.models.sql.compiler'
- name = 'spatialite'
- spatialite = True
- version_regex = re.compile(r'^(?P<major>\d)\.(?P<minor1>\d)\.(?P<minor2>\d+)')
-diff --git a/django/contrib/gis/db/models/sql/compiler.py b/django/contrib/gis/db/models/sql/compiler.py
-index 782ce78..405a000 100644
---- a/django/contrib/gis/db/models/sql/compiler.py
-+++ b/django/contrib/gis/db/models/sql/compiler.py
-@@ -1,7 +1,7 @@
- from itertools import izip
--from django.db.backends.util import truncate_name
-+from django.db.backends.util import truncate_name, typecast_timestamp
- from django.db.models.sql import compiler
--from django.db.models.sql.constants import TABLE_NAME
-+from django.db.models.sql.constants import TABLE_NAME, MULTI
- from django.db.models.sql.query import get_proxied_model
-
- SQLCompiler = compiler.SQLCompiler
-@@ -194,7 +194,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):
- # We resolve the rest of the columns if we're on Oracle or if
- # the `geo_values` attribute is defined.
- for value, field in map(None, row[index_start:], fields):
-- values.append(self.query.convert_values(value, field, connection=self.connection))
-+ values.append(self.query.convert_values(value, field, self.connection))
- else:
- values.extend(row[index_start:])
- return tuple(values)
-@@ -275,4 +275,24 @@ class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
- pass
-
- class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
-- pass
-+ """
-+ This is overridden for GeoDjango to properly cast date columns, since
-+ `GeoQuery.resolve_columns` is used for spatial values.
-+ See #14648, #16757.
-+ """
-+ def results_iter(self):
-+ if self.connection.ops.oracle:
-+ from django.db.models.fields import DateTimeField
-+ fields = [DateTimeField()]
-+ else:
-+ needs_string_cast = self.connection.features.needs_datetime_string_cast
-+
-+ offset = len(self.query.extra_select)
-+ for rows in self.execute_sql(MULTI):
-+ for row in rows:
-+ date = row[offset]
-+ if self.connection.ops.oracle:
-+ date = self.resolve_columns(row, fields)[offset]
-+ elif needs_string_cast:
-+ date = typecast_timestamp(str(date))
-+ yield date
-diff --git a/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz b/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz
-index 68bf54c..8937637 100644
-Binary files a/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz and b/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz differ
-diff --git a/django/contrib/gis/tests/relatedapp/models.py b/django/contrib/gis/tests/relatedapp/models.py
-index 2e9a62b..aec4e15 100644
---- a/django/contrib/gis/tests/relatedapp/models.py
-+++ b/django/contrib/gis/tests/relatedapp/models.py
-@@ -36,6 +36,7 @@ class Parcel(models.Model):
- # These use the GeoManager but do not have any geographic fields.
- class Author(models.Model):
- name = models.CharField(max_length=100)
-+ dob = models.DateField()
- objects = models.GeoManager()
-
- class Article(models.Model):
-diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py
-index 250783b..1a6197c 100644
---- a/django/contrib/gis/tests/relatedapp/tests.py
-+++ b/django/contrib/gis/tests/relatedapp/tests.py
-@@ -1,3 +1,4 @@
-+from datetime import date
- from django.test import TestCase
-
- from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
-@@ -281,4 +282,11 @@ class RelatedGeoModelTest(TestCase):
- # evaluated as list generation swallows TypeError in CPython.
- sql = str(qs.query)
-
-+ def test16_annotated_date_queryset(self):
-+ "Ensure annotated date querysets work if spatial backend is used. See #14648."
-+ birth_years = [dt.year for dt in
-+ list(Author.objects.annotate(num_books=Count('books')).dates('dob', 'year'))]
-+ birth_years.sort()
-+ self.assertEqual([1950, 1974], birth_years)
-+
- # TODO: Related tests for KML, GML, and distance lookups.
-diff --git a/django/contrib/sites/management.py b/django/contrib/sites/management.py
-index 1987274..9bf5a14 100644
---- a/django/contrib/sites/management.py
-+++ b/django/contrib/sites/management.py
-@@ -3,15 +3,34 @@ Creates the default Site object.
- """
-
- from django.db.models import signals
-+from django.db import connections
-+from django.db import router
- from django.contrib.sites.models import Site
- from django.contrib.sites import models as site_app
-+from django.core.management.color import no_style
-
- def create_default_site(app, created_models, verbosity, db, **kwargs):
-- if Site in created_models:
-+ # Only create the default sites in databases where Django created the table
-+ if Site in created_models and router.allow_syncdb(db, Site) :
-+ # The default settings set SITE_ID = 1, and some tests in Django's test
-+ # suite rely on this value. However, if database sequences are reused
-+ # (e.g. in the test suite after flush/syncdb), it isn't guaranteed that
-+ # the next id will be 1, so we coerce it. See #15573 and #16353. This
-+ # can also crop up outside of tests - see #15346.
- if verbosity >= 2:
- print "Creating example.com Site object"
-- s = Site(domain="example.com", name="example.com")
-- s.save(using=db)
-+ Site(pk=1, domain="example.com", name="example.com").save(using=db)
-+
-+ # We set an explicit pk instead of relying on auto-incrementation,
-+ # so we need to reset the database sequence.
-+ sequence_sql = connections[db].ops.sequence_reset_sql(no_style(), [Site])
-+ if sequence_sql:
-+ if verbosity >= 2:
-+ print "Resetting sequence"
-+ cursor = connections[db].cursor()
-+ for command in sequence_sql:
-+ cursor.execute(command)
-+
- Site.objects.clear_cache()
-
- signals.post_syncdb.connect(create_default_site, sender=site_app)
-diff --git a/django/contrib/sites/tests.py b/django/contrib/sites/tests.py
-index 17ab1f2..828badb 100644
---- a/django/contrib/sites/tests.py
-+++ b/django/contrib/sites/tests.py
-@@ -15,6 +15,12 @@ class SitesFrameworkTests(TestCase):
- def tearDown(self):
- Site._meta.installed = self.old_Site_meta_installed
-
-+ def test_save_another(self):
-+ # Regression for #17415
-+ # On some backends the sequence needs reset after save with explicit ID.
-+ # Test that there is no sequence collisions by saving another site.
-+ Site(domain="example2.com", name="example2.com").save()
-+
- def test_site_manager(self):
- # Make sure that get_current() does not return a deleted Site object.
- s = Site.objects.get_current()
-diff --git a/django/core/management/commands/shell.py b/django/core/management/commands/shell.py
-index e4ce462..039ebb8 100644
---- a/django/core/management/commands/shell.py
-+++ b/django/core/management/commands/shell.py
-@@ -13,9 +13,8 @@ class Command(NoArgsCommand):
-
- def ipython(self):
- try:
-- from IPython.frontend.terminal.embed import TerminalInteractiveShell
-- shell = TerminalInteractiveShell()
-- shell.mainloop()
-+ from IPython import embed
-+ embed()
- except ImportError:
- # IPython < 0.11
- # Explicitly pass an empty list as arguments, because otherwise
-diff --git a/django/core/validators.py b/django/core/validators.py
-index a93c6ac..9dcc2bc 100644
---- a/django/core/validators.py
-+++ b/django/core/validators.py
-@@ -147,7 +147,8 @@ class EmailValidator(RegexValidator):
-
- email_re = re.compile(
- r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
-- r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
-+ # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
-+ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
- r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain
- validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
-
-diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
-index 57e3f77..ef594b7 100644
---- a/django/db/backends/creation.py
-+++ b/django/db/backends/creation.py
-@@ -374,15 +374,6 @@ class BaseDatabaseCreation(object):
- verbosity=max(verbosity - 1, 0),
- interactive=False,
- database=self.connection.alias)
--
-- # One effect of calling syncdb followed by flush is that the id of the
-- # default site may or may not be 1, depending on how the sequence was
-- # reset. If the sites app is loaded, then we coerce it.
-- from django.db.models import get_model
-- if 'django.contrib.sites' in settings.INSTALLED_APPS:
-- Site = get_model('sites', 'Site')
-- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
-- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
-
- from django.core.cache import get_cache
- from django.core.cache.backends.db import BaseDatabaseCache
-diff --git a/django/http/__init__.py b/django/http/__init__.py
-index 68ac45d..07e5a46 100644
---- a/django/http/__init__.py
-+++ b/django/http/__init__.py
-@@ -92,7 +92,7 @@ else:
- if not _cookie_allows_colon_in_names:
- def load(self, rawdata, ignore_parse_errors=False):
- if ignore_parse_errors:
-- self.bad_cookies = []
-+ self.bad_cookies = set()
- self._BaseCookie__set = self._loose_set
- super(SimpleCookie, self).load(rawdata)
- if ignore_parse_errors:
-@@ -106,8 +106,8 @@ else:
- try:
- self._strict_set(key, real_value, coded_value)
- except Cookie.CookieError:
-- self.bad_cookies.append(key)
-- dict.__setitem__(self, key, None)
-+ self.bad_cookies.add(key)
-+ dict.__setitem__(self, key, Cookie.Morsel())
-
-
- class CompatCookie(SimpleCookie):
-diff --git a/django/http/utils.py b/django/http/utils.py
-index 5eea239..0180864 100644
---- a/django/http/utils.py
-+++ b/django/http/utils.py
-@@ -76,7 +76,8 @@ def fix_IE_for_vary(request, response):
-
- # The first part of the Content-Type field will be the MIME type,
- # everything after ';', such as character-set, can be ignored.
-- if response['Content-Type'].split(';')[0] not in safe_mime_types:
-+ mime_type = response.get('Content-Type', '').partition(';')[0]
-+ if mime_type not in safe_mime_types:
- try:
- del response['Vary']
- except KeyError:
-diff --git a/docs/howto/deployment/modpython.txt b/docs/howto/deployment/modpython.txt
-index f5030e9..693f942 100644
---- a/docs/howto/deployment/modpython.txt
-+++ b/docs/howto/deployment/modpython.txt
-@@ -293,11 +293,14 @@ of the admin app, but this is not the case when you use any other server
- arrangement. You're responsible for setting up Apache, or whichever media
- server you're using, to serve the admin files.
-
--The admin files live in (:file:`django/contrib/admin/static/admin`) of the
-+The admin files live in (:file:`django/contrib/admin/media/admin`) of the
- Django distribution.
-
--We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
--the admin files, but here are two other approaches:
-+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
-+admin files (this means using the :djadmin:`collectstatic` management command
-+to collect the static files in :setting:`STATIC_ROOT`, and then configuring
-+your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
-+here are two other approaches:
-
- 1. Create a symbolic link to the admin static files from within your
- document root.
-diff --git a/docs/howto/deployment/modwsgi.txt b/docs/howto/deployment/modwsgi.txt
-index de3a5b6..fdf9d27 100644
---- a/docs/howto/deployment/modwsgi.txt
-+++ b/docs/howto/deployment/modwsgi.txt
-@@ -127,11 +127,14 @@ of the admin app, but this is not the case when you use any other server
- arrangement. You're responsible for setting up Apache, or whichever media
- server you're using, to serve the admin files.
-
--The admin files live in (:file:`django/contrib/admin/static/admin`) of the
-+The admin files live in (:file:`django/contrib/admin/media/admin`) of the
- Django distribution.
-
--We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
--the admin files, but here are two other approaches:
-+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
-+admin files (this means using the :djadmin:`collectstatic` management command
-+to collect the static files in :setting:`STATIC_ROOT`, and then configuring
-+your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
-+here are two other approaches:
-
- 1. Create a symbolic link to the admin static files from within your
- document root.
-diff --git a/docs/index.txt b/docs/index.txt
-index 0cf066e..20a7cec 100644
---- a/docs/index.txt
-+++ b/docs/index.txt
-@@ -28,7 +28,7 @@ Having trouble? We'd like to help!
- .. _archives of the django-users mailing list: http://groups.google.com/group/django-users/
- .. _post a question: http://groups.google.com/group/django-users/
- .. _#django IRC channel: irc://irc.freenode.net/django
--.. _IRC logs: http://botland.oebfare.com/logger/django/
-+.. _IRC logs: http://django-irc-logs.com/
- .. _ticket tracker: http://code.djangoproject.com/
-
- First steps
-diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
-index 3f0f998..ca29d15 100644
---- a/docs/internals/deprecation.txt
-+++ b/docs/internals/deprecation.txt
-@@ -177,6 +177,12 @@ their deprecation, as per the :ref:`Django deprecation policy
- required to end with a trailing slash to ensure there is a consistent
- way to combine paths in templates.
-
-+ * Translations located under the so-called *project path* will be
-+ ignored during the translation building process performed at runtime.
-+ The :setting:`LOCALE_PATHS` setting can be used for the same task by
-+ including the filesystem path to a ``locale`` directory containing
-+ non-app-specific translations in its value.
-+
- * 2.0
- * ``django.views.defaults.shortcut()``. This function has been moved
- to ``django.contrib.contenttypes.views.shortcut()`` as part of the
-diff --git a/docs/internals/release-process.txt b/docs/internals/release-process.txt
-index 2a56f0b..799a59e 100644
---- a/docs/internals/release-process.txt
-+++ b/docs/internals/release-process.txt
-@@ -99,6 +99,13 @@ varying levels:
- * Security fixes will be applied to the current trunk and the previous two
- minor releases.
-
-+* Documentation fixes will generally be more freely backported to the last
-+ release branch (at the discretion of the committer), and don't need to meet
-+ the "critical fixes only" bar as it's highly advantageous to have the docs
-+ for the last release be up-to-date and correct, and the downside of
-+ backporting (risk of introducing regressions) is much less of a concern
-+ with doc fixes.
-+
- As a concrete example, consider a moment in time halfway between the release of
- Django 1.3 and 1.4. At this point in time:
-
-@@ -111,6 +118,9 @@ Django 1.3 and 1.4. At this point in time:
- ``1.2.X`` branch. Security fixes will trigger the release of ``1.3.1``,
- ``1.2.1``, etc.
-
-+* Documentation fixes will be applied to trunk, and if easily backported, to
-+ the ``1.3.X`` branch.
-+
- .. _release-process:
-
- Release process
-diff --git a/docs/intro/index.txt b/docs/intro/index.txt
-index bc61be7..19290a5 100644
---- a/docs/intro/index.txt
-+++ b/docs/intro/index.txt
-@@ -31,6 +31,6 @@ place: read this material to quickly get up and running.
-
- .. _python: http://python.org/
- .. _list of Python resources for non-programmers: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
-- .. _dive into python: http://diveintopython.org/
-+ .. _dive into python: http://diveintopython.net/
- .. _dead-tree version: http://www.amazon.com/exec/obidos/ASIN/1590593561/ref=nosim/jacobian20
- .. _books about Python: http://wiki.python.org/moin/PythonBooks
-\ No newline at end of file
-diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
-index 2f2e049..4dc1e5c 100644
---- a/docs/intro/tutorial01.txt
-+++ b/docs/intro/tutorial01.txt
-@@ -59,7 +59,7 @@ This will create a ``mysite`` directory in your current directory.
- can be run as a program. To do this, open Terminal.app and navigate (using
- the ``cd`` command) to the directory where :doc:`django-admin.py
- </ref/django-admin>` is installed, then run the command
-- ``chmod +x django-admin.py``.
-+ ``sudo chmod +x django-admin.py``.
-
- .. note::
-
-@@ -692,10 +692,9 @@ Save these changes and start a new Python interactive shell by running
-
- For more information on model relations, see :doc:`Accessing related objects
- </ref/models/relations>`. For more on how to use double underscores to perform
--field lookups via the API, see `Field lookups`__. For full details on the
--database API, see our :doc:`Database API reference </topics/db/queries>`.
--
--__ http://docs.djangoproject.com/en/1.2/topics/db/queries/#field-lookups
-+field lookups via the API, see :ref:`Field lookups <field-lookups-intro>`. For
-+full details on the database API, see our :doc:`Database API reference
-+</topics/db/queries>`.
-
- When you're comfortable with the API, read :doc:`part 2 of this tutorial
- </intro/tutorial02>` to get Django's automatic admin working.
-diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt
-index 4bd31fb..1e837e6 100644
---- a/docs/intro/tutorial02.txt
-+++ b/docs/intro/tutorial02.txt
-@@ -40,22 +40,22 @@ activate the admin site for your installation, do these three things:
-
- .. parsed-literal::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- # Uncomment the next two lines to enable the admin:
- **from django.contrib import admin**
- **admin.autodiscover()**
-
- urlpatterns = patterns('',
-- # Example:
-- # (r'^mysite/', include('mysite.foo.urls')),
-+ # Examples:
-+ # url(r'^$', 'mysite.views.home', name='home'),
-+ # url(r'^mysite/', include('mysite.foo.urls')),
-
-- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
-- # to INSTALLED_APPS to enable admin documentation:
-- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
-+ # Uncomment the admin/doc line below to enable admin documentation:
-+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
- # Uncomment the next line to enable the admin:
-- **(r'^admin/', include(admin.site.urls)),**
-+ **url(r'^admin/', include(admin.site.urls)),**
- )
-
- (The bold lines are the ones that needed to be uncommented.)
-diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
-index 41a62a7..566ba55 100644
---- a/docs/intro/tutorial03.txt
-+++ b/docs/intro/tutorial03.txt
-@@ -78,17 +78,17 @@ point at that file::
-
- Time for an example. Edit ``mysite/urls.py`` so it looks like this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- from django.contrib import admin
- admin.autodiscover()
-
- urlpatterns = patterns('',
-- (r'^polls/$', 'polls.views.index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^polls/$', 'polls.views.index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- This is worth a review. When somebody requests a page from your Web site -- say,
-@@ -112,7 +112,7 @@ what you can do with them. And there's no need to add URL cruft such as ``.php``
- -- unless you have a sick sense of humor, in which case you can do something
- like this::
-
-- (r'^polls/latest\.php$', 'polls.views.index'),
-+ url(r'^polls/latest\.php$', 'polls.views.index'),
-
- But, don't do that. It's silly.
-
-@@ -357,22 +357,23 @@ the list is empty.
- Write a 404 (page not found) view
- =================================
-
--When you raise :exc:`~django.http.Http404` from within a view, Django will load
--a special view devoted to handling 404 errors. It finds it by looking for the
--variable ``handler404``, which is a string in Python dotted syntax -- the same
--format the normal URLconf callbacks use. A 404 view itself has nothing special:
--It's just a normal view.
--
--You normally won't have to bother with writing 404 views. By default, URLconfs
--have the following line up top::
--
-- from django.conf.urls.defaults import *
-+When you raise :exc:`~django.http.Http404` from within a view, Django
-+will load a special view devoted to handling 404 errors. It finds it
-+by looking for the variable ``handler404`` in your root URLconf (and
-+only in your root URLconf; setting ``handler404`` anywhere else will
-+have no effect), which is a string in Python dotted syntax -- the same
-+format the normal URLconf callbacks use. A 404 view itself has nothing
-+special: It's just a normal view.
-
--That takes care of setting ``handler404`` in the current module. As you can see
--in ``django/conf/urls/defaults.py``, ``handler404`` is set to
--:func:`django.views.defaults.page_not_found` by default.
-+You normally won't have to bother with writing 404 views. If you don't set
-+``handler404``, the built-in view :func:`django.views.defaults.page_not_found`
-+is used by default. In this case, you still have one obligation: To create a
-+``404.html`` template in the root of your template directory. The default 404
-+view will use that template for all 404 errors. If :setting:`DEBUG` is set to
-+``False`` (in your settings module) and if you didn't create a ``404.html``
-+file, an ``Http500`` is raised instead. So remember to create a ``404.html``.
-
--Four more things to note about 404 views:
-+A couple more things to note about 404 views:
-
- * If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
- 404 view will never be used (and thus the ``404.html`` template will never
-@@ -381,21 +382,12 @@ Four more things to note about 404 views:
- * The 404 view is also called if Django doesn't find a match after checking
- every regular expression in the URLconf.
-
-- * If you don't define your own 404 view -- and simply use the default, which
-- is recommended -- you still have one obligation: To create a ``404.html``
-- template in the root of your template directory. The default 404 view will
-- use that template for all 404 errors.
--
-- * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
-- you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
-- So remember to create a ``404.html``.
--
- Write a 500 (server error) view
- ===============================
-
--Similarly, URLconfs may define a ``handler500``, which points to a view to call
--in case of server errors. Server errors happen when you have runtime errors in
--view code.
-+Similarly, your root URLconf may define a ``handler500``, which points
-+to a view to call in case of server errors. Server errors happen when
-+you have runtime errors in view code.
-
- Use the template system
- =======================
-@@ -432,10 +424,10 @@ Take some time to play around with the views and template system. As you edit
- the URLconf, you may notice there's a fair bit of redundancy in it::
-
- urlpatterns = patterns('',
-- (r'^polls/$', 'polls.views.index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^polls/$', 'polls.views.index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
- )
-
- Namely, ``polls.views`` is in every callback.
-@@ -445,10 +437,10 @@ common prefixes. You can factor out the common prefixes and add them as the
- first argument to :func:`~django.conf.urls.defaults.patterns`, like so::
-
- urlpatterns = patterns('polls.views',
-- (r'^polls/$', 'index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^polls/$', 'index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- This is functionally identical to the previous formatting. It's just a bit
-@@ -459,20 +451,20 @@ callback in your URLconf, you can concatenate multiple
- :func:`~django.conf.urls.defaults.patterns`. Your full ``mysite/urls.py`` might
- now look like this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- from django.contrib import admin
- admin.autodiscover()
-
- urlpatterns = patterns('polls.views',
-- (r'^polls/$', 'index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^polls/$', 'index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- urlpatterns += patterns('',
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- Decoupling the URLconfs
-@@ -502,8 +494,8 @@ Copy the file ``mysite/urls.py`` to ``polls/urls.py``. Then, change
- admin.autodiscover()
-
- urlpatterns = patterns('',
-- (r'^polls/', include('polls.urls')),
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^polls/', include('polls.urls')),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- :func:`~django.conf.urls.defaults.include` simply references another URLconf.
-@@ -526,13 +518,13 @@ URLconf by removing the leading "polls/" from each line, and removing the
- lines registering the admin site. Your ``polls/urls.py`` file should now look like
- this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- urlpatterns = patterns('polls.views',
-- (r'^$', 'index'),
-- (r'^(?P<poll_id>\d+)/$', 'detail'),
-- (r'^(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^$', 'index'),
-+ url(r'^(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- The idea behind :func:`~django.conf.urls.defaults.include` and URLconf
-diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
-index ded5cb2..4c2f2d4 100644
---- a/docs/intro/tutorial04.txt
-+++ b/docs/intro/tutorial04.txt
-@@ -218,13 +218,13 @@ Read on for details.
- First, open the ``polls/urls.py`` URLconf. It looks like this, according to the
- tutorial so far::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- urlpatterns = patterns('polls.views',
-- (r'^$', 'index'),
-- (r'^(?P<poll_id>\d+)/$', 'detail'),
-- (r'^(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^$', 'index'),
-+ url(r'^(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- Change it like so::
-@@ -234,12 +234,12 @@ Change it like so::
- from polls.models import Poll
-
- urlpatterns = patterns('',
-- (r'^$',
-+ url(r'^$',
- ListView.as_view(
- queryset=Poll.objects.order_by('-pub_date')[:5],
- context_object_name='latest_poll_list',
- template_name='polls/index.html')),
-- (r'^(?P<pk>\d+)/$',
-+ url(r'^(?P<pk>\d+)/$',
- DetailView.as_view(
- model=Poll,
- template_name='polls/detail.html')),
-@@ -248,7 +248,7 @@ Change it like so::
- model=Poll,
- template_name='polls/results.html'),
- name='poll_results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
- )
-
- We're using two generic views here:
-diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
-index beff94e..7394c3a 100644
---- a/docs/ref/contrib/admin/index.txt
-+++ b/docs/ref/contrib/admin/index.txt
-@@ -19,8 +19,10 @@ There are six steps in activating the Django admin site:
- 1. Add ``'django.contrib.admin'`` to your :setting:`INSTALLED_APPS`
- setting.
-
-- 2. Admin has two dependencies - :mod:`django.contrib.auth` and
-- :mod:`django.contrib.contenttypes`. If these applications are not
-+ 2. The admin has four dependencies - :mod:`django.contrib.auth`,
-+ :mod:`django.contrib.contenttypes`,
-+ :mod:`django.contrib.messages` and
-+ :mod:`django.contrib.sessions`. If these applications are not
- in your :setting:`INSTALLED_APPS` list, add them.
-
- 3. Determine which of your application's models should be editable in the
-@@ -542,7 +544,7 @@ subclass::
- Fields in ``list_filter`` can also span relations using the ``__`` lookup::
-
- class UserAdminWithLookup(UserAdmin):
-- list_filter = ('groups__name')
-+ list_filter = ('groups__name',)
-
- .. attribute:: ModelAdmin.list_per_page
-
-diff --git a/docs/ref/contrib/gis/geoip.txt b/docs/ref/contrib/gis/geoip.txt
-index 6503be7..f5c45e1 100644
---- a/docs/ref/contrib/gis/geoip.txt
-+++ b/docs/ref/contrib/gis/geoip.txt
-@@ -144,7 +144,7 @@ parameters.
- Returns a dictionary of city information for the given query. Some
- of the values in the dictionary may be undefined (``None``).
-
--.. method:: GeoIPcountry(query)
-+.. method:: GeoIP.country(query)
-
- Returns a dictionary with the country code and country for the given
- query.
-diff --git a/docs/ref/contrib/messages.txt b/docs/ref/contrib/messages.txt
-index ca3212d..ee7e01c 100644
---- a/docs/ref/contrib/messages.txt
-+++ b/docs/ref/contrib/messages.txt
-@@ -210,6 +210,10 @@ If you're using the context processor, your template should be rendered with a
- ``RequestContext``. Otherwise, ensure ``messages`` is available to
- the template context.
-
-+Even if you know there is only just one message, you should still iterate over
-+the ``messages`` sequence, because otherwise the message storage will not be cleared
-+for the next request.
-+
- Creating custom message levels
- ------------------------------
-
-diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
-index 89bc43f..58b86ea 100644
---- a/docs/ref/django-admin.txt
-+++ b/docs/ref/django-admin.txt
-@@ -1156,7 +1156,7 @@ variable.
- Note that this option is unnecessary in ``manage.py``, because it takes care of
- setting the Python path for you.
-
--.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
-+.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
-
- .. django-admin-option:: --settings
-
-diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
-index 3728a09..52c0869 100644
---- a/docs/ref/models/instances.txt
-+++ b/docs/ref/models/instances.txt
-@@ -470,7 +470,7 @@ the URL. For example, if your URLconf contained a line such as::
-
- Similarly, if you had a URLconf entry that looked like::
-
-- (r'/archive/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', archive_view)
-+ (r'/archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', archive_view)
-
- ...you could reference this using ``permalink()`` as follows::
-
-@@ -478,8 +478,8 @@ Similarly, if you had a URLconf entry that looked like::
- def get_absolute_url(self):
- return ('archive_view', (), {
- 'year': self.created.year,
-- 'month': self.created.month,
-- 'day': self.created.day})
-+ 'month': self.created.strftime('%m'),
-+ 'day': self.created.strftime('%d')})
-
- Notice that we specify an empty sequence for the second parameter in this case,
- because we only want to pass keyword parameters, not positional ones.
-diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
-index 4530439..c1beab0 100644
---- a/docs/ref/models/options.txt
-+++ b/docs/ref/models/options.txt
-@@ -166,6 +166,13 @@ Django quotes column and table names behind the scenes.
- >>> answer.get_previous_in_order()
- <Answer: 1>
-
-+.. admonition:: Changing order_with_respect_to
-+
-+ ``order_with_respect_to`` adds an additional field/database column
-+ named ``_order``, so be sure to handle that as you would any other
-+ change to your models if you add or change ``order_with_respect_to``
-+ after your initial :djadmin:`syncdb`.
-+
- ``ordering``
- ------------
-
-@@ -238,6 +245,12 @@ Django quotes column and table names behind the scenes.
-
- unique_together = ("driver", "restaurant")
-
-+ A :class:`~django.db.models.ManyToManyField` cannot be included in
-+ unique_together (it's not even clear what that would mean). If you
-+ need to validate uniqueness related to a
-+ :class:`~django.db.models.ManyToManyField`, look at signals or
-+ using an explicit :attr:`through <ManyToManyField.through>` model.
-+
- ``verbose_name``
- ----------------
-
-diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt
-index e83142e..ad25dce 100644
---- a/docs/ref/signals.txt
-+++ b/docs/ref/signals.txt
-@@ -352,12 +352,16 @@ post_syncdb
- .. data:: django.db.models.signals.post_syncdb
- :module:
-
--Sent by :djadmin:`syncdb` after it installs an application.
-+Sent by :djadmin:`syncdb` command after it installs an application, and
-+:djadmin:`flush` command.
-
- Any handlers that listen to this signal need to be written in a particular
- place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
- handlers are registered anywhere else they may not be loaded by
--:djadmin:`syncdb`.
-+:djadmin:`syncdb`. It is important that handlers of this signal perform
-+idempotent changes (e.g. no database alterations) as this may cause the
-+:djadmin:`flush` management command to fail if it also ran during the
-+:djadmin:`syncdb` command.
-
- Arguments sent with this signal:
-
-diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
-index 7d24c1d..6c7057a 100644
---- a/docs/ref/templates/builtins.txt
-+++ b/docs/ref/templates/builtins.txt
-@@ -1868,7 +1868,7 @@ slice
- Returns a slice of the list.
-
- Uses the same syntax as Python's list slicing. See
--http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
-+http://diveintopython.net/native_data_types/lists.html#odbchelper.list.slice
- for an introduction.
-
- Example::
-diff --git a/docs/releases/0.95.txt b/docs/releases/0.95.txt
-index 7409bff..3632c31 100644
---- a/docs/releases/0.95.txt
-+++ b/docs/releases/0.95.txt
-@@ -92,15 +92,15 @@ changes is described in the `Removing The Magic`_ wiki page. There is also an
- easy checklist_ for reference when undertaking the porting operation.
-
- .. _Removing The Magic: http://code.djangoproject.com/wiki/RemovingTheMagic
--.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet1
-+.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet
-
- Problem reports and getting help
- ================================
-
--Need help resolving a problem with Django? The documentation in the distribution
--is also available online_ at the `Django Web site`_. The :doc:`FAQ </faq/index>`
--document is especially recommended, as it contains a number of issues that come
--up time and again.
-+Need help resolving a problem with Django? The documentation in the
-+distribution is also available :doc:`online </index>` at the `Django Web
-+site`_. The :doc:`FAQ </faq/index>` document is especially recommended, as it
-+contains a number of issues that come up time and again.
-
- For more personalized help, the `django-users`_ mailing list is a very active
- list, with more than 2,000 subscribers who can help you solve any sort of
-@@ -113,7 +113,6 @@ there's a #django channel on irc.freenode.net that is regularly populated by
- Django users and developers from around the world. Friendly people are usually
- available at any hour of the day -- to help, or just to chat.
-
--.. _online: http://www.djangoproject.com/documentation/0.95/
- .. _Django Web site: http://www.djangoproject.com/
- .. _django-users: http://groups.google.com/group/django-users
-
-diff --git a/docs/releases/0.96.txt b/docs/releases/0.96.txt
-index 1224360..8874ccb 100644
---- a/docs/releases/0.96.txt
-+++ b/docs/releases/0.96.txt
-@@ -50,12 +50,10 @@ aside from any necessary security fixes, it will not be actively
- maintained, and it will be removed in a future release of Django.
-
- Also, note that some features, like the new :setting:`DATABASE_OPTIONS`
--setting (see the `databases documentation`_ for details), are only
--available on the "mysql" backend, and will not be made available for
-+setting (see the :doc:`databases documentation </ref/databases>` for details),
-+are only available on the "mysql" backend, and will not be made available for
- "mysql_old".
-
--.. _databases documentation: http://www.djangoproject.com/documentation/0.96/databases/
--
- Database constraint names changed
- ---------------------------------
-
-@@ -164,10 +162,8 @@ Although the ``newforms`` library will continue to evolve, it's ready for use
- for most common cases. We recommend that anyone new to form handling skip the
- old forms system and start with the new.
-
--For more information about ``django.newforms``, read the `newforms
--documentation`_.
--
--.. _newforms documentation: http://www.djangoproject.com/documentation/0.96/newforms/
-+For more information about ``django.newforms``, read the :doc:`newforms
-+documentation </topics/forms/index>`.
-
- URLconf improvements
- --------------------
-@@ -216,19 +212,15 @@ The test framework
- ------------------
-
- Django now includes a test framework so you can start transmuting fear into
--boredom (with apologies to Kent Beck). You can write tests based on doctest_
--or unittest_ and test your views with a simple test client.
-+boredom (with apologies to Kent Beck). You can write tests based on
-+:mod:`doctest` or :mod:`unittest` and test your views with a simple test client.
-
- There is also new support for "fixtures" -- initial data, stored in any of the
--supported `serialization formats`_, that will be loaded into your database at the
--start of your tests. This makes testing with real data much easier.
--
--See `the testing documentation`_ for the full details.
-+supported :doc:`serialization formats </topics/serialization>`, that will be
-+loaded into your database at the start of your tests. This makes testing with
-+real data much easier.
-
--.. _doctest: http://docs.python.org/library/doctest.html
--.. _unittest: http://docs.python.org/library/unittest.html
--.. _the testing documentation: http://www.djangoproject.com/documentation/0.96/testing/
--.. _serialization formats: http://www.djangoproject.com/documentation/0.96/serialization/
-+See :doc:`the testing documentation </topics/testing>` for the full details.
-
- Improvements to the admin interface
- -----------------------------------
-diff --git a/docs/releases/1.0.1.txt b/docs/releases/1.0.1.txt
-index 780dc53..3550e7c 100644
---- a/docs/releases/1.0.1.txt
-+++ b/docs/releases/1.0.1.txt
-@@ -6,10 +6,10 @@ Welcome to Django 1.0.1!
-
- This is the first "bugfix" release in the Django 1.0 series, improving
- the stability and performance of the Django 1.0 codebase. As such,
--Django 1.0.1 contains no new features (and, pursuant to `our
--compatibility policy`_, maintains backwards compatibility with Django
--1.0), but does contain a number of fixes and other
--improvements. Django 1.0.1 is a recommended upgrade for any
-+Django 1.0.1 contains no new features (and, pursuant to :doc:`our
-+compatibility policy </misc/api-stability/>`, maintains backwards
-+compatibility with Django 1.0), but does contain a number of fixes
-+and other improvements. Django 1.0.1 is a recommended upgrade for any
- development or deployment currently using or targeting Django 1.0.
-
-
-@@ -46,8 +46,9 @@ highlights:
-
- * A fix to the application of autoescaping for literal strings passed
- to the ``join`` template filter. Previously, literal strings passed
-- to ``join`` were automatically escaped, contrary to `the documented
-- behavior for autoescaping and literal strings`_. Literal strings
-+ to ``join`` were automatically escaped, contrary to :ref:`the
-+ documented behavior for autoescaping and literal strings
-+ <string-literals-and-automatic-escaping>`. Literal strings
- passed to ``join`` are no longer automatically escaped, meaning you
- must now manually escape them; this is an incompatibility if you
- were relying on this bug, but not if you were relying on escaping
-@@ -60,6 +61,4 @@ highlights:
- documentation, including both corrections to existing documents and
- expanded and new documentation.
-
--.. _our compatibility policy: http://docs.djangoproject.com/en/dev/misc/api-stability/
- .. _the Subversion log of the 1.0.X branch: http://code.djangoproject.com/log/django/branches/releases/1.0.X
--.. _the documented behavior for autoescaping and literal strings: http://docs.djangoproject.com/en/dev/topics/templates/#string-literals-and-automatic-escaping
-diff --git a/docs/releases/1.2.6.txt b/docs/releases/1.2.6.txt
-new file mode 100644
-index 0000000..cfd1d9c
---- /dev/null
-+++ b/docs/releases/1.2.6.txt
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.2.6 release notes
-+==========================
-+
-+*September 9, 2011*
-+
-+Welcome to Django 1.2.6!
-+
-+This is the sixth bugfix/security release in the Django 1.2 series, fixing
-+several security issues present in Django 1.2.5. Django 1.2.6 is a
-+recommended upgrade for all users of any Django release in the 1.2.X series.
-+
-+For a full list of issues addressed in this release, see the `security
-+advisory`_.
-+
-+.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
-diff --git a/docs/releases/1.2.7.txt b/docs/releases/1.2.7.txt
-new file mode 100644
-index 0000000..c0cf698
---- /dev/null
-+++ b/docs/releases/1.2.7.txt
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.2.7 release notes
-+==========================
-+
-+*September 10, 2011*
-+
-+Welcome to Django 1.2.7!
-+
-+This is the seventh bugfix/security release in the Django 1.2 series. It
-+replaces Django 1.2.6 due to problems with the 1.2.6 release tarball.
-+Django 1.2.7 is a recommended upgrade for all users of any Django release in
-+the 1.2.X series.
-+
-+For more information, see the `release advisory`_.
-+
-+.. _release advisory: https://www.djangoproject.com/weblog/2011/sep/10/127/
-diff --git a/docs/releases/1.3.1.txt b/docs/releases/1.3.1.txt
-new file mode 100644
-index 0000000..4c28916
---- /dev/null
-+++ b/docs/releases/1.3.1.txt
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.3.1 release notes
-+==========================
-+
-+*September 9, 2011*
-+
-+Welcome to Django 1.3.1!
-+
-+This is the first security release in the Django 1.3 series, fixing several
-+security issues in Django 1.3. Django 1.3.1 is a recommended upgrade for
-+all users of Django 1.3.
-+
-+For a full list of issues addressed in this release, see the `security
-+advisory`_.
-+
-+.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
-diff --git a/docs/releases/index.txt b/docs/releases/index.txt
-index 8d23c28..40fe5b0 100644
---- a/docs/releases/index.txt
-+++ b/docs/releases/index.txt
-@@ -19,6 +19,7 @@ Final releases
- .. toctree::
- :maxdepth: 1
-
-+ 1.3.1
- 1.3
-
- 1.2 release
-@@ -26,6 +27,8 @@ Final releases
- .. toctree::
- :maxdepth: 1
-
-+ 1.2.7
-+ 1.2.6
- 1.2.5
- 1.2.4
- 1.2.2
-diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
-index 635f18f..5a2608a 100644
---- a/docs/topics/auth.txt
-+++ b/docs/topics/auth.txt
-@@ -1251,16 +1251,19 @@ can or cannot do with Task instances, specific to your application::
- ...
- class Meta:
- permissions = (
-- ("can_view", "Can see available tasks"),
-- ("can_change_status", "Can change the status of tasks"),
-- ("can_close", "Can remove a task by setting its status as closed"),
-+ ("view_task", "Can see available tasks"),
-+ ("change_task_status", "Can change the status of tasks"),
-+ ("close_task", "Can remove a task by setting its status as closed"),
- )
-
- The only thing this does is create those extra permissions when you run
- :djadmin:`manage.py syncdb <syncdb>`. Your code is in charge of checking the
- value of these permissions when an user is trying to access the functionality
- provided by the application (viewing tasks, changing the status of tasks,
--closing tasks.)
-+closing tasks.) Continuing the above example, the following checks if a user may
-+view tasks::
-+
-+ user.has_perm('app.view_task')
-
- API reference
- -------------
-diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
-index 8ef4ea2..9b68353 100644
---- a/docs/topics/cache.txt
-+++ b/docs/topics/cache.txt
-@@ -99,8 +99,9 @@ To use Memcached with Django:
- on your chosen memcached binding)
-
- * Set :setting:`LOCATION <CACHES-LOCATION>` to ``ip:port`` values,
-- where ``ip`` is the IP address of the Memcached daemon and
-- ``port`` is the port on which Memcached is running.
-+ where ``ip`` is the IP address of the Memcached daemon and ``port`` is the
-+ port on which Memcached is running, or to a ``unix:path`` value, where
-+ ``path`` is the path to a Memcached Unix socket file.
-
- In this example, Memcached is running on localhost (127.0.0.1) port 11211, using
- the ``python-memcached`` binding::
-@@ -112,6 +113,16 @@ the ``python-memcached`` binding::
- }
- }
-
-+In this example, Memcached is available through a local Unix socket file
-+:file:`/tmp/memcached.sock` using the ``python-memcached`` binding::
-+
-+ CACHES = {
-+ 'default': {
-+ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
-+ 'LOCATION': 'unix:/tmp/memcached.sock',
-+ }
-+ }
-+
- One excellent feature of Memcached is its ability to share cache over multiple
- servers. This means you can run Memcached daemons on multiple machines, and the
- program will treat the group of machines as a *single* cache, without the need
-@@ -526,9 +537,10 @@ you may expect. But once a particular URL (e.g., ``/foo/23/``) has been
- requested, subsequent requests to that URL will use the cache.
-
- ``cache_page`` can also take an optional keyword argument, ``cache``,
--which directs the decorator to use a specific cache alias when caching view
--results. By default, the ``default`` alias will be used, but you can specify
--any cache alias you want::
-+which directs the decorator to use a specific cache (from your
-+:setting:`CACHES` setting) when caching view results. By default, the
-+``default`` cache will be used, but you can specify any cache you
-+want::
-
- @cache_page(60 * 15, cache="special_cache")
- def my_view(request):
-diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt
-index 3831046..4da48ec 100644
---- a/docs/topics/class-based-views.txt
-+++ b/docs/topics/class-based-views.txt
-@@ -380,7 +380,7 @@ Next, we'll write the ``PublisherBookListView`` view itself::
- class PublisherBookListView(ListView):
-
- context_object_name = "book_list"
-- template_name = "books/books_by_publisher.html",
-+ template_name = "books/books_by_publisher.html"
-
- def get_queryset(self):
- publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
-@@ -396,7 +396,7 @@ use it in the template::
- class PublisherBookListView(ListView):
-
- context_object_name = "book_list"
-- template_name = "books/books_by_publisher.html",
-+ template_name = "books/books_by_publisher.html"
-
- def get_queryset(self):
- self.publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
-diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
-index 0e18205..af76344 100644
---- a/docs/topics/db/models.txt
-+++ b/docs/topics/db/models.txt
-@@ -324,11 +324,10 @@ whatever you want. For example::
- should work; all are optional.
-
- For details on accessing backwards-related objects, see the
-- `Following relationships backward example`_.
--
-+ :ref:`Following relationships backward example <backwards-related-objects>`.
-+
- For sample code, see the `Many-to-one relationship model tests`_.
-
-- .. _Following relationships backward example: http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
- .. _Many-to-one relationship model tests: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one
-
- Many-to-many relationships
-diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
-index fe71736..d9b8b1a 100644
---- a/docs/topics/db/sql.txt
-+++ b/docs/topics/db/sql.txt
-@@ -236,6 +236,30 @@ alias::
- # Your code here...
- transaction.commit_unless_managed(using='my_db_alias')
-
-+By default, the Python DB API will return results without their field
-+names, which means you end up with a ``list`` of values, rather than a
-+``dict``. At a small performance cost, you can return results as a
-+``dict`` by using something like this::
-+
-+ def dictfetchall(cursor):
-+ "Returns all rows from a cursor as a dict"
-+ desc = cursor.description
-+ return [
-+ dict(zip([col[0] for col in desc], row))
-+ for row in cursor.fetchall()
-+ ]
-+
-+Here is an example of the difference between the two::
-+
-+ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
-+ >>> cursor.fetchall()
-+ ((54360982L, None), (54360880L, None))
-+
-+ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
-+ >>> dictfetchall(cursor)
-+ [{'parent_id': None, 'id': 54360982L}, {'parent_id': None, 'id': 54360880L}]
-+
-+
- .. _transactions-and-raw-sql:
-
- Transactions and raw SQL
-diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
-index 07bc5e3..24e000e 100644
---- a/docs/topics/forms/modelforms.txt
-+++ b/docs/topics/forms/modelforms.txt
-@@ -332,13 +332,17 @@ Since the Author model has only 3 fields, 'name', 'title', and
- .. note::
-
- If you specify ``fields`` or ``exclude`` when creating a form with
-- ``ModelForm``, then the fields that are not in the resulting form will not
-- be set by the form's ``save()`` method. Django will prevent any attempt to
-- save an incomplete model, so if the model does not allow the missing fields
-- to be empty, and does not provide a default value for the missing fields,
-- any attempt to ``save()`` a ``ModelForm`` with missing fields will fail.
-- To avoid this failure, you must instantiate your model with initial values
-- for the missing, but required fields::
-+ ``ModelForm``, then the fields that are not in the resulting form
-+ will not be set by the form's ``save()`` method. Also, if you
-+ manually add the excluded fields back to the form, they will not
-+ be initialized from the model instance.
-+
-+ Django will prevent any attempt to save an incomplete model, so if
-+ the model does not allow the missing fields to be empty, and does
-+ not provide a default value for the missing fields, any attempt to
-+ ``save()`` a ``ModelForm`` with missing fields will fail. To
-+ avoid this failure, you must instantiate your model with initial
-+ values for the missing, but required fields::
-
- author = Author(title='Mr')
- form = PartialAuthorForm(request.POST, instance=author)
-@@ -633,6 +637,12 @@ database. If a given instance's data didn't change in the bound data, the
- instance won't be saved to the database and won't be included in the return
- value (``instances``, in the above example).
-
-+When fields are missing from the form (for example because they have
-+been excluded), these fields will not be set by the ``save()``
-+method. You can find more information about this restriction, which
-+also holds for regular ``ModelForms``, in `Using a subset of fields on
-+the form`_.
-+
- Pass ``commit=False`` to return the unsaved model instances::
-
- # don't save to the database
-diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
-index 1caa801..7a0e724 100644
---- a/docs/topics/http/urls.txt
-+++ b/docs/topics/http/urls.txt
-@@ -54,6 +54,10 @@ algorithm the system follows to determine which Python code to execute:
- :class:`~django.http.HttpRequest` as its first argument and any values
- captured in the regex as remaining arguments.
-
-+ 5. If no regex matches, or if an exception is raised during any
-+ point in this process, Django invokes an appropriate
-+ error-handling view. See `Error handling`_ below.
-+
- Example
- =======
-
-@@ -99,10 +103,10 @@ Example requests:
- * ``/articles/2003`` would not match any of these patterns, because each
- pattern requires that the URL end with a slash.
-
-- * ``/articles/2003/03/3/`` would match the final pattern. Django would call
-- the function ``news.views.article_detail(request, '2003', '03', '3')``.
-+ * ``/articles/2003/03/03/`` would match the final pattern. Django would call
-+ the function ``news.views.article_detail(request, '2003', '03', '03')``.
-
--.. _Dive Into Python's explanation: http://diveintopython.org/regular_expressions/street_addresses.html#re.matching.2.3
-+.. _Dive Into Python's explanation: http://diveintopython.net/regular_expressions/street_addresses.html#re.matching.2.3
-
- Named groups
- ============
-@@ -123,7 +127,7 @@ Here's the above example URLconf, rewritten to use named groups::
- (r'^articles/2003/$', 'news.views.special_case_2003'),
- (r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
-- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'news.views.article_detail'),
-+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
- )
-
- This accomplishes exactly the same thing as the previous example, with one
-@@ -134,8 +138,8 @@ arguments rather than positional arguments. For example:
- ``news.views.month_archive(request, year='2005', month='03')``, instead
- of ``news.views.month_archive(request, '2005', '03')``.
-
-- * A request to ``/articles/2003/03/3/`` would call the function
-- ``news.views.article_detail(request, year='2003', month='03', day='3')``.
-+ * A request to ``/articles/2003/03/03/`` would call the function
-+ ``news.views.article_detail(request, year='2003', month='03', day='03')``.
-
- In practice, this means your URLconfs are slightly more explicit and less prone
- to argument-order bugs -- and you can reorder the arguments in your views'
-@@ -246,6 +250,31 @@ The ``prefix`` parameter has the same meaning as the first argument to
- ``patterns()`` and is only relevant when you're passing a string as the
- ``view`` parameter.
-
-+include
-+-------
-+
-+.. function:: include(<module or pattern_list>)
-+
-+A function that takes a full Python import path to another URLconf module that
-+should be "included" in this place.
-+
-+:func:`include` also accepts as an argument an iterable that returns URL
-+patterns.
-+
-+See `Including other URLconfs`_ below.
-+
-+Error handling
-+==============
-+
-+When Django can't find a regex matching the requested URL, or when an
-+exception is raised, Django will invoke an error-handling view. The
-+views to use for these cases are specified by two variables which can
-+be set in your root URLconf. Setting these variables in any other
-+URLconf will have no effect.
-+
-+See the documentation on :ref:`customizing error views
-+<customizing-error-views>` for more details.
-+
- handler404
- ----------
-
-@@ -275,19 +304,6 @@ value should suffice.
- .. versionchanged:: 1.2
- Previous versions of Django only accepted strings representing import paths.
-
--include
---------
--
--.. function:: include(<module or pattern_list>)
--
--A function that takes a full Python import path to another URLconf module that
--should be "included" in this place.
--
--:func:`include` also accepts as an argument an iterable that returns URL
--patterns.
--
--See `Including other URLconfs`_ below.
--
- Notes on capturing text in URLs
- ===============================
-
-@@ -420,8 +436,8 @@ directly the pattern list as returned by `patterns`_ instead. For example::
- from django.conf.urls.defaults import *
-
- extra_patterns = patterns('',
-- url(r'reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
-- url(r'charge/$', 'credit.views.charge', name='credit-charge'),
-+ url(r'^reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
-+ url(r'^charge/$', 'credit.views.charge', name='credit-charge'),
- )
-
- urlpatterns = patterns('',
-diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt
-index 99359ab..83a52cb 100644
---- a/docs/topics/http/views.txt
-+++ b/docs/topics/http/views.txt
-@@ -122,6 +122,8 @@ In order to use the ``Http404`` exception to its fullest, you should create a
- template that is displayed when a 404 error is raised. This template should be
- called ``404.html`` and located in the top level of your template tree.
-
-+.. _customizing-error-views:
-+
- Customizing error views
- =======================
-
-diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt
-index 5d50fa7..a83299c 100644
---- a/docs/topics/i18n/internationalization.txt
-+++ b/docs/topics/i18n/internationalization.txt
-@@ -477,7 +477,7 @@ for use within the translation block. Examples::
-
- You can use multiple expressions inside a single ``blocktrans`` tag::
-
-- {% blocktrans with book_t=book|title and author_t=author|title %}
-+ {% blocktrans with book_t=book|title author_t=author|title %}
- This is {{ book_t }} by {{ author_t }}
- {% endblocktrans %}
-
-diff --git a/docs/topics/settings.txt b/docs/topics/settings.txt
-index 61ddf8c..bda51f2 100644
---- a/docs/topics/settings.txt
-+++ b/docs/topics/settings.txt
-@@ -39,7 +39,7 @@ The value of ``DJANGO_SETTINGS_MODULE`` should be in Python path syntax, e.g.
- ``mysite.settings``. Note that the settings module should be on the
- Python `import search path`_.
-
--.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
-+.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
-
- The django-admin.py utility
- ---------------------------
-diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt
-index 83269ae..fc2cd3f 100644
---- a/docs/topics/templates.txt
-+++ b/docs/topics/templates.txt
-@@ -555,6 +555,8 @@ variable that needs escaping. When auto-escaping is on, there's no danger of
- the ``escape`` filter *double-escaping* data -- the ``escape`` filter does not
- affect auto-escaped variables.
-
-+.. _string-literals-and-automatic-escaping:
-+
- String literals and automatic escaping
- --------------------------------------
-
-diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
-index 0a86f0d..8262b57 100644
---- a/docs/topics/testing.txt
-+++ b/docs/topics/testing.txt
-@@ -1586,7 +1586,7 @@ skipUnlessDBFeature
- Skip the decorated test if the named database feature is *not*
- supported.
-
--For example, the following test will not be executed if the database
-+For example, the following test will only be executed if the database
- supports transactions (e.g., it would run under PostgreSQL, but *not*
- under MySQL with MyISAM tables)::
-
-diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
-index e585262..4bd5827 100644
---- a/tests/modeltests/validators/tests.py
-+++ b/tests/modeltests/validators/tests.py
-@@ -28,6 +28,9 @@ TEST_DATA = (
- (validate_email, 'abc', ValidationError),
- (validate_email, 'a @x.cz', ValidationError),
- (validate_email, 'something@@somewhere.com', ValidationError),
-+ # Quoted-string format (CR not allowed)
-+ (validate_email, '"\\\011"@here.com', None),
-+ (validate_email, '"\\\012"@here.com', ValidationError),
-
- (validate_slug, 'slug-ok', None),
- (validate_slug, 'longer-slug-still-ok', None),
-diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
-index 2e2932f..6aabfe6 100644
---- a/tests/regressiontests/httpwrappers/tests.py
-+++ b/tests/regressiontests/httpwrappers/tests.py
-@@ -281,3 +281,9 @@ class CookieTests(unittest.TestCase):
- Test that a single non-standard cookie name doesn't affect all cookies. Ticket #13007.
- """
- self.assertTrue('good_cookie' in parse_cookie('good_cookie=yes;bad:cookie=yes').keys())
-+
-+ def test_repeated_nonstandard_keys(self):
-+ """
-+ Test that a repeated non-standard name doesn't affect all cookies. Ticket #15852
-+ """
-+ self.assertTrue('good_cookie' in parse_cookie('a,=b; a,=c; good_cookie=yes').keys())
-diff --git a/tests/regressiontests/utils/http.py b/tests/regressiontests/utils/http.py
-index 83a4a7f..666d04f 100644
---- a/tests/regressiontests/utils/http.py
-+++ b/tests/regressiontests/utils/http.py
-@@ -1,5 +1,7 @@
- from django.utils import http
- from django.utils import unittest
-+from django.http import HttpResponse, utils
-+from django.test import RequestFactory
-
- class TestUtilsHttp(unittest.TestCase):
-
-@@ -21,3 +23,49 @@ class TestUtilsHttp(unittest.TestCase):
- self.assertFalse(http.same_origin('http://foo.com', 'http://foo.com.evil.com'))
- # Different port
- self.assertFalse(http.same_origin('http://foo.com:8000', 'http://foo.com:8001'))
-+
-+ def test_fix_IE_for_vary(self):
-+ """
-+ Regression for #16632.
-+
-+ `fix_IE_for_vary` shouldn't crash when there's no Content-Type header.
-+ """
-+
-+ # functions to generate responses
-+ def response_with_unsafe_content_type():
-+ r = HttpResponse(content_type="text/unsafe")
-+ r['Vary'] = 'Cookie'
-+ return r
-+
-+ def no_content_response_with_unsafe_content_type():
-+ # 'Content-Type' always defaulted, so delete it
-+ r = response_with_unsafe_content_type()
-+ del r['Content-Type']
-+ return r
-+
-+ # request with & without IE user agent
-+ rf = RequestFactory()
-+ request = rf.get('/')
-+ ie_request = rf.get('/', HTTP_USER_AGENT='MSIE')
-+
-+ # not IE, unsafe_content_type
-+ response = response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(request, response)
-+ self.assertTrue('Vary' in response)
-+
-+ # IE, unsafe_content_type
-+ response = response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(ie_request, response)
-+ self.assertFalse('Vary' in response)
-+
-+ # not IE, no_content
-+ response = no_content_response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(request, response)
-+ self.assertTrue('Vary' in response)
-+
-+ # IE, no_content
-+ response = no_content_response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(ie_request, response)
-+ self.assertFalse('Vary' in response)
-+
-+
diff --git a/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff b/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
deleted file mode 100644
index ebbf80993..000000000
--- a/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
+++ /dev/null
@@ -1,1575 +0,0 @@
-Index: django/http/__init__.py
-===================================================================
---- django/http/__init__.py (revision 16771)
-+++ django/http/__init__.py (revision 17460)
-@@ -92,7 +92,7 @@
- if not _cookie_allows_colon_in_names:
- def load(self, rawdata, ignore_parse_errors=False):
- if ignore_parse_errors:
-- self.bad_cookies = []
-+ self.bad_cookies = set()
- self._BaseCookie__set = self._loose_set
- super(SimpleCookie, self).load(rawdata)
- if ignore_parse_errors:
-@@ -106,8 +106,8 @@
- try:
- self._strict_set(key, real_value, coded_value)
- except Cookie.CookieError:
-- self.bad_cookies.append(key)
-- dict.__setitem__(self, key, None)
-+ self.bad_cookies.add(key)
-+ dict.__setitem__(self, key, Cookie.Morsel())
-
-
- class CompatCookie(SimpleCookie):
-Index: django/http/utils.py
-===================================================================
---- django/http/utils.py (revision 16771)
-+++ django/http/utils.py (revision 17460)
-@@ -76,7 +76,8 @@
-
- # The first part of the Content-Type field will be the MIME type,
- # everything after ';', such as character-set, can be ignored.
-- if response['Content-Type'].split(';')[0] not in safe_mime_types:
-+ mime_type = response.get('Content-Type', '').partition(';')[0]
-+ if mime_type not in safe_mime_types:
- try:
- del response['Vary']
- except KeyError:
-Index: django/db/backends/creation.py
-===================================================================
---- django/db/backends/creation.py (revision 16771)
-+++ django/db/backends/creation.py (revision 17460)
-@@ -374,15 +374,6 @@
- verbosity=max(verbosity - 1, 0),
- interactive=False,
- database=self.connection.alias)
--
-- # One effect of calling syncdb followed by flush is that the id of the
-- # default site may or may not be 1, depending on how the sequence was
-- # reset. If the sites app is loaded, then we coerce it.
-- from django.db.models import get_model
-- if 'django.contrib.sites' in settings.INSTALLED_APPS:
-- Site = get_model('sites', 'Site')
-- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
-- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
-
- from django.core.cache import get_cache
- from django.core.cache.backends.db import BaseDatabaseCache
-Index: django/core/validators.py
-===================================================================
---- django/core/validators.py (revision 16771)
-+++ django/core/validators.py (revision 17460)
-@@ -147,7 +147,8 @@
-
- email_re = re.compile(
- r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
-- r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
-+ # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
-+ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
- r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain
- validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
-
-Index: django/core/management/commands/shell.py
-===================================================================
---- django/core/management/commands/shell.py (revision 16771)
-+++ django/core/management/commands/shell.py (revision 17460)
-@@ -13,9 +13,8 @@
-
- def ipython(self):
- try:
-- from IPython.frontend.terminal.embed import TerminalInteractiveShell
-- shell = TerminalInteractiveShell()
-- shell.mainloop()
-+ from IPython import embed
-+ embed()
- except ImportError:
- # IPython < 0.11
- # Explicitly pass an empty list as arguments, because otherwise
-Index: django/contrib/gis/db/models/sql/compiler.py
-===================================================================
---- django/contrib/gis/db/models/sql/compiler.py (revision 16771)
-+++ django/contrib/gis/db/models/sql/compiler.py (revision 17460)
-@@ -1,7 +1,7 @@
- from itertools import izip
--from django.db.backends.util import truncate_name
-+from django.db.backends.util import truncate_name, typecast_timestamp
- from django.db.models.sql import compiler
--from django.db.models.sql.constants import TABLE_NAME
-+from django.db.models.sql.constants import TABLE_NAME, MULTI
- from django.db.models.sql.query import get_proxied_model
-
- SQLCompiler = compiler.SQLCompiler
-@@ -194,7 +194,7 @@
- # We resolve the rest of the columns if we're on Oracle or if
- # the `geo_values` attribute is defined.
- for value, field in map(None, row[index_start:], fields):
-- values.append(self.query.convert_values(value, field, connection=self.connection))
-+ values.append(self.query.convert_values(value, field, self.connection))
- else:
- values.extend(row[index_start:])
- return tuple(values)
-@@ -275,4 +275,24 @@
- pass
-
- class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
-- pass
-+ """
-+ This is overridden for GeoDjango to properly cast date columns, since
-+ `GeoQuery.resolve_columns` is used for spatial values.
-+ See #14648, #16757.
-+ """
-+ def results_iter(self):
-+ if self.connection.ops.oracle:
-+ from django.db.models.fields import DateTimeField
-+ fields = [DateTimeField()]
-+ else:
-+ needs_string_cast = self.connection.features.needs_datetime_string_cast
-+
-+ offset = len(self.query.extra_select)
-+ for rows in self.execute_sql(MULTI):
-+ for row in rows:
-+ date = row[offset]
-+ if self.connection.ops.oracle:
-+ date = self.resolve_columns(row, fields)[offset]
-+ elif needs_string_cast:
-+ date = typecast_timestamp(str(date))
-+ yield date
-Index: django/contrib/gis/db/backends/spatialite/compiler.py
-===================================================================
---- django/contrib/gis/db/backends/spatialite/compiler.py (revision 16771)
-+++ django/contrib/gis/db/backends/spatialite/compiler.py (revision 17460)
-@@ -1,32 +0,0 @@
--from django.db.backends.util import typecast_timestamp
--from django.db.models.sql import compiler
--from django.db.models.sql.constants import MULTI
--from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler
--
--SQLCompiler = compiler.SQLCompiler
--
--class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):
-- pass
--
--class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler):
-- pass
--
--class SQLDeleteCompiler(compiler.SQLDeleteCompiler, GeoSQLCompiler):
-- pass
--
--class SQLUpdateCompiler(compiler.SQLUpdateCompiler, GeoSQLCompiler):
-- pass
--
--class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
-- pass
--
--class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
-- """
-- This is overridden for GeoDjango to properly cast date columns, see #16757.
-- """
-- def results_iter(self):
-- offset = len(self.query.extra_select)
-- for rows in self.execute_sql(MULTI):
-- for row in rows:
-- date = typecast_timestamp(str(row[offset]))
-- yield date
-Index: django/contrib/gis/db/backends/spatialite/operations.py
-===================================================================
---- django/contrib/gis/db/backends/spatialite/operations.py (revision 16771)
-+++ django/contrib/gis/db/backends/spatialite/operations.py (revision 17460)
-@@ -48,7 +48,7 @@
- return (SpatiaLiteDistance(operator),)
-
- class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
-- compiler_module = 'django.contrib.gis.db.backends.spatialite.compiler'
-+ compiler_module = 'django.contrib.gis.db.models.sql.compiler'
- name = 'spatialite'
- spatialite = True
- version_regex = re.compile(r'^(?P<major>\d)\.(?P<minor1>\d)\.(?P<minor2>\d+)')
-Index: django/contrib/gis/db/backends/spatialite/creation.py
-===================================================================
---- django/contrib/gis/db/backends/spatialite/creation.py (revision 16771)
-+++ django/contrib/gis/db/backends/spatialite/creation.py (revision 17460)
-@@ -56,14 +56,6 @@
- interactive=False,
- database=self.connection.alias)
-
-- # One effect of calling syncdb followed by flush is that the id of the
-- # default site may or may not be 1, depending on how the sequence was
-- # reset. If the sites app is loaded, then we coerce it.
-- from django.db.models import get_model
-- Site = get_model('sites', 'Site')
-- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
-- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
--
- from django.core.cache import get_cache
- from django.core.cache.backends.db import BaseDatabaseCache
- for cache_alias in settings.CACHES:
-Index: django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz
-===================================================================
-Cannot display: file marked as a binary type.
-svn:mime-type = application/octet-stream
-Index: django/contrib/gis/tests/relatedapp/tests.py
-===================================================================
---- django/contrib/gis/tests/relatedapp/tests.py (revision 16771)
-+++ django/contrib/gis/tests/relatedapp/tests.py (revision 17460)
-@@ -1,3 +1,4 @@
-+from datetime import date
- from django.test import TestCase
-
- from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
-@@ -281,4 +282,11 @@
- # evaluated as list generation swallows TypeError in CPython.
- sql = str(qs.query)
-
-+ def test16_annotated_date_queryset(self):
-+ "Ensure annotated date querysets work if spatial backend is used. See #14648."
-+ birth_years = [dt.year for dt in
-+ list(Author.objects.annotate(num_books=Count('books')).dates('dob', 'year'))]
-+ birth_years.sort()
-+ self.assertEqual([1950, 1974], birth_years)
-+
- # TODO: Related tests for KML, GML, and distance lookups.
-Index: django/contrib/gis/tests/relatedapp/models.py
-===================================================================
---- django/contrib/gis/tests/relatedapp/models.py (revision 16771)
-+++ django/contrib/gis/tests/relatedapp/models.py (revision 17460)
-@@ -36,6 +36,7 @@
- # These use the GeoManager but do not have any geographic fields.
- class Author(models.Model):
- name = models.CharField(max_length=100)
-+ dob = models.DateField()
- objects = models.GeoManager()
-
- class Article(models.Model):
-Index: django/contrib/sites/management.py
-===================================================================
---- django/contrib/sites/management.py (revision 16771)
-+++ django/contrib/sites/management.py (revision 17460)
-@@ -3,15 +3,34 @@
- """
-
- from django.db.models import signals
-+from django.db import connections
-+from django.db import router
- from django.contrib.sites.models import Site
- from django.contrib.sites import models as site_app
-+from django.core.management.color import no_style
-
- def create_default_site(app, created_models, verbosity, db, **kwargs):
-- if Site in created_models:
-+ # Only create the default sites in databases where Django created the table
-+ if Site in created_models and router.allow_syncdb(db, Site) :
-+ # The default settings set SITE_ID = 1, and some tests in Django's test
-+ # suite rely on this value. However, if database sequences are reused
-+ # (e.g. in the test suite after flush/syncdb), it isn't guaranteed that
-+ # the next id will be 1, so we coerce it. See #15573 and #16353. This
-+ # can also crop up outside of tests - see #15346.
- if verbosity >= 2:
- print "Creating example.com Site object"
-- s = Site(domain="example.com", name="example.com")
-- s.save(using=db)
-+ Site(pk=1, domain="example.com", name="example.com").save(using=db)
-+
-+ # We set an explicit pk instead of relying on auto-incrementation,
-+ # so we need to reset the database sequence.
-+ sequence_sql = connections[db].ops.sequence_reset_sql(no_style(), [Site])
-+ if sequence_sql:
-+ if verbosity >= 2:
-+ print "Resetting sequence"
-+ cursor = connections[db].cursor()
-+ for command in sequence_sql:
-+ cursor.execute(command)
-+
- Site.objects.clear_cache()
-
- signals.post_syncdb.connect(create_default_site, sender=site_app)
-Index: django/contrib/sites/tests.py
-===================================================================
---- django/contrib/sites/tests.py (revision 16771)
-+++ django/contrib/sites/tests.py (revision 17460)
-@@ -15,6 +15,12 @@
- def tearDown(self):
- Site._meta.installed = self.old_Site_meta_installed
-
-+ def test_save_another(self):
-+ # Regression for #17415
-+ # On some backends the sequence needs reset after save with explicit ID.
-+ # Test that there is no sequence collisions by saving another site.
-+ Site(domain="example2.com", name="example2.com").save()
-+
- def test_site_manager(self):
- # Make sure that get_current() does not return a deleted Site object.
- s = Site.objects.get_current()
-Index: django/contrib/admin/media/css/forms.css
-===================================================================
---- django/contrib/admin/media/css/forms.css (revision 16771)
-+++ django/contrib/admin/media/css/forms.css (revision 17460)
-@@ -352,9 +352,3 @@
- .empty-form {
- display: none;
- }
--
--/* IE7 specific bug fixes */
--
--.submit-row input {
-- float: right;
--}
-\ No newline at end of file
-Index: tests/modeltests/validators/tests.py
-===================================================================
---- tests/modeltests/validators/tests.py (revision 16771)
-+++ tests/modeltests/validators/tests.py (revision 17460)
-@@ -28,6 +28,9 @@
- (validate_email, 'abc', ValidationError),
- (validate_email, 'a @x.cz', ValidationError),
- (validate_email, 'something@@somewhere.com', ValidationError),
-+ # Quoted-string format (CR not allowed)
-+ (validate_email, '"\\\011"@here.com', None),
-+ (validate_email, '"\\\012"@here.com', ValidationError),
-
- (validate_slug, 'slug-ok', None),
- (validate_slug, 'longer-slug-still-ok', None),
-Index: tests/regressiontests/utils/http.py
-===================================================================
---- tests/regressiontests/utils/http.py (revision 16771)
-+++ tests/regressiontests/utils/http.py (revision 17460)
-@@ -1,5 +1,7 @@
- from django.utils import http
- from django.utils import unittest
-+from django.http import HttpResponse, utils
-+from django.test import RequestFactory
-
- class TestUtilsHttp(unittest.TestCase):
-
-@@ -21,3 +23,49 @@
- self.assertFalse(http.same_origin('http://foo.com', 'http://foo.com.evil.com'))
- # Different port
- self.assertFalse(http.same_origin('http://foo.com:8000', 'http://foo.com:8001'))
-+
-+ def test_fix_IE_for_vary(self):
-+ """
-+ Regression for #16632.
-+
-+ `fix_IE_for_vary` shouldn't crash when there's no Content-Type header.
-+ """
-+
-+ # functions to generate responses
-+ def response_with_unsafe_content_type():
-+ r = HttpResponse(content_type="text/unsafe")
-+ r['Vary'] = 'Cookie'
-+ return r
-+
-+ def no_content_response_with_unsafe_content_type():
-+ # 'Content-Type' always defaulted, so delete it
-+ r = response_with_unsafe_content_type()
-+ del r['Content-Type']
-+ return r
-+
-+ # request with & without IE user agent
-+ rf = RequestFactory()
-+ request = rf.get('/')
-+ ie_request = rf.get('/', HTTP_USER_AGENT='MSIE')
-+
-+ # not IE, unsafe_content_type
-+ response = response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(request, response)
-+ self.assertTrue('Vary' in response)
-+
-+ # IE, unsafe_content_type
-+ response = response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(ie_request, response)
-+ self.assertFalse('Vary' in response)
-+
-+ # not IE, no_content
-+ response = no_content_response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(request, response)
-+ self.assertTrue('Vary' in response)
-+
-+ # IE, no_content
-+ response = no_content_response_with_unsafe_content_type()
-+ utils.fix_IE_for_vary(ie_request, response)
-+ self.assertFalse('Vary' in response)
-+
-+
-Index: tests/regressiontests/httpwrappers/tests.py
-===================================================================
---- tests/regressiontests/httpwrappers/tests.py (revision 16771)
-+++ tests/regressiontests/httpwrappers/tests.py (revision 17460)
-@@ -281,3 +281,9 @@
- Test that a single non-standard cookie name doesn't affect all cookies. Ticket #13007.
- """
- self.assertTrue('good_cookie' in parse_cookie('good_cookie=yes;bad:cookie=yes').keys())
-+
-+ def test_repeated_nonstandard_keys(self):
-+ """
-+ Test that a repeated non-standard name doesn't affect all cookies. Ticket #15852
-+ """
-+ self.assertTrue('good_cookie' in parse_cookie('a,=b; a,=c; good_cookie=yes').keys())
-Index: docs/index.txt
-===================================================================
---- docs/index.txt (revision 16771)
-+++ docs/index.txt (revision 17460)
-@@ -28,7 +28,7 @@
- .. _archives of the django-users mailing list: http://groups.google.com/group/django-users/
- .. _post a question: http://groups.google.com/group/django-users/
- .. _#django IRC channel: irc://irc.freenode.net/django
--.. _IRC logs: http://botland.oebfare.com/logger/django/
-+.. _IRC logs: http://django-irc-logs.com/
- .. _ticket tracker: http://code.djangoproject.com/
-
- First steps
-Index: docs/intro/tutorial01.txt
-===================================================================
---- docs/intro/tutorial01.txt (revision 16771)
-+++ docs/intro/tutorial01.txt (revision 17460)
-@@ -59,7 +59,7 @@
- can be run as a program. To do this, open Terminal.app and navigate (using
- the ``cd`` command) to the directory where :doc:`django-admin.py
- </ref/django-admin>` is installed, then run the command
-- ``chmod +x django-admin.py``.
-+ ``sudo chmod +x django-admin.py``.
-
- .. note::
-
-@@ -692,10 +692,9 @@
-
- For more information on model relations, see :doc:`Accessing related objects
- </ref/models/relations>`. For more on how to use double underscores to perform
--field lookups via the API, see `Field lookups`__. For full details on the
--database API, see our :doc:`Database API reference </topics/db/queries>`.
-+field lookups via the API, see :ref:`Field lookups <field-lookups-intro>`. For
-+full details on the database API, see our :doc:`Database API reference
-+</topics/db/queries>`.
-
--__ http://docs.djangoproject.com/en/1.2/topics/db/queries/#field-lookups
--
- When you're comfortable with the API, read :doc:`part 2 of this tutorial
- </intro/tutorial02>` to get Django's automatic admin working.
-Index: docs/intro/tutorial02.txt
-===================================================================
---- docs/intro/tutorial02.txt (revision 16771)
-+++ docs/intro/tutorial02.txt (revision 17460)
-@@ -40,22 +40,22 @@
-
- .. parsed-literal::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- # Uncomment the next two lines to enable the admin:
- **from django.contrib import admin**
- **admin.autodiscover()**
-
- urlpatterns = patterns('',
-- # Example:
-- # (r'^mysite/', include('mysite.foo.urls')),
-+ # Examples:
-+ # url(r'^$', 'mysite.views.home', name='home'),
-+ # url(r'^mysite/', include('mysite.foo.urls')),
-
-- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
-- # to INSTALLED_APPS to enable admin documentation:
-- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
-+ # Uncomment the admin/doc line below to enable admin documentation:
-+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
- # Uncomment the next line to enable the admin:
-- **(r'^admin/', include(admin.site.urls)),**
-+ **url(r'^admin/', include(admin.site.urls)),**
- )
-
- (The bold lines are the ones that needed to be uncommented.)
-Index: docs/intro/tutorial03.txt
-===================================================================
---- docs/intro/tutorial03.txt (revision 16771)
-+++ docs/intro/tutorial03.txt (revision 17460)
-@@ -78,17 +78,17 @@
-
- Time for an example. Edit ``mysite/urls.py`` so it looks like this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- from django.contrib import admin
- admin.autodiscover()
-
- urlpatterns = patterns('',
-- (r'^polls/$', 'polls.views.index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^polls/$', 'polls.views.index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- This is worth a review. When somebody requests a page from your Web site -- say,
-@@ -112,7 +112,7 @@
- -- unless you have a sick sense of humor, in which case you can do something
- like this::
-
-- (r'^polls/latest\.php$', 'polls.views.index'),
-+ url(r'^polls/latest\.php$', 'polls.views.index'),
-
- But, don't do that. It's silly.
-
-@@ -357,23 +357,24 @@
- Write a 404 (page not found) view
- =================================
-
--When you raise :exc:`~django.http.Http404` from within a view, Django will load
--a special view devoted to handling 404 errors. It finds it by looking for the
--variable ``handler404``, which is a string in Python dotted syntax -- the same
--format the normal URLconf callbacks use. A 404 view itself has nothing special:
--It's just a normal view.
-+When you raise :exc:`~django.http.Http404` from within a view, Django
-+will load a special view devoted to handling 404 errors. It finds it
-+by looking for the variable ``handler404`` in your root URLconf (and
-+only in your root URLconf; setting ``handler404`` anywhere else will
-+have no effect), which is a string in Python dotted syntax -- the same
-+format the normal URLconf callbacks use. A 404 view itself has nothing
-+special: It's just a normal view.
-
--You normally won't have to bother with writing 404 views. By default, URLconfs
--have the following line up top::
-+You normally won't have to bother with writing 404 views. If you don't set
-+``handler404``, the built-in view :func:`django.views.defaults.page_not_found`
-+is used by default. In this case, you still have one obligation: To create a
-+``404.html`` template in the root of your template directory. The default 404
-+view will use that template for all 404 errors. If :setting:`DEBUG` is set to
-+``False`` (in your settings module) and if you didn't create a ``404.html``
-+file, an ``Http500`` is raised instead. So remember to create a ``404.html``.
-
-- from django.conf.urls.defaults import *
-+A couple more things to note about 404 views:
-
--That takes care of setting ``handler404`` in the current module. As you can see
--in ``django/conf/urls/defaults.py``, ``handler404`` is set to
--:func:`django.views.defaults.page_not_found` by default.
--
--Four more things to note about 404 views:
--
- * If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
- 404 view will never be used (and thus the ``404.html`` template will never
- be rendered) because the traceback will be displayed instead.
-@@ -381,21 +382,12 @@
- * The 404 view is also called if Django doesn't find a match after checking
- every regular expression in the URLconf.
-
-- * If you don't define your own 404 view -- and simply use the default, which
-- is recommended -- you still have one obligation: To create a ``404.html``
-- template in the root of your template directory. The default 404 view will
-- use that template for all 404 errors.
--
-- * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
-- you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
-- So remember to create a ``404.html``.
--
- Write a 500 (server error) view
- ===============================
-
--Similarly, URLconfs may define a ``handler500``, which points to a view to call
--in case of server errors. Server errors happen when you have runtime errors in
--view code.
-+Similarly, your root URLconf may define a ``handler500``, which points
-+to a view to call in case of server errors. Server errors happen when
-+you have runtime errors in view code.
-
- Use the template system
- =======================
-@@ -432,10 +424,10 @@
- the URLconf, you may notice there's a fair bit of redundancy in it::
-
- urlpatterns = patterns('',
-- (r'^polls/$', 'polls.views.index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^polls/$', 'polls.views.index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
- )
-
- Namely, ``polls.views`` is in every callback.
-@@ -445,10 +437,10 @@
- first argument to :func:`~django.conf.urls.defaults.patterns`, like so::
-
- urlpatterns = patterns('polls.views',
-- (r'^polls/$', 'index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^polls/$', 'index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- This is functionally identical to the previous formatting. It's just a bit
-@@ -459,20 +451,20 @@
- :func:`~django.conf.urls.defaults.patterns`. Your full ``mysite/urls.py`` might
- now look like this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- from django.contrib import admin
- admin.autodiscover()
-
- urlpatterns = patterns('polls.views',
-- (r'^polls/$', 'index'),
-- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^polls/$', 'index'),
-+ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- urlpatterns += patterns('',
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- Decoupling the URLconfs
-@@ -502,8 +494,8 @@
- admin.autodiscover()
-
- urlpatterns = patterns('',
-- (r'^polls/', include('polls.urls')),
-- (r'^admin/', include(admin.site.urls)),
-+ url(r'^polls/', include('polls.urls')),
-+ url(r'^admin/', include(admin.site.urls)),
- )
-
- :func:`~django.conf.urls.defaults.include` simply references another URLconf.
-@@ -526,13 +518,13 @@
- lines registering the admin site. Your ``polls/urls.py`` file should now look like
- this::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- urlpatterns = patterns('polls.views',
-- (r'^$', 'index'),
-- (r'^(?P<poll_id>\d+)/$', 'detail'),
-- (r'^(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^$', 'index'),
-+ url(r'^(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- The idea behind :func:`~django.conf.urls.defaults.include` and URLconf
-Index: docs/intro/index.txt
-===================================================================
---- docs/intro/index.txt (revision 16771)
-+++ docs/intro/index.txt (revision 17460)
-@@ -31,6 +31,6 @@
-
- .. _python: http://python.org/
- .. _list of Python resources for non-programmers: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
-- .. _dive into python: http://diveintopython.org/
-+ .. _dive into python: http://diveintopython.net/
- .. _dead-tree version: http://www.amazon.com/exec/obidos/ASIN/1590593561/ref=nosim/jacobian20
- .. _books about Python: http://wiki.python.org/moin/PythonBooks
-\ No newline at end of file
-Index: docs/intro/tutorial04.txt
-===================================================================
---- docs/intro/tutorial04.txt (revision 16771)
-+++ docs/intro/tutorial04.txt (revision 17460)
-@@ -218,13 +218,13 @@
- First, open the ``polls/urls.py`` URLconf. It looks like this, according to the
- tutorial so far::
-
-- from django.conf.urls.defaults import *
-+ from django.conf.urls.defaults import patterns, include, url
-
- urlpatterns = patterns('polls.views',
-- (r'^$', 'index'),
-- (r'^(?P<poll_id>\d+)/$', 'detail'),
-- (r'^(?P<poll_id>\d+)/results/$', 'results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
-+ url(r'^$', 'index'),
-+ url(r'^(?P<poll_id>\d+)/$', 'detail'),
-+ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
- )
-
- Change it like so::
-@@ -234,12 +234,12 @@
- from polls.models import Poll
-
- urlpatterns = patterns('',
-- (r'^$',
-+ url(r'^$',
- ListView.as_view(
- queryset=Poll.objects.order_by('-pub_date')[:5],
- context_object_name='latest_poll_list',
- template_name='polls/index.html')),
-- (r'^(?P<pk>\d+)/$',
-+ url(r'^(?P<pk>\d+)/$',
- DetailView.as_view(
- model=Poll,
- template_name='polls/detail.html')),
-@@ -248,7 +248,7 @@
- model=Poll,
- template_name='polls/results.html'),
- name='poll_results'),
-- (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
-+ url(r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
- )
-
- We're using two generic views here:
-Index: docs/internals/release-process.txt
-===================================================================
---- docs/internals/release-process.txt (revision 16771)
-+++ docs/internals/release-process.txt (revision 17460)
-@@ -99,6 +99,13 @@
- * Security fixes will be applied to the current trunk and the previous two
- minor releases.
-
-+* Documentation fixes will generally be more freely backported to the last
-+ release branch (at the discretion of the committer), and don't need to meet
-+ the "critical fixes only" bar as it's highly advantageous to have the docs
-+ for the last release be up-to-date and correct, and the downside of
-+ backporting (risk of introducing regressions) is much less of a concern
-+ with doc fixes.
-+
- As a concrete example, consider a moment in time halfway between the release of
- Django 1.3 and 1.4. At this point in time:
-
-@@ -111,6 +118,9 @@
- ``1.2.X`` branch. Security fixes will trigger the release of ``1.3.1``,
- ``1.2.1``, etc.
-
-+* Documentation fixes will be applied to trunk, and if easily backported, to
-+ the ``1.3.X`` branch.
-+
- .. _release-process:
-
- Release process
-Index: docs/internals/deprecation.txt
-===================================================================
---- docs/internals/deprecation.txt (revision 16771)
-+++ docs/internals/deprecation.txt (revision 17460)
-@@ -177,6 +177,12 @@
- required to end with a trailing slash to ensure there is a consistent
- way to combine paths in templates.
-
-+ * Translations located under the so-called *project path* will be
-+ ignored during the translation building process performed at runtime.
-+ The :setting:`LOCALE_PATHS` setting can be used for the same task by
-+ including the filesystem path to a ``locale`` directory containing
-+ non-app-specific translations in its value.
-+
- * 2.0
- * ``django.views.defaults.shortcut()``. This function has been moved
- to ``django.contrib.contenttypes.views.shortcut()`` as part of the
-Index: docs/howto/deployment/modpython.txt
-===================================================================
---- docs/howto/deployment/modpython.txt (revision 16771)
-+++ docs/howto/deployment/modpython.txt (revision 17460)
-@@ -293,11 +293,14 @@
- arrangement. You're responsible for setting up Apache, or whichever media
- server you're using, to serve the admin files.
-
--The admin files live in (:file:`django/contrib/admin/static/admin`) of the
-+The admin files live in (:file:`django/contrib/admin/media/admin`) of the
- Django distribution.
-
--We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
--the admin files, but here are two other approaches:
-+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
-+admin files (this means using the :djadmin:`collectstatic` management command
-+to collect the static files in :setting:`STATIC_ROOT`, and then configuring
-+your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
-+here are two other approaches:
-
- 1. Create a symbolic link to the admin static files from within your
- document root.
-Index: docs/howto/deployment/modwsgi.txt
-===================================================================
---- docs/howto/deployment/modwsgi.txt (revision 16771)
-+++ docs/howto/deployment/modwsgi.txt (revision 17460)
-@@ -127,11 +127,14 @@
- arrangement. You're responsible for setting up Apache, or whichever media
- server you're using, to serve the admin files.
-
--The admin files live in (:file:`django/contrib/admin/static/admin`) of the
-+The admin files live in (:file:`django/contrib/admin/media/admin`) of the
- Django distribution.
-
--We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
--the admin files, but here are two other approaches:
-+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
-+admin files (this means using the :djadmin:`collectstatic` management command
-+to collect the static files in :setting:`STATIC_ROOT`, and then configuring
-+your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
-+here are two other approaches:
-
- 1. Create a symbolic link to the admin static files from within your
- document root.
-Index: docs/topics/auth.txt
-===================================================================
---- docs/topics/auth.txt (revision 16771)
-+++ docs/topics/auth.txt (revision 17460)
-@@ -1251,17 +1251,20 @@
- ...
- class Meta:
- permissions = (
-- ("can_view", "Can see available tasks"),
-- ("can_change_status", "Can change the status of tasks"),
-- ("can_close", "Can remove a task by setting its status as closed"),
-+ ("view_task", "Can see available tasks"),
-+ ("change_task_status", "Can change the status of tasks"),
-+ ("close_task", "Can remove a task by setting its status as closed"),
- )
-
- The only thing this does is create those extra permissions when you run
- :djadmin:`manage.py syncdb <syncdb>`. Your code is in charge of checking the
- value of these permissions when an user is trying to access the functionality
- provided by the application (viewing tasks, changing the status of tasks,
--closing tasks.)
-+closing tasks.) Continuing the above example, the following checks if a user may
-+view tasks::
-
-+ user.has_perm('app.view_task')
-+
- API reference
- -------------
-
-Index: docs/topics/http/urls.txt
-===================================================================
---- docs/topics/http/urls.txt (revision 16771)
-+++ docs/topics/http/urls.txt (revision 17460)
-@@ -54,6 +54,10 @@
- :class:`~django.http.HttpRequest` as its first argument and any values
- captured in the regex as remaining arguments.
-
-+ 5. If no regex matches, or if an exception is raised during any
-+ point in this process, Django invokes an appropriate
-+ error-handling view. See `Error handling`_ below.
-+
- Example
- =======
-
-@@ -99,10 +103,10 @@
- * ``/articles/2003`` would not match any of these patterns, because each
- pattern requires that the URL end with a slash.
-
-- * ``/articles/2003/03/3/`` would match the final pattern. Django would call
-- the function ``news.views.article_detail(request, '2003', '03', '3')``.
-+ * ``/articles/2003/03/03/`` would match the final pattern. Django would call
-+ the function ``news.views.article_detail(request, '2003', '03', '03')``.
-
--.. _Dive Into Python's explanation: http://diveintopython.org/regular_expressions/street_addresses.html#re.matching.2.3
-+.. _Dive Into Python's explanation: http://diveintopython.net/regular_expressions/street_addresses.html#re.matching.2.3
-
- Named groups
- ============
-@@ -123,7 +127,7 @@
- (r'^articles/2003/$', 'news.views.special_case_2003'),
- (r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
-- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'news.views.article_detail'),
-+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
- )
-
- This accomplishes exactly the same thing as the previous example, with one
-@@ -134,8 +138,8 @@
- ``news.views.month_archive(request, year='2005', month='03')``, instead
- of ``news.views.month_archive(request, '2005', '03')``.
-
-- * A request to ``/articles/2003/03/3/`` would call the function
-- ``news.views.article_detail(request, year='2003', month='03', day='3')``.
-+ * A request to ``/articles/2003/03/03/`` would call the function
-+ ``news.views.article_detail(request, year='2003', month='03', day='03')``.
-
- In practice, this means your URLconfs are slightly more explicit and less prone
- to argument-order bugs -- and you can reorder the arguments in your views'
-@@ -246,6 +250,31 @@
- ``patterns()`` and is only relevant when you're passing a string as the
- ``view`` parameter.
-
-+include
-+-------
-+
-+.. function:: include(<module or pattern_list>)
-+
-+A function that takes a full Python import path to another URLconf module that
-+should be "included" in this place.
-+
-+:func:`include` also accepts as an argument an iterable that returns URL
-+patterns.
-+
-+See `Including other URLconfs`_ below.
-+
-+Error handling
-+==============
-+
-+When Django can't find a regex matching the requested URL, or when an
-+exception is raised, Django will invoke an error-handling view. The
-+views to use for these cases are specified by two variables which can
-+be set in your root URLconf. Setting these variables in any other
-+URLconf will have no effect.
-+
-+See the documentation on :ref:`customizing error views
-+<customizing-error-views>` for more details.
-+
- handler404
- ----------
-
-@@ -275,19 +304,6 @@
- .. versionchanged:: 1.2
- Previous versions of Django only accepted strings representing import paths.
-
--include
---------
--
--.. function:: include(<module or pattern_list>)
--
--A function that takes a full Python import path to another URLconf module that
--should be "included" in this place.
--
--:func:`include` also accepts as an argument an iterable that returns URL
--patterns.
--
--See `Including other URLconfs`_ below.
--
- Notes on capturing text in URLs
- ===============================
-
-@@ -420,8 +436,8 @@
- from django.conf.urls.defaults import *
-
- extra_patterns = patterns('',
-- url(r'reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
-- url(r'charge/$', 'credit.views.charge', name='credit-charge'),
-+ url(r'^reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
-+ url(r'^charge/$', 'credit.views.charge', name='credit-charge'),
- )
-
- urlpatterns = patterns('',
-Index: docs/topics/http/views.txt
-===================================================================
---- docs/topics/http/views.txt (revision 16771)
-+++ docs/topics/http/views.txt (revision 17460)
-@@ -122,6 +122,8 @@
- template that is displayed when a 404 error is raised. This template should be
- called ``404.html`` and located in the top level of your template tree.
-
-+.. _customizing-error-views:
-+
- Customizing error views
- =======================
-
-Index: docs/topics/i18n/internationalization.txt
-===================================================================
---- docs/topics/i18n/internationalization.txt (revision 16771)
-+++ docs/topics/i18n/internationalization.txt (revision 17460)
-@@ -477,7 +477,7 @@
-
- You can use multiple expressions inside a single ``blocktrans`` tag::
-
-- {% blocktrans with book_t=book|title and author_t=author|title %}
-+ {% blocktrans with book_t=book|title author_t=author|title %}
- This is {{ book_t }} by {{ author_t }}
- {% endblocktrans %}
-
-Index: docs/topics/cache.txt
-===================================================================
---- docs/topics/cache.txt (revision 16771)
-+++ docs/topics/cache.txt (revision 17460)
-@@ -99,8 +99,9 @@
- on your chosen memcached binding)
-
- * Set :setting:`LOCATION <CACHES-LOCATION>` to ``ip:port`` values,
-- where ``ip`` is the IP address of the Memcached daemon and
-- ``port`` is the port on which Memcached is running.
-+ where ``ip`` is the IP address of the Memcached daemon and ``port`` is the
-+ port on which Memcached is running, or to a ``unix:path`` value, where
-+ ``path`` is the path to a Memcached Unix socket file.
-
- In this example, Memcached is running on localhost (127.0.0.1) port 11211, using
- the ``python-memcached`` binding::
-@@ -112,6 +113,16 @@
- }
- }
-
-+In this example, Memcached is available through a local Unix socket file
-+:file:`/tmp/memcached.sock` using the ``python-memcached`` binding::
-+
-+ CACHES = {
-+ 'default': {
-+ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
-+ 'LOCATION': 'unix:/tmp/memcached.sock',
-+ }
-+ }
-+
- One excellent feature of Memcached is its ability to share cache over multiple
- servers. This means you can run Memcached daemons on multiple machines, and the
- program will treat the group of machines as a *single* cache, without the need
-@@ -526,9 +537,10 @@
- requested, subsequent requests to that URL will use the cache.
-
- ``cache_page`` can also take an optional keyword argument, ``cache``,
--which directs the decorator to use a specific cache alias when caching view
--results. By default, the ``default`` alias will be used, but you can specify
--any cache alias you want::
-+which directs the decorator to use a specific cache (from your
-+:setting:`CACHES` setting) when caching view results. By default, the
-+``default`` cache will be used, but you can specify any cache you
-+want::
-
- @cache_page(60 * 15, cache="special_cache")
- def my_view(request):
-Index: docs/topics/db/models.txt
-===================================================================
---- docs/topics/db/models.txt (revision 16771)
-+++ docs/topics/db/models.txt (revision 17460)
-@@ -324,11 +324,10 @@
- should work; all are optional.
-
- For details on accessing backwards-related objects, see the
-- `Following relationships backward example`_.
--
-+ :ref:`Following relationships backward example <backwards-related-objects>`.
-+
- For sample code, see the `Many-to-one relationship model tests`_.
-
-- .. _Following relationships backward example: http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
- .. _Many-to-one relationship model tests: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one
-
- Many-to-many relationships
-Index: docs/topics/db/sql.txt
-===================================================================
---- docs/topics/db/sql.txt (revision 16771)
-+++ docs/topics/db/sql.txt (revision 17460)
-@@ -236,6 +236,30 @@
- # Your code here...
- transaction.commit_unless_managed(using='my_db_alias')
-
-+By default, the Python DB API will return results without their field
-+names, which means you end up with a ``list`` of values, rather than a
-+``dict``. At a small performance cost, you can return results as a
-+``dict`` by using something like this::
-+
-+ def dictfetchall(cursor):
-+ "Returns all rows from a cursor as a dict"
-+ desc = cursor.description
-+ return [
-+ dict(zip([col[0] for col in desc], row))
-+ for row in cursor.fetchall()
-+ ]
-+
-+Here is an example of the difference between the two::
-+
-+ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
-+ >>> cursor.fetchall()
-+ ((54360982L, None), (54360880L, None))
-+
-+ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
-+ >>> dictfetchall(cursor)
-+ [{'parent_id': None, 'id': 54360982L}, {'parent_id': None, 'id': 54360880L}]
-+
-+
- .. _transactions-and-raw-sql:
-
- Transactions and raw SQL
-Index: docs/topics/forms/modelforms.txt
-===================================================================
---- docs/topics/forms/modelforms.txt (revision 16771)
-+++ docs/topics/forms/modelforms.txt (revision 17460)
-@@ -332,14 +332,18 @@
- .. note::
-
- If you specify ``fields`` or ``exclude`` when creating a form with
-- ``ModelForm``, then the fields that are not in the resulting form will not
-- be set by the form's ``save()`` method. Django will prevent any attempt to
-- save an incomplete model, so if the model does not allow the missing fields
-- to be empty, and does not provide a default value for the missing fields,
-- any attempt to ``save()`` a ``ModelForm`` with missing fields will fail.
-- To avoid this failure, you must instantiate your model with initial values
-- for the missing, but required fields::
-+ ``ModelForm``, then the fields that are not in the resulting form
-+ will not be set by the form's ``save()`` method. Also, if you
-+ manually add the excluded fields back to the form, they will not
-+ be initialized from the model instance.
-
-+ Django will prevent any attempt to save an incomplete model, so if
-+ the model does not allow the missing fields to be empty, and does
-+ not provide a default value for the missing fields, any attempt to
-+ ``save()`` a ``ModelForm`` with missing fields will fail. To
-+ avoid this failure, you must instantiate your model with initial
-+ values for the missing, but required fields::
-+
- author = Author(title='Mr')
- form = PartialAuthorForm(request.POST, instance=author)
- form.save()
-@@ -633,6 +637,12 @@
- instance won't be saved to the database and won't be included in the return
- value (``instances``, in the above example).
-
-+When fields are missing from the form (for example because they have
-+been excluded), these fields will not be set by the ``save()``
-+method. You can find more information about this restriction, which
-+also holds for regular ``ModelForms``, in `Using a subset of fields on
-+the form`_.
-+
- Pass ``commit=False`` to return the unsaved model instances::
-
- # don't save to the database
-Index: docs/topics/class-based-views.txt
-===================================================================
---- docs/topics/class-based-views.txt (revision 16771)
-+++ docs/topics/class-based-views.txt (revision 17460)
-@@ -380,7 +380,7 @@
- class PublisherBookListView(ListView):
-
- context_object_name = "book_list"
-- template_name = "books/books_by_publisher.html",
-+ template_name = "books/books_by_publisher.html"
-
- def get_queryset(self):
- publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
-@@ -396,7 +396,7 @@
- class PublisherBookListView(ListView):
-
- context_object_name = "book_list"
-- template_name = "books/books_by_publisher.html",
-+ template_name = "books/books_by_publisher.html"
-
- def get_queryset(self):
- self.publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
-Index: docs/topics/testing.txt
-===================================================================
---- docs/topics/testing.txt (revision 16771)
-+++ docs/topics/testing.txt (revision 17460)
-@@ -1586,7 +1586,7 @@
- Skip the decorated test if the named database feature is *not*
- supported.
-
--For example, the following test will not be executed if the database
-+For example, the following test will only be executed if the database
- supports transactions (e.g., it would run under PostgreSQL, but *not*
- under MySQL with MyISAM tables)::
-
-Index: docs/topics/templates.txt
-===================================================================
---- docs/topics/templates.txt (revision 16771)
-+++ docs/topics/templates.txt (revision 17460)
-@@ -555,6 +555,8 @@
- the ``escape`` filter *double-escaping* data -- the ``escape`` filter does not
- affect auto-escaped variables.
-
-+.. _string-literals-and-automatic-escaping:
-+
- String literals and automatic escaping
- --------------------------------------
-
-Index: docs/topics/settings.txt
-===================================================================
---- docs/topics/settings.txt (revision 16771)
-+++ docs/topics/settings.txt (revision 17460)
-@@ -39,7 +39,7 @@
- ``mysite.settings``. Note that the settings module should be on the
- Python `import search path`_.
-
--.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
-+.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
-
- The django-admin.py utility
- ---------------------------
-Index: docs/releases/1.2.6.txt
-===================================================================
---- docs/releases/1.2.6.txt (revision 0)
-+++ docs/releases/1.2.6.txt (revision 17460)
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.2.6 release notes
-+==========================
-+
-+*September 9, 2011*
-+
-+Welcome to Django 1.2.6!
-+
-+This is the sixth bugfix/security release in the Django 1.2 series, fixing
-+several security issues present in Django 1.2.5. Django 1.2.6 is a
-+recommended upgrade for all users of any Django release in the 1.2.X series.
-+
-+For a full list of issues addressed in this release, see the `security
-+advisory`_.
-+
-+.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
-Index: docs/releases/1.2.7.txt
-===================================================================
---- docs/releases/1.2.7.txt (revision 0)
-+++ docs/releases/1.2.7.txt (revision 17460)
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.2.7 release notes
-+==========================
-+
-+*September 10, 2011*
-+
-+Welcome to Django 1.2.7!
-+
-+This is the seventh bugfix/security release in the Django 1.2 series. It
-+replaces Django 1.2.6 due to problems with the 1.2.6 release tarball.
-+Django 1.2.7 is a recommended upgrade for all users of any Django release in
-+the 1.2.X series.
-+
-+For more information, see the `release advisory`_.
-+
-+.. _release advisory: https://www.djangoproject.com/weblog/2011/sep/10/127/
-Index: docs/releases/index.txt
-===================================================================
---- docs/releases/index.txt (revision 16771)
-+++ docs/releases/index.txt (revision 17460)
-@@ -19,6 +19,7 @@
- .. toctree::
- :maxdepth: 1
-
-+ 1.3.1
- 1.3
-
- 1.2 release
-@@ -26,6 +27,8 @@
- .. toctree::
- :maxdepth: 1
-
-+ 1.2.7
-+ 1.2.6
- 1.2.5
- 1.2.4
- 1.2.2
-Index: docs/releases/0.95.txt
-===================================================================
---- docs/releases/0.95.txt (revision 16771)
-+++ docs/releases/0.95.txt (revision 17460)
-@@ -92,15 +92,15 @@
- easy checklist_ for reference when undertaking the porting operation.
-
- .. _Removing The Magic: http://code.djangoproject.com/wiki/RemovingTheMagic
--.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet1
-+.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet
-
- Problem reports and getting help
- ================================
-
--Need help resolving a problem with Django? The documentation in the distribution
--is also available online_ at the `Django Web site`_. The :doc:`FAQ </faq/index>`
--document is especially recommended, as it contains a number of issues that come
--up time and again.
-+Need help resolving a problem with Django? The documentation in the
-+distribution is also available :doc:`online </index>` at the `Django Web
-+site`_. The :doc:`FAQ </faq/index>` document is especially recommended, as it
-+contains a number of issues that come up time and again.
-
- For more personalized help, the `django-users`_ mailing list is a very active
- list, with more than 2,000 subscribers who can help you solve any sort of
-@@ -113,7 +113,6 @@
- Django users and developers from around the world. Friendly people are usually
- available at any hour of the day -- to help, or just to chat.
-
--.. _online: http://www.djangoproject.com/documentation/0.95/
- .. _Django Web site: http://www.djangoproject.com/
- .. _django-users: http://groups.google.com/group/django-users
-
-Index: docs/releases/0.96.txt
-===================================================================
---- docs/releases/0.96.txt (revision 16771)
-+++ docs/releases/0.96.txt (revision 17460)
-@@ -50,12 +50,10 @@
- maintained, and it will be removed in a future release of Django.
-
- Also, note that some features, like the new :setting:`DATABASE_OPTIONS`
--setting (see the `databases documentation`_ for details), are only
--available on the "mysql" backend, and will not be made available for
-+setting (see the :doc:`databases documentation </ref/databases>` for details),
-+are only available on the "mysql" backend, and will not be made available for
- "mysql_old".
-
--.. _databases documentation: http://www.djangoproject.com/documentation/0.96/databases/
--
- Database constraint names changed
- ---------------------------------
-
-@@ -164,11 +162,9 @@
- for most common cases. We recommend that anyone new to form handling skip the
- old forms system and start with the new.
-
--For more information about ``django.newforms``, read the `newforms
--documentation`_.
-+For more information about ``django.newforms``, read the :doc:`newforms
-+documentation </topics/forms/index>`.
-
--.. _newforms documentation: http://www.djangoproject.com/documentation/0.96/newforms/
--
- URLconf improvements
- --------------------
-
-@@ -216,20 +212,16 @@
- ------------------
-
- Django now includes a test framework so you can start transmuting fear into
--boredom (with apologies to Kent Beck). You can write tests based on doctest_
--or unittest_ and test your views with a simple test client.
-+boredom (with apologies to Kent Beck). You can write tests based on
-+:mod:`doctest` or :mod:`unittest` and test your views with a simple test client.
-
- There is also new support for "fixtures" -- initial data, stored in any of the
--supported `serialization formats`_, that will be loaded into your database at the
--start of your tests. This makes testing with real data much easier.
-+supported :doc:`serialization formats </topics/serialization>`, that will be
-+loaded into your database at the start of your tests. This makes testing with
-+real data much easier.
-
--See `the testing documentation`_ for the full details.
-+See :doc:`the testing documentation </topics/testing>` for the full details.
-
--.. _doctest: http://docs.python.org/library/doctest.html
--.. _unittest: http://docs.python.org/library/unittest.html
--.. _the testing documentation: http://www.djangoproject.com/documentation/0.96/testing/
--.. _serialization formats: http://www.djangoproject.com/documentation/0.96/serialization/
--
- Improvements to the admin interface
- -----------------------------------
-
-Index: docs/releases/1.0.1.txt
-===================================================================
---- docs/releases/1.0.1.txt (revision 16771)
-+++ docs/releases/1.0.1.txt (revision 17460)
-@@ -6,10 +6,10 @@
-
- This is the first "bugfix" release in the Django 1.0 series, improving
- the stability and performance of the Django 1.0 codebase. As such,
--Django 1.0.1 contains no new features (and, pursuant to `our
--compatibility policy`_, maintains backwards compatibility with Django
--1.0), but does contain a number of fixes and other
--improvements. Django 1.0.1 is a recommended upgrade for any
-+Django 1.0.1 contains no new features (and, pursuant to :doc:`our
-+compatibility policy </misc/api-stability/>`, maintains backwards
-+compatibility with Django 1.0), but does contain a number of fixes
-+and other improvements. Django 1.0.1 is a recommended upgrade for any
- development or deployment currently using or targeting Django 1.0.
-
-
-@@ -46,8 +46,9 @@
-
- * A fix to the application of autoescaping for literal strings passed
- to the ``join`` template filter. Previously, literal strings passed
-- to ``join`` were automatically escaped, contrary to `the documented
-- behavior for autoescaping and literal strings`_. Literal strings
-+ to ``join`` were automatically escaped, contrary to :ref:`the
-+ documented behavior for autoescaping and literal strings
-+ <string-literals-and-automatic-escaping>`. Literal strings
- passed to ``join`` are no longer automatically escaped, meaning you
- must now manually escape them; this is an incompatibility if you
- were relying on this bug, but not if you were relying on escaping
-@@ -60,6 +61,4 @@
- documentation, including both corrections to existing documents and
- expanded and new documentation.
-
--.. _our compatibility policy: http://docs.djangoproject.com/en/dev/misc/api-stability/
- .. _the Subversion log of the 1.0.X branch: http://code.djangoproject.com/log/django/branches/releases/1.0.X
--.. _the documented behavior for autoescaping and literal strings: http://docs.djangoproject.com/en/dev/topics/templates/#string-literals-and-automatic-escaping
-Index: docs/releases/1.3.1.txt
-===================================================================
---- docs/releases/1.3.1.txt (revision 0)
-+++ docs/releases/1.3.1.txt (revision 17460)
-@@ -0,0 +1,16 @@
-+==========================
-+Django 1.3.1 release notes
-+==========================
-+
-+*September 9, 2011*
-+
-+Welcome to Django 1.3.1!
-+
-+This is the first security release in the Django 1.3 series, fixing several
-+security issues in Django 1.3. Django 1.3.1 is a recommended upgrade for
-+all users of Django 1.3.
-+
-+For a full list of issues addressed in this release, see the `security
-+advisory`_.
-+
-+.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
-Index: docs/ref/models/instances.txt
-===================================================================
---- docs/ref/models/instances.txt (revision 16771)
-+++ docs/ref/models/instances.txt (revision 17460)
-@@ -470,7 +470,7 @@
-
- Similarly, if you had a URLconf entry that looked like::
-
-- (r'/archive/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', archive_view)
-+ (r'/archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', archive_view)
-
- ...you could reference this using ``permalink()`` as follows::
-
-@@ -478,8 +478,8 @@
- def get_absolute_url(self):
- return ('archive_view', (), {
- 'year': self.created.year,
-- 'month': self.created.month,
-- 'day': self.created.day})
-+ 'month': self.created.strftime('%m'),
-+ 'day': self.created.strftime('%d')})
-
- Notice that we specify an empty sequence for the second parameter in this case,
- because we only want to pass keyword parameters, not positional ones.
-Index: docs/ref/models/options.txt
-===================================================================
---- docs/ref/models/options.txt (revision 16771)
-+++ docs/ref/models/options.txt (revision 17460)
-@@ -166,6 +166,13 @@
- >>> answer.get_previous_in_order()
- <Answer: 1>
-
-+.. admonition:: Changing order_with_respect_to
-+
-+ ``order_with_respect_to`` adds an additional field/database column
-+ named ``_order``, so be sure to handle that as you would any other
-+ change to your models if you add or change ``order_with_respect_to``
-+ after your initial :djadmin:`syncdb`.
-+
- ``ordering``
- ------------
-
-@@ -238,6 +245,12 @@
-
- unique_together = ("driver", "restaurant")
-
-+ A :class:`~django.db.models.ManyToManyField` cannot be included in
-+ unique_together (it's not even clear what that would mean). If you
-+ need to validate uniqueness related to a
-+ :class:`~django.db.models.ManyToManyField`, look at signals or
-+ using an explicit :attr:`through <ManyToManyField.through>` model.
-+
- ``verbose_name``
- ----------------
-
-Index: docs/ref/templates/builtins.txt
-===================================================================
---- docs/ref/templates/builtins.txt (revision 16771)
-+++ docs/ref/templates/builtins.txt (revision 17460)
-@@ -1868,7 +1868,7 @@
- Returns a slice of the list.
-
- Uses the same syntax as Python's list slicing. See
--http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
-+http://diveintopython.net/native_data_types/lists.html#odbchelper.list.slice
- for an introduction.
-
- Example::
-Index: docs/ref/contrib/gis/geoip.txt
-===================================================================
---- docs/ref/contrib/gis/geoip.txt (revision 16771)
-+++ docs/ref/contrib/gis/geoip.txt (revision 17460)
-@@ -144,7 +144,7 @@
- Returns a dictionary of city information for the given query. Some
- of the values in the dictionary may be undefined (``None``).
-
--.. method:: GeoIPcountry(query)
-+.. method:: GeoIP.country(query)
-
- Returns a dictionary with the country code and country for the given
- query.
-Index: docs/ref/contrib/messages.txt
-===================================================================
---- docs/ref/contrib/messages.txt (revision 16771)
-+++ docs/ref/contrib/messages.txt (revision 17460)
-@@ -210,6 +210,10 @@
- ``RequestContext``. Otherwise, ensure ``messages`` is available to
- the template context.
-
-+Even if you know there is only just one message, you should still iterate over
-+the ``messages`` sequence, because otherwise the message storage will not be cleared
-+for the next request.
-+
- Creating custom message levels
- ------------------------------
-
-Index: docs/ref/contrib/admin/index.txt
-===================================================================
---- docs/ref/contrib/admin/index.txt (revision 16771)
-+++ docs/ref/contrib/admin/index.txt (revision 17460)
-@@ -19,8 +19,10 @@
- 1. Add ``'django.contrib.admin'`` to your :setting:`INSTALLED_APPS`
- setting.
-
-- 2. Admin has two dependencies - :mod:`django.contrib.auth` and
-- :mod:`django.contrib.contenttypes`. If these applications are not
-+ 2. The admin has four dependencies - :mod:`django.contrib.auth`,
-+ :mod:`django.contrib.contenttypes`,
-+ :mod:`django.contrib.messages` and
-+ :mod:`django.contrib.sessions`. If these applications are not
- in your :setting:`INSTALLED_APPS` list, add them.
-
- 3. Determine which of your application's models should be editable in the
-@@ -542,7 +544,7 @@
- Fields in ``list_filter`` can also span relations using the ``__`` lookup::
-
- class UserAdminWithLookup(UserAdmin):
-- list_filter = ('groups__name')
-+ list_filter = ('groups__name',)
-
- .. attribute:: ModelAdmin.list_per_page
-
-Index: docs/ref/django-admin.txt
-===================================================================
---- docs/ref/django-admin.txt (revision 16771)
-+++ docs/ref/django-admin.txt (revision 17460)
-@@ -1156,7 +1156,7 @@
- Note that this option is unnecessary in ``manage.py``, because it takes care of
- setting the Python path for you.
-
--.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
-+.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
-
- .. django-admin-option:: --settings
-
-Index: docs/ref/signals.txt
-===================================================================
---- docs/ref/signals.txt (revision 16771)
-+++ docs/ref/signals.txt (revision 17460)
-@@ -352,12 +352,16 @@
- .. data:: django.db.models.signals.post_syncdb
- :module:
-
--Sent by :djadmin:`syncdb` after it installs an application.
-+Sent by :djadmin:`syncdb` command after it installs an application, and
-+:djadmin:`flush` command.
-
- Any handlers that listen to this signal need to be written in a particular
- place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
- handlers are registered anywhere else they may not be loaded by
--:djadmin:`syncdb`.
-+:djadmin:`syncdb`. It is important that handlers of this signal perform
-+idempotent changes (e.g. no database alterations) as this may cause the
-+:djadmin:`flush` management command to fail if it also ran during the
-+:djadmin:`syncdb` command.
-
- Arguments sent with this signal:
-
-Index: README
-===================================================================
---- README (revision 16771)
-+++ README (revision 17460)
-@@ -28,7 +28,7 @@
- To get more help:
-
- * Join the #django channel on irc.freenode.net. Lots of helpful people
-- hang out there. Read the archives at http://botland.oebfare.com/logger/django/.
-+ hang out there. Read the archives at http://django-irc-logs.com/.
-
- * Join the django-users mailing list, or read the archives, at
- http://groups.google.com/group/django-users.
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index 21220a209..59c7dbe0a 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -3,23 +3,25 @@
# Contributor: Keshav Padram (the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
-## grub-extras lua and gpxe fail to build
+_GRUB_BZR_REV="5043"
+
+## grub-extras lua and gpxe fail to build with grub bzr rev 5043
[[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64"
[[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386"
pkgname=grub
pkgdesc="GNU GRand Unified Bootloader (2), (Parabola rebranded)"
-pkgver=2.00
+pkgver=2.00.${_GRUB_BZR_REV}
pkgrel=1
url="https://www.gnu.org/software/grub/"
arch=('x86_64' 'i686')
license=('GPL3')
-backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
+backup=('etc/default/grub' 'etc/grub.d/40_custom')
install="${pkgname}.install"
options=('!makeflags')
-conflicts=('grub-legacy' 'grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}")
+conflicts=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}" 'grub-legacy')
replaces=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}")
provides=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}")
@@ -28,51 +30,42 @@ makedepends=('xz' 'freetype2' 'bdf-unifont' 'ttf-dejavu' 'python' 'autogen'
depends=('sh' 'xz' 'gettext' 'device-mapper')
optdepends=('freetype2: For grub-mkfont usage'
'fuse: For grub-mount usage'
- 'dosfstools: For EFI support'
+ 'dosfstools: For grub-mkrescue FAT FS and EFI support'
'efibootmgr: For grub-install EFI support'
'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue'
'os-prober: To detect other OSes when generating grub.cfg in BIOS systems'
'mtools: For grub-mkrescue FAT FS support')
-source=("http://ftp.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
- '0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch'
- 'grub-2.00-fix-docs.patch'
+# source=("http://ftp.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
+source=("grub-${pkgver}::bzr+bzr://bzr.savannah.gnu.org/grub/trunk/grub/#revision=${_GRUB_BZR_REV}"
'parabola_grub_mkconfig_fixes.patch'
'60_memtest86+'
- 'grub.default'
- 'grub.cfg')
+ 'grub.default')
for _DIR_ in 915resolution ntldr-img ; do
- source+=("grub-extras-${_DIR_}::bzr+bzr://bzr.savannah.gnu.org/grub-extras/${_DIR_}/")
+ source+=("grub-extras-${_DIR_}::bzr+bzr://bzr.savannah.gnu.org/grub-extras/${_DIR_}/#revision=")
done
-source+=("grub-extras-lua::bzr+bzr://bzr.savannah.gnu.org/grub-extras/lua/#revision=24"
- "grub-extras-gpxe::bzr+bzr://bzr.savannah.gnu.org/grub-extras/gpxe/#revision=13")
-
-sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b'
- 'b68565bc155094bade390c257c3f31bc55ae244b'
- '1dc08391bb13f8e23faa21a76cc4cc4b25467702'
- 'c631ec04d458c60a3ceffe60d2d1806d54554d9c'
+# sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b'
+sha1sums=('SKIP'
+ '513172d91d1a2e2cda7c0a744c766d5868cb28bf'
'2aa2deeb7d7dc56f389aa1487b7a57b0d44ce559'
'06b926320cb2add6c157d59d46e553b89dd3aa03'
- '662ec5f0d44122b66666a788387ec69389295b2c'
- 'SKIP'
- 'SKIP'
'SKIP'
'SKIP')
_build_grub-common_and_bios() {
## Copy the source for building the common/bios package
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-bios-${pkgver}"
- cd "${srcdir}/grub-bios-${pkgver}/"
+ cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-bios"
+ cd "${srcdir}/grub-${pkgver}-bios/"
## Add the grub-extra sources
- export GRUB_CONTRIB="${srcdir}/grub-bios-${pkgver}/grub-extras/"
+ export GRUB_CONTRIB="${srcdir}/grub-${pkgver}-bios/grub-extras/"
- install -d "${srcdir}/grub-bios-${pkgver}/grub-extras"
- for _DIR_ in 915resolution ntldr-img lua gpxe ; do
- cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-bios-${pkgver}/grub-extras/${_DIR_}"
+ install -d "${srcdir}/grub-${pkgver}-bios/grub-extras"
+ for _DIR_ in 915resolution ntldr-img ; do
+ cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-${pkgver}-bios/grub-extras/${_DIR_}"
done
## Unset all compiler FLAGS for bios build
@@ -83,11 +76,11 @@ _build_grub-common_and_bios() {
unset MAKEFLAGS
## Start the actual build process
- cd "${srcdir}/grub-bios-${pkgver}/"
+ cd "${srcdir}/grub-${pkgver}-bios/"
./autogen.sh
echo
- CFLAGS="-fno-stack-protector" ./configure \
+ ./configure \
--with-platform="pc" \
--target="i386" \
"${_EFIEMU}" \
@@ -117,15 +110,15 @@ _build_grub-common_and_bios() {
_build_grub-efi() {
## Copy the source for building the efi package
- cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-efi-${pkgver}"
- cd "${srcdir}/grub-efi-${pkgver}/"
+ cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-efi"
+ cd "${srcdir}/grub-${pkgver}-efi/"
- export GRUB_CONTRIB="${srcdir}/grub-efi-${pkgver}/grub-extras/"
+ # export GRUB_CONTRIB="${srcdir}/grub-${pkgver}-efi/grub-extras/"
- install -d "${srcdir}/grub-efi-${pkgver}/grub-extras/"
- for _DIR_ in lua gpxe ; do
- cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-bios-${pkgver}/grub-extras/${_DIR_}"
- done
+ # install -d "${srcdir}/grub-${pkgver}-efi/grub-extras/"
+ # for _DIR_ in lua gpxe ; do
+ # cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-${pkgver}-bios/grub-extras/${_DIR_}"
+ # done
## Unset all compiler FLAGS for efi build
unset CFLAGS
@@ -134,7 +127,7 @@ _build_grub-efi() {
unset LDFLAGS
unset MAKEFLAGS
- cd "${srcdir}/grub-efi-${pkgver}/"
+ cd "${srcdir}/grub-${pkgver}-efi/"
./autogen.sh
echo
@@ -177,14 +170,6 @@ build() {
cd "${srcdir}/grub-${pkgver}/"
- ## Fix compiling with gcc48
- patch -Np1 -i "${srcdir}/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch"
- echo
-
- ## Fix docs compiling
- patch -Np1 -i "${srcdir}/grub-2.00-fix-docs.patch"
- echo
-
## Apply Parabola specific fixes to enable grub-mkconfig detect kernels and initramfs
patch -Np1 -i "${srcdir}/parabola_grub_mkconfig_fixes.patch"
echo
@@ -208,7 +193,7 @@ build() {
_package_grub-common_and_bios() {
- cd "${srcdir}/grub-bios-${pkgver}/"
+ cd "${srcdir}/grub-${pkgver}-bios/"
make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
echo
@@ -223,15 +208,12 @@ _package_grub-common_and_bios() {
## Install /etc/default/grub (used by grub-mkconfig)
install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
- ## Install grub.cfg for backup array
- install -D -m0644 "${srcdir}/grub.cfg" "${pkgdir}/boot/grub/grub.cfg"
-
}
_package_grub-efi() {
- cd "${srcdir}/grub-efi-${pkgver}/"
- make DESTDIR="${pkgdir}/" install
+ cd "${srcdir}/grub-${pkgver}-efi/"
+ make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
echo
## remove gdb debugging related files
diff --git a/libre/grub/grub_bzr_export.sh b/libre/grub/grub_bzr_export.sh
deleted file mode 100644
index ff8f99ecc..000000000
--- a/libre/grub/grub_bzr_export.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/env bash
-
-## For actual repos
-
-# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/lua lua
-# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/gpxe gpxe
-# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/ntldr-img ntldr-img
-# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/915resolution 915resolution
-
-## For launchpad mirror
-
-# bzr branch lp:~the-ridikulus-rat/grub/grub-extras-lua lua
-# bzr branch lp:~the-ridikulus-rat/grub/grub-extras-gpxe gpxe
-# bzr branch lp:~the-ridikulus-rat/grub/grub-extras-ntldr-img ntldr-img
-# bzr branch lp:~the-ridikulus-rat/grub/grub-extras-915resolution 915resolution
-
-## grub-extras zfs is integrated into grub bzr main repo and is no longer needed separately.
-
-_WD="${PWD}/"
-_OUTPUT_DIR="${_WD}/"
-
-_ACTUAL_PKGVER="2.00"
-
-_GRUB_BZR_REPO_DIR="${_WD}/grub_mainline_BZR/"
-_GRUB_BZR_EXP_REPO_DIR="${_WD}/grub_experimental_BZR/"
-_GRUB_EXTRAS_REPOS_DIR="${_WD}/grub_extras_BZR/"
-
-_MAIN_SNAPSHOT() {
-
- cd "${_GRUB_BZR_REPO_DIR}/"
- echo
-
- _REVNUM="$(bzr revno ${_GRUB_BZR_REPO_DIR})"
- bzr export --root="grub-${_ACTUAL_PKGVER}" --format="tar" "${_OUTPUT_DIR}/grub_r${_REVNUM}.tar"
- echo
-
- cd "${_OUTPUT_DIR}/"
-
- xz -9 "${_OUTPUT_DIR}/grub_r${_REVNUM}.tar"
- echo
-
-}
-
-_EXP_SNAPSHOT() {
-
- cd "${_GRUB_BZR_EXP_REPO_DIR}/"
- echo
-
- _REVNUM="$(bzr revno ${_GRUB_BZR_EXP_REPO_DIR})"
- bzr export --root="grub-${_ACTUAL_PKGVER}" --format="tar" "${_OUTPUT_DIR}/grub_exp_r${_REVNUM}.tar"
- echo
-
- cd "${_OUTPUT_DIR}/"
-
- xz -9 "${_OUTPUT_DIR}/grub_exp_r${_REVNUM}.tar"
- echo
-
-}
-
-_EXTRAS_SNAPSHOT() {
-
- cd "${_GRUB_EXTRAS_REPOS_DIR}/${_GRUB_EXTRAS_NAME}/"
- echo
-
- _REVNUM="$(bzr revno ${_GRUB_EXTRAS_REPOS_DIR}/${_GRUB_EXTRAS_NAME})"
- bzr export --root="${_GRUB_EXTRAS_NAME}" --format="tar" "${_OUTPUT_DIR}/grub_extras_${_GRUB_EXTRAS_NAME}_r${_REVNUM}.tar"
- echo
-
- cd "${_OUTPUT_DIR}/"
- echo
-
- xz -9 "${_OUTPUT_DIR}/grub_extras_${_GRUB_EXTRAS_NAME}_r${_REVNUM}.tar"
- echo
-
-}
-
-echo
-
-set -x -e
-
-echo
-
-_MAIN_SNAPSHOT
-
-echo
-
-# _EXP_SNAPSHOT
-
-echo
-
-_GRUB_EXTRAS_NAME="lua"
-_EXTRAS_SNAPSHOT
-
-# _GRUB_EXTRAS_NAME="gpxe"
-# _EXTRAS_SNAPSHOT
-
-_GRUB_EXTRAS_NAME="ntldr-img"
-_EXTRAS_SNAPSHOT
-
-_GRUB_EXTRAS_NAME="915resolution"
-_EXTRAS_SNAPSHOT
-
-echo
-
-set +x +e
-
-echo
-
-unset _WD
-unset _OUTPUT_DIR
-unset _GRUB_BZR_REPO_DIR
-unset _GRUB_EXTRAS_REPOS_DIR
-unset _GRUB_EXTRAS_NAME
diff --git a/libre/grub/parabola_grub_mkconfig_fixes.patch b/libre/grub/parabola_grub_mkconfig_fixes.patch
index 5324afa01..fbcca19ec 100644
--- a/libre/grub/parabola_grub_mkconfig_fixes.patch
+++ b/libre/grub/parabola_grub_mkconfig_fixes.patch
@@ -1,8 +1,8 @@
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index 516be86..5f37db2 100644
+index 8decc1d..170047f 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
-@@ -213,6 +213,8 @@ export GRUB_DEFAULT \
+@@ -212,6 +212,8 @@ export GRUB_DEFAULT \
GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \
GRUB_DISABLE_OS_PROBER \
@@ -12,10 +12,10 @@ index 516be86..5f37db2 100644
GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
-index 765bfdc..b148558 100644
+index 2c4bb0a..c7120d2 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
-@@ -115,6 +115,14 @@ cat <<EOF
+@@ -125,6 +125,14 @@ cat <<EOF
EOF
@@ -64,7 +64,7 @@ index 14402e8..e85f7d6 100644
fi
- if [ x$type != xrecovery ] ; then
+ if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then
- save_default_entry | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
fi
@@ -132,7 +140,8 @@ linux_entry ()
@@ -75,7 +75,7 @@ index 14402e8..e85f7d6 100644
+
+ message="$(gettext_printf "Loading Linux %s ..." "${version}")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
@@ -190,7 +199,22 @@ while [ "x$list" != "x" ] ; do
alt_version=`echo $version | sed -e "s,\.old$,,g"`
diff --git a/libre/liferea-libre/PKGBUILD b/libre/liferea-libre/PKGBUILD
index 3ac0fdb5d..4126d4d01 100644
--- a/libre/liferea-libre/PKGBUILD
+++ b/libre/liferea-libre/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 186254 2013-05-23 00:44:27Z eric $
+# $Id: PKGBUILD 188905 2013-06-25 03:54:44Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Contributor (Parabola): bitlord
# Contributor (Parabola): André Silva <emulatorman@lavabit.com>
_pkgname=liferea
pkgname=liferea-libre
-pkgver=1.8.14
+pkgver=1.8.15
pkgrel=1
pkgdesc="A desktop news aggregator for online news feeds and weblogs, without nonfree suggestions"
arch=('i686' 'x86_64')
@@ -21,7 +21,7 @@ options=('!libtool' '!emptydirs')
install=liferea.install
source=(http://downloads.sourceforge.net/sourceforge/liferea/liferea-${pkgver}.tar.bz2
remove-non-free-suggestions.patch)
-sha1sums=('980939a9f6483f4e9ca2353ffdba131cb9a88a6e'
+sha1sums=('9a86773996d61d03c03e9a5137a2c0a3e2539f4f'
'0d68c567c3d37932a49709c58c37c3f138fd19cb')
build() {
diff --git a/libre/python2-bencode/PKGBUILD b/libre/python2-bencode/PKGBUILD
new file mode 100644
index 000000000..762d55cad
--- /dev/null
+++ b/libre/python2-bencode/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=bencode
+pkgname=python2-bencode
+pkgver=1.0
+pkgdesc="BitTorrent bencode module as leight-weight, standalone package"
+url="http://pypi.python.org/pypi/BitTorrent-bencode"
+license=('custom:BitTorrent Open Source License')
+
+pkgrel=1
+arch=('any')
+depends=('python2')
+makedepends=('python2-distribute')
+source=(http://pypi.python.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz
+ bittorrent-osl.txt)
+
+package(){
+ cd "$srcdir/$_pkgname-$pkgver"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 "$srcdir"/bittorrent-osl.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums=('400dd42ff346eb7db91245403f8f2b7b'
+ '016d959cb9f7a319e48d9699c4ef2f42')
diff --git a/libre/python2-bencode/bittorrent-osl.txt b/libre/python2-bencode/bittorrent-osl.txt
new file mode 100644
index 000000000..f0625f45c
--- /dev/null
+++ b/libre/python2-bencode/bittorrent-osl.txt
@@ -0,0 +1,510 @@
+BitTorrent Open Source License
+
+Version 1.1
+
+This BitTorrent Open Source License (the "License") applies to the
+BitTorrent client and related software products as well as any updates
+or maintenance releases of that software ("BitTorrent Products") that
+are distributed by BitTorrent, Inc. ("Licensor"). Any BitTorrent
+Product licensed pursuant to this License is a Licensed
+Product. Licensed Product, in its entirety, is protected by
+U.S. copyright law. This License identifies the terms under which you
+may use, copy, distribute or modify Licensed Product.
+
+Preamble
+
+This Preamble is intended to describe, in plain English, the nature
+and scope of this License. However, this Preamble is not a part of
+this license. The legal effect of this License is dependent only upon
+the terms of the License and not this Preamble.
+
+This License complies with the Open Source Definition and is derived
+from the Jabber Open Source License 1.0 (the "JOSL"), which has been
+approved by Open Source Initiative. Sections 4(c) and 4(f)(iii) from
+the JOSL have been deleted.
+
+This License provides that:
+
+1. You may use or give away the Licensed Product, alone or as a
+component of an aggregate software distribution containing programs
+from several different sources. No royalty or other fee is required.
+
+2. Both Source Code and executable versions of the Licensed Product,
+including Modifications made by previous Contributors, are available
+for your use. (The terms "Licensed Product," "Modifications,"
+"Contributors" and "Source Code" are defined in the License.)
+
+3. You are allowed to make Modifications to the Licensed Product, and
+you can create Derivative Works from it. (The term "Derivative Works"
+is defined in the License.)
+
+4. By accepting the Licensed Product under the provisions of this
+License, you agree that any Modifications you make to the Licensed
+Product and then distribute are governed by the provisions of this
+License. In particular, you must make the Source Code of your
+Modifications available to others free of charge and without a
+royalty.
+
+5. You may sell, accept donations or otherwise receive compensation
+for executable versions of a Licensed Product, without paying a
+royalty or other fee to the Licensor or any Contributor, provided that
+such executable versions contain your or another Contributor?s
+material Modifications. For the avoidance of doubt, to the extent your
+executable version of a Licensed Product does not contain your or
+another Contributor?s material Modifications, you may not sell, accept
+donations or otherwise receive compensation for such executable.
+
+You may use the Licensed Product for any purpose, but the Licensor is
+not providing you any warranty whatsoever, nor is the Licensor
+accepting any liability in the event that the Licensed Product doesn't
+work properly or causes you any injury or damages.
+
+6. If you sublicense the Licensed Product or Derivative Works, you may
+charge fees for warranty or support, or for accepting indemnity or
+liability obligations to your customers. You cannot charge for, sell,
+accept donations or otherwise receive compensation for the Source
+Code.
+
+7. If you assert any patent claims against the Licensor relating to
+the Licensed Product, or if you breach any terms of the License, your
+rights to the Licensed Product under this License automatically
+terminate.
+
+You may use this License to distribute your own Derivative Works, in
+which case the provisions of this License will apply to your
+Derivative Works just as they do to the original Licensed Product.
+
+Alternatively, you may distribute your Derivative Works under any
+other OSI-approved Open Source license, or under a proprietary license
+of your choice. If you use any license other than this License,
+however, you must continue to fulfill the requirements of this License
+(including the provisions relating to publishing the Source Code) for
+those portions of your Derivative Works that consist of the Licensed
+Product, including the files containing Modifications.
+
+New versions of this License may be published from time to time in
+connection with new versions of a Licensed Product or otherwise. You
+may choose to continue to use the license terms in this version of the
+License for the Licensed Product that was originally licensed
+hereunder, however, the new versions of this License will at all times
+apply to new versions of the Licensed Product released by Licensor
+after the release of the new version of this License. Only the
+Licensor has the right to change the License terms as they apply to
+the Licensed Product.
+
+This License relies on precise definitions for certain terms. Those
+terms are defined when they are first used, and the definitions are
+repeated for your convenience in a Glossary at the end of the License.
+
+License Terms
+
+1. Grant of License From Licensor. Subject to the terms and conditions
+of this License, Licensor hereby grants you a world-wide,
+royalty-free, non-exclusive license, subject to third party
+intellectual property claims, to do the following:
+
+a. Use, reproduce, modify, display, perform, sublicense and distribute
+any Modifications created by a Contributor or portions thereof, in
+both Source Code or as an executable program, either on an unmodified
+basis or as part of Derivative Works.
+
+b. Under claims of patents now or hereafter owned or controlled by
+Contributor, to make, use, sell, offer for sale, have made, and/or
+otherwise dispose of Modifications or portions thereof, but solely to
+the extent that any such claim is necessary to enable you to make,
+use, sell, offer for sale, have made, and/or otherwise dispose of
+Modifications or portions thereof or Derivative Works thereof.
+
+2. Grant of License to Modifications From Contributor. "Modifications"
+means any additions to or deletions from the substance or structure of
+(i) a file containing a Licensed Product, or (ii) any new file that
+contains any part of a Licensed Product. Hereinafter in this License,
+the term "Licensed Product" shall include all previous Modifications
+that you receive from any Contributor. Subject to the terms and
+conditions of this License, By application of the provisions in
+Section 4(a) below, each person or entity who created or contributed
+to the creation of, and distributed, a Modification (a "Contributor")
+hereby grants you a world-wide, royalty-free, non-exclusive license,
+subject to third party intellectual property claims, to do the
+following:
+
+a. Use, reproduce, modify, display, perform, sublicense and distribute
+any Modifications created by such Contributor or portions thereof, in
+both Source Code or as an executable program, either on an unmodified
+basis or as part of Derivative Works.
+
+b. Under claims of patents now or hereafter owned or controlled by
+Contributor, to make, use, sell, offer for sale, have made, and/or
+otherwise dispose of Modifications or portions thereof, but solely to
+the extent that any such claim is necessary to enable you to make,
+use, sell, offer for sale, have made, and/or otherwise dispose of
+Modifications or portions thereof or Derivative Works thereof.
+
+3. Exclusions From License Grant. Nothing in this License shall be
+deemed to grant any rights to trademarks, copyrights, patents, trade
+secrets or any other intellectual property of Licensor or any
+Contributor except as expressly stated herein. No patent license is
+granted separate from the Licensed Product, for code that you delete
+from the Licensed Product, or for combinations of the Licensed Product
+with other software or hardware. No right is granted to the trademarks
+of Licensor or any Contributor even if such marks are included in the
+Licensed Product. Nothing in this License shall be interpreted to
+prohibit Licensor from licensing under different terms from this
+License any code that Licensor otherwise would have a right to
+license. As an express condition for your use of the Licensed Product,
+you hereby agree that you will not, without the prior written consent
+of Licensor, use any trademarks, copyrights, patents, trade secrets or
+any other intellectual property of Licensor or any Contributor except
+as expressly stated herein. For the avoidance of doubt and without
+limiting the foregoing, you hereby agree that you will not use or
+display any trademark of Licensor or any Contributor in any domain
+name, directory filepath, advertisement, link or other reference to
+you in any manner or in any media.
+
+4. Your Obligations Regarding Distribution.
+
+a. Application of This License to Your Modifications. As an express
+condition for your use of the Licensed Product, you hereby agree that
+any Modifications that you create or to which you contribute, and
+which you distribute, are governed by the terms of this License
+including, without limitation, Section 2. Any Modifications that you
+create or to which you contribute may be distributed only under the
+terms of this License or a future version of this License released
+under Section 7. You must include a copy of this License with every
+copy of the Modifications you distribute. You agree not to offer or
+impose any terms on any Source Code or executable version of the
+Licensed Product or Modifications that alter or restrict the
+applicable version of this License or the recipients' rights
+hereunder. However, you may include an additional document offering
+the additional rights described in Section 4(d).
+
+b. Availability of Source Code. You must make available, without
+charge, under the terms of this License, the Source Code of the
+Licensed Product and any Modifications that you distribute, either on
+the same media as you distribute any executable or other form of the
+Licensed Product, or via a mechanism generally accepted in the
+software development community for the electronic transfer of data (an
+"Electronic Distribution Mechanism"). The Source Code for any version
+of Licensed Product or Modifications that you distribute must remain
+available for as long as any executable or other form of the Licensed
+Product is distributed by you. You are responsible for ensuring that
+the Source Code version remains available even if the Electronic
+Distribution Mechanism is maintained by a third party.
+
+c. Intellectual Property Matters.
+
+i. Third Party Claims. If you have knowledge that a license to a third
+party's intellectual property right is required to exercise the rights
+granted by this License, you must include a text file with the Source
+Code distribution titled "LEGAL" that describes the claim and the
+party making the claim in sufficient detail that a recipient will know
+whom to contact. If you obtain such knowledge after you make any
+Modifications available as described in Section 4(b), you shall
+promptly modify the LEGAL file in all copies you make available
+thereafter and shall take other steps (such as notifying appropriate
+mailing lists or newsgroups) reasonably calculated to inform those who
+received the Licensed Product from you that new knowledge has been
+obtained.
+
+ii. Contributor APIs. If your Modifications include an application
+programming interface ("API") and you have knowledge of patent
+licenses that are reasonably necessary to implement that API, you must
+also include this information in the LEGAL file.
+
+iii. Representations. You represent that, except as disclosed pursuant
+to 4(c)(i) above, you believe that any Modifications you distribute
+are your original creations and that you have sufficient rights to
+grant the rights conveyed by this License.
+
+d. Required Notices. You must duplicate this License in any
+documentation you provide along with the Source Code of any
+Modifications you create or to which you contribute, and which you
+distribute, wherever you describe recipients' rights relating to
+Licensed Product. You must duplicate the notice contained in Exhibit A
+(the "Notice") in each file of the Source Code of any copy you
+distribute of the Licensed Product. If you created a Modification, you
+may add your name as a Contributor to the Notice. If it is not
+possible to put the Notice in a particular Source Code file due to its
+structure, then you must include such Notice in a location (such as a
+relevant directory file) where a user would be likely to look for such
+a notice. You may choose to offer, and charge a fee for, warranty,
+support, indemnity or liability obligations to one or more recipients
+of Licensed Product. However, you may do so only on your own behalf,
+and not on behalf of the Licensor or any Contributor. You must make it
+clear that any such warranty, support, indemnity or liability
+obligation is offered by you alone, and you hereby agree to indemnify
+the Licensor and every Contributor for any liability incurred by the
+Licensor or such Contributor as a result of warranty, support,
+indemnity or liability terms you offer.
+
+e. Distribution of Executable Versions. You may distribute Licensed
+Product as an executable program under a license of your choice that
+may contain terms different from this License provided (i) you have
+satisfied the requirements of Sections 4(a) through 4(d) for that
+distribution, (ii) you include a conspicuous notice in the executable
+version, related documentation and collateral materials stating that
+the Source Code version of the Licensed Product is available under the
+terms of this License, including a description of how and where you
+have fulfilled the obligations of Section 4(b), and (iii) you make it
+clear that any terms that differ from this License are offered by you
+alone, not by Licensor or any Contributor. You hereby agree to
+indemnify the Licensor and every Contributor for any liability
+incurred by Licensor or such Contributor as a result of any terms you
+offer.
+
+f. Distribution of Derivative Works. You may create Derivative Works
+(e.g., combinations of some or all of the Licensed Product with other
+code) and distribute the Derivative Works as products under any other
+license you select, with the proviso that the requirements of this
+License are fulfilled for those portions of the Derivative Works that
+consist of the Licensed Product or any Modifications thereto.
+
+g. Compensation for Distribution of Executable Versions of Licensed
+Products, Modifications or Derivative Works. Notwithstanding any
+provision of this License to the contrary, by distributing, selling,
+licensing, sublicensing or otherwise making available any Licensed
+Product, or Modification or Derivative Work thereof, you and Licensor
+hereby acknowledge and agree that you may sell, license or sublicense
+for a fee, accept donations or otherwise receive compensation for
+executable versions of a Licensed Product, without paying a royalty or
+other fee to the Licensor or any other Contributor, provided that such
+executable versions (i) contain your or another Contributor?s material
+Modifications, or (ii) are otherwise material Derivative Works. For
+purposes of this License, an executable version of the Licensed
+Product will be deemed to contain a material Modification, or will
+otherwise be deemed a material Derivative Work, if (a) the Licensed
+Product is modified with your own or a third party?s software programs
+or other code, and/or the Licensed Product is combined with a number
+of your own or a third party?s software programs or code,
+respectively, and (b) such software programs or code add or contribute
+material value, functionality or features to the License Product. For
+the avoidance of doubt, to the extent your executable version of a
+Licensed Product does not contain your or another Contributor?s
+material Modifications or is otherwise not a material Derivative Work,
+in each case as contemplated herein, you may not sell, license or
+sublicense for a fee, accept donations or otherwise receive
+compensation for such executable. Additionally, without limitation of
+the foregoing and notwithstanding any provision of this License to the
+contrary, you cannot charge for, sell, license or sublicense for a
+fee, accept donations or otherwise receive compensation for the Source
+Code.
+
+5. Inability to Comply Due to Statute or Regulation. If it is
+impossible for you to comply with any of the terms of this License
+with respect to some or all of the Licensed Product due to statute,
+judicial order, or regulation, then you must (i) comply with the terms
+of this License to the maximum extent possible, (ii) cite the statute
+or regulation that prohibits you from adhering to the License, and
+(iii) describe the limitations and the code they affect. Such
+description must be included in the LEGAL file described in Section
+4(d), and must be included with all distributions of the Source
+Code. Except to the extent prohibited by statute or regulation, such
+description must be sufficiently detailed for a recipient of ordinary
+skill at computer programming to be able to understand it.
+
+6. Application of This License. This License applies to code to which
+Licensor or Contributor has attached the Notice in Exhibit A, which is
+incorporated herein by this reference.
+
+7. Versions of This License.
+
+a. New Versions. Licensor may publish from time to time revised and/or
+new versions of the License.
+
+b. Effect of New Versions. Once Licensed Product has been published
+under a particular version of the License, you may always continue to
+use it under the terms of that version, provided that any such license
+be in full force and effect at the time, and has not been revoked or
+otherwise terminated. You may also choose to use such Licensed Product
+under the terms of any subsequent version (but not any prior version)
+of the License published by Licensor. No one other than Licensor has
+the right to modify the terms applicable to Licensed Product created
+under this License.
+
+c. Derivative Works of this License. If you create or use a modified
+version of this License, which you may do only in order to apply it to
+software that is not already a Licensed Product under this License,
+you must rename your license so that it is not confusingly similar to
+this License, and must make it clear that your license contains terms
+that differ from this License. In so naming your license, you may not
+use any trademark of Licensor or any Contributor.
+
+8. Disclaimer of Warranty. LICENSED PRODUCT IS PROVIDED UNDER THIS
+LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE
+LICENSED PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
+PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE
+QUALITY AND PERFORMANCE OF THE LICENSED PRODUCT IS WITH YOU. SHOULD
+LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND NOT THE
+LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
+SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
+CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED
+PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+9. Termination.
+
+a. Automatic Termination Upon Breach. This license and the rights
+granted hereunder will terminate automatically if you fail to comply
+with the terms herein and fail to cure such breach within ten (10)
+days of being notified of the breach by the Licensor. For purposes of
+this provision, proof of delivery via email to the address listed in
+the ?WHOIS? database of the registrar for any website through which
+you distribute or market any Licensed Product, or to any alternate
+email address which you designate in writing to the Licensor, shall
+constitute sufficient notification. All sublicenses to the Licensed
+Product that are properly granted shall survive any termination of
+this license so long as they continue to complye with the terms of
+this License. Provisions that, by their nature, must remain in effect
+beyond the termination of this License, shall survive.
+
+b. Termination Upon Assertion of Patent Infringement. If you initiate
+litigation by asserting a patent infringement claim (excluding
+declaratory judgment actions) against Licensor or a Contributor
+(Licensor or Contributor against whom you file such an action is
+referred to herein as Respondent) alleging that Licensed Product
+directly or indirectly infringes any patent, then any and all rights
+granted by such Respondent to you under Sections 1 or 2 of this
+License shall terminate prospectively upon sixty (60) days notice from
+Respondent (the "Notice Period") unless within that Notice Period you
+either agree in writing (i) to pay Respondent a mutually agreeable
+reasonably royalty for your past or future use of Licensed Product
+made by such Respondent, or (ii) withdraw your litigation claim with
+respect to Licensed Product against such Respondent. If within said
+Notice Period a reasonable royalty and payment arrangement are not
+mutually agreed upon in writing by the parties or the litigation claim
+is not withdrawn, the rights granted by Licensor to you under Sections
+1 and 2 automatically terminate at the expiration of said Notice
+Period.
+
+c. Reasonable Value of This License. If you assert a patent
+infringement claim against Respondent alleging that Licensed Product
+directly or indirectly infringes any patent where such claim is
+resolved (such as by license or settlement) prior to the initiation of
+patent infringement litigation, then the reasonable value of the
+licenses granted by said Respondent under Sections 1 and 2 shall be
+taken into account in determining the amount or value of any payment
+or license.
+
+d. No Retroactive Effect of Termination. In the event of termination
+under Sections 9(a) or 9(b) above, all end user license agreements
+(excluding licenses to distributors and resellers) that have been
+validly granted by you or any distributor hereunder prior to
+termination shall survive termination.
+
+10. Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
+THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE,
+SHALL THE LICENSOR, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED
+PRODUCT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY
+PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
+GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
+ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
+BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+11. Responsibility for Claims. As between Licensor and Contributors,
+each party is responsible for claims and damages arising, directly or
+indirectly, out of its utilization of rights under this License. You
+agree to work with Licensor and Contributors to distribute such
+responsibility on an equitable basis. Nothing herein is intended or
+shall be deemed to constitute any admission of liability.
+
+12. U.S. Government End Users. The Licensed Product is a commercial
+item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
+consisting of commercial computer software and commercial computer
+software documentation, as such terms are used in 48 C.F.R. 12.212
+(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government
+End Users acquire Licensed Product with only those rights set forth
+herein.
+
+13. Miscellaneous. This License represents the complete agreement
+concerning the subject matter hereof. If any provision of this License
+is held to be unenforceable, such provision shall be reformed only to
+the extent necessary to make it enforceable. This License shall be
+governed by California law provisions (except to the extent applicable
+law, if any, provides otherwise), excluding its conflict-of-law
+provisions. You expressly agree that in any litigation relating to
+this license the losing party shall be responsible for costs
+including, without limitation, court costs and reasonable attorneys
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly
+excluded. Any law or regulation that provides that the language of a
+contract shall be construed against the drafter shall not apply to
+this License.
+
+14. Definition of You in This License. You throughout this License,
+whether in upper or lower case, means an individual or a legal entity
+exercising rights under, and complying with all of the terms of, this
+License or a future version of this License issued under Section
+7. For legal entities, you includes any entity that controls, is
+controlled by, is under common control with, or affiliated with,
+you. For purposes of this definition, control means (i) the power,
+direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity. You are responsible for advising any
+affiliated entity of the terms of this License, and that any rights or
+privileges derived from or obtained by way of this License are subject
+to the restrictions outlined herein.
+
+15. Glossary. All defined terms in this License that are used in more
+than one Section of this License are repeated here, in alphabetical
+order, for the convenience of the reader. The Section of this License
+in which each defined term is first used is shown in parentheses.
+
+Contributor: Each person or entity who created or contributed to the
+creation of, and distributed, a Modification. (See Section 2)
+
+Derivative Works: That term as used in this License is defined under
+U.S. copyright law. (See Section 1(b))
+
+License: This BitTorrent Open Source License. (See first paragraph of License)
+
+Licensed Product: Any BitTorrent Product licensed pursuant to this
+License. The term "Licensed Product" includes all previous
+Modifications from any Contributor that you receive. (See first
+paragraph of License and Section 2)
+
+Licensor: BitTorrent, Inc. (See first paragraph of License)
+
+Modifications: Any additions to or deletions from the substance or
+structure of (i) a file containing Licensed Product, or (ii) any new
+file that contains any part of Licensed Product. (See Section 2)
+
+Notice: The notice contained in Exhibit A. (See Section 4(e))
+
+Source Code: The preferred form for making modifications to the
+Licensed Product, including all modules contained therein, plus any
+associated interface definition files, scripts used to control
+compilation and installation of an executable program, or a list of
+differential comparisons against the Source Code of the Licensed
+Product. (See Section 1(a))
+
+You: This term is defined in Section 14 of this License.
+
+EXHIBIT A
+
+The Notice below must appear in each file of the Source Code of any
+copy you distribute of the Licensed Product or any
+hereto. Contributors to any Modifications may add their own copyright
+notices to identify their own contributions.
+
+License:
+
+The contents of this file are subject to the BitTorrent Open Source
+License Version 1.0 (the License). You may not copy or use this file,
+in either source code or executable form, except in compliance with
+the License. You may obtain a copy of the License at
+http://www.bittorrent.com/license/.
+
+Software distributed under the License is distributed on an AS IS
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+
+BitTorrent, Inc.
diff --git a/libre/python2-cssmin-fredj/PKGBUILD b/libre/python2-cssmin-fredj/PKGBUILD
index 0f155de89..ba21b8fc4 100644
--- a/libre/python2-cssmin-fredj/PKGBUILD
+++ b/libre/python2-cssmin-fredj/PKGBUILD
@@ -4,14 +4,13 @@ _pkgname=python2-cssmin
pkgname=python2-cssmin-fredj
pkgver=0.1.4.git4 # 0.1.4.git<number of commits after 0.1.4>
_gitver='commit=3422b9962c5a6c2adb9597f418131d73e991c9b6'
-pkgdesc="Provides a country field for Django models"
-license=('custom:MIT')
-url="http://bitbucket.org/smileychris/django-countries/"
-
+pkgdesc="A Python port of the YUI CSS compression algorithm"
+license=('custom:MIT' 'custom:BSD3')
+url="https://github.com/fredj/cssmin"
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
-pkgrel=1
+pkgrel=2
arch=(any)
makedepends=('python2-distribute')
diff --git a/libre/python2-jsmin/PKGBUILD b/libre/python2-jsmin/PKGBUILD
new file mode 100644
index 000000000..5c7646ec2
--- /dev/null
+++ b/libre/python2-jsmin/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=jsmin
+pkgname=python2-jsmin
+pkgver=2.0.3
+pkgdesc="JavaScript minifier"
+url="https://bitbucket.org/dcs/jsmin"
+license=('MIT')
+
+pkgrel=1
+arch=('any')
+depends=('python2')
+makedepends=('python2-distribute')
+source=(http://pypi.python.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz)
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ sed -rn 's/^#\s?//p' jsmin/__init__.py > license.txt
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 license.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums=('6bdce452c7508d9bd11b133e965fb64e')
diff --git a/pcr/amsynth/PKGBUILD b/pcr/amsynth/PKGBUILD
index 1cd3cccf6..7142d6c9f 100644
--- a/pcr/amsynth/PKGBUILD
+++ b/pcr/amsynth/PKGBUILD
@@ -1,26 +1,25 @@
# Maintainer : Guest One <theguestone at gmail dot com>
pkgname=amsynth
-pkgver=1.3.2
-pkgrel=2
+pkgver=1.4.0
+pkgrel=1
pkgdesc="Analogue Modeling SYNTHesizer"
arch=('i686' 'x86_64')
-url="http://code.google.com/p/amsynth/"
+url="http://code.google.com/p/$pkgname/"
license=('GPL')
-depends=('gtkmm' 'jack' 'liblo')
-makedepends=('desktop-file-utils' 'dssi' 'libtool' 'ladspa')
+depends=('gtkmm' 'jack' 'liblo' 'ladspa')
+makedepends=('desktop-file-utils' 'dssi' 'libtool')
install="$pkgname.install"
-source=("http://amsynth.googlecode.com/files/amSynth-$pkgver.tar.gz")
-md5sums=('991329e433bb8c496f9ca5158faf0bca')
+source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz")
+md5sums=('9193d334c89996cf44e98422e03318bb')
build() {
- cd "$srcdir/amSynth-$pkgver"
- libtoolize
+ cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
package() {
- cd "$srcdir/amSynth-$pkgver"
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}
diff --git a/pcr/perl-crypt-dh/PKGBUILD b/pcr/perl-crypt-dh/PKGBUILD
new file mode 100644
index 000000000..e2c9b5a3c
--- /dev/null
+++ b/pcr/perl-crypt-dh/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer (AUR): Michael Witten
+#
+# Derived from perl-crypt-blowfish:
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Charles Mauch <cmauch@gmail.com>
+#
+# Contributor: Pedro Alejandro López-Valencia <palopezv@gmail.com>
+
+pkgname=perl-crypt-dh
+pkgver=0.07
+pkgrel=3
+
+pkgdesc='Perl/CPAN Module Crypt::DH: Diffie-Hellman key exchange system'
+
+_cpan_name=Crypt-DH-$pkgver
+url=http://search.cpan.org/~mithaldu/$_cpan_name/lib/Crypt/DH.pm
+
+license=(GPL PerlArtistic)
+source=("http://search.cpan.org/CPAN/authors/id/M/MI/MITHALDU/$_cpan_name.tar.gz")
+md5sums=(5494c91420bf77de4af808fcafb6c3ce)
+
+arch=(any)
+makedepends=(make)
+depends=(perl perl-math-bigint-gmp)
+
+build()
+{
+ cd "$srcdir/$_cpan_name"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+check()
+{
+ cd "$srcdir/$_cpan_name"
+ make test
+}
+
+package()
+{
+ cd "$srcdir/$_cpan_name"
+ make pure_install DESTDIR="$pkgdir"
+
+ cd "$pkgdir"
+ find . -name '.packlist' -delete
+ find . -name '*.pod' -delete
+}
diff --git a/pcr/perl-math-bigint-gmp/PKGBUILD b/pcr/perl-math-bigint-gmp/PKGBUILD
new file mode 100644
index 000000000..32923d432
--- /dev/null
+++ b/pcr/perl-math-bigint-gmp/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer (AUR): Pedro Alejandro López-Valencia <palopezv@gmail.com>
+
+_author=PJACKLAM
+_perlmod=Math-BigInt-GMP
+pkgname=perl-math-bigint-gmp
+pkgver=1.37
+pkgrel=2
+pkgdesc="Big integer calculations using the GNU Multiple Precision Arithmetic Library."
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/~$_author/$_perlmod-$pkgver/"
+license=('GPL' 'PerlArtistic')
+depends=('perl>=5.16.2' 'gmp')
+options=(!emptydirs)
+source=(http://cpan.perl.org/modules/by-authors/id/P/PJ/$_author/$_perlmod-$pkgver.tar.gz)
+md5sums=('d11bf69c0471e38191f33144079d0373')
+
+build() {
+ cd "$srcdir/$_perlmod-$pkgver"
+ # Install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+check() {
+ cd "$srcdir/$_perlmod-$pkgver"
+ make test
+}
+
+package() {
+ cd "$srcdir/$_perlmod-$pkgver"
+ make install DESTDIR="$pkgdir/"
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
+
+# vim:set ts=2 sw=2 et ft=sh:
diff --git a/pcr/wuala/copyright b/pcr/wuala/copyright
deleted file mode 100644
index 699b835e9..000000000
--- a/pcr/wuala/copyright
+++ /dev/null
@@ -1,16 +0,0 @@
-wuala
-
-Copyright (C) 2011 LaCie AG <deb@wuala.com>
-
-License:
-
-All rights reserved
-
-The home page of wuala is at:
-http://www.wuala.com
-
-Licensing information and third party code:
-http://www.wuala.com/about/thirdpartycode/
-
-General Terms and Conditions:
-http://www.wuala.com/about/terms/
diff --git a/pcr/wuala/loader3.jar b/pcr/wuala/loader3.jar
deleted file mode 100644
index 70b2f8ae1..000000000
--- a/pcr/wuala/loader3.jar
+++ /dev/null
Binary files differ
diff --git a/pcr/wuala/readme.txt b/pcr/wuala/readme.txt
deleted file mode 100644
index e72fa8a8c..000000000
--- a/pcr/wuala/readme.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Installing & running Wuala
-
-1. Install Java (if not yet installed)
- Make sure you have Java version 1.6 or later installed.
- To check, type 'java -version'. If you can not install Java with the
- package manager of your distro, Java can be downloaded from http://java.sun.com.
-
-2. Untar the downloaded wuala.tar.gz: tar -xzf wuala.tar.gz
-
-3. Start Wuala by executing the wuala script from extracted wuala directory.
-
-Used Directories:
-~/.config/ Wuala will put its configuration file Wuala.cfg there
-~/wuala/ Default program directory.
-
-Have fun!
-For feedback or questions, feel free to contact support@wuala.com.
diff --git a/pcr/wuala/wuala b/pcr/wuala/wuala
deleted file mode 100755
index 939c783f5..000000000
--- a/pcr/wuala/wuala
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-export GDK_NATIVE_WINDOWS=true
-export UBUNTU_MENUPROXY=0
-export LIBOVERLAY_SCROLLBAR=0
-
-function launchWuala() {
- if [ -z "$JAVA" ]; then
- JAVA=`which java`
- fi
- echo $JAVA
- pushd "$(dirname $0)" > /dev/null
- $JAVA -ea -Xmx384m -Djava.net.preferIPv4Stack=true -jar loader3.jar -installed "$@"
- popd > /dev/null
-}
-
-if [ -z "$DISPLAY" ]; then
- echo "Running on console"
- launchWuala "-nogui" "$@"
-else
- echo "Running on display $DISPLAY"
- launchWuala "$@"
-fi
diff --git a/pcr/wuala/wualacmd b/pcr/wuala/wualacmd
deleted file mode 100755
index 41ef1d5c7..000000000
--- a/pcr/wuala/wualacmd
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-./wuala -nogui "$@"