[Bug 1166095] New: CVE-2012-6662 couchdb: jquery-ui: XSS vulnerability in default content in Tooltip widget [fedora-all]
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1166095
Bug ID: 1166095
Summary: CVE-2012-6662 couchdb: jquery-ui: XSS vulnerability in
default content in Tooltip widget [fedora-all]
Product: Fedora
Version: 20
Component: couchdb
Keywords: Security, SecurityTracking
Severity: medium
Priority: medium
Assignee: lemenkov(a)gmail.com
Reporter: vkaigoro(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: erlang(a)lists.fedoraproject.org, lemenkov(a)gmail.com,
wtogami(a)gmail.com
Blocks: 1166064 (CVE-2012-6662)
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time. If you need to fix the versions independent of each other,
you may clone this bug as appropriate.
[bug automatically created by: add-tracking-bugs]
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1166064
[Bug 1166064] CVE-2012-6662 jquery-ui: XSS vulnerability in default content
in Tooltip widget
--
You are receiving this mail because:
You are on the CC list for the bug.
9 years, 5 months
[erlang/epel7] Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
by Peter Lemenkov
commit 03a198125ba8d6cf720b02d9b2ade7fb7e8a1d75
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Mon Nov 17 16:43:43 2014 +0300
Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
erlang.spec | 9 +-
...rc-ftp-ftp.erl-Check-the-filenames-userna.patch | 430 ++++++++++++++++++++
2 files changed, 438 insertions(+), 1 deletions(-)
---
diff --git a/erlang.spec b/erlang.spec
index a221252..659fdbd 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.8%{?dist}
+Release: %{upstream_rel_for_rpm}.9%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -104,6 +104,9 @@ Patch15: otp-0015-Expose-NIF-version.patch
# Fedora specific patch
# Split off webtool dependency from tools
Patch16: otp-0016-Split-off-webtool-dependency-from-tools.patch
+# Fedora specific patch
+# lib/inets/src/ftp/ftp.erl: Check the filenames, usernames,
+Patch17: otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -985,6 +988,7 @@ Erlang mode for XEmacs (source lisp files).
%patch14 -p1 -b .Install_internal_hrl_files_when_necessary
%patch15 -p1 -b .Expose_NIF_version
%patch16 -p1 -b .Split_off_webtool_dependency_from_tools
+%patch17 -p1 -b .lib_inets_src_ftp_ftp_erl_Check_the_filenames_userna
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2316,6 +2320,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Nov 17 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.9
+- Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
+
* Tue Nov 11 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.8
- Trimmed dependency chain
- Cleaned up spec-file
diff --git a/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch b/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
new file mode 100644
index 0000000..7b7ad77
--- /dev/null
+++ b/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
@@ -0,0 +1,430 @@
+From: Sergei Golovan <sgolovan(a)gmail.com>
+Date: Sun, 9 Feb 2014 23:06:25 +0400
+Subject: [PATCH] lib/inets/src/ftp/ftp.erl: Check the filenames, usernames,
+ passwords etc. for <CR> and <LF> in them and return error if these
+ offending chars are found. See
+ http://erlang.org/pipermail/erlang-bugs/2014-January/003998.html for
+ details. lib/inets/test/ftp_suite_lib.erl: Added checks for <CR><LF> in file
+ and directory names.
+
+
+diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
+index 520db1b..5674599 100644
+--- a/lib/inets/src/ftp/ftp.erl
++++ b/lib/inets/src/ftp/ftp.erl
+@@ -192,7 +192,12 @@ do_open(Pid, OpenOptions, TLSOpts) ->
+ 'ok' | {'error', Reason :: 'euser' | common_reason()}.
+
+ user(Pid, User, Pass) ->
+- call(Pid, {user, User, Pass}, atom).
++ case {is_name_sane(User), is_name_sane(Pass)} of
++ {true, true} ->
++ call(Pid, {user, User, Pass}, atom);
++ _ ->
++ {error, euser}
++ end.
+
+ -spec user(Pid :: pid(),
+ User :: string(),
+@@ -201,7 +206,12 @@ user(Pid, User, Pass) ->
+ 'ok' | {'error', Reason :: 'euser' | common_reason()}.
+
+ user(Pid, User, Pass, Acc) ->
+- call(Pid, {user, User, Pass, Acc}, atom).
++ case {is_name_sane(User), is_name_sane(Pass), is_name_sane(Acc)} of
++ {true, true, true} ->
++ call(Pid, {user, User, Pass, Acc}, atom);
++ _ ->
++ {error, euser}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -216,7 +226,12 @@ user(Pid, User, Pass, Acc) ->
+ 'ok' | {'error', Reason :: 'eacct' | common_reason()}.
+
+ account(Pid, Acc) ->
+- call(Pid, {account, Acc}, atom).
++ case is_name_sane(Acc) of
++ true ->
++ call(Pid, {account, Acc}, atom);
++ _ ->
++ {error, eacct}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -262,7 +277,12 @@ lpwd(Pid) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ cd(Pid, Dir) ->
+- call(Pid, {cd, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {cd, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -305,7 +325,12 @@ ls(Pid) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ ls(Pid, Dir) ->
+- call(Pid, {dir, long, Dir}, string).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {dir, long, Dir}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -333,7 +358,12 @@ nlist(Pid) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ nlist(Pid, Dir) ->
+- call(Pid, {dir, short, Dir}, string).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {dir, short, Dir}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -349,7 +379,12 @@ nlist(Pid, Dir) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ rename(Pid, Old, New) ->
+- call(Pid, {rename, Old, New}, string).
++ case {is_name_sane(Old), is_name_sane(New)} of
++ {true, true} ->
++ call(Pid, {rename, Old, New}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -365,7 +400,12 @@ rename(Pid, Old, New) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ delete(Pid, File) ->
+- call(Pid, {delete, File}, string).
++ case is_name_sane(File) of
++ true ->
++ call(Pid, {delete, File}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -380,7 +420,12 @@ delete(Pid, File) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ mkdir(Pid, Dir) ->
+- call(Pid, {mkdir, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {mkdir, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -395,7 +440,12 @@ mkdir(Pid, Dir) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ rmdir(Pid, Dir) ->
+- call(Pid, {rmdir, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {rmdir, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -437,7 +487,12 @@ recv(Pid, RemotFileName) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ recv(Pid, RemotFileName, LocalFileName) ->
+- call(Pid, {recv, RemotFileName, LocalFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {recv, RemotFileName, LocalFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -456,7 +511,12 @@ recv(Pid, RemotFileName, LocalFileName) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ recv_bin(Pid, RemoteFile) ->
+- call(Pid, {recv_bin, RemoteFile}, bin).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {recv_bin, RemoteFile}, bin);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -473,7 +533,12 @@ recv_bin(Pid, RemoteFile) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ recv_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {recv_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {recv_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -521,7 +586,12 @@ send(Pid, LocalFileName) ->
+ shortage_reason()}.
+
+ send(Pid, LocalFileName, RemotFileName) ->
+- call(Pid, {send, LocalFileName, RemotFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {send, LocalFileName, RemotFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -541,7 +611,12 @@ send(Pid, LocalFileName, RemotFileName) ->
+ shortage_reason()}.
+
+ send_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
+- call(Pid, {send_bin, Bin, RemoteFile}, atom);
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {send_bin, Bin, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end;
+ send_bin(_Pid, _Bin, _RemoteFile) ->
+ {error, enotbinary}.
+
+@@ -559,7 +634,12 @@ send_bin(_Pid, _Bin, _RemoteFile) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ send_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {send_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {send_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -575,7 +655,12 @@ send_chunk_start(Pid, RemoteFile) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ append_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {append_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {append_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -683,7 +768,12 @@ append(Pid, LocalFileName) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ append(Pid, LocalFileName, RemotFileName) ->
+- call(Pid, {append, LocalFileName, RemotFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {append, LocalFileName, RemotFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -705,7 +795,12 @@ append(Pid, LocalFileName, RemotFileName) ->
+ shortage_reason()}.
+
+ append_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
+- call(Pid, {append_bin, Bin, RemoteFile}, atom);
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {append_bin, Bin, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end;
+ append_bin(_Pid, _Bin, _RemoteFile) ->
+ {error, enotbinary}.
+
+@@ -2302,6 +2397,15 @@ send_bin(State, Bin) ->
+ mk_cmd(Fmt, Args) ->
+ [io_lib:format(Fmt, Args)| [?CR, ?LF]]. % Deep list ok.
+
++is_name_sane([]) ->
++ true;
++is_name_sane([?CR| _]) ->
++ false;
++is_name_sane([?LF| _]) ->
++ false;
++is_name_sane([_| Rest]) ->
++ is_name_sane(Rest).
++
+ pwd_result(Lines) ->
+ {_, [?DOUBLE_QUOTE | Rest]} =
+ lists:splitwith(fun(?DOUBLE_QUOTE) -> false; (_) -> true end, Lines),
+diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
+index 35f21cc..daee1bd 100644
+--- a/lib/inets/test/ftp_suite_lib.erl
++++ b/lib/inets/test/ftp_suite_lib.erl
+@@ -1266,6 +1266,8 @@ read_log_6035([]) ->
+ %%--------------------------------------------------------------------
+ do_user(Pid) ->
+ {error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS),
++ {error, euser} = ftp:user(Pid, ?FTP_USER++"\r\nPASS "++?FTP_PASS, ?FTP_PASS),
++ {error, euser} = ftp:user(Pid, ?FTP_USER, ?FTP_PASS++"\r\nCWD ."),
+ ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
+ ok.
+
+@@ -1278,6 +1280,7 @@ do_pwd(Pid) ->
+ do_cd(Pid) ->
+ ok = ftp:cd(Pid, "/pub"),
+ {error, epath} = ftp:cd(Pid, ?BAD_DIR),
++ {error, efnamena} = ftp:cd(Pid, "/pub\r\nCWD ."),
+ ok.
+
+ do_lcd(Pid, Dir) ->
+@@ -1294,11 +1297,14 @@ do_ls(Pid) ->
+ %% directory, but can also be a filename or a group
+ %% of files (including wildcards).
+ {ok, _} = ftp:ls(Pid, "incom*"),
++ %% but \r\n can't be in the wildcard
++ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
+ ok.
+
+ do_nlist(Pid, WildcardSupport) ->
+ {ok, _} = ftp:nlist(Pid),
+ {ok, _} = ftp:nlist(Pid, "incoming"),
++ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
+ %% neither nlist nor ls operates on a directory
+ %% they operate on a pathname, which *can* be a
+ %% directory, but can also be a filename or a group
+@@ -1324,6 +1330,8 @@ do_rename(Pid, Config) ->
+ ftp:delete(Pid, NewLFile), % reset
+ ok = ftp:send(Pid, LFile),
+ {error, epath} = ftp:rename(Pid, NewLFile, LFile),
++ {error, efnamena} = ftp:rename(Pid, NewLFile++"\r\nRNTO "++LFile++"\r\nRNFR "++NewLFile, LFile),
++ {error, efnamena} = ftp:rename(Pid, NewLFile, LFile++"\r\nCWD ."),
+ ok = ftp:rename(Pid, LFile, NewLFile),
+ ftp:delete(Pid, LFile), % cleanup
+ ftp:delete(Pid, NewLFile), % cleanup
+@@ -1338,6 +1346,7 @@ do_delete(Pid, Config) ->
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:lcd(Pid, PrivDir),
+ ftp:delete(Pid,LFile), % reset
++ {error, efnamena} = ftp:delete(Pid,LFile++"\r\nCWD ."),
+ ok = ftp:send(Pid, LFile),
+ ok = ftp:delete(Pid,LFile),
+ ok.
+@@ -1348,6 +1357,8 @@ do_mkdir(Pid) ->
+ integer_to_list(B) ++ "_" ++ integer_to_list(C),
+ ok = ftp:cd(Pid, "incoming"),
+ {ok, CurrDir} = ftp:pwd(Pid),
++ {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."),
++ {error, efnamena} = ftp:rmdir(Pid, NewDir++"\r\nCWD ."),
+ ok = ftp:mkdir(Pid, NewDir),
+ ok = ftp:cd(Pid, NewDir),
+ ok = ftp:cd(Pid, CurrDir),
+@@ -1363,6 +1374,7 @@ do_send(Pid, Config) ->
+ ok = file:write_file(AbsLFile, list_to_binary(Contents)),
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:lcd(Pid, PrivDir),
++ {error, efnamena} = ftp:send(Pid, LFile, RFile++"1\r\nCWD ."),
+ ok = ftp:send(Pid, LFile, RFile),
+ {ok, RFilesString} = ftp:nlist(Pid),
+ RFiles = split(RFilesString),
+@@ -1392,6 +1404,7 @@ do_append(Pid, Config) ->
+ ftp:delete(Pid, RFile),
+ ftp:delete(Pid, LFile),
+
++ {error, efnamena} = ftp:append(Pid, LFile, RFile++"1\r\nCWD ."),
+ ok = ftp:append(Pid, LFile, RFile),
+ ok = ftp:append(Pid, LFile, RFile),
+ ok = ftp:append(Pid, LFile),
+@@ -1413,6 +1426,7 @@ do_send_bin(Pid, Config) ->
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:send_bin(Pid, Contents, File),
++ {error, efnamena} = ftp:send_bin(Pid, Bin, File++"1\r\nCWD ."),
+ ok = ftp:send_bin(Pid, Bin, File),
+ {ok, RFilesString} = ftp:nlist(Pid),
+ RFiles = split(RFilesString),
+@@ -1426,6 +1440,7 @@ do_append_bin(Pid, Config) ->
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:append_bin(Pid, Contents, File),
++ {error, efnamena} = ftp:append_bin(Pid, Bin, File++"1\r\nCWD ."),
+ ok = ftp:append_bin(Pid, Bin, File),
+ ok = ftp:append_bin(Pid, Bin, File),
+ %% Control the contents of the file
+@@ -1438,6 +1453,7 @@ do_send_chunk(Pid, Config) ->
+ Contents = "ftp_SUITE test ...",
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
++ {error, efnamena} = ftp:send_chunk_start(Pid, File++"1\r\nCWD ."),
+ ok = ftp:send_chunk_start(Pid, File),
+ {error, echunk} = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:send_chunk(Pid, Contents),
+@@ -1454,6 +1470,7 @@ do_append_chunk(Pid, Config) ->
+ File = ?config(file, Config),
+ Contents = ["ER","LE","RL"],
+ ok = ftp:cd(Pid, "incoming"),
++ {error, efnamena} = ftp:append_chunk_start(Pid, File++"1\r\nCWD ."),
+ ok = ftp:append_chunk_start(Pid, File),
+ {error, enotbinary} = ftp:append_chunk(Pid, lists:nth(1,Contents)),
+ ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(1,Contents))),
+@@ -1480,6 +1497,7 @@ do_recv(Pid, Config) ->
+ ok = file:delete(AbsFile), % cleanup
+ test_server:sleep(100),
+ ok = ftp:lcd(Pid, PrivDir),
++ {error, efnamena} = ftp:recv(Pid, File++"\r\nCWD ."),
+ ok = ftp:recv(Pid, File),
+ {ok, Files} = file:list_dir(PrivDir),
+ true = lists:member(File, Files),
+@@ -1495,6 +1513,7 @@ do_recv_bin(Pid, Config) ->
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:send_bin(Pid, Bin1, File),
+ test_server:sleep(100),
++ {error, efnamena} = ftp:recv_bin(Pid, File++"\r\nCWD ."),
+ {ok, Bin2} = ftp:recv_bin(Pid, File),
+ ok = ftp:delete(Pid, File), % cleanup
+ Contents2 = binary_to_list(Bin2),
+@@ -1520,6 +1539,7 @@ do_recv_chunk(Pid, Config) ->
+ ok = ftp:send_bin(Pid, Bin1, File),
+ test_server:sleep(100),
+ {error, "ftp:recv_chunk_start/2 not called"} = recv_chunk(Pid, <<>>),
++ {error, efnamena} = ftp:recv_chunk_start(Pid, File++"\r\nCWD ."),
+ ok = ftp:recv_chunk_start(Pid, File),
+ {ok, Contents2} = recv_chunk(Pid, <<>>),
+ ok = ftp:delete(Pid, File), % cleanup
9 years, 5 months
[erlang/f20] Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
by Peter Lemenkov
commit bc7188bc292d7f41d7dd0567d535cf1614cee597
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Mon Nov 17 16:43:43 2014 +0300
Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
erlang.spec | 9 +-
...rc-ftp-ftp.erl-Check-the-filenames-userna.patch | 430 ++++++++++++++++++++
2 files changed, 438 insertions(+), 1 deletions(-)
---
diff --git a/erlang.spec b/erlang.spec
index a221252..659fdbd 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.8%{?dist}
+Release: %{upstream_rel_for_rpm}.9%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -104,6 +104,9 @@ Patch15: otp-0015-Expose-NIF-version.patch
# Fedora specific patch
# Split off webtool dependency from tools
Patch16: otp-0016-Split-off-webtool-dependency-from-tools.patch
+# Fedora specific patch
+# lib/inets/src/ftp/ftp.erl: Check the filenames, usernames,
+Patch17: otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -985,6 +988,7 @@ Erlang mode for XEmacs (source lisp files).
%patch14 -p1 -b .Install_internal_hrl_files_when_necessary
%patch15 -p1 -b .Expose_NIF_version
%patch16 -p1 -b .Split_off_webtool_dependency_from_tools
+%patch17 -p1 -b .lib_inets_src_ftp_ftp_erl_Check_the_filenames_userna
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2316,6 +2320,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Nov 17 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.9
+- Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
+
* Tue Nov 11 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.8
- Trimmed dependency chain
- Cleaned up spec-file
diff --git a/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch b/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
new file mode 100644
index 0000000..7b7ad77
--- /dev/null
+++ b/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
@@ -0,0 +1,430 @@
+From: Sergei Golovan <sgolovan(a)gmail.com>
+Date: Sun, 9 Feb 2014 23:06:25 +0400
+Subject: [PATCH] lib/inets/src/ftp/ftp.erl: Check the filenames, usernames,
+ passwords etc. for <CR> and <LF> in them and return error if these
+ offending chars are found. See
+ http://erlang.org/pipermail/erlang-bugs/2014-January/003998.html for
+ details. lib/inets/test/ftp_suite_lib.erl: Added checks for <CR><LF> in file
+ and directory names.
+
+
+diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
+index 520db1b..5674599 100644
+--- a/lib/inets/src/ftp/ftp.erl
++++ b/lib/inets/src/ftp/ftp.erl
+@@ -192,7 +192,12 @@ do_open(Pid, OpenOptions, TLSOpts) ->
+ 'ok' | {'error', Reason :: 'euser' | common_reason()}.
+
+ user(Pid, User, Pass) ->
+- call(Pid, {user, User, Pass}, atom).
++ case {is_name_sane(User), is_name_sane(Pass)} of
++ {true, true} ->
++ call(Pid, {user, User, Pass}, atom);
++ _ ->
++ {error, euser}
++ end.
+
+ -spec user(Pid :: pid(),
+ User :: string(),
+@@ -201,7 +206,12 @@ user(Pid, User, Pass) ->
+ 'ok' | {'error', Reason :: 'euser' | common_reason()}.
+
+ user(Pid, User, Pass, Acc) ->
+- call(Pid, {user, User, Pass, Acc}, atom).
++ case {is_name_sane(User), is_name_sane(Pass), is_name_sane(Acc)} of
++ {true, true, true} ->
++ call(Pid, {user, User, Pass, Acc}, atom);
++ _ ->
++ {error, euser}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -216,7 +226,12 @@ user(Pid, User, Pass, Acc) ->
+ 'ok' | {'error', Reason :: 'eacct' | common_reason()}.
+
+ account(Pid, Acc) ->
+- call(Pid, {account, Acc}, atom).
++ case is_name_sane(Acc) of
++ true ->
++ call(Pid, {account, Acc}, atom);
++ _ ->
++ {error, eacct}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -262,7 +277,12 @@ lpwd(Pid) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ cd(Pid, Dir) ->
+- call(Pid, {cd, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {cd, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -305,7 +325,12 @@ ls(Pid) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ ls(Pid, Dir) ->
+- call(Pid, {dir, long, Dir}, string).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {dir, long, Dir}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -333,7 +358,12 @@ nlist(Pid) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ nlist(Pid, Dir) ->
+- call(Pid, {dir, short, Dir}, string).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {dir, short, Dir}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -349,7 +379,12 @@ nlist(Pid, Dir) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ rename(Pid, Old, New) ->
+- call(Pid, {rename, Old, New}, string).
++ case {is_name_sane(Old), is_name_sane(New)} of
++ {true, true} ->
++ call(Pid, {rename, Old, New}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -365,7 +400,12 @@ rename(Pid, Old, New) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ delete(Pid, File) ->
+- call(Pid, {delete, File}, string).
++ case is_name_sane(File) of
++ true ->
++ call(Pid, {delete, File}, string);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -380,7 +420,12 @@ delete(Pid, File) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ mkdir(Pid, Dir) ->
+- call(Pid, {mkdir, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {mkdir, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -395,7 +440,12 @@ mkdir(Pid, Dir) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ rmdir(Pid, Dir) ->
+- call(Pid, {rmdir, Dir}, atom).
++ case is_name_sane(Dir) of
++ true ->
++ call(Pid, {rmdir, Dir}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -437,7 +487,12 @@ recv(Pid, RemotFileName) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ recv(Pid, RemotFileName, LocalFileName) ->
+- call(Pid, {recv, RemotFileName, LocalFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {recv, RemotFileName, LocalFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -456,7 +511,12 @@ recv(Pid, RemotFileName, LocalFileName) ->
+ {'error', Reason :: restriction_reason() | common_reason()}.
+
+ recv_bin(Pid, RemoteFile) ->
+- call(Pid, {recv_bin, RemoteFile}, bin).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {recv_bin, RemoteFile}, bin);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -473,7 +533,12 @@ recv_bin(Pid, RemoteFile) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ recv_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {recv_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {recv_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -521,7 +586,12 @@ send(Pid, LocalFileName) ->
+ shortage_reason()}.
+
+ send(Pid, LocalFileName, RemotFileName) ->
+- call(Pid, {send, LocalFileName, RemotFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {send, LocalFileName, RemotFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -541,7 +611,12 @@ send(Pid, LocalFileName, RemotFileName) ->
+ shortage_reason()}.
+
+ send_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
+- call(Pid, {send_bin, Bin, RemoteFile}, atom);
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {send_bin, Bin, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end;
+ send_bin(_Pid, _Bin, _RemoteFile) ->
+ {error, enotbinary}.
+
+@@ -559,7 +634,12 @@ send_bin(_Pid, _Bin, _RemoteFile) ->
+ 'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
+
+ send_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {send_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {send_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -575,7 +655,12 @@ send_chunk_start(Pid, RemoteFile) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ append_chunk_start(Pid, RemoteFile) ->
+- call(Pid, {append_chunk_start, RemoteFile}, atom).
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {append_chunk_start, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -683,7 +768,12 @@ append(Pid, LocalFileName) ->
+ 'ok' | {'error', Reason :: term()}.
+
+ append(Pid, LocalFileName, RemotFileName) ->
+- call(Pid, {append, LocalFileName, RemotFileName}, atom).
++ case is_name_sane(RemotFileName) of
++ true ->
++ call(Pid, {append, LocalFileName, RemotFileName}, atom);
++ _ ->
++ {error, efnamena}
++ end.
+
+
+ %%--------------------------------------------------------------------------
+@@ -705,7 +795,12 @@ append(Pid, LocalFileName, RemotFileName) ->
+ shortage_reason()}.
+
+ append_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
+- call(Pid, {append_bin, Bin, RemoteFile}, atom);
++ case is_name_sane(RemoteFile) of
++ true ->
++ call(Pid, {append_bin, Bin, RemoteFile}, atom);
++ _ ->
++ {error, efnamena}
++ end;
+ append_bin(_Pid, _Bin, _RemoteFile) ->
+ {error, enotbinary}.
+
+@@ -2302,6 +2397,15 @@ send_bin(State, Bin) ->
+ mk_cmd(Fmt, Args) ->
+ [io_lib:format(Fmt, Args)| [?CR, ?LF]]. % Deep list ok.
+
++is_name_sane([]) ->
++ true;
++is_name_sane([?CR| _]) ->
++ false;
++is_name_sane([?LF| _]) ->
++ false;
++is_name_sane([_| Rest]) ->
++ is_name_sane(Rest).
++
+ pwd_result(Lines) ->
+ {_, [?DOUBLE_QUOTE | Rest]} =
+ lists:splitwith(fun(?DOUBLE_QUOTE) -> false; (_) -> true end, Lines),
+diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
+index 35f21cc..daee1bd 100644
+--- a/lib/inets/test/ftp_suite_lib.erl
++++ b/lib/inets/test/ftp_suite_lib.erl
+@@ -1266,6 +1266,8 @@ read_log_6035([]) ->
+ %%--------------------------------------------------------------------
+ do_user(Pid) ->
+ {error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS),
++ {error, euser} = ftp:user(Pid, ?FTP_USER++"\r\nPASS "++?FTP_PASS, ?FTP_PASS),
++ {error, euser} = ftp:user(Pid, ?FTP_USER, ?FTP_PASS++"\r\nCWD ."),
+ ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
+ ok.
+
+@@ -1278,6 +1280,7 @@ do_pwd(Pid) ->
+ do_cd(Pid) ->
+ ok = ftp:cd(Pid, "/pub"),
+ {error, epath} = ftp:cd(Pid, ?BAD_DIR),
++ {error, efnamena} = ftp:cd(Pid, "/pub\r\nCWD ."),
+ ok.
+
+ do_lcd(Pid, Dir) ->
+@@ -1294,11 +1297,14 @@ do_ls(Pid) ->
+ %% directory, but can also be a filename or a group
+ %% of files (including wildcards).
+ {ok, _} = ftp:ls(Pid, "incom*"),
++ %% but \r\n can't be in the wildcard
++ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
+ ok.
+
+ do_nlist(Pid, WildcardSupport) ->
+ {ok, _} = ftp:nlist(Pid),
+ {ok, _} = ftp:nlist(Pid, "incoming"),
++ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
+ %% neither nlist nor ls operates on a directory
+ %% they operate on a pathname, which *can* be a
+ %% directory, but can also be a filename or a group
+@@ -1324,6 +1330,8 @@ do_rename(Pid, Config) ->
+ ftp:delete(Pid, NewLFile), % reset
+ ok = ftp:send(Pid, LFile),
+ {error, epath} = ftp:rename(Pid, NewLFile, LFile),
++ {error, efnamena} = ftp:rename(Pid, NewLFile++"\r\nRNTO "++LFile++"\r\nRNFR "++NewLFile, LFile),
++ {error, efnamena} = ftp:rename(Pid, NewLFile, LFile++"\r\nCWD ."),
+ ok = ftp:rename(Pid, LFile, NewLFile),
+ ftp:delete(Pid, LFile), % cleanup
+ ftp:delete(Pid, NewLFile), % cleanup
+@@ -1338,6 +1346,7 @@ do_delete(Pid, Config) ->
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:lcd(Pid, PrivDir),
+ ftp:delete(Pid,LFile), % reset
++ {error, efnamena} = ftp:delete(Pid,LFile++"\r\nCWD ."),
+ ok = ftp:send(Pid, LFile),
+ ok = ftp:delete(Pid,LFile),
+ ok.
+@@ -1348,6 +1357,8 @@ do_mkdir(Pid) ->
+ integer_to_list(B) ++ "_" ++ integer_to_list(C),
+ ok = ftp:cd(Pid, "incoming"),
+ {ok, CurrDir} = ftp:pwd(Pid),
++ {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."),
++ {error, efnamena} = ftp:rmdir(Pid, NewDir++"\r\nCWD ."),
+ ok = ftp:mkdir(Pid, NewDir),
+ ok = ftp:cd(Pid, NewDir),
+ ok = ftp:cd(Pid, CurrDir),
+@@ -1363,6 +1374,7 @@ do_send(Pid, Config) ->
+ ok = file:write_file(AbsLFile, list_to_binary(Contents)),
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:lcd(Pid, PrivDir),
++ {error, efnamena} = ftp:send(Pid, LFile, RFile++"1\r\nCWD ."),
+ ok = ftp:send(Pid, LFile, RFile),
+ {ok, RFilesString} = ftp:nlist(Pid),
+ RFiles = split(RFilesString),
+@@ -1392,6 +1404,7 @@ do_append(Pid, Config) ->
+ ftp:delete(Pid, RFile),
+ ftp:delete(Pid, LFile),
+
++ {error, efnamena} = ftp:append(Pid, LFile, RFile++"1\r\nCWD ."),
+ ok = ftp:append(Pid, LFile, RFile),
+ ok = ftp:append(Pid, LFile, RFile),
+ ok = ftp:append(Pid, LFile),
+@@ -1413,6 +1426,7 @@ do_send_bin(Pid, Config) ->
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:send_bin(Pid, Contents, File),
++ {error, efnamena} = ftp:send_bin(Pid, Bin, File++"1\r\nCWD ."),
+ ok = ftp:send_bin(Pid, Bin, File),
+ {ok, RFilesString} = ftp:nlist(Pid),
+ RFiles = split(RFilesString),
+@@ -1426,6 +1440,7 @@ do_append_bin(Pid, Config) ->
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:append_bin(Pid, Contents, File),
++ {error, efnamena} = ftp:append_bin(Pid, Bin, File++"1\r\nCWD ."),
+ ok = ftp:append_bin(Pid, Bin, File),
+ ok = ftp:append_bin(Pid, Bin, File),
+ %% Control the contents of the file
+@@ -1438,6 +1453,7 @@ do_send_chunk(Pid, Config) ->
+ Contents = "ftp_SUITE test ...",
+ Bin = list_to_binary(Contents),
+ ok = ftp:cd(Pid, "incoming"),
++ {error, efnamena} = ftp:send_chunk_start(Pid, File++"1\r\nCWD ."),
+ ok = ftp:send_chunk_start(Pid, File),
+ {error, echunk} = ftp:cd(Pid, "incoming"),
+ {error, enotbinary} = ftp:send_chunk(Pid, Contents),
+@@ -1454,6 +1470,7 @@ do_append_chunk(Pid, Config) ->
+ File = ?config(file, Config),
+ Contents = ["ER","LE","RL"],
+ ok = ftp:cd(Pid, "incoming"),
++ {error, efnamena} = ftp:append_chunk_start(Pid, File++"1\r\nCWD ."),
+ ok = ftp:append_chunk_start(Pid, File),
+ {error, enotbinary} = ftp:append_chunk(Pid, lists:nth(1,Contents)),
+ ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(1,Contents))),
+@@ -1480,6 +1497,7 @@ do_recv(Pid, Config) ->
+ ok = file:delete(AbsFile), % cleanup
+ test_server:sleep(100),
+ ok = ftp:lcd(Pid, PrivDir),
++ {error, efnamena} = ftp:recv(Pid, File++"\r\nCWD ."),
+ ok = ftp:recv(Pid, File),
+ {ok, Files} = file:list_dir(PrivDir),
+ true = lists:member(File, Files),
+@@ -1495,6 +1513,7 @@ do_recv_bin(Pid, Config) ->
+ ok = ftp:cd(Pid, "incoming"),
+ ok = ftp:send_bin(Pid, Bin1, File),
+ test_server:sleep(100),
++ {error, efnamena} = ftp:recv_bin(Pid, File++"\r\nCWD ."),
+ {ok, Bin2} = ftp:recv_bin(Pid, File),
+ ok = ftp:delete(Pid, File), % cleanup
+ Contents2 = binary_to_list(Bin2),
+@@ -1520,6 +1539,7 @@ do_recv_chunk(Pid, Config) ->
+ ok = ftp:send_bin(Pid, Bin1, File),
+ test_server:sleep(100),
+ {error, "ftp:recv_chunk_start/2 not called"} = recv_chunk(Pid, <<>>),
++ {error, efnamena} = ftp:recv_chunk_start(Pid, File++"\r\nCWD ."),
+ ok = ftp:recv_chunk_start(Pid, File),
+ {ok, Contents2} = recv_chunk(Pid, <<>>),
+ ok = ftp:delete(Pid, File), % cleanup
9 years, 5 months
[erlang/f20] Trimmed dependency chain
by Peter Lemenkov
commit a82b758ad6a72d7a65ab16739c75971d6c1bd0d3
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Wed Nov 12 09:09:56 2014 +0300
Trimmed dependency chain
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
erlang.spec | 221 +++++++++-----------
...Install-internal-hrl-files-when-necessary.patch | 97 +++++++++
otp-0015-Expose-NIF-version.patch | 90 ++++++++
...6-Split-off-webtool-dependency-from-tools.patch | 40 ++++
sources | 3 -
5 files changed, 330 insertions(+), 121 deletions(-)
---
diff --git a/erlang.spec b/erlang.spec
index dbac58a..a221252 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -17,13 +17,6 @@
%bcond_without doc
-# No fop for EPEL5, and only for x86/x86_64 in EPEL6, so just disable there too
-%if 0%{?el5}%{?el6}
-%global use_prebuilt_docs 1
-%else
-%global use_prebuilt_docs 0
-%endif
-
%ifarch %{arm} %{ix86} x86_64 ppc %{power64}
%global __with_hipe 1
%endif
@@ -32,18 +25,16 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.7%{?dist}
+Release: %{upstream_rel_for_rpm}.8%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
License: ERPL
URL: http://www.erlang.org
-Source0: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.t...
-%if %{use_prebuilt_docs}
-Source1: http://erlang.org/download/otp_doc_html_%{upstream_ver}%{upstream_rel}-1....
-Source2: http://erlang.org/download/otp_doc_man_%{upstream_ver}%{upstream_rel}-1.t...
+%if 0%{?el7}%{?fedora}
+VCS: scm:git:https://github.com/erlang/otp
%endif
-Source4: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.r...
+Source0: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.t...
Source5: epmd.service
Source6: epmd.socket
Source7: epmd@.service
@@ -104,11 +95,17 @@ Patch12: otp-0012-Add-systemd-support-to-epmd.patch
# Fedora specific patch
# Added systemd notify support to EPMD
Patch13: otp-0013-Added-systemd-notify-support-to-EPMD.patch
+# Fedora specific patch
+# Install internal hrl files when necessary
+Patch14: otp-0014-Install-internal-hrl-files-when-necessary.patch
+# Fedora specific patch
+# Expose NIF version
+Patch15: otp-0015-Expose-NIF-version.patch
+# Fedora specific patch
+# Split off webtool dependency from tools
+Patch16: otp-0016-Split-off-webtool-dependency-from-tools.patch
# end of autogenerated patch tag list
-# BuildRoot not strictly needed since F10, but keep it for spec file robustness
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
BuildRequires: lksctp-tools-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
@@ -116,8 +113,7 @@ BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: m4
%if %{with doc}
-%if %{use_prebuilt_docs}
-%else
+# BEWARE. No fop for EPEL5, and only for x86/x86_64 in EPEL6, so we cannot regenerate docs here
BuildRequires: fop
BuildRequires: libxslt
@@ -126,14 +122,11 @@ BuildRequires: libxslt
BuildRequires: erlang
%endif
%endif
-%endif
-%if 0%{?el6}%{?fedora}
BuildRequires: emacs
BuildRequires: xemacs
BuildRequires: emacs-el
BuildRequires: xemacs-packages-extra-el
-%endif
%if 0%{?el7}%{?fedora}
# for <systemd/sd-daemon.h>
@@ -144,63 +137,64 @@ Requires(postun):systemd
Requires: systemd
%endif
-Requires: erlang-appmon%{?_isa} = %{version}-%{release}
-Requires: erlang-asn1%{?_isa} = %{version}-%{release}
-Requires: erlang-common_test%{?_isa} = %{version}-%{release}
-Requires: erlang-compiler%{?_isa} = %{version}-%{release}
-Requires: erlang-cosEvent%{?_isa} = %{version}-%{release}
-Requires: erlang-cosEventDomain%{?_isa} = %{version}-%{release}
-Requires: erlang-cosFileTransfer%{?_isa} = %{version}-%{release}
-Requires: erlang-cosNotification%{?_isa} = %{version}-%{release}
-Requires: erlang-cosProperty%{?_isa} = %{version}-%{release}
-Requires: erlang-cosTime%{?_isa} = %{version}-%{release}
-Requires: erlang-cosTransactions%{?_isa} = %{version}-%{release}
-Requires: erlang-crypto%{?_isa} = %{version}-%{release}
-Requires: erlang-debugger%{?_isa} = %{version}-%{release}
-
-Requires: erlang-dialyzer%{?_isa} = %{version}-%{release}
-Requires: erlang-diameter%{?_isa} = %{version}-%{release}
-Requires: erlang-edoc%{?_isa} = %{version}-%{release}
-Requires: erlang-eldap%{?_isa} = %{version}-%{release}
-Requires: erlang-erl_docgen%{?_isa} = %{version}-%{release}
-Requires: erlang-erl_interface%{?_isa} = %{version}-%{release}
-Requires: erlang-erts%{?_isa} = %{version}-%{release}
-Requires: erlang-et%{?_isa} = %{version}-%{release}
-Requires: erlang-eunit%{?_isa} = %{version}-%{release}
-Requires: erlang-examples%{?_isa} = %{version}-%{release}
-Requires: erlang-gs%{?_isa} = %{version}-%{release}
-Requires: erlang-hipe%{?_isa} = %{version}-%{release}
-Requires: erlang-ic%{?_isa} = %{version}-%{release}
-Requires: erlang-inets%{?_isa} = %{version}-%{release}
-Requires: erlang-jinterface%{?_isa} = %{version}-%{release}
-Requires: erlang-kernel%{?_isa} = %{version}-%{release}
-Requires: erlang-megaco%{?_isa} = %{version}-%{release}
-Requires: erlang-mnesia%{?_isa} = %{version}-%{release}
-Requires: erlang-observer%{?_isa} = %{version}-%{release}
-Requires: erlang-odbc%{?_isa} = %{version}-%{release}
-Requires: erlang-orber%{?_isa} = %{version}-%{release}
-Requires: erlang-os_mon%{?_isa} = %{version}-%{release}
-Requires: erlang-otp_mibs%{?_isa} = %{version}-%{release}
-Requires: erlang-parsetools%{?_isa} = %{version}-%{release}
-Requires: erlang-percept%{?_isa} = %{version}-%{release}
-Requires: erlang-pman%{?_isa} = %{version}-%{release}
-Requires: erlang-public_key%{?_isa} = %{version}-%{release}
-Requires: erlang-reltool%{?_isa} = %{version}-%{release}
-Requires: erlang-runtime_tools%{?_isa} = %{version}-%{release}
-Requires: erlang-sasl%{?_isa} = %{version}-%{release}
-Requires: erlang-snmp%{?_isa} = %{version}-%{release}
-Requires: erlang-ssh%{?_isa} = %{version}-%{release}
-Requires: erlang-ssl%{?_isa} = %{version}-%{release}
-Requires: erlang-stdlib%{?_isa} = %{version}-%{release}
-Requires: erlang-syntax_tools%{?_isa} = %{version}-%{release}
-Requires: erlang-test_server%{?_isa} = %{version}-%{release}
-Requires: erlang-toolbar%{?_isa} = %{version}-%{release}
-Requires: erlang-tools%{?_isa} = %{version}-%{release}
-Requires: erlang-tv%{?_isa} = %{version}-%{release}
-Requires: erlang-typer%{?_isa} = %{version}-%{release}
-Requires: erlang-webtool%{?_isa} = %{version}-%{release}
-Requires: erlang-wx%{?_isa} = %{version}-%{release}
-Requires: erlang-xmerl%{?_isa} = %{version}-%{release}
+BuildRequires: erlang-rpm-macros
+
+Requires: %{name}-appmon%{?_isa} = %{version}-%{release}
+Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
+Requires: %{name}-common_test%{?_isa} = %{version}-%{release}
+Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosEvent%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosEventDomain%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosFileTransfer%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosNotification%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosProperty%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosTime%{?_isa} = %{version}-%{release}
+Requires: %{name}-cosTransactions%{?_isa} = %{version}-%{release}
+Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
+Requires: %{name}-debugger%{?_isa} = %{version}-%{release}
+Requires: %{name}-dialyzer%{?_isa} = %{version}-%{release}
+Requires: %{name}-diameter%{?_isa} = %{version}-%{release}
+Requires: %{name}-edoc%{?_isa} = %{version}-%{release}
+Requires: %{name}-eldap%{?_isa} = %{version}-%{release}
+Requires: %{name}-erl_docgen%{?_isa} = %{version}-%{release}
+Requires: %{name}-erl_interface%{?_isa} = %{version}-%{release}
+Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+Requires: %{name}-et%{?_isa} = %{version}-%{release}
+Requires: %{name}-eunit%{?_isa} = %{version}-%{release}
+Requires: %{name}-examples%{?_isa} = %{version}-%{release}
+Requires: %{name}-gs%{?_isa} = %{version}-%{release}
+Requires: %{name}-hipe%{?_isa} = %{version}-%{release}
+Requires: %{name}-ic%{?_isa} = %{version}-%{release}
+Requires: %{name}-inets%{?_isa} = %{version}-%{release}
+Requires: %{name}-jinterface%{?_isa} = %{version}-%{release}
+Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
+Requires: %{name}-megaco%{?_isa} = %{version}-%{release}
+Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
+Requires: %{name}-observer%{?_isa} = %{version}-%{release}
+Requires: %{name}-odbc%{?_isa} = %{version}-%{release}
+Requires: %{name}-orber%{?_isa} = %{version}-%{release}
+Requires: %{name}-os_mon%{?_isa} = %{version}-%{release}
+Requires: %{name}-otp_mibs%{?_isa} = %{version}-%{release}
+Requires: %{name}-parsetools%{?_isa} = %{version}-%{release}
+Requires: %{name}-percept%{?_isa} = %{version}-%{release}
+Requires: %{name}-pman%{?_isa} = %{version}-%{release}
+Requires: %{name}-public_key%{?_isa} = %{version}-%{release}
+Requires: %{name}-reltool%{?_isa} = %{version}-%{release}
+Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
+Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
+Requires: %{name}-snmp%{?_isa} = %{version}-%{release}
+Requires: %{name}-ssh%{?_isa} = %{version}-%{release}
+Requires: %{name}-ssl%{?_isa} = %{version}-%{release}
+Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
+Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
+Requires: %{name}-test_server%{?_isa} = %{version}-%{release}
+Requires: %{name}-toolbar%{?_isa} = %{version}-%{release}
+Requires: %{name}-tools%{?_isa} = %{version}-%{release}
+Requires: %{name}-tv%{?_isa} = %{version}-%{release}
+Requires: %{name}-typer%{?_isa} = %{version}-%{release}
+Requires: %{name}-webtool%{?_isa} = %{version}-%{release}
+Requires: %{name}-wx%{?_isa} = %{version}-%{release}
+Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
Obsoletes: erlang-docbuilder
Obsoletes: erlang-inviso
@@ -405,15 +399,15 @@ Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
%description diameter
Diameter (RFC 3588) library
+%if %{with doc}
%package doc
Summary: Erlang documentation
Group: Development/Languages
-%if 0%{?el6}%{?el7}%{?fedora}
BuildArch: noarch
-%endif
%description doc
Documentation for Erlang.
+%endif
%package edoc
Summary: A utility used to generate documentation out of tags in source files
@@ -464,8 +458,12 @@ Summary: Functionality necessary to run the Erlang System itself
Group: Development/Languages
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
+# This library is dlopened so it can't be picked up automatically by the RPM
+# dependency checker
Requires: lksctp-tools
+# See erts/emulator/beam/erl_driver.h or call erlang:system_info(driver_version).
Provides: erlang(erl_drv_version) = 2.2
+# See erts/emulator/beam/erl_nif.h or call erlang:system_info(nif_version).
Provides: erlang(erl_nif_version) = 2.4
%description erts
@@ -558,7 +556,7 @@ Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
# FIXME see erlang-ic also
#Requires: jpackage-utils
-%if 0%{?fedora}%{?el7}
+%if 0%{?el7}%{?fedora}
BuildRequires: java-devel
%else
%ifarch %{ix86} x86_64
@@ -788,7 +786,6 @@ Secure Shell application with sftp and ssh support.
%package ssl
Summary: Secure Socket Layer support
Group: Development/Languages
-#Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -828,7 +825,6 @@ Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-observer%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
-#Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
@@ -855,7 +851,12 @@ Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-Requires: %{name}-webtool%{?_isa} = %{version}-%{release}
+# This is a weak dependency triggered by the "cover_web" application.
+# Unfortunately Recommends/Suggests tags are supported only in Fedora 21+ and
+# RHEL 8+ (eventually)
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
+Suggests: %{name}-webtool%{?_isa} = %{version}-%{release}
+%endif
Provides: emacs-common-erlang = %{version}-%{release}
%description tools
@@ -922,7 +923,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description xmerl
Provides support for XML 1.0.
-%if 0%{?el6}%{?fedora}
%package -n emacs-erlang
Summary: Compiled elisp files for erlang-mode under GNU Emacs
Requires: emacs-common-erlang = %{version}-%{release}
@@ -960,7 +960,6 @@ BuildArch: noarch
%description -n xemacs-erlang-el
Erlang mode for XEmacs (source lisp files).
-%endif
%prep
%setup -q -n otp_src_%{upstream_ver}%{upstream_rel}-1
@@ -983,6 +982,9 @@ Erlang mode for XEmacs (source lisp files).
%patch11 -p1 -b .Add_systemd_option_to_empd_Check_for_include_system
%patch12 -p1 -b .Add_systemd_support_to_epmd
%patch13 -p1 -b .Added_systemd_notify_support_to_EPMD
+%patch14 -p1 -b .Install_internal_hrl_files_when_necessary
+%patch15 -p1 -b .Expose_NIF_version
+%patch16 -p1 -b .Split_off_webtool_dependency_from_tools
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -1005,9 +1007,9 @@ rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old
%build
%ifarch sparcv9 sparc64
-CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{?__with_hipe:--enable-hipe}
+CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
%else
-CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{?__with_hipe:--enable-hipe}
+CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
%endif
# Remove pre-built BEAM files
@@ -1016,7 +1018,6 @@ make clean
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
-%if 0%{?el6}%{?fedora}
# GNU Emacs related stuff
cat > emacs-erlang-init.el << EOF
(setq load-path (cons "%{_emacs_sitelispdir}/erlang" load-path))
@@ -1043,12 +1044,10 @@ rm -f xemacs-erlang/erlang-flymake.el
pushd xemacs-erlang
%{_xemacs_bytecompile} *.el
popd
-%endif
make
+
%if %{with doc}
-%if %{use_prebuilt_docs}
-%else
# should use FOP_OPTS after #832323 is resolved
%ifnarch ppc %{power64}
export BASE_OPTIONS=-Xmx1024m
@@ -1057,13 +1056,9 @@ export BASE_OPTIONS=-Xmx1536m
%endif
make docs
%endif
-%endif
%install
-rm -rf $RPM_BUILD_ROOT
-
-%if 0%{?el6}%{?fedora}
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
@@ -1089,25 +1084,12 @@ for f in lib/tools/emacs/{README,*.el}; do
done
rm -f "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/erlang-flymake.el"
install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/"
-%endif
make DESTDIR=$RPM_BUILD_ROOT install
+
%if %{with doc}
-%if %{use_prebuilt_docs}
-# extract prebuilt docs and man-pages
-tar xf %{SOURCE1} -C $RPM_BUILD_ROOT%{_libdir}/erlang
-tar xf %{SOURCE2} -C $RPM_BUILD_ROOT%{_libdir}/erlang
-# rm Win32-specific functionality
-rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/nteventlog.*
-# rm VxWorks specific
-rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/erl_set_memory_block.*
-# rm unneeded files
-rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/erts-*/info
-rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/*-*/info
-%else
env ERL_LIBS="$RPM_BUILD_ROOT%{_libdir}/erlang/lib" make DESTDIR=$RPM_BUILD_ROOT install-docs
%endif
-%endif
# Do not install info files - they are almost empty and useless
find $RPM_BUILD_ROOT%{_libdir}/erlang -type f -name info -exec rm -f {} \;
@@ -1194,10 +1176,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
-c "Erlang Port Mapper Daemon" epmd 2>/dev/null || :
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%files
%if %{with doc}
%dir %{_docdir}/%{n_uvr}/
@@ -1410,8 +1388,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man4/diameter_dict.*
%endif
-%files doc
%if %{with doc}
+%files doc
%doc %{_docdir}/%{n_uvr}/doc
%doc %{_docdir}/%{n_uvr}/erts-*/
%doc %{_docdir}/%{n_uvr}/lib/
@@ -1436,7 +1414,9 @@ rm -rf $RPM_BUILD_ROOT
%files erl_docgen
%{_libdir}/erlang/lib/erl_docgen-*/
+%if %{with doc}
%{_libdir}/erlang/man/man6/erl_docgen.*
+%endif
%files erl_interface
%{_libdir}/erlang/lib/erl_interface-*/
@@ -1455,7 +1435,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%files erts
-# TODO these directories should be packaged separately
+# TODO
+# In order to have a parallel-installable Erlang packages these directories
+# should be packaged separately
%dir %{_libdir}/erlang/
%dir %{_libdir}/erlang/bin/
%dir %{_libdir}/erlang/lib/
@@ -1556,6 +1538,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/erlang/lib/eunit-*/
%{_libdir}/erlang/lib/eunit-*/ebin
%{_libdir}/erlang/lib/eunit-*/include
+%{_libdir}/erlang/lib/eunit-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/eunit.*
%{_libdir}/erlang/man/man3/eunit_surefire.*
@@ -2313,7 +2296,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/xmerl_xsd.*
%endif
-%if 0%{?el6}%{?fedora}
%files -n emacs-erlang
%dir %{_emacs_sitelispdir}/erlang
%doc %{_emacs_sitelispdir}/erlang/README
@@ -2331,10 +2313,13 @@ rm -rf $RPM_BUILD_ROOT
%files -n xemacs-erlang-el
%{_xemacs_sitelispdir}/erlang/*.el
-%endif
%changelog
+* Tue Nov 11 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.8
+- Trimmed dependency chain
+- Cleaned up spec-file
+
* Wed Jun 11 2014 Peter Lemenkov <lemenkov(a)gmail.com> - R16B-03.7
- Added missing template for epmd@.socket
diff --git a/otp-0014-Install-internal-hrl-files-when-necessary.patch b/otp-0014-Install-internal-hrl-files-when-necessary.patch
new file mode 100644
index 0000000..14cf312
--- /dev/null
+++ b/otp-0014-Install-internal-hrl-files-when-necessary.patch
@@ -0,0 +1,97 @@
+From: Peter Lemenkov <lemenkov(a)gmail.com>
+Date: Tue, 26 Aug 2014 13:53:49 +0400
+Subject: [PATCH] Install internal hrl files when necessary
+
+Sometimes we install *.erl files. Some these files include a private
+*.hrl files, so in order to make these *.erl files usable we have to
+install these private includes as well.
+
+Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
+
+Conflicts:
+ lib/eunit/src/Makefile
+ lib/percept/src/Makefile
+ lib/test_server/src/Makefile
+
+diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile
+index 5a6f298..b40ef23 100644
+--- a/lib/debugger/src/Makefile
++++ b/lib/debugger/src/Makefile
+@@ -77,7 +77,7 @@ MODULES= \
+
+ HRL_FILES=
+
+-INTERNAL_HRL_FILES= dbg_ieval.hrl
++INTERNAL_HRL_FILES= dbg_ieval.hrl dbg_wx_filedialog_win.hrl
+
+ ERL_FILES= $(MODULES:%=%.erl)
+
+diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile
+index a5e147d..8483e28 100644
+--- a/lib/eunit/src/Makefile
++++ b/lib/eunit/src/Makefile
+@@ -46,6 +46,8 @@ SOURCES= \
+
+ INCLUDE_FILES = eunit.hrl
+
++INTERNAL_HRL_FILES= eunit_internal.hrl
++
+ PARSE_TRANSFORM_BIN = $(PARSE_TRANSFORM:%.erl=$(EBIN)/%.$(EMULATOR))
+
+ TARGET_FILES= $(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR))
+@@ -117,6 +119,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin"
++ $(INSTALL_DIR) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
+
+diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
+index dbda2a2..3e1792f 100644
+--- a/lib/kernel/src/Makefile
++++ b/lib/kernel/src/Makefile
+@@ -122,6 +122,7 @@ HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \
+ ../include/net_address.hrl
+
+ INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \
++ erl_epmd.hrl hipe_ext_format.hrl \
+ inet_dns.hrl inet_res.hrl \
+ inet_boot.hrl inet_config.hrl inet_int.hrl \
+ inet_dns_record_adts.hrl
+diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile
+index e501539..5902da3 100644
+--- a/lib/percept/src/Makefile
++++ b/lib/percept/src/Makefile
+@@ -50,6 +50,8 @@ MODULES= \
+
+ #HRL_FILES= ../include/
+
++INTERNAL_HRL_FILES= egd.hrl percept.hrl
++
+ ERL_FILES= $(MODULES:%=%.erl)
+
+ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+@@ -93,6 +95,8 @@ docs:
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
++ $(INSTALL_DIR) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ # $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ # $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
+index bcb1bc3..deb7caf 100644
+--- a/lib/test_server/src/Makefile
++++ b/lib/test_server/src/Makefile
+@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/otp-0015-Expose-NIF-version.patch b/otp-0015-Expose-NIF-version.patch
new file mode 100644
index 0000000..3ae0096
--- /dev/null
+++ b/otp-0015-Expose-NIF-version.patch
@@ -0,0 +1,90 @@
+From: Peter Lemenkov <lemenkov(a)gmail.com>
+Date: Sun, 2 Nov 2014 19:49:55 +0300
+Subject: [PATCH] Expose NIF version
+
+This patch allows checking for NIF API version in a way similar to
+driver version. E.g. by calling erlang:system_info(nif_version).
+
+Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
+
+Conflicts:
+ erts/emulator/test/driver_SUITE.erl
+
+diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
+index e3ef48a..b9d7230 100644
+--- a/erts/doc/src/erlang.xml
++++ b/erts/doc/src/erlang.xml
+@@ -5903,6 +5903,11 @@ ok
+ <seealso marker="#system_info_multi_scheduling">erlang:system_info(multi_scheduling)</seealso>, and
+ <seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
+ </item>
++ <tag><c>nif_version</c></tag>
++ <item>
++ <p>Returns a string containing the erlang NIF version
++ used by the runtime system. It will be on the form "<major ver>.<minor ver>".</p>
++ </item>
+ <tag><marker id="system_info_otp_release"><c>otp_release</c></marker></tag>
+ <item>
+ <p>Returns a string containing the OTP release number.</p>
+diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
+index d7f1e2d..7a7f23e 100755
+--- a/erts/emulator/beam/erl_bif_info.c
++++ b/erts/emulator/beam/erl_bif_info.c
+@@ -27,6 +27,7 @@
+ #include "erl_process.h"
+ #include "error.h"
+ #include "erl_driver.h"
++#include "erl_nif.h"
+ #include "bif.h"
+ #include "big.h"
+ #include "erl_version.h"
+@@ -2428,6 +2429,13 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
+ ERL_DRV_EXTENDED_MINOR_VERSION);
+ hp = HAlloc(BIF_P, 2*n);
+ BIF_RET(buf_to_intlist(&hp, buf, n, NIL));
++ } else if (ERTS_IS_ATOM_STR("nif_version", BIF_ARG_1)) {
++ char buf[42];
++ int n = erts_snprintf(buf, 42, "%d.%d",
++ ERL_NIF_MAJOR_VERSION,
++ ERL_NIF_MINOR_VERSION);
++ hp = HAlloc(BIF_P, 2*n);
++ BIF_RET(buf_to_intlist(&hp, buf, n, NIL));
+ } else if (ERTS_IS_ATOM_STR("smp_support", BIF_ARG_1)) {
+ #ifdef ERTS_SMP
+ BIF_RET(am_true);
+diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
+index 2919265..c0f14ad 100644
+--- a/erts/preloaded/src/erlang.erl
++++ b/erts/preloaded/src/erlang.erl
+@@ -2124,6 +2124,7 @@ tuple_to_list(_Tuple) ->
+ (modified_timing_level) -> integer() | undefined;
+ (multi_scheduling) -> disabled | blocked | enabled;
+ (multi_scheduling_blockers) -> [PID :: pid()];
++ (nif_version) -> string();
+ (otp_release) -> string();
+ (port_count) -> non_neg_integer();
+ (port_limit) -> pos_integer();
+diff --git a/lib/runtime_tools/src/system_information.erl b/lib/runtime_tools/src/system_information.erl
+index 1d4b878..64f1b82 100644
+--- a/lib/runtime_tools/src/system_information.erl
++++ b/lib/runtime_tools/src/system_information.erl
+@@ -344,6 +344,7 @@ erlang_system_info() ->
+ logical_processors_online,
+ logical_processors_available,
+ driver_version,
++ nif_version,
+ emu_args,
+ ethread_info,
+ beam_jump_table,
+diff --git a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
+index 0900ead..9ded5a1 100644
+--- a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
++++ b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
+@@ -9720,6 +9720,7 @@
+ {logical_processors_online,4},
+ {logical_processors_available,4},
+ {driver_version,"2.1"},
++ {nif_version,"1.1"},
+ {taints,[]}]},
+ {erts_compile_info,
+ [{ldflags,[]},
diff --git a/otp-0016-Split-off-webtool-dependency-from-tools.patch b/otp-0016-Split-off-webtool-dependency-from-tools.patch
new file mode 100644
index 0000000..f2de8ac
--- /dev/null
+++ b/otp-0016-Split-off-webtool-dependency-from-tools.patch
@@ -0,0 +1,40 @@
+From: Peter Lemenkov <lemenkov(a)gmail.com>
+Date: Sat, 8 Nov 2014 22:54:57 +0300
+Subject: [PATCH] Split off webtool dependency from tools
+
+Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
+
+diff --git a/lib/tools/src/cover_web.erl b/lib/tools/src/cover_web.erl
+index 69f2f3b..9085300 100644
+--- a/lib/tools/src/cover_web.erl
++++ b/lib/tools/src/cover_web.erl
+@@ -50,14 +50,25 @@
+ %%%----------------------------------------------------------------------
+ %% Start webtool and webcover from erlang shell
+ start() ->
+- webtool:start(),
+- webtool:start_tools([],"app=webcover"),
++ try
++ % Disable automatic dependency picking up
++ erlang:apply(webtool, start, []),
++ erlang:apply(webtool, start_tools, [[],"app=webcover"])
++ catch
++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
++ end,
+ ok.
+
+ %% Stop webtool and webcover from erlang shell
+ stop() ->
+- webtool:stop_tools([],"app=webcover"),
+- webtool:stop().
++ try
++ % Disable automatic dependency picking up
++ erlang:apply(webtool, stop_tools, [[],"app=webcover"]),
++ erlang:apply(webtool, stop, [])
++ catch
++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
++ end,
++ ok.
+
+
+
diff --git a/sources b/sources
index df29746..aa69160 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-d27250e9ee98d6388e7f2e65379a0406 otp_src_R16B03-1.readme
-eff44490c9bbae3a5c5741bec2390ba3 otp_doc_html_R16B03-1.tar.gz
-39113c0d2515bdd8cd7e0f975a380122 otp_doc_man_R16B03-1.tar.gz
e5ece977375197338c1b93b3d88514f8 otp_src_R16B03-1.tar.gz
9 years, 5 months
[erlang-lager] Fixed FTBFS (see rhbz #1106221)
by Peter Lemenkov
commit 181c819be30df794f420fcfd5b7d06184e911036
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Mon Nov 17 00:32:16 2014 +0300
Fixed FTBFS (see rhbz #1106221)
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
.gitignore | 1 +
...ine-numbers-detection-in-tests-for-OTP-17.patch | 26 ++++++++++++++++++++
erlang-lager.spec | 20 ++++++++++-----
sources | 2 +-
4 files changed, 41 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5cc190b..af656d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/basho-lager-1.2.0-0-g0e1947e.tar.gz
/basho-lager-1.2.1-0-gd8ad5eb.tar.gz
/basho-lager-1.2.2-0-g4fcb8fd.tar.gz
+/lager-1.2.2.tar.gz
diff --git a/erlang-lager-0001-Fix-line-numbers-detection-in-tests-for-OTP-17.patch b/erlang-lager-0001-Fix-line-numbers-detection-in-tests-for-OTP-17.patch
new file mode 100644
index 0000000..35c8bef
--- /dev/null
+++ b/erlang-lager-0001-Fix-line-numbers-detection-in-tests-for-OTP-17.patch
@@ -0,0 +1,26 @@
+From: James Fish <james(a)fishcakez.com>
+Date: Thu, 23 Oct 2014 16:45:30 +0100
+Subject: [PATCH] Fix line numbers detection in tests for OTP >= 17
+
+Conflicts:
+ test/lager_test_backend.erl
+
+diff --git a/test/lager_test_backend.erl b/test/lager_test_backend.erl
+index 64a04f5..385e054 100644
+--- a/test/lager_test_backend.erl
++++ b/test/lager_test_backend.erl
+@@ -88,10 +88,10 @@ flush() ->
+ gen_event:call(lager_event, ?MODULE, flush).
+
+ has_line_numbers() ->
+- %% are we R15 or greater
+- Rel = erlang:system_info(otp_release),
+- {match, [Major]} = re:run(Rel, "^R(\\d+)[A|B](|0(\\d))$", [{capture, [1], list}]),
+- list_to_integer(Major) >= 15.
++ %% are we R15 or greater
++ Rel = erlang:system_info(otp_release),
++ {match, [Major]} = re:run(Rel, "(?|(^R(\\d+)[A|B](|0(\\d)))|(^(\\d+)$))", [{capture, [2], list}]),
++ list_to_integer(Major) >= 15.
+
+ not_running_test() ->
+ ?assertEqual({error, lager_not_running}, lager:log(info, self(), "not running")).
diff --git a/erlang-lager.spec b/erlang-lager.spec
index b6733c3..03867d5 100644
--- a/erlang-lager.spec
+++ b/erlang-lager.spec
@@ -1,19 +1,21 @@
%global realname lager
%global upstream basho
%global debug_package %{nil}
-%global git_tag 4fcb8fd
-%global patchnumber 0
Name: erlang-%{realname}
Version: 1.2.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A logging framework for Erlang/OTP
Group: Development/Languages
License: ASL 2.0
-URL: https://github.com/basho/lager
-# wget --content-disposition https://github.com/basho/lager/tarball/1.2.2
-Source0: %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz
+URL: http://github.com/%{upstream}/%{realname}
+%if 0%{?el7}%{?fedora}
+VCS: scm:git:https://github.com/%{upstream}/%{realname}.git
+%endif
+Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}...
+# Backported from upstream
+Patch1: erlang-lager-0001-Fix-line-numbers-detection-in-tests-for-OTP-17.patch
BuildRequires: erlang-rebar
Requires: erlang-compiler%{?_isa}
# Error:erlang(erlang:max/2) in R12B and below
@@ -35,7 +37,8 @@ plays nicely with traditional UNIX logging tools like logrotate and syslog.
%prep
-%setup -q -n %{upstream}-%{realname}-942b19b
+%setup -q -n %{realname}-%{version}
+%patch1 -p1 -b .fix_numbering
%build
rebar compile -v
@@ -64,6 +67,9 @@ rebar eunit -v
%changelog
+* Mon Nov 17 2014 Peter Lemenkov <lemenkov(a)gmail.com> - 1.2.2-5
+- Fixed FTBFS (see rhbz #1106221)
+
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/sources b/sources
index b76f148..61b0c4e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cc6aeb9f67bdc28840919c2e65675467 basho-lager-1.2.2-0-g4fcb8fd.tar.gz
+058c455f504da5e3f284c0dfdabfa7ec lager-1.2.2.tar.gz
9 years, 5 months
[erlang-js/f21: 2/2] Merge branch 'master' into f21
by Peter Lemenkov
commit 99491975ca4f9c355a2a2abf514556984fffcf0c
Merge: bbae986 1b03031
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Sun Nov 16 23:47:23 2014 +0300
Merge branch 'master' into f21
.gitignore | 1 +
...-js-0001-Fix-building-of-linked-in-driver.patch | 108 ++++++++------------
erlang-js-0002-Build-with-js-1.7.0.patch | 80 ---------------
erlang-js-0002-build-fix-for-js-1.8.5.patch | 9 +--
...-Use-mochiweb-instead-of-a-bundled-copies.patch | 44 +++-----
...recated-driver_output_term-with-erl_drv_o.patch | 29 +++++
erlang-js.spec | 19 +++-
sources | 2 +-
8 files changed, 104 insertions(+), 188 deletions(-)
---
9 years, 5 months