Build 20.4 with system gyp
This commit is contained in:
parent
f759d50712
commit
915cb9056a
@ -19,18 +19,3 @@ diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c
|
||||
}
|
||||
printf("\n"
|
||||
" // Nofiles is a deprecated security feature which prevents cjdns from opening\n"
|
||||
@@ -695,11 +695,12 @@ int main(int argc, char** argv)
|
||||
char corePipeName[64] = "client-core-";
|
||||
Random_base32(rand, (uint8_t*)corePipeName+CString_strlen(corePipeName), 31);
|
||||
String* pipePath = Dict_getStringC(config, "pipe");
|
||||
+ String* path = String_CONST(Pipe_PATH);
|
||||
if (!pipePath) {
|
||||
- pipePath = String_CONST(Pipe_PATH);
|
||||
+ pipePath = path;
|
||||
}
|
||||
if (!Defined(win32) && access(pipePath->bytes, W_OK)) {
|
||||
- Except_throw(eh, "Can't have writable permission to pipe directory.");
|
||||
+ Except_throw(eh, "Pipe directory not writable: [%s]",pipePath->bytes);
|
||||
}
|
||||
Assert_ifParanoid(EventBase_eventCount(eventBase) == 0);
|
||||
struct Pipe* corePipe = Pipe_named(pipePath->bytes, corePipeName, eventBase,
|
||||
|
@ -1,27 +1,6 @@
|
||||
diff -up ./dht/dhtcore/NodeStore.c.libuv ./dht/dhtcore/NodeStore.c
|
||||
--- ./dht/dhtcore/NodeStore.c.libuv 2018-04-18 03:35:41.000000000 -0400
|
||||
+++ ./dht/dhtcore/NodeStore.c 2019-04-24 23:37:26.625881889 -0400
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "util/Endian.h"
|
||||
#include "util/events/Time.h"
|
||||
|
||||
-#include <tree.h>
|
||||
+#include "dependencies/uv_tree.h"
|
||||
|
||||
/** A list of DHT nodes. */
|
||||
struct NodeStore_pvt
|
||||
diff -up ./node_build/make.js.libuv ./node_build/make.js
|
||||
--- ./node_build/make.js.libuv 2018-04-18 03:35:41.000000000 -0400
|
||||
+++ ./node_build/make.js 2019-04-24 23:37:26.690882782 -0400
|
||||
@@ -46,7 +46,7 @@ Builder.configure({
|
||||
crossCompiling: process.env['CROSS'] !== undefined,
|
||||
gcc: GCC,
|
||||
tempDir: process.env['CJDNS_BUILD_TMPDIR'] || '/tmp',
|
||||
- optimizeLevel: '-O3',
|
||||
+ optimizeLevel: '-O',
|
||||
logLevel: process.env['Log_LEVEL'] || 'DEBUG'
|
||||
}, function (builder, waitFor) {
|
||||
|
||||
--- ./node_build/make.js.libuv 2019-05-02 04:02:32.000000000 -0400
|
||||
+++ ./node_build/make.js 2019-09-18 11:01:36.021282700 -0400
|
||||
@@ -101,7 +101,7 @@ Builder.configure({
|
||||
|
||||
if (!builder.config.crossCompiling) {
|
||||
@ -31,7 +10,7 @@ diff -up ./node_build/make.js.libuv ./node_build/make.js
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ Builder.configure({
|
||||
@@ -291,7 +291,7 @@ Builder.configure({
|
||||
|
||||
if (!builder.config.crossCompiling) {
|
||||
if (NO_MARCH_FLAG.indexOf(process.arch) == -1) {
|
||||
@ -40,7 +19,7 @@ diff -up ./node_build/make.js.libuv ./node_build/make.js
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ Builder.configure({
|
||||
@@ -305,7 +305,7 @@ Builder.configure({
|
||||
|
||||
}).nThen(function (waitFor) {
|
||||
|
||||
@ -49,7 +28,7 @@ diff -up ./node_build/make.js.libuv ./node_build/make.js
|
||||
if (!android) {
|
||||
builder.config.libs.push('-lpthread');
|
||||
}
|
||||
@@ -328,15 +328,13 @@ Builder.configure({
|
||||
@@ -332,15 +332,13 @@ Builder.configure({
|
||||
);
|
||||
}
|
||||
|
||||
@ -68,8 +47,8 @@ diff -up ./node_build/make.js.libuv ./node_build/make.js
|
||||
}).nThen(function (waitFor) {
|
||||
|
||||
diff -up ./test/Beacon_test.c.libuv ./test/Beacon_test.c
|
||||
--- ./test/Beacon_test.c.libuv 2018-04-18 03:35:41.000000000 -0400
|
||||
+++ ./test/Beacon_test.c 2019-04-24 23:44:04.535476759 -0400
|
||||
--- ./test/Beacon_test.c.libuv 2019-05-02 04:02:32.000000000 -0400
|
||||
+++ ./test/Beacon_test.c 2019-09-18 10:56:52.757377575 -0400
|
||||
@@ -256,7 +256,8 @@ int main()
|
||||
start(alloc, logger, base, rand, runTest);
|
||||
|
||||
@ -81,8 +60,8 @@ diff -up ./test/Beacon_test.c.libuv ./test/Beacon_test.c
|
||||
}
|
||||
#endif
|
||||
diff -up ./util/events/libuv/FileNo.c.libuv ./util/events/libuv/FileNo.c
|
||||
--- ./util/events/libuv/FileNo.c.libuv 2018-04-18 03:35:41.000000000 -0400
|
||||
+++ ./util/events/libuv/FileNo.c 2019-04-24 23:37:26.626881902 -0400
|
||||
--- ./util/events/libuv/FileNo.c.libuv 2019-05-02 04:02:32.000000000 -0400
|
||||
+++ ./util/events/libuv/FileNo.c 2019-09-18 10:56:52.757377575 -0400
|
||||
@@ -77,14 +77,14 @@ static void onClose(uv_handle_t* handle)
|
||||
#endif
|
||||
#define ALLOC(buff) (((struct Allocator**) &(buff[-(8 + (((uintptr_t)buff) % 8))]))[0])
|
||||
@ -113,9 +92,9 @@ diff -up ./util/events/libuv/FileNo.c.libuv ./util/events/libuv/FileNo.c
|
||||
uv_close((uv_handle_t*) &fileno->peer, onClose);
|
||||
|
||||
diff -up ./util/events/libuv/Timeout.c.libuv ./util/events/libuv/Timeout.c
|
||||
--- ./util/events/libuv/Timeout.c.libuv 2018-04-18 03:35:41.000000000 -0400
|
||||
+++ ./util/events/libuv/Timeout.c 2019-04-24 23:37:26.626881902 -0400
|
||||
@@ -38,7 +38,7 @@ struct Timeout
|
||||
--- ./util/events/libuv/Timeout.c.libuv 2019-09-18 10:56:52.757377575 -0400
|
||||
+++ ./util/events/libuv/Timeout.c 2019-09-18 10:58:31.190730913 -0400
|
||||
@@ -68,7 +68,7 @@ static void unlinkTo(struct Timeout* tim
|
||||
/**
|
||||
* The callback to be called by libuv.
|
||||
*/
|
||||
@ -123,4 +102,11 @@ diff -up ./util/events/libuv/Timeout.c.libuv ./util/events/libuv/Timeout.c
|
||||
+static void handleEvent(uv_timer_t* handle)
|
||||
{
|
||||
struct Timeout* timeout = Identity_check((struct Timeout*) handle);
|
||||
if (!timeout->isInterval) {
|
||||
if (!timeout->isArmed) { return; }
|
||||
@@ -196,4 +196,4 @@ void Timeout_clearAll(struct EventBase*
|
||||
int Timeout_isActive(struct Timeout* timeout)
|
||||
{
|
||||
return (timeout && timeout->selfPtr);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
|
@ -1,9 +1,43 @@
|
||||
diff -up ./node_build/dependencies/libuv/gyp_uv.py.python3 ./node_build/dependencies/libuv/gyp_uv.py
|
||||
--- ./node_build/dependencies/libuv/gyp_uv.py.python3 2017-02-18 15:19:22.280061575 -0500
|
||||
+++ ./node_build/dependencies/libuv/gyp_uv.py 2017-02-18 15:32:37.090478242 -0500
|
||||
--- ./node_build/dependencies/libuv/gyp_uv.py.python3 2019-08-06 18:58:48.000000000 -0400
|
||||
+++ ./node_build/dependencies/libuv/gyp_uv.py 2019-09-19 13:11:51.125240959 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import platform
|
||||
@@ -29,7 +29,7 @@ def host_arch():
|
||||
def run_gyp(args):
|
||||
rc = gyp.main(args)
|
||||
if rc != 0:
|
||||
- print 'Error running GYP'
|
||||
+ print('Error running GYP')
|
||||
sys.exit(rc)
|
||||
|
||||
|
||||
@@ -80,5 +80,5 @@ if __name__ == '__main__':
|
||||
args.append('-Dcomponent=static_library')
|
||||
|
||||
gyp_args = list(args)
|
||||
- print gyp_args
|
||||
+ print(gyp_args)
|
||||
run_gyp(gyp_args)
|
||||
diff -up ./node_build/FindPython2.js.python3 ./node_build/FindPython2.js
|
||||
--- ./node_build/FindPython2.js.python3 2019-09-19 13:14:40.677573302 -0400
|
||||
+++ ./node_build/FindPython2.js 2019-09-19 13:15:15.796056265 -0400
|
||||
@@ -16,12 +16,12 @@ var nThen = require('nthen');
|
||||
var Spawn = require('child_process').spawn;
|
||||
var Fs = require('fs');
|
||||
|
||||
-var PYTHONS = ["python", "python2", "python2.7", "python2.6", "python2.5"];
|
||||
+var PYTHONS = ["python", "python2", "python2.7", "python2.6", "python3"];
|
||||
|
||||
var SCRIPT = [
|
||||
'import sys;',
|
||||
'print(sys.version_info);',
|
||||
- 'exit(sys.version_info[0] != 2 or sys.version_info[1] < 7);'
|
||||
+ 'exit(sys.version_info[0] < 2 or sys.version_info[1] < 6);'
|
||||
].join('\n');
|
||||
|
||||
var find = module.exports.find = function (tempFile, callback) {
|
||||
|
23
cjdns.spec
23
cjdns.spec
@ -79,8 +79,8 @@
|
||||
|
||||
Name: cjdns
|
||||
# major version is cjdns protocol version:
|
||||
Version: 20.3
|
||||
Release: 8%{?dist}
|
||||
Version: 20.4
|
||||
Release: 1%{?dist}
|
||||
Summary: The privacy-friendly network without borders
|
||||
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
|
||||
# cnacl is unused except when use_embedded is true
|
||||
@ -145,15 +145,15 @@ Patch16: cjdns.python3.patch
|
||||
# patch build to use system libuv
|
||||
Patch18: cjdns.libuv.patch
|
||||
Patch19: cjdns.fuzz.patch
|
||||
# patch to use /proc/sys/kernel/random/uuid instead of sysctl
|
||||
# patch to use /proc/sys/kernel/random/uuid instead of sysctl before 20.4
|
||||
Patch20: cjdns.sysctl.patch
|
||||
# Patch ronn to stop using deprecated util.puts and util.debug
|
||||
Patch21: cjdns.puts.patch
|
||||
|
||||
%if %{use_marked}
|
||||
BuildRequires: nodejs, nodejs-marked, python2
|
||||
BuildRequires: nodejs, nodejs-marked, python3
|
||||
%else
|
||||
BuildRequires: nodejs, nodejs-ronn, python2
|
||||
BuildRequires: nodejs, nodejs-ronn, python3
|
||||
%endif
|
||||
|
||||
# Automated package review hates explicit BR on make, but it *is* needed
|
||||
@ -175,6 +175,7 @@ Requires(pre): shadow-utils
|
||||
%if 0%{use_libuv}
|
||||
BuildRequires: libuv-devel
|
||||
%else
|
||||
BuildRequires: gyp
|
||||
Provides: bundled(libuv) = 0.11.19
|
||||
%endif
|
||||
%if 0%{use_embedded}
|
||||
@ -295,12 +296,12 @@ fi
|
||||
%patch16 -b .python3
|
||||
%if 0%{use_libuv}
|
||||
%patch18 -p1 -b .libuv
|
||||
mkdir dependencies
|
||||
cp node_build/dependencies/libuv/include/tree.h dependencies/uv_tree.h
|
||||
rm -rf node_build/dependencies/libuv
|
||||
%else
|
||||
rm -rf node_build/dependencies/libuv/build/gyp # use system gyp
|
||||
%endif
|
||||
%patch19 -p1 -b .fuzz
|
||||
%patch20 -p1 -b .sysctl
|
||||
#patch19 -p1 -b .fuzz
|
||||
#patch20 -p1 -b .sysctl
|
||||
|
||||
cp %{SOURCE1} README_Fedora.md
|
||||
|
||||
@ -641,6 +642,10 @@ fi
|
||||
%{_bindir}/graphStats
|
||||
|
||||
%changelog
|
||||
* Tue Sep 10 2019 Stuart Gathman <stuart@gathman.org> - 20.4-1
|
||||
- Update to 20.4
|
||||
- Update bundled libuv build to use system gyp for build
|
||||
|
||||
* Sat Aug 24 2019 Stuart Gathman <stuart@gathman.org> - 20.3-8
|
||||
- Don't package local copy of ronn
|
||||
- Remove hidden files from node_modules/nthen
|
||||
|
Loading…
Reference in New Issue
Block a user