From 885bb5b7a2bb8e709e75739228c5e906c7a9f735 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Nov 03 2014 12:54:44 +0000 Subject: Ver. 17.3.3 Signed-off-by: Peter Lemenkov --- diff --git a/.gitignore b/.gitignore index 5da57f3..110111a 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ otp_src_R14A.tar.gz /otp_src_R16B03-1.tar.gz /otp-OTP-17.2.1.tar.gz /otp-OTP-17.2.2.tar.gz +/otp-OTP-17.3.3.tar.gz diff --git a/erlang.spec b/erlang.spec index 29186e7..18fa2fa 100644 --- a/erlang.spec +++ b/erlang.spec @@ -9,7 +9,7 @@ %endif Name: erlang -Version: 17.2.2 +Version: 17.3.3 Release: 1%{?dist} Summary: General-purpose programming language and runtime environment @@ -65,6 +65,9 @@ Patch7: otp-0007-Added-systemd-notify-support-to-EPMD.patch # Fedora specific patch # Install internal hrl files when necessary Patch8: otp-0008-Install-internal-hrl-files-when-necessary.patch +# Fedora specific patch +# Expose NIF version +Patch9: otp-0009-Expose-NIF-version.patch # end of autogenerated patch tag list BuildRequires: lksctp-tools-devel @@ -97,6 +100,7 @@ Requires(preun):systemd Requires(postun):systemd Requires: systemd %endif +BuildRequires: erlang-rpm-macros Requires: erlang-asn1%{?_isa} = %{version}-%{release} Requires: erlang-common_test%{?_isa} = %{version}-%{release} @@ -337,6 +341,7 @@ Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release} %description diameter Diameter (RFC 3588) library +%if %{with doc} %package doc Summary: Erlang documentation Group: Development/Languages @@ -344,6 +349,7 @@ BuildArch: noarch %description doc Documentation for Erlang. +%endif %package edoc Summary: A utility used to generate documentation out of tags in source files @@ -397,8 +403,12 @@ 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 -Provides: erlang(erl_drv_version) = 3.0 -Provides: erlang(erl_nif_version) = 2.6 +# See erts/emulator/beam/erl_driver.h or call erlang:system_info(driver_version). +Provides: erlang(erl_drv_version) = 3.1 +#Provides: erlang(erl_drv_version) = %%(%%{buildroot}/bin/erl -noshell -eval 'io:format(erlang:system_info(driver_version)).' -s erlang halt) +# See erts/emulator/beam/erl_nif.h or call erlang:system_info(nif_version). +Provides: erlang(erl_nif_version) = 2.7 +#Provides: erlang(erl_nif_version) = %%(%%{buildroot}/bin/erl -noshell -eval 'io:format(erlang:system_info(nif_version)).' -s erlang halt) # These sub-packages were removed once Obsoletes: erlang-appmon Obsoletes: erlang-docbuilder @@ -521,7 +531,6 @@ Main erlang library. %package megaco Summary: Megaco/H.248 support library Group: Development/Languages -# FIXME Error:erlang(megaco_flex_scanner:scan/2) Requires: %{name}-asn1%{?_isa} = %{version}-%{release} Requires: %{name}-debugger%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} @@ -881,22 +890,13 @@ Erlang mode for XEmacs (source lisp files). %patch6 -p1 -b .Do_not_install_erlang_sources %patch7 -p1 -b .Added_systemd_notify_support_to_EPMD %patch8 -p1 -b .Install_internal_hrl_files_when_necessary +%patch9 -p1 -b .Expose_NIF_version # end of autogenerated prep patch list # FIXME we should come up with a better solution # remove shipped zlib sources #rm -f erts/emulator/zlib/*.[ch] -# Fix 664 file mode -chmod 644 lib/kernel/examples/uds_dist/c_src/Makefile -chmod 644 lib/kernel/examples/uds_dist/src/Makefile -chmod 644 lib/ssl/examples/certs/Makefile -chmod 644 lib/ssl/examples/src/Makefile - -# Remove old txt files -rm -f lib/ssl/examples/certs/etc/otpCA/index.txt.old -rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old - # Reconfigure everything to apply changes to the autotools templates ./otp_build autoconf @@ -1108,6 +1108,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/man/man3/ct_hooks.* %{_libdir}/erlang/man/man3/ct_master.* %{_libdir}/erlang/man/man3/ct_netconfc.* +%{_libdir}/erlang/man/man3/ct_property_test.* %{_libdir}/erlang/man/man3/ct_rpc.* %{_libdir}/erlang/man/man3/ct_slave.* %{_libdir}/erlang/man/man3/ct_snmp.* @@ -1283,8 +1284,8 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/man/man4/diameter_dict.* %endif -%files doc %if %{with doc} +%files doc %doc %{_docdir}/%{name}-%{version}/doc %doc %{_docdir}/%{name}-%{version}/erts-*/ %doc %{_docdir}/%{name}-%{version}/lib/ @@ -2208,6 +2209,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %changelog +* Sun Nov 02 2014 Peter Lemenkov - 17.3.3-1 +- Ver. 17.3.3 + * Sun Sep 7 2014 Peter Lemenkov - 17.2.2-1 - Ver. 17.2.2 - Fixed a race which could make create_table fail if a node was going down diff --git a/otp-0003-Do-not-install-C-sources.patch b/otp-0003-Do-not-install-C-sources.patch index 388a738..6499e4c 100644 --- a/otp-0003-Do-not-install-C-sources.patch +++ b/otp-0003-Do-not-install-C-sources.patch @@ -46,10 +46,10 @@ index 5b36c19..470821e 100644 endif endif diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in -index e36b39c..fd377bb 100644 +index 7d914a0..b013939 100644 --- a/lib/erl_interface/src/Makefile.in +++ b/lib/erl_interface/src/Makefile.in -@@ -876,14 +876,14 @@ ifneq ($(EXE_TARGETS),) +@@ -892,14 +892,14 @@ ifneq ($(EXE_TARGETS),) $(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin" endif $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src" diff --git a/otp-0004-Do-not-install-Java-sources.patch b/otp-0004-Do-not-install-Java-sources.patch index 378e86d..b5a48ff 100644 --- a/otp-0004-Do-not-install-Java-sources.patch +++ b/otp-0004-Do-not-install-Java-sources.patch @@ -18,10 +18,10 @@ index 273614e..5b1fb57 100644 $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv" diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile -index f476d45..44429a4 100644 +index 8ae1ca0..adaaf55 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile -@@ -102,8 +102,6 @@ release release_docs release_tests release_html: +@@ -114,8 +114,6 @@ release release_docs release_tests release_html: $(V_at)$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec release_spec: opt @@ -29,4 +29,4 @@ index f476d45..44429a4 100644 - $(V_at)$(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang" $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/priv" $(V_at)$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv" - + $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/ebin" diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch index 02fdb3c..cc923fb 100644 --- a/otp-0006-Do-not-install-erlang-sources.patch +++ b/otp-0006-Do-not-install-erlang-sources.patch @@ -34,10 +34,10 @@ index 6798da0..4e3ae0e 100644 $(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/examples" diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile -index 4600c0a..1675a4a 100644 +index 8d74546..a25d85d 100644 --- a/lib/common_test/src/Makefile +++ b/lib/common_test/src/Makefile -@@ -139,7 +139,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk +@@ -140,7 +140,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/src" @@ -873,10 +873,10 @@ index 698c341..3344a0c 100644 $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" # $(INSTALL_DIR) "$(RELSYSDIR)/include" diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile -index 2ef2859..aac91a3 100644 +index 04ce750..ef55c37 100644 --- a/lib/ssh/src/Makefile +++ b/lib/ssh/src/Makefile -@@ -134,7 +134,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk +@@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/src" diff --git a/otp-0007-Added-systemd-notify-support-to-EPMD.patch b/otp-0007-Added-systemd-notify-support-to-EPMD.patch index dd4ddcd..8461024 100644 --- a/otp-0007-Added-systemd-notify-support-to-EPMD.patch +++ b/otp-0007-Added-systemd-notify-support-to-EPMD.patch @@ -8,10 +8,10 @@ Conflicts: erts/configure.in diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c -index 3cfa7a7..67e8b49 100644 +index 9630e0c..dff9bc6 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c -@@ -589,9 +589,11 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) +@@ -593,9 +593,11 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) for(i=0; g->argv[i] != NULL; ++i) free(g->argv[i]); free(g->argv); diff --git a/otp-0009-Expose-NIF-version.patch b/otp-0009-Expose-NIF-version.patch new file mode 100644 index 0000000..3448add --- /dev/null +++ b/otp-0009-Expose-NIF-version.patch @@ -0,0 +1,102 @@ +From: Peter Lemenkov +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 + +diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml +index 8416839..81f98cb 100644 +--- a/erts/doc/src/erlang.xml ++++ b/erts/doc/src/erlang.xml +@@ -6133,6 +6133,11 @@ ok + erlang:system_info(multi_scheduling), and + erlang:system_info(schedulers).

