Re: [OpenWrt-Devel] [Patch][packages][RFC] erlang: update and remove RIPEMD
On 15.11.2013 03:16, Peter Wagner wrote: Hi Dirk, could you please resend the patch. i get: patching file Makefile patch: malformed patch at line 84: 2. As it seems you mail clients wraps the lines. If you can't disable wrapping just attach the patch as file. v2 resent with mail.wrap_long_lines;false now (Thunderbird) attached patchfile too This patch updates erlang to a more current 16B02 and hopefully removes RIPEMD160 support. It's only compile tested - don't know about erlang I used the commit that added ripemd to erlang as a guideline https://github.com/erlang/otp/commit/3881407ea8444c280d9659f40e6c169a1e10310d.patch add ripemd160 support to crypto add ripemd160 message digest support to the crypto app, includes some test cases. and reverted it accordingly i hope. notice: - docs are left untouched - tests are left untouched Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ddba81c..96d336e 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=R15B01 -PKG_RELEASE:=4 +PKG_VERSION:=R16B02 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= http://www.erlang.org/download/ \ http://erlang.mirror.su.se/ -PKG_MD5SUM:=f12d00f6e62b36ad027d6c0c08905fad +PKG_MD5SUM:=ca63bcde0e5ae0f2df9457f97b3115a4 PKG_BUILD_DEPENDS:=erlang/host openssl diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch index 933c73e..8136e47 100644 --- a/lang/erlang/patches/101-emulator_includes.patch +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -1,11 +1,14 @@ --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in -@@ -591,7 +591,7 @@ endif - - - $(OBJDIR)/%.o: beam/%.c -- $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $ -o $@ -+ $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ - +@@ -642,9 +642,9 @@ endif + + ifneq ($(filter tile-%,$(TARGET)),) + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ ++ $(V_CC) $(INCLUDES) \ + -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ +- $(INCLUDES) -c $ -o $@ ++ $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ else - + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers diff --git a/lang/erlang/patches/104-disable_ripemd.patch b/lang/erlang/patches/104-disable_ripemd.patch new file mode 100644 index 000..0995c01 --- /dev/null +++ b/lang/erlang/patches/104-disable_ripemd.patch @@ -0,0 +1,191 @@ +--- a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c +@@ -44,7 +44,6 @@ + #include openssl/md5.h + #include openssl/md4.h + #include openssl/sha.h +-#include openssl/ripemd.h + #include openssl/bn.h + #include openssl/objects.h + #include openssl/rc4.h +@@ -167,10 +166,6 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, + static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +@@ -292,10 +287,6 @@ static ErlNifFunc nif_funcs[] = { + {md5_init, 0, md5_init}, + {md5_update, 2, md5_update}, + {md5_final, 1, md5_final}, +-{ripemd160, 1, ripemd160}, +-{ripemd160_init, 0, ripemd160_init}, +-{ripemd160_update, 2, ripemd160_update}, +-{ripemd160_final, 1, ripemd160_final}, + {sha, 1, sha}, + {sha_init, 0, sha_init}, + {sha_update, 2, sha_update}, +@@ -478,8 +469,6 @@ ERL_NIF_INIT(crypto,nif_funcs,load,NULL, + #define MD5_LEN_96 12 + #define MD4_CTX_LEN (sizeof(MD4_CTX)) + #define MD4_LEN 16 +-#define RIPEMD160_CTX_LEN (sizeof(RIPEMD160_CTX)) +-#define RIPEMD160_LEN 20 + #define SHA_CTX_LEN (sizeof(SHA_CTX)) + #define SHA_LEN 20 + #define SHA_LEN_96 12 +@@ -503,7 +492,6 @@ static ERL_NIF_TERM atom_sha384; + static ERL_NIF_TERM
Re: [OpenWrt-Devel] [Patch][packages][RFC] erlang: update and remove RIPEMD
Hi, i thought about the patch and as openssl now supports ripemd i will commit the patch from Králik Barnabás. Thanks, Peter On Fri, 15 Nov 2013 10:13:17 +0100 Dirk Neukirchen dirkneukirc...@web.de wrote: On 15.11.2013 03:16, Peter Wagner wrote: Hi Dirk, could you please resend the patch. i get: patching file Makefile patch: malformed patch at line 84: 2. As it seems you mail clients wraps the lines. If you can't disable wrapping just attach the patch as file. v2 resent with mail.wrap_long_lines;false now (Thunderbird) attached patchfile too This patch updates erlang to a more current 16B02 and hopefully removes RIPEMD160 support. It's only compile tested - don't know about erlang I used the commit that added ripemd to erlang as a guideline https://github.com/erlang/otp/commit/3881407ea8444c280d9659f40e6c169a1e10310d.patch add ripemd160 support to crypto add ripemd160 message digest support to the crypto app, includes some test cases. and reverted it accordingly i hope. notice: - docs are left untouched - tests are left untouched Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ddba81c..96d336e 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=R15B01 -PKG_RELEASE:=4 +PKG_VERSION:=R16B02 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= http://www.erlang.org/download/ \ http://erlang.mirror.su.se/ -PKG_MD5SUM:=f12d00f6e62b36ad027d6c0c08905fad +PKG_MD5SUM:=ca63bcde0e5ae0f2df9457f97b3115a4 PKG_BUILD_DEPENDS:=erlang/host openssl diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch index 933c73e..8136e47 100644 --- a/lang/erlang/patches/101-emulator_includes.patch +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -1,11 +1,14 @@ --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in -@@ -591,7 +591,7 @@ endif - - - $(OBJDIR)/%.o: beam/%.c --$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $ -o $@ -+$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ - +@@ -642,9 +642,9 @@ endif + + ifneq ($(filter tile-%,$(TARGET)),) + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +-$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ ++$(V_CC) $(INCLUDES) \ + -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ +- $(INCLUDES) -c $ -o $@ ++ $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ else - + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers diff --git a/lang/erlang/patches/104-disable_ripemd.patch b/lang/erlang/patches/104-disable_ripemd.patch new file mode 100644 index 000..0995c01 --- /dev/null +++ b/lang/erlang/patches/104-disable_ripemd.patch @@ -0,0 +1,191 @@ +--- a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c +@@ -44,7 +44,6 @@ + #include openssl/md5.h + #include openssl/md4.h + #include openssl/sha.h +-#include openssl/ripemd.h + #include openssl/bn.h + #include openssl/objects.h + #include openssl/rc4.h +@@ -167,10 +166,6 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, + static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +@@ -292,10 +287,6 @@ static ErlNifFunc nif_funcs[] = { + {md5_init, 0, md5_init}, + {md5_update, 2, md5_update}, + {md5_final, 1, md5_final}, +-{ripemd160, 1, ripemd160}, +-{ripemd160_init, 0, ripemd160_init}, +-{ripemd160_update, 2, ripemd160_update}, +-{ripemd160_final, 1, ripemd160_final}, + {sha, 1, sha}, + {sha_init, 0, sha_init}, + {sha_update, 2, sha_update}, +@@ -478,8 +469,6 @@ ERL_NIF_INIT(crypto,nif_funcs,load,NULL, + #define MD5_LEN_96
Re: [OpenWrt-Devel] [Patch][packages][RFC] erlang: update and remove RIPEMD
Hi Dirk, could you please resend the patch. i get: patching file Makefile patch: malformed patch at line 84: 2. As it seems you mail clients wraps the lines. If you can't disable wrapping just attach the patch as file. /Peter On Thu, 14 Nov 2013 23:53:42 +0100 Dirk Neukirchen dirkneukirc...@web.de wrote: This patch updates erlang to a more current 16B02 and hopefully removes RIPEMD160 support. It's only compile tested - don't know about erlang I used the commit that added ripemd to erlang as a guideline https://github.com/erlang/otp/commit/3881407ea8444c280d9659f40e6c169a1e10310d.patch add ripemd160 support to crypto add ripemd160 message digest support to the crypto app, includes some test cases. and reverted it accordingly i hope. notice: - docs are left untouched - tests are left untouched Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ddba81c..96d336e 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=R15B01 -PKG_RELEASE:=4 +PKG_VERSION:=R16B02 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= http://www.erlang.org/download/ \ http://erlang.mirror.su.se/ -PKG_MD5SUM:=f12d00f6e62b36ad027d6c0c08905fad +PKG_MD5SUM:=ca63bcde0e5ae0f2df9457f97b3115a4 PKG_BUILD_DEPENDS:=erlang/host openssl diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch index 933c73e..8136e47 100644 --- a/lang/erlang/patches/101-emulator_includes.patch +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -1,11 +1,14 @@ --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in -@@ -591,7 +591,7 @@ endif - - - $(OBJDIR)/%.o: beam/%.c --$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $ -o $@ -+$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ - +@@ -642,9 +642,9 @@ endif + + ifneq ($(filter tile-%,$(TARGET)),) + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +-$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ ++$(V_CC) $(INCLUDES) \ + -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ +- $(INCLUDES) -c $ -o $@ ++ $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ else - + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers diff --git a/lang/erlang/patches/104-disable_ripemd.patch b/lang/erlang/patches/104-disable_ripemd.patch new file mode 100644 index 000..0995c01 --- /dev/null +++ b/lang/erlang/patches/104-disable_ripemd.patch @@ -0,0 +1,191 @@ +--- a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c +@@ -44,7 +44,6 @@ + #include openssl/md5.h + #include openssl/md4.h + #include openssl/sha.h +-#include openssl/ripemd.h + #include openssl/bn.h + #include openssl/objects.h + #include openssl/rc4.h +@@ -167,10 +166,6 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, + static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +@@ -292,10 +287,6 @@ static ErlNifFunc nif_funcs[] = { + {md5_init, 0, md5_init}, + {md5_update, 2, md5_update}, + {md5_final, 1, md5_final}, +-{ripemd160, 1, ripemd160}, +-{ripemd160_init, 0, ripemd160_init}, +-{ripemd160_update, 2, ripemd160_update}, +-{ripemd160_final, 1, ripemd160_final}, + {sha, 1, sha}, + {sha_init, 0, sha_init}, + {sha_update, 2, sha_update}, +@@ -478,8 +469,6 @@ ERL_NIF_INIT(crypto,nif_funcs,load,NULL, + #define MD5_LEN_96 12 + #define MD4_CTX_LEN (sizeof(MD4_CTX)) + #define MD4_LEN 16 +-#define RIPEMD160_CTX_LEN (sizeof(RIPEMD160_CTX)) +-#define RIPEMD160_LEN 20 + #define SHA_CTX_LEN (sizeof(SHA_CTX)) + #define SHA_LEN 20 + #define SHA_LEN_96 12