Saturday, January 05, 2019

Re: [update] lang/node to 10.15.0

On Sat, Jan 5, 2019 at 12:56 PM Aaron Bieber <qbit@fastmail.com> wrote:

> Clobbered the diff with emacs! Here is a link to a working copy:
> https://deftly.net/patches/node-v10.15.0.diff
>
> Thanks for reporting!
>

Thanks for the update! This diff applies, packages, and so far I have
nightscout running fine with this on amd64.


> PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE
>
>
> On Jan 5, 2019, at 4:12 AM, viq <vicviq@gmail.com> wrote:
>
> On Fri, Dec 28, 2018 at 1:02 AM Aaron Bieber <aaron@bolddaemon.com> wrote:
>
>> Hola!
>>
>> Here is a diff that brings node to the latest LTS. The deps/openssl
>> bits were kindly put together by naddy@, so thanks for that!
>>
>> I am reviving my pine64 to test a build on and phessler@ will get it
>> in a bulk here shortly.
>>
>> Any other testing would be greately appreciated!
>>
>
> I spent last evening banging my head against this,
> curl 'https://marc.info/?l=openbsd-ports&m=154595534806449&q=raw' >
> node.patch
> patch -p3 -C -E < /tmp/node.patch
> fails to apply, first offender is patches/patch-Makefile, even though it
> looks identical to what your patch expects. Any idea what am I doing wrong?
>
>
>> Cheers,
>> Aaron
>>
>> diff --git a/lang/node/Makefile b/lang/node/Makefile
>> index 7bef5fb0802..23f6624ebdc 100644
>> --- a/lang/node/Makefile
>> +++ b/lang/node/Makefile
>> @@ -11,14 +11,12 @@ USE_WXNEEDED = Yes
>>
>> COMMENT = V8 JavaScript for clients and servers
>>
>> -NODE_VERSION = v8.12.0
>> -
>> +NODE_VERSION = v10.15.0
>> PLEDGE_VER = 1.1.0
>> DISTFILES = node-pledge-{}${PLEDGE_VER}.tar.gz:0
>> ${DISTNAME}.tar.gz
>>
>> DISTNAME = node-${NODE_VERSION}
>> PKGNAME = ${DISTNAME:S/v//g}
>> -REVISION = 1
>>
>> MASTER_SITES0 =
>> https://github.com/qbit/node-pledge/archive/
>>
>> @@ -35,7 +33,7 @@ MASTER_SITES =
>> ${HOMEPAGE}dist/${NODE_VERSION}/
>>
>> MODULES = lang/python
>>
>> -WANTLIB += c execinfo kvm m pthread util z ${COMPILER_LIBCXX}
>> +WANTLIB += c execinfo kvm m pthread util ${COMPILER_LIBCXX}
>>
>> COMPILER = base-clang ports-gcc base-gcc
>>
>> @@ -53,12 +51,7 @@ CONFIGURE_STYLE = simple
>>
>> # libpath and includes aren't picked up, but I added them here as a note.
>> # The patch for node.gyp is where they are actually being set.
>> -CONFIGURE_ARGS = --prefix=${PREFIX} \
>> - --shared-zlib
>> -
>> -.if "${MACHINE_ARCH}" == "aarch64"
>> -CONFIGURE_ARGS += --openssl-no-asm
>> -.endif
>> +CONFIGURE_ARGS = --prefix=${PREFIX}
>>
>> SUBST_VARS += DISTNAME
>> SUBST_VARS += DISTFILES
>> @@ -78,13 +71,6 @@ do-extract:
>> mv ${WRKSRC}/deps/npm/node_modules/node-pledge-${PLEDGE_VER} \
>> ${WRKSRC}/deps/npm/node_modules/node-pledge
>>
>> -post-extract:
>> - # Currently tarbals exclude tools/eslint, while the tests that
>> require it
>> - # are still in tree
>> - cd ${WRKSRC} && for x in $$(grep -r "tools/eslint" test/* | awk
>> -F: '{print $$1}' | sort | uniq); do \
>> - rm $$x; \
>> - done
>> -
>> pre-configure:
>> @# Bad practice, but prevents a whole stack of patches.
>> ln -sf ${LOCALBASE}/bin/python${MODPY_VERSION}
>> ${WRKDIR}/bin/python
>> @@ -95,13 +81,12 @@ pre-configure:
>> ${WRKDIST}/node.gyp \
>> ${WRKDIST}/common.gypi \
>> ${WRKDIST}/tools/test.py
>> -# generate PIC assembly code
>> -.if ${MACHINE_ARCH} == "i386"
>> - find ${WRKDIST}/deps/openssl/asm/x86-elf-gas -name '*.s' -delete
>> - find ${WRKDIST}/deps/openssl/asm -type f -exec touch {} +
>> - cd ${WRKDIST}/deps/openssl/asm && \
>> - ${MAKE_PROGRAM} -j${MAKE_JOBS} CC="${CC}" ASM="${CC}" all
>> -.endif
>> + cd ${WRKDIST}/deps/openssl/config && \
>> + ${MAKE_PROGRAM} ARCHS=BSD-x86-elf
>> +
>> +post-configure:
>> + sed -i 's/-ldl //' ${WRKSRC}/out/deps/openssl/openssl.target.mk
>> + sed -i 's/-ldl //' ${WRKSRC}/out/deps/openssl/
>> openssl-cli.target.mk
>>
>> post-install:
>> ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
>> diff --git a/lang/node/distinfo b/lang/node/distinfo
>> index b9bc179edc8..03d88505a8c 100644
>> --- a/lang/node/distinfo
>> +++ b/lang/node/distinfo
>> @@ -1,4 +1,4 @@
>> SHA256 (node-pledge-1.1.0.tar.gz) =
>> BuKnrXSkqpTb5Tfap1AHk+l7ucTJLEWbMFNbgQkNBsw=
>> -SHA256 (node-v8.12.0.tar.gz) =
>> tHl4QxNu3ZGVwoIhoWgK5Swp2Gf8X8HJn31uLyEmpns=
>> +SHA256 (node-v10.15.0.tar.gz) =
>> 2+Rn49q7aFT8sM2W4ECCJoyx4xPOl6S3EAsu0VKwoKs=
>> SIZE (node-pledge-1.1.0.tar.gz) = 2560
>> -SIZE (node-v8.12.0.tar.gz) = 30393516
>> +SIZE (node-v10.15.0.tar.gz) = 36300933
>> diff --git a/lang/node/patches/patch-Makefile
>> b/lang/node/patches/patch-Makefile
>> index 033b6f8510d..ef77e1de3fb 100644
>> --- a/lang/node/patches/patch-Makefile
>> +++ b/lang/node/patches/patch-Makefile
>> @@ -2,33 +2,33 @@ $OpenBSD: patch-Makefile,v 1.7 2018/09/19 19:10:27
>> abieber Exp $
>> Index: Makefile
>> --- Makefile.orig
>> +++ Makefile
>> -@@ -101,7 +101,7 @@ out/Makefile: common.gypi deps/uv/uv.gyp
>> deps/http_par
>> - config.gypi: configure
>> - $(error Missing or stale $@, please run ./$<)
>> +@@ -138,7 +138,7 @@ config.gypi: configure configure.py
>> + fi
>>
>> + .PHONY: install
>> -install: all ## Installs node into $PREFIX (default=/usr/local).
>> +install: all build-pledge ## Installs node into $PREFIX
>> (default=/usr/local).
>> $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
>>
>> - uninstall: ## Uninstalls node from $PREFIX (default=/usr/local).
>> -@@ -251,7 +251,6 @@ test-cov: all
>> - $(PYTHON) tools/test.py --mode=release -J \
>> - $(CI_JS_SUITES) \
>> - $(CI_NATIVE_SUITES)
>> -- $(MAKE) lint
>> -
>> - test-parallel: all
>> - $(PYTHON) tools/test.py --mode=release parallel -J
>> -@@ -331,6 +330,12 @@ test/addons/.buildstamp: config.gypi \
>> - # Just goes to show that recursive make really is harmful...
>> + .PHONY: uninstall
>> +@@ -380,6 +380,12 @@ test/addons/.buildstamp: $(ADDONS_PREREQS) \
>> # TODO(bnoordhuis) Force rebuild after gyp update.
>> build-addons: | $(NODE_EXE) test/addons/.buildstamp
>> -+
>> +
>> +build-pledge: $(NODE_EXE)
>> + $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
>> + --directory="deps/npm/node_modules/node-pledge" \
>> + --nodedir="$(shell pwd)" && \
>> + $(RM) -rf
>> deps/npm/node_modules/node-pledge/build/Release/{.deps,../Makefile,obj.target}
>> -
>> ++
>> ADDONS_NAPI_BINDING_GYPS := \
>> $(filter-out test/addons-napi/??_*/binding.gyp, \
>> + $(wildcard test/addons-napi/*/binding.gyp))
>> +@@ -518,7 +524,6 @@ test-hash-seed: all
>> +
>> + .PHONY: test-doc
>> + test-doc: doc-only ## Builds, lints, and verifies the docs.
>> +- $(MAKE) lint
>> + $(PYTHON) tools/test.py $(PARALLEL_ARGS) $(CI_DOC)
>> +
>> + test-known-issues: all
>> diff --git a/lang/node/patches/patch-common_gypi
>> b/lang/node/patches/patch-common_gypi
>> index 682b5771be0..2c28be2a53e 100644
>> --- a/lang/node/patches/patch-common_gypi
>> +++ b/lang/node/patches/patch-common_gypi
>> @@ -2,7 +2,7 @@ $OpenBSD: patch-common_gypi,v 1.10 2018/06/21 23:13:28
>> abieber Exp $
>> Index: common.gypi
>> --- common.gypi.orig
>> +++ common.gypi
>> -@@ -426,6 +426,10 @@
>> +@@ -515,6 +515,10 @@
>> 'ldflags': [
>> '-Wl,--export-dynamic',
>> ],
>> diff --git a/lang/node/patches/patch-deps_openssl_asm_Makefile
>> b/lang/node/patches/patch-deps_openssl_asm_Makefile
>> deleted file mode 100644
>> index 3a00238deea..00000000000
>> --- a/lang/node/patches/patch-deps_openssl_asm_Makefile
>> +++ /dev/null
>> @@ -1,65 +0,0 @@
>> -$OpenBSD: patch-deps_openssl_asm_Makefile,v 1.1 2018/11/16 21:18:15
>> naddy Exp $
>> -
>> -Generate PIC assembly code.
>> -CAST assembly is not PIC.
>> -
>> -Index: deps/openssl/asm/Makefile
>> ---- deps/openssl/asm/Makefile.orig
>> -+++ deps/openssl/asm/Makefile
>> -@@ -3,7 +3,7 @@ PERL += -I../openssl/crypto/perlasm -I../openssl/crypt
>> -
>> - # OPENSSL_IA32_SSE2 flag is needed for checking the sse2 feature on ia32
>> - # see
>> https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha512-586.pl#L56
>> --SSE2
>> <https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha512-586.pl#L56--SSE2>
>> = -DOPENSSL_IA32_SSE2
>> -+SSE2 = -fPIC -DOPENSSL_IA32_SSE2
>> -
>> - OUTPUTS = \
>> - x86-elf-gas/aes/aes-586.s \
>> -@@ -15,7 +15,6 @@ OUTPUTS = \
>> - x86-elf-gas/bn/x86-mont.s \
>> - x86-elf-gas/bn/x86-gf2m.s \
>> - x86-elf-gas/camellia/cmll-x86.s \
>> -- x86-elf-gas/cast/cast-586.s \
>> - x86-elf-gas/des/crypt586.s \
>> - x86-elf-gas/des/des-586.s \
>> - x86-elf-gas/md5/md5-586.s \
>> -@@ -77,7 +76,6 @@ OUTPUTS = \
>> - x86-macosx-gas/bn/x86-mont.s \
>> - x86-macosx-gas/bn/x86-gf2m.s \
>> - x86-macosx-gas/camellia/cmll-x86.s \
>> -- x86-macosx-gas/cast/cast-586.s \
>> - x86-macosx-gas/des/crypt586.s \
>> - x86-macosx-gas/des/des-586.s \
>> - x86-macosx-gas/md5/md5-586.s \
>> -@@ -122,7 +120,6 @@ OUTPUTS = \
>> - x86-win32-masm/bn/x86-mont.asm \
>> - x86-win32-masm/bn/x86-gf2m.asm \
>> - x86-win32-masm/camellia/cmll-x86.asm \
>> -- x86-win32-masm/cast/cast-586.asm \
>> - x86-win32-masm/des/crypt586.asm \
>> - x86-win32-masm/des/des-586.asm \
>> - x86-win32-masm/md5/md5-586.asm \
>> -@@ -313,7 +310,6 @@ x86-elf-gas/bn/co-586.s:
>> ../openssl/crypto/bn/asm/co-5
>> - x86-elf-gas/bn/x86-mont.s: ../openssl/crypto/bn/asm/x86-mont.pl
>> - x86-elf-gas/bn/x86-gf2m.s: ../openssl/crypto/bn/asm/x86-gf2m.pl
>> - x86-elf-gas/camellia/cmll-x86.s: ../openssl/crypto/camellia/asm/
>> cmll-x86.pl
>> --x86-elf-gas/cast/cast-586.s: ../openssl/crypto/cast/asm/cast-586.pl
>> - x86-elf-gas/des/crypt586.s: ../openssl/crypto/des/asm/crypt586.pl
>> - x86-elf-gas/des/des-586.s: ../openssl/crypto/des/asm/des-586.pl
>> - x86-elf-gas/md5/md5-586.s: ../openssl/crypto/md5/asm/md5-586.pl
>> -@@ -335,7 +331,6 @@ x86-macosx-gas/bn/co-586.s:
>> ../openssl/crypto/bn/asm/c
>> - x86-macosx-gas/bn/x86-mont.s: ../openssl/crypto/bn/asm/x86-mont.pl
>> - x86-macosx-gas/bn/x86-gf2m.s: ../openssl/crypto/bn/asm/x86-gf2m.pl
>> - x86-macosx-gas/camellia/cmll-x86.s: ../openssl/crypto/camellia/asm/
>> cmll-x86.pl
>> --x86-macosx-gas/cast/cast-586.s: ../openssl/crypto/cast/asm/cast-586.pl
>> - x86-macosx-gas/des/crypt586.s: ../openssl/crypto/des/asm/crypt586.pl
>> - x86-macosx-gas/des/des-586.s: ../openssl/crypto/des/asm/des-586.pl
>> - x86-macosx-gas/md5/md5-586.s: ../openssl/crypto/md5/asm/md5-586.pl
>> -@@ -357,7 +352,6 @@ x86-win32-masm/bn/co-586.asm:
>> ../openssl/crypto/bn/asm
>> - x86-win32-masm/bn/x86-gf2m.asm: ../openssl/crypto/bn/asm/x86-gf2m.pl
>> - x86-win32-masm/bn/x86-mont.asm: ../openssl/crypto/bn/asm/x86-mont.pl
>> - x86-win32-masm/camellia/cmll-x86.asm: ../openssl/crypto/camellia/asm/
>> cmll-x86.pl
>> --x86-win32-masm/cast/cast-586.asm: ../openssl/crypto/cast/asm/
>> cast-586.pl
>> - x86-win32-masm/des/crypt586.asm: ../openssl/crypto/des/asm/crypt586.pl
>> - x86-win32-masm/des/des-586.asm: ../openssl/crypto/des/asm/des-586.pl
>> - x86-win32-masm/md5/md5-586.asm: ../openssl/crypto/md5/asm/md5-586.pl
>> diff --git a/lang/node/patches/patch-deps_openssl_config_Makefile
>> b/lang/node/patches/patch-deps_openssl_config_Makefile
>> new file mode 100644
>> index 00000000000..549f537e97e
>> --- /dev/null
>> +++ b/lang/node/patches/patch-deps_openssl_config_Makefile
>> @@ -0,0 +1,26 @@
>> +$OpenBSD$
>> +
>> +Index: deps/openssl/config/Makefile
>> +--- deps/openssl/config/Makefile.orig
>> ++++ deps/openssl/config/Makefile
>> +@@ -1,15 +1,15 @@
>> + # This Makefile is confirmed to be run only on Linux (CentOS and
>> + # Ubuntu). perl5 and gas(>=2.26) are needed.
>> +
>> +-UNAME_S := $(shell uname -s)
>> +-ifneq ($(UNAME_S),Linux)
>> +- $(error This can be run only on Linux)
>> +-endif
>> ++#UNAME_S := $(shell uname -s)
>> ++#ifneq ($(UNAME_S),Linux)
>> ++# $(error This can be run only on Linux)
>> ++

No comments:

Post a Comment