+ ++ nif_version ++ ++

Returns a string containing the erlang NIF version ++ used by the runtime system. It will be on the form "<major ver>.<minor ver>".

++
+ otp_release + +

Returns a string containing the OTP release number of the +diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c +index 6efe9d9..da38eea 100644 +--- 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" +@@ -2459,6 +2460,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/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl +index 336b618..081789f 100644 +--- a/erts/emulator/test/driver_SUITE.erl ++++ b/erts/emulator/test/driver_SUITE.erl +@@ -1199,8 +1199,8 @@ check_si_res(["sched_thrs", Value]) -> + ?line Value = integer_to_list(erlang:system_info(schedulers)); + + %% Data added in 3rd version of driver_system_info() (driver version 1.5) +-check_si_res(["emu_nif_vsn", _Value]) -> +- true; ++check_si_res(["emu_nif_vsn", Value]) -> ++ ?line Value = erlang:system_info(nif_version); + + %% Data added in 4th version of driver_system_info() (driver version 3.1) + check_si_res(["dirty_sched", _Value]) -> +diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl +index 98d7a94..de6a773 100644 +--- a/erts/preloaded/src/erlang.erl ++++ b/erts/preloaded/src/erlang.erl +@@ -2251,6 +2251,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 f541d6e..04cc33e 100644 +--- a/lib/runtime_tools/src/system_information.erl ++++ b/lib/runtime_tools/src/system_information.erl +@@ -371,6 +371,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 1893837..bdc510e 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/sources b/sources index e769560..8aeebf7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -12c6cc0096f0b146234b1698e17d34d1 otp-OTP-17.2.2.tar.gz +18422a0498b882fe043591cf29577d36 otp-OTP-17.3.3.tar.gz