* Have a useful description prefixed with the package name
(E.g.: "foopkg: Add libzot dependency")
* Include Signed-off-by tag in the commit comments.
- See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
+ See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work)
### Advice on pull requests:
PKG_NAME:=luasec
PKG_VERSION:=0.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)?
TARGET_LDFLAGS += $(FPIC)
MAKE_FLAGS += \
- INCDIR="$(TARGET_CPPFLAGS) -I." \
- LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+ LD="$(TARGET_CC)" \
+ INC_PATH="" \
+ LIB_PATH="" \
LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
PKG_NPM_NAME:=arduino-firmata
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
-PKG_MIRROR_HASH:=1aef93dc704ea771b9eab51cb64103533f829aee5b2886ad55d173adf3f11ede
-PKG_SOURCE_VERSION:=v0.3.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
+ TITLE:=Arduino Firmata implementation for Node.js
+ URL:=https://www.npmjs.com/package/arduino-firmata
DEPENDS:=+node +node-npm +node-serialport
endef
define Package/node-arduino-firmata/description
- Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+ Arduino Firmata protocol (http://firmata.org) implementation on Node.js.
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-arduino-firmata/install
- mkdir -p $(1)/usr/lib/node
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node
- rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ \
- $(1)/usr/lib/node/arduino-firmata/patches \
- $(1)/usr/lib/node/arduino-firmata/.p* \
- $(1)/usr/lib/node/arduino-firmata/.quilt* \
- $(1)/usr/lib/node/arduino-firmata/.built* \
- $(1)/usr/lib/node/arduino-firmata/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,README.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{tests,*.txt} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,node-arduino-firmata))
-
(function() {
'use strict';
- var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var ArduinoFirmata, debug, events, exports, serialport;
events = require('eventemitter2');
- SerialPort = (serialport = require('serialport')).SerialPort;
+ serialport = require('serialport');
debug = require('debug')('arduino-firmata');
- exports = module.exports = ArduinoFirmata = (function(superClass) {
- extend(ArduinoFirmata, superClass);
-
- ArduinoFirmata.Status = {
- CLOSE: 0,
- OPEN: 1
- };
-
- ArduinoFirmata.INPUT = 0;
-
- ArduinoFirmata.OUTPUT = 1;
-
- ArduinoFirmata.ANALOG = 2;
-
- ArduinoFirmata.PWM = 3;
-
- ArduinoFirmata.SERVO = 4;
-
- ArduinoFirmata.SHIFT = 5;
-
- ArduinoFirmata.I2C = 6;
-
- ArduinoFirmata.LOW = 0;
-
- ArduinoFirmata.HIGH = 1;
-
- ArduinoFirmata.MAX_DATA_BYTES = 32;
-
- ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
-
- ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
-
- ArduinoFirmata.REPORT_ANALOG = 0xC0;
-
- ArduinoFirmata.REPORT_DIGITAL = 0xD0;
-
- ArduinoFirmata.SET_PIN_MODE = 0xF4;
-
- ArduinoFirmata.REPORT_VERSION = 0xF9;
-
- ArduinoFirmata.SYSTEM_RESET = 0xFF;
-
- ArduinoFirmata.START_SYSEX = 0xF0;
-
- ArduinoFirmata.END_SYSEX = 0xF7;
-
- ArduinoFirmata.list = function(callback) {
- return serialport.list(function(err, ports) {
- var devices, j, len, port;
- if (err) {
- return callback(err);
- }
- devices = [];
- for (j = 0, len = ports.length; j < len; j++) {
- port = ports[j];
- if (/usb|acm|com\d+/i.test(port.comName)) {
- devices.push(port.comName);
+ exports = module.exports = ArduinoFirmata = (function() {
+ class ArduinoFirmata extends events.EventEmitter2 {
+ static list(callback) {
+ return serialport.list(function(err, ports) {
+ var devices, j, len, port;
+ if (err) {
+ return callback(err);
}
- }
- return callback(null, devices);
- });
- };
-
- function ArduinoFirmata() {
- this.status = ArduinoFirmata.Status.CLOSE;
- this.wait_for_data = 0;
- this.execute_multi_byte_command = 0;
- this.multi_byte_channel = 0;
- this.stored_input_data = [];
- this.parsing_sysex = false;
- this.sysex_bytes_read = 0;
- this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.boardVersion = null;
- }
-
- ArduinoFirmata.prototype.isOldArduinoDevice = function() {
- return /usbserial|USB/.test(this.serialport_name);
- };
+ devices = [];
+ for (j = 0, len = ports.length; j < len; j++) {
+ port = ports[j];
+ if (/usb|acm|com|ama\d+/i.test(port.comName)) {
+ devices.push(port.comName);
+ }
+ }
+ return callback(null, devices);
+ });
+ }
- ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
- this.serialport_name = serialport_name;
- if (opts == null) {
- opts = {
- baudrate: 57600
- };
+ constructor() {
+ super();
+ this.status = ArduinoFirmata.Status.CLOSE;
+ this.wait_for_data = 0;
+ this.execute_multi_byte_command = 0;
+ this.multi_byte_channel = 0;
+ this.stored_input_data = [];
+ this.parsing_sysex = false;
+ this.sysex_bytes_read = 0;
+ this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.boardVersion = null;
}
- opts.parser = serialport.parsers.raw;
- if (!this.serialport_name) {
- ArduinoFirmata.list((function(_this) {
- return function(err, devices) {
- return _this.connect(devices[0], opts);
- };
- })(this));
- return this;
+
+ isOldArduinoDevice() {
+ return /usbserial|USB/.test(this.serialport_name);
}
- this.once('boardReady', function() {
- var io_init_wait;
- debug('boardReady');
- io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
- debug("wait " + io_init_wait + "(msec)");
- return setTimeout((function(_this) {
- return function() {
+
+ connect(serialport_name, opts = {
+ baudRate: 57600
+ }) {
+ this.serialport_name = serialport_name;
+ opts.parser = serialport.parsers.raw;
+ if (!this.serialport_name) {
+ ArduinoFirmata.list((err, devices) => {
+ return this.connect(devices[0], opts);
+ });
+ return this;
+ }
+ this.once('boardReady', function() {
+ var io_init_wait;
+ debug('boardReady');
+ io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100);
+ debug(`wait ${io_init_wait}(msec)`);
+ return setTimeout(() => {
var i, j, k;
for (i = j = 0; j < 6; i = ++j) {
- _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+ this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
}
for (i = k = 0; k < 2; i = ++k) {
- _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+ this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
}
debug('init IO ports');
- return _this.emit('connect');
- };
- })(this), io_init_wait);
- });
- this.serialport = new SerialPort(this.serialport_name, opts);
- this.serialport.once('open', (function(_this) {
- return function() {
+ return this.emit('connect');
+ }, io_init_wait);
+ });
+ this.serialport = new serialport(this.serialport_name, opts);
+ this.serialport.once('open', () => {
var cid;
- cid = setInterval(function() {
+ cid = setInterval(() => {
debug('request REPORT_VERSION');
- return _this.write([ArduinoFirmata.REPORT_VERSION]);
+ return this.write([ArduinoFirmata.REPORT_VERSION]);
}, 500);
- _this.once('boardVersion', function(version) {
+ this.once('boardVersion', (version) => {
clearInterval(cid);
- _this.status = ArduinoFirmata.Status.OPEN;
- return _this.emit('boardReady');
+ this.status = ArduinoFirmata.Status.OPEN;
+ return this.emit('boardReady');
});
- return _this.serialport.on('data', function(data) {
+ return this.serialport.on('data', (data) => {
var byte, j, len, results;
results = [];
for (j = 0, len = data.length; j < len; j++) {
byte = data[j];
- results.push(_this.process_input(byte));
+ results.push(this.process_input(byte));
}
return results;
});
- };
- })(this));
- return this;
- };
+ });
+ return this;
+ }
- ArduinoFirmata.prototype.isOpen = function() {
- return this.status === ArduinoFirmata.Status.OPEN;
- };
+ isOpen() {
+ return this.status === ArduinoFirmata.Status.OPEN;
+ }
- ArduinoFirmata.prototype.close = function(callback) {
- this.status = ArduinoFirmata.Status.CLOSE;
- return this.serialport.close(callback);
- };
+ close(callback) {
+ this.status = ArduinoFirmata.Status.CLOSE;
+ return this.serialport.close(callback);
+ }
- ArduinoFirmata.prototype.reset = function(callback) {
- return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
- };
+ reset(callback) {
+ return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+ }
- ArduinoFirmata.prototype.write = function(bytes, callback) {
- return this.serialport.write(bytes, callback);
- };
+ write(bytes, callback) {
+ return this.serialport.write(bytes, callback);
+ }
- ArduinoFirmata.prototype.sysex = function(command, data, callback) {
- var write_data;
- if (data == null) {
- data = [];
+ sysex(command, data = [], callback) {
+ var write_data;
+ //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
+ data = data.map(function(i) {
+ return i & 0b1111111; // 7bit
+ });
+ write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+ return this.write(write_data, callback);
}
- data = data.map(function(i) {
- return i & 0x7f;
- });
- write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
- return this.write(write_data, callback);
- };
- ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
- switch (mode) {
- case true:
- mode = ArduinoFirmata.OUTPUT;
- break;
- case false:
- mode = ArduinoFirmata.INPUT;
+ pinMode(pin, mode, callback) {
+ switch (mode) {
+ case true:
+ mode = ArduinoFirmata.OUTPUT;
+ break;
+ case false:
+ mode = ArduinoFirmata.INPUT;
+ }
+ return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
}
- return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
- };
- ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
- var port_num;
- this.pinMode(pin, ArduinoFirmata.OUTPUT);
- port_num = (pin >>> 3) & 0x0F;
- if (value === 0 || value === false) {
- this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
- } else {
- this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ digitalWrite(pin, value, callback) {
+ var port_num;
+ this.pinMode(pin, ArduinoFirmata.OUTPUT);
+ port_num = (pin >>> 3) & 0x0F;
+ if (value === 0 || value === false) {
+ this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+ } else {
+ this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ }
+ return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
}
- return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
- };
- ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
- value = Math.floor(value);
- this.pinMode(pin, ArduinoFirmata.PWM);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
- };
+ analogWrite(pin, value, callback) {
+ value = Math.floor(value);
+ this.pinMode(pin, ArduinoFirmata.PWM);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+ }
- ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
- this.pinMode(pin, ArduinoFirmata.SERVO);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
- };
+ servoWrite(pin, angle, callback) {
+ this.pinMode(pin, ArduinoFirmata.SERVO);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+ }
- ArduinoFirmata.prototype.digitalRead = function(pin) {
- return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
- };
+ digitalRead(pin) {
+ return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+ }
- ArduinoFirmata.prototype.analogRead = function(pin) {
- return this.analog_input_data[pin];
- };
+ analogRead(pin) {
+ return this.analog_input_data[pin];
+ }
- ArduinoFirmata.prototype.process_input = function(input_data) {
- var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
- if (this.parsing_sysex) {
- if (input_data === ArduinoFirmata.END_SYSEX) {
- this.parsing_sysex = false;
- sysex_command = this.stored_input_data[0];
- sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
- return this.emit('sysex', {
- command: sysex_command,
- data: sysex_data
- });
- } else {
- this.stored_input_data[this.sysex_bytes_read] = input_data;
- return this.sysex_bytes_read += 1;
- }
- } else if (this.wait_for_data > 0 && input_data < 128) {
- this.wait_for_data -= 1;
- this.stored_input_data[this.wait_for_data] = input_data;
- if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
- switch (this.execute_multi_byte_command) {
- case ArduinoFirmata.DIGITAL_MESSAGE:
- input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
- this.digital_input_data[this.multi_byte_channel] = input_data;
- if (this.listeners('digitalChange').length > 0) {
- results = [];
- for (i = j = 0; j <= 13; i = ++j) {
- if (((0x01 << i) & diff) > 0) {
- stat = (input_data & diff) > 0;
- results.push(this.emit('digitalChange', {
- pin: i + this.multi_byte_channel * 8,
- value: stat,
- old_value: !stat
- }));
- } else {
- results.push(void 0);
+ process_input(input_data) {
+ var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+ if (this.parsing_sysex) {
+ if (input_data === ArduinoFirmata.END_SYSEX) {
+ this.parsing_sysex = false;
+ sysex_command = this.stored_input_data[0];
+ sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+ return this.emit('sysex', {
+ command: sysex_command,
+ data: sysex_data
+ });
+ } else {
+ this.stored_input_data[this.sysex_bytes_read] = input_data;
+ return this.sysex_bytes_read += 1;
+ }
+ } else if (this.wait_for_data > 0 && input_data < 128) {
+ this.wait_for_data -= 1;
+ this.stored_input_data[this.wait_for_data] = input_data;
+ if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+ switch (this.execute_multi_byte_command) {
+ case ArduinoFirmata.DIGITAL_MESSAGE:
+ input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+ this.digital_input_data[this.multi_byte_channel] = input_data;
+ if (this.listeners('digitalChange').length > 0) {
+ results = [];
+ for (i = j = 0; j <= 13; i = ++j) {
+ if (((0x01 << i) & diff) > 0) {
+ stat = (input_data & diff) > 0;
+ results.push(this.emit('digitalChange', {
+ pin: i + this.multi_byte_channel * 8,
+ value: stat,
+ old_value: !stat
+ }));
+ } else {
+ results.push(void 0);
+ }
}
+ return results;
+ }
+ break;
+ case ArduinoFirmata.ANALOG_MESSAGE:
+ analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ old_analog_value = this.analogRead(this.multi_byte_channel);
+ this.analog_input_data[this.multi_byte_channel] = analog_value;
+ if (old_analog_value !== analog_value) {
+ return this.emit('analogChange', {
+ pin: this.multi_byte_channel,
+ value: analog_value,
+ old_value: old_analog_value
+ });
}
- return results;
- }
- break;
- case ArduinoFirmata.ANALOG_MESSAGE:
- analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- old_analog_value = this.analogRead(this.multi_byte_channel);
- this.analog_input_data[this.multi_byte_channel] = analog_value;
- if (old_analog_value !== analog_value) {
- return this.emit('analogChange', {
- pin: this.multi_byte_channel,
- value: analog_value,
- old_value: old_analog_value
- });
- }
- break;
- case ArduinoFirmata.REPORT_VERSION:
- this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
- return this.emit('boardVersion', this.boardVersion);
+ break;
+ case ArduinoFirmata.REPORT_VERSION:
+ this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`;
+ return this.emit('boardVersion', this.boardVersion);
+ }
}
- }
- } else {
- if (input_data < 0xF0) {
- command = input_data & 0xF0;
- this.multi_byte_channel = input_data & 0x0F;
} else {
- command = input_data;
- }
- if (command === ArduinoFirmata.START_SYSEX) {
- this.parsing_sysex = true;
- return this.sysex_bytes_read = 0;
- } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
- this.wait_for_data = 2;
- return this.execute_multi_byte_command = command;
+ if (input_data < 0xF0) {
+ command = input_data & 0xF0;
+ this.multi_byte_channel = input_data & 0x0F;
+ } else {
+ command = input_data;
+ }
+ if (command === ArduinoFirmata.START_SYSEX) {
+ this.parsing_sysex = true;
+ return this.sysex_bytes_read = 0;
+ } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+ this.wait_for_data = 2;
+ return this.execute_multi_byte_command = command;
+ }
}
}
+
+ };
+
+ ArduinoFirmata.Status = {
+ CLOSE: 0,
+ OPEN: 1
};
+ ArduinoFirmata.INPUT = 0;
+
+ ArduinoFirmata.OUTPUT = 1;
+
+ ArduinoFirmata.ANALOG = 2;
+
+ ArduinoFirmata.PWM = 3;
+
+ ArduinoFirmata.SERVO = 4;
+
+ ArduinoFirmata.SHIFT = 5;
+
+ ArduinoFirmata.I2C = 6;
+
+ ArduinoFirmata.LOW = 0;
+
+ ArduinoFirmata.HIGH = 1;
+
+ ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+ ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port
+
+ ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM)
+
+ ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin
+
+ ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port
+
+ ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc
+
+ ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version
+
+ ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI
+
+ ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message
+
+ ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message
+
return ArduinoFirmata;
- })(events.EventEmitter2);
+ }).call(this);
}).call(this);
PKG_NPM_NAME:=cylon
PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_SRC_NAME:=$(PKG_NPM_NAME)-firmata
PKG_VERSION:=0.24.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
-PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00
+PKG_SOURCE:=$(PKG_SRC_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_SRC_NAME)/-/
+PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104
+PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
SECTION:=lang
CATEGORY:=Languages
TITLE:=CylonJS - $(1)
- URL:=https://www.npmjs.org/package/cylon
+ URL:=https://www.npmjs.org/package/cylon-firmata
DEPENDS:=+node +node-npm $(2)
endef
endef
define Package/node-cylon/description
- JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+ JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-cylon/install
- mkdir -p $(1)/usr/lib/node/cylon
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
endef
define Package/node-cylon-i2c/install
- mkdir -p $(1)/usr/lib/node/cylon-i2c
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-i2c
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
endef
define Package/node-cylon-gpio/install
- mkdir -p $(1)/usr/lib/node/cylon-gpio
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-gpio
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
endef
define Package/node-cylon-firmata/install
- mkdir -p $(1)/usr/lib/node/cylon-firmata
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-firmata
+ $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{docs,examples,*.js} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{lib,spec} \
+ $(1)/usr/lib/node/cylon-firmata/
endef
$(eval $(call BuildPackage,node-cylon))
$(eval $(call BuildPackage,node-cylon-i2c))
$(eval $(call BuildPackage,node-cylon-gpio))
$(eval $(call BuildPackage,node-cylon-firmata))
-
include $(TOPDIR)/rules.mk
-PKG_NPM_NAME:=hid
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.2
-PKG_RELEASE:=2
+PKG_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.7
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v0.7.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=ac14467265a64116114e99091cd557ca7953500285c78cb4bdf6b82fe262cca6
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT or X11
PKG_LICENSE_FILES:=
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Languages
TITLE:=Node.js package to access HID devices
URL:=https://github.com/node-hid/node-hid
- DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
+ DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd
endef
define Package/node-hid/description
Node.js package to access HID devices
endef
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+
+TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
define Build/Compile
git init $(PKG_BUILD_DIR)
- cd $(PKG_BUILD_DIR) ; \
$(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-hid/install
- mkdir -p $(1)/usr/lib/node/node-hid/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID.node \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
endef
$(eval $(call BuildPackage,node-hid))
-
PKG_NPM_NAME:=serialport
PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=6.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=7.1.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d6f60bd81fe94578dee8e82887a66c5b007ec3f346b13d8156dd94a46f2b4849
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
+ TITLE:=Node.js package to access serial ports
+ URL:=https://serialport.io/
DEPENDS:=+node +node-npm
endef
Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
-
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g --build-from-source $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-serialport/install
- mkdir -p $(1)/usr/lib/node/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/test.js \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
endef
$(eval $(call BuildPackage,node-serialport))
-
delete_empty_dirs() {
local dst_dir="$1"
if [ -d "$dst_dir/usr" ] ; then
- for _ in $(seq 1 10) ; do
- find "$dst_dir/usr" -empty -type d -exec rmdir {} \; || continue
- break
- done
- rmdir "$dst_dir/usr" || true
+ find "$dst_dir/usr" -empty -type d -delete
fi
}
mode="$5"
filespec="$6"
-find "$src_dir" -name "*\.exe" -exec rm -f {} \;
+SED="${SED:-sed -e}"
+
+find "$src_dir" -name "*.exe" -delete
process_filespec "$src_dir" "$dst_dir" "$filespec" || {
echo "process filespec error-ed"
usr_bin_dir="$dst_dir/usr/bin"
if [ -d "$usr_bin_dir" ] ; then
- sed "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i $usr_bin_dir/*
+ $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/*
fi
if [ "$mode" == "sources" ] ; then
# Copy only python source files
- find "$dst_dir" -not -type d -not -name "*\.py" -exec rm -f {} \;
+ find "$dst_dir" -not -type d -not -name "*.py" -delete
delete_empty_dirs "$dst_dir"
exit 0
legacy=
[ "$ver" == "3" ] && legacy="-b"
+# default max recursion is 10
+max_recursion_level=20
# XXX [So that you won't goof as I did]
# Note: Yes, I tried to use the -O & -OO flags here.
# So, we just stuck to un-optimized byte-codes,
# which is still way better/faster than running
# Python sources all the time.
-$python -m compileall $legacy -d '/' "$dst_dir" || {
+$python -m compileall -r "$max_recursion_level" $legacy -d '/' "$dst_dir" || {
echo "python -m compileall err-ed"
exit 1
}
# Delete source files and pyc [ un-optimized bytecode files ]
# We may want to make this optimization thing configurable later, but not sure atm
-find "$dst_dir" -type f -name "*\.py" -exec rm -f {} \;
+find "$dst_dir" -type f -name "*.py" -delete
delete_empty_dirs "$dst_dir"
define Package/$(1)/install
$$(call PyPackage/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python_mk_path)python-package-install.sh "2" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON_BIN)" "$$(2)" \
endef
PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
PYTHON_PKG_SETUP_VARS ?=
)
$(call Build/Compile/PyMod, \
$(PYTHON_PKG_SETUP_DIR), \
+ $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON_PKG_SETUP_ARGS), \
$(PYTHON_PKG_SETUP_VARS) \
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
+ $(INSTALL_BIN) \
+ ./files/python-config.in \
+ $(1)/usr/bin/python$(PYTHON_VERSION)-config
+ $(SED) \
+ 's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
+ $(1)/usr/bin/python$(PYTHON_VERSION)-config
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+ $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
endef
PYTHON_BASE_LIB_FILES:= \
--- /dev/null
+#!@EXENAME@
+
+import sys
+import os
+import getopt
+from distutils import sysconfig
+
+# start changes
+host_prefix = sysconfig.PREFIX
+
+target_bin_dir = os.path.dirname(os.path.abspath(__file__))
+target_prefix = os.path.normpath(os.path.join(target_bin_dir, '..'))
+
+target_data_dir = os.path.join(target_prefix, 'lib', 'python' + sysconfig.get_config_var('VERSION') + '-openwrt')
+sys.path.append(target_data_dir)
+
+try:
+ from _sysconfigdatatarget import build_time_vars
+ sysconfig._config_vars = {}
+ sysconfig._config_vars.update(build_time_vars)
+except ImportError:
+ print >>sys.stderr, "Could not import target data from %s" % (target_data_dir)
+ sys.exit(1)
+# end changes
+# plus .replace(host_prefix, target_prefix) below
+
+valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
+ 'ldflags', 'help']
+
+def exit_with_usage(code=1):
+ print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
+ '|'.join('--'+opt for opt in valid_opts))
+ sys.exit(code)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
+except getopt.error:
+ exit_with_usage()
+
+if not opts:
+ exit_with_usage()
+
+pyver = sysconfig.get_config_var('VERSION')
+getvar = sysconfig.get_config_var
+
+opt_flags = [flag for (flag, val) in opts]
+
+if '--help' in opt_flags:
+ exit_with_usage(code=0)
+
+for opt in opt_flags:
+ if opt == '--prefix':
+ #print sysconfig.PREFIX
+ print target_prefix
+
+ elif opt == '--exec-prefix':
+ #print sysconfig.EXEC_PREFIX
+ print target_prefix
+
+ elif opt in ('--includes', '--cflags'):
+ flags = ['-I' + sysconfig.get_python_inc(),
+ '-I' + sysconfig.get_python_inc(plat_specific=True)]
+ if opt == '--cflags':
+ flags.extend(getvar('CFLAGS').split())
+ #print ' '.join(flags)
+ print ' '.join(flags).replace(host_prefix, target_prefix)
+
+ elif opt in ('--libs', '--ldflags'):
+ libs = ['-lpython' + pyver]
+ libs += getvar('LIBS').split()
+ libs += getvar('SYSLIBS').split()
+ # add the prefix/lib/pythonX.Y/config dir, but only if there is no
+ # shared library in prefix/lib/.
+ if opt == '--ldflags':
+ if not getvar('Py_ENABLE_SHARED'):
+ libs.insert(0, '-L' + getvar('LIBPL'))
+ if not getvar('PYTHONFRAMEWORK'):
+ libs.extend(getvar('LINKFORSHARED').split())
+ #print ' '.join(libs)
+ print ' '.join(libs).replace(host_prefix, target_prefix)
+
--- /dev/null
+diff --git a/Lib/compileall.py b/Lib/compileall.py
+index 5cfa8bed3f..8716c9c0ca 100644
+--- a/Lib/compileall.py
++++ b/Lib/compileall.py
+@@ -152,10 +152,10 @@ def main():
+ """Script main program."""
+ import getopt
+ try:
+- opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
++ opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
+ except getopt.error, msg:
+ print msg
+- print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
++ print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
+ "[-x regexp] [-i list] [directory|file ...]"
+ print
+ print "arguments: zero or more file and directory names to compile; " \
+@@ -164,6 +164,7 @@ def main():
+ print
+ print "options:"
+ print "-l: don't recurse into subdirectories"
++ print "-r recursion: control the maximum recursion level"
+ print "-f: force rebuild even if timestamps are up-to-date"
+ print "-q: output only error messages"
+ print "-d destdir: directory to prepend to file paths for use in " \
+@@ -187,6 +188,7 @@ def main():
+ flist = None
+ for o, a in opts:
+ if o == '-l': maxlevels = 0
++ if o == '-r': maxlevels = int(a)
+ if o == '-d': ddir = a
+ if o == '-f': force = 1
+ if o == '-q': quiet = 1
define Package/$(1)/install
$$(call Py3Package/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python3_mk_path)python-package-install.sh "3" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \
endef
PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
PYTHON3_PKG_SETUP_VARS ?=
)
$(call Build/Compile/Py3Mod, \
$(PYTHON3_PKG_SETUP_DIR), \
+ $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON3_PKG_SETUP_ARGS), \
$(PYTHON3_PKG_SETUP_VARS) \
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/bin
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+ $(1)/usr/bin/
endef
PYTHON3_BASE_LIB_FILES:= \
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=63.1
+MAJOR_VERSION:=64
+MINOR_VERSION:=1
+PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-63_1-src.tgz
-PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
+PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
+PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
+PKG_HASH:=92f1b7b9d51b396679c17f35a2112423361b8da3c1b9de00aa94fd768ae296e6
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
--enable-dyload \
--prefix=$(STAGING_DIR_HOSTPKG)
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ mkdir -p $(PKG_BUILD_DIR)/data/out
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
--- /dev/null
+--- a/runConfigureICU
++++ b/runConfigureICU
+@@ -239,8 +239,8 @@
+ THE_COMP="the GNU C++"
+ CC=gcc; export CC
+ CXX=g++; export CXX
+- RELEASE_CFLAGS='-O3'
+- RELEASE_CXXFLAGS='-O3'
++ RELEASE_CFLAGS=' '
++ RELEASE_CXXFLAGS=' '
+ DEBUG_CFLAGS='-g'
+ DEBUG_CXXFLAGS='-g'
+ ;;
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jose
+PKG_VERSION:=10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjose
+ SECTION:=libs
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+zlib +jansson +libopenssl +libpthread
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose
+ SECTION:=utils
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+libjose
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose/description
+ jose is a command line utility for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Package/libjose/description
+ libjose is a library for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h $(1)/usr/include/$(PKG_NAME)
+ $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libjose/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib/
+endef
+
+define Package/jose/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libjose))
+$(eval $(call BuildPackage,jose))
--- /dev/null
+From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
+From: Nathaniel McCallum <npmccallum@redhat.com>
+Date: Fri, 29 Sep 2017 14:49:57 -0400
+Subject: [PATCH] Fix minor FILE* leak
+
+---
+ cmd/jwe/pwd.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
+index 0b5be54..2f021eb 100644
+--- a/cmd/jwe/pwd.h
++++ b/cmd/jwe/pwd.h
+@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
+ nf.c_lflag &= ~ECHO;
+ nf.c_lflag |= ECHONL;
+
+- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
++ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
++ fclose(tty);
+ return NULL;
++ }
+
+ fprintf(tty, "%s", prompt);
+
+@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
+ }
+
+ tcsetattr(fileno(tty), TCSANOW, &of);
++ fclose(tty);
+ return pwd;
+ }
+ #endif
PKG_NAME:=libdouble-conversion
PKG_VERSION:=3.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE_FILES:=COPYING LICENSE
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libdouble-conversion
endef
$(eval $(call BuildPackage,libdouble-conversion))
+$(eval $(call HostBuild))
include $(TOPDIR)/rules.mk
PKG_NAME:=glog
-PKG_VERSION:=0.3.5
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILE:=COPYING
--- /dev/null
+Index: glog-0.4.0/src/symbolize_unittest.cc
+===================================================================
+--- glog-0.4.0.orig/src/symbolize_unittest.cc
++++ glog-0.4.0/src/symbolize_unittest.cc
+@@ -401,7 +401,7 @@ int main(int argc, char **argv) {
+ FLAGS_logtostderr = true;
+ InitGoogleLogging(argv[0]);
+ InitGoogleTest(&argc, argv);
+-#if defined(HAVE_SYMBOLIZE)
++#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE)
+ # if defined(__ELF__)
+ // We don't want to get affected by the callback interface, that may be
+ // used to install some callback function at InitGoogle() time.
include $(TOPDIR)/rules.mk
PKG_NAME:=libssh2
-PKG_VERSION:=1.8.1
+PKG_VERSION:=1.8.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=40b517f35b1bb869d0075b15125c7a015557f53a5a3a6a8bffb89b69fd70f159
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libssh2:libssh2
PKG_CONFIG_DEPENDS:= \
CONFIG_LIBSSH2_MBEDTLS \
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nspr
+PKG_VERSION:=4.21
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+ https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \
+ https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/
+PKG_HASH:=15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH = ./nspr
+MAKE_PATH = ./nspr
+PKG_AUTOMAKE_PATHS = $(PKG_BUILD_DIR)/nspr
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+ conf=--enable-64bit
+endif
+
+export MUSL=$(if $(CONFIG_LIBC_USE_GLIBC),0,1)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --disable-debug \
+ --with-pthreads \
+ $(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
+ $(conf)
+
+define Build/Compile
+ CROSS_COMPILE=1 CFLAGS="-DXP_UNIX $(HOST_CFLAGS)" LDFLAGS="" CC="$(HOSTCC)" \
+ $(MAKE) -C $(PKG_BUILD_DIR)/nspr/config
+ $(call Build/Compile/Default)
+endef
+
+define Package/nspr
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Netscape Portable Runtime (NSPR)
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR
+ DEPENDS:=+libpthread
+endef
+
+define Package/nspr/description
+ Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
+ level and libc-like functions. The API is used in the Mozilla clients, many
+ of Red Hat's and Oracle's server applications, and other software offerings.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib/ \
+ $(1)/usr/lib/pkgconfig/ \
+ $(1)/usr/share/aclocal/
+
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/nspr $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
+endef
+
+define Package/nspr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,nspr))
--- /dev/null
+From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 16 Nov 2018 13:52:49 +0800
+Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
+
+Remove _BUILD_STRING and _BUILD_TIME to avoid
+adding timestamp to _pl_bld.h which can result
+in adding timestamp in library file such as
+libnspr4.so.
+ $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
+ [snip]
+ 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
+ [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ lib/ds/Makefile.in | 8 +-------
+ lib/libc/src/Makefile.in | 8 +-------
+ lib/prstreams/Makefile.in | 8 +-------
+ pr/src/Makefile.in | 8 +-------
+ 4 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
+index e737791..b578476 100644
+--- a/nspr/lib/ds/Makefile.in
++++ b/nspr/lib/ds/Makefile.in
+@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
+index e8a6d9f..978ed28 100644
+--- a/nspr/lib/libc/src/Makefile.in
++++ b/nspr/lib/libc/src/Makefile.in
+@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
+index aeb2944..f318097 100644
+--- a/nspr/lib/prstreams/Makefile.in
++++ b/nspr/lib/prstreams/Makefile.in
+@@ -116,13 +116,7 @@ endif
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
+index 19c5a69..b4ac31c 100644
+--- a/nspr/pr/src/Makefile.in
++++ b/nspr/pr/src/Makefile.in
+@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
+--
+2.7.4
+
--- /dev/null
+From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001
+From: Antoine Tenart <antoine.tenart@free-electrons.com>
+Date: Mon, 23 Oct 2017 10:28:20 +0200
+Subject: [PATCH] Add ARC support
+
+[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc].
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ]
+---
+ pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h | 2 ++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index fec8525378dc..5f4fa0eac783 100644
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+@@ -1157,6 +1157,51 @@
+ #define PR_BYTES_PER_WORD_LOG2 3
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
++#elif defined(__arc__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE 1
++#define PR_BYTES_PER_SHORT 2
++#define PR_BYTES_PER_INT 4
++#define PR_BYTES_PER_INT64 8
++#define PR_BYTES_PER_LONG 4
++#define PR_BYTES_PER_FLOAT 4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD 4
++#define PR_BYTES_PER_DWORD 8
++
++#define PR_BITS_PER_BYTE 8
++#define PR_BITS_PER_SHORT 16
++#define PR_BITS_PER_INT 32
++#define PR_BITS_PER_INT64 64
++#define PR_BITS_PER_LONG 32
++#define PR_BITS_PER_FLOAT 32
++#define PR_BITS_PER_DOUBLE 64
++#define PR_BITS_PER_WORD 32
++
++#define PR_BITS_PER_BYTE_LOG2 3
++#define PR_BITS_PER_SHORT_LOG2 4
++#define PR_BITS_PER_INT_LOG2 5
++#define PR_BITS_PER_INT64_LOG2 6
++#define PR_BITS_PER_LONG_LOG2 5
++#define PR_BITS_PER_FLOAT_LOG2 5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2 5
++
++#define PR_ALIGN_OF_SHORT 2
++#define PR_ALIGN_OF_INT 4
++#define PR_ALIGN_OF_LONG 4
++#define PR_ALIGN_OF_INT64 4
++#define PR_ALIGN_OF_FLOAT 4
++#define PR_ALIGN_OF_DOUBLE 4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD 4
++
++#define PR_BYTES_PER_WORD_LOG2 2
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #else
+
+ #error "Unknown CPU architecture"
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 8e04fad479a1..628b1217e9c8 100644
+--- a/nspr/pr/include/md/_linux.h
++++ b/nspr/pr/include/md/_linux.h
+@@ -63,6 +63,8 @@
+ #define _PR_SI_ARCHITECTURE "riscv32"
+ #elif defined(__riscv) && (__riscv_xlen == 64)
+ #define _PR_SI_ARCHITECTURE "riscv64"
++#elif defined(__arc__)
++#define _PR_SI_ARCHITECTURE "arc"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
+--
+2.17.1
+
--- /dev/null
+--- a/nspr/config/config.mk 2017-10-31 13:13:22.692343122 +0200
++++ b/nspr/config/config.mk 2017-10-31 13:13:58.758016378 +0200
+@@ -126,6 +126,9 @@
+
+ ifeq ($(USE_IPV6),1)
+ DEFINES += -D_PR_INET6
++ifeq ($(MUSL),1)
++CFLAGS += -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE
++endif
+ endif
+
+ ifeq ($(MOZ_UNICODE),1)
+--- a/nspr/config/Makefile.in 2019-03-31 13:44:56.919871810 +0300
++++ b/nspr/config/Makefile.in 2019-03-31 13:45:21.560545948 +0300
+@@ -30,7 +30,7 @@
+
+ # This version hasn't been ported for us; the one in mozilla/config has
+ ifneq ($(OS_ARCH),OS2)
+-CSRCS += nsinstall.c
++#CSRCS += nsinstall.c
+
+ PLSRCS = nfspwd.pl
+ endif
SECTION:=libs
CATEGORY:=Libraries
URL:=https://www.pcre.org/
+ DEPENDS:=$(CXX_DEPENDS)
endef
define Package/libpcre
define Package/libpcrecpp
$(call Package/libpcre/default)
TITLE:=C++ wrapper for Perl Compatible Regular Expression library
- DEPENDS:=+libpcre $(CXX_DEPENDS)
+ DEPENDS:=+libpcre
endef
TARGET_CFLAGS += $(FPIC)
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.11.2
+PKG_VERSION:=1.11.4
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
https://bitbucket.org/mutt/mutt/downloads/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723
+PKG_HASH:=b651357ea6c8762178080493991c77ecb111d916d171d422500257ab48be2801
PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/aircrack-ng/aircrack-ng/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7e03f9828495a3a1a781ad79e41805971bf7347c092df852820232bca866a19b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=42f2b48d7f46b39e0d5d2f2a64cbf63f87416a70
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=17893e05278635675a77a3cb0927202ec4df2fc9a742689a7a88e4a8f27a69b6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CONFIG_AIRCRACK_NG_HWLOC \
CONFIG_AIRCRACK_NG_SQLITE3
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/aircrack-ng
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+ DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
Bash script designed to turn wireless cards into monitor mode.
endef
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
+endef
+
CONFIGURE_ARGS += \
--disable-silent-rules \
--enable-shared \
\
PYTHON=$(PYTHON) \
\
- $(if $(CONFIG_AIRCRACK_NG_OPENSSL),--with-openssl,--without-openssl) \
+ $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
$(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
$(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
- $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3,--without-sqlite3)
+ $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
PKG_NAME:=apcupsd
PKG_VERSION:=3.14.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0
URL:=http://www.apcupsd.org/
endef
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+
define Build/Configure
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
$(call Build/Configure/Default, \
APCPID=/var/run/apcupsd.pid
APCUPSD=/usr/sbin/apcupsd
-SHUTDOWN=/sbin/shutdown
+SHUTDOWN=/sbin/halt
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=true
;;
doreboot)
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
- ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
+ echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
;;
doshutdown)
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
- ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
+ echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
;;
annoyme)
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
--- /dev/null
+--- a/Makefile.orig 2019-04-04 18:19:45.007668656 +0200
++++ a/Makefile 2019-04-04 18:23:00.723165465 +0200
+@@ -1,6 +1,6 @@
+ topdir:=.
+
+-SUBDIRS=src platforms doc
++SUBDIRS=src platforms
+ include autoconf/targets.mak
+
+ # Force platforms/ to build after src/
PKG_NAME:=gnunet
-PKG_VERSION:=0.11.0
+PKG_VERSION:=0.11.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gnunet
-PKG_HASH:=b7477a3c3b0d5e8a013685dc208cfb4ccee4145f8668faa8eb5b382af36c7e9a
+PKG_HASH:=cac5c6c692d8375de733371ee777481d11bf6f2276c951b8759d8f870a1515b5
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \
- peerinfo revocation scalarproduct scrypt statistics transport uri; do \
+ peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
( for lib in arm ats atsapplication atstransport block blockgroup cadet \
core datacache dht dns dnsparser fragmentation friends hello \
- identity natauto natnew nse nt peerinfo regexblock regex revocation \
- scalarproduct set statistics transport transportaddress \
+ identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
+ scalarproduct set statistics transport transportaddress transportapplication \
transportcommunicator transportcore transportmonitor util; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
- ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
+ ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
( for lex in daemon-topology helper-nat-client \
- helper-nat-server service-arm service-ats service-cadet \
+ helper-nat-server service-arm service-ats service-ats-new service-cadet \
service-core service-dht service-identity service-nat service-nat-auto \
- service-nse service-peerinfo service-regex \
+ service-nse service-peerinfo service-peerstore service-regex \
service-revocation service-scalarproduct-alice \
service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-statistics \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
done )
- ( for conf in arm ats cadet core datacache dht identity identity-provider \
- nat nat-auto nse peerinfo regex revocation scalarproduct \
- set statistics topology transport util; do \
+ ( for conf in arm ats cadet communicator-unix core datacache dht identity \
+ identity-provider nat nat-auto nse peerinfo peerstore regex revocation \
+ scalarproduct set statistics topology transport util; do \
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
done )
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
endef
+BIN_auction:=auction-create auction-info auction-join
+LIBEXEC_auction:=service-auction
+CONF_auction:=auction
+DEPENDS_auction:=+gnunet-reclaim +jansson
+
DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
BIN_conversation:=conversation conversation-test
LIB_conversation:=conversation microphone speaker
DEPENDS_transport-http_server:=+libmicrohttpd-ssl
PLUGIN_transport-http_server:=transport_http_server transport_https_server
+BIN_transport-http_server:=transport-certificate-creation
PLUGIN_transport-tcp:=transport_tcp
PLUGIN_transport-wlan:=transport_wlan
LIBEXEC_transport-wlan:=helper-transport-wlan
-PLUGIN_transport-xt:=transport_xt
-
-PLUGIN_transport-xu:=transport_xu
DEPENDS_experiments:=+libglpk
PLUGIN_experiments:=ats_mlp ats_ril
LIBEXEC_dv:=service-dv
CONF_dv:=dv
-DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
+DEPENDS_fs:=+gnunet-datastore +libextractor
BIN_fs:=auto-share directory download fs publish unindex search
LIB_fs:=fs
PLUGIN_fs:=block_fs
DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
+BIN_gns:=gns gns-import.sh gns-proxy-setup-ca namecache namestore resolver zoneimport
LIB_gns:=gns gnsrecord namecache namestore
PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
LIBEXEC_datastore:=service-datastore
CONF_datastore:=datastore
-BIN_peerstore:=peerstore
-LIB_peerstore:=peerstore
-LIBEXEC_peerstore:=service-peerstore
-CONF_peerstore:=peerstore
-
-DEPENDS_auction:=+gnunet-reclaim
-BIN_auction:=auction-create auction-info auction-join
-LIBEXEC_auction:=service-auction
-CONF_auction:=auction
DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe
BIN_reclaim:=credential reclaim
LIB_reclaim:=consensus credential abe reclaim reclaimattribute secretsharing
LIBEXEC_reclaim:=service-consensus service-credential service-reclaim service-secretsharing
-CONF_reclaim:=consensus reclaim secretsharing
+CONF_reclaim:=consensus credential reclaim secretsharing
PLUGIN_reclaim:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid reclaim_sqlite
DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson
DEPENDS_gns-flat:=+gnunet-gns
PLUGIN_gns-flat:=namecache_flat namestore_heap
-DEPENDS_peerstore-flat:=+gnunet-peerstore
PLUGIN_peerstore-flat:=peerstore_flat
DEPENDS_fs-heap:=+gnunet-datastore
PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
CONFLICTS_gns-sqlite:=gnunet-gns-flat
-DEPENDS_peerstore-sqlite:=+gnunet-peerstore +gnunet-sqlite
+DEPENDS_peerstore-sqlite:=+gnunet-sqlite
PLUGIN_peerstore-sqlite:=peerstore_sqlite
CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
$(eval $(call PostInstFixSUIDPerms,gnunet-vpn))
$(eval $(call BuildPackage,gnunet))
+$(eval $(call BuildComponent,auction,auction components,))
$(eval $(call BuildComponent,conversation,conversation component,))
$(eval $(call BuildComponent,curl,cURL wrapper component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,gns,name resolution components,y))
$(eval $(call BuildComponent,gns-proxy,gns-proxy component,))
$(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,y))
-$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
$(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,))
$(eval $(call BuildComponent,rest,REST interface,))
$(eval $(call BuildComponent,rps,RPS routing component,y))
$(eval $(call BuildComponent,transport-tcp,TCP transport,y))
$(eval $(call BuildComponent,transport-udp,UDP transport,y))
$(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
-$(eval $(call BuildComponent,transport-xt,xt transport,))
-$(eval $(call BuildComponent,transport-xu,xu transport,))
$(eval $(call BuildComponent,utils,administration utililties,))
$(eval $(call BuildComponent,vpn,vpn components,y))
+++ /dev/null
-From 6603f7e1a837d3a51a1949a6f4e1802b6ef3d806 Mon Sep 17 00:00:00 2001
-From: "Schanzenbach, Martin" <mschanzenbach@posteo.de>
-Date: Thu, 28 Feb 2019 14:19:34 +0100
-Subject: [PATCH] fix dist for experimental
-
----
- po/POTFILES.in | 114 ++++++++++++++++++++--------------------
- src/include/Makefile.am | 1 +
- 2 files changed, 58 insertions(+), 57 deletions(-)
-
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -4,6 +4,14 @@ src/arm/arm_monitor_api.c
- src/arm/gnunet-arm.c
- src/arm/gnunet-service-arm.c
- src/arm/mockup-service.c
-+src/ats-tests/ats-testing-experiment.c
-+src/ats-tests/ats-testing-log.c
-+src/ats-tests/ats-testing-preferences.c
-+src/ats-tests/ats-testing-traffic.c
-+src/ats-tests/ats-testing.c
-+src/ats-tests/gnunet-ats-sim.c
-+src/ats-tests/gnunet-solver-eval.c
-+src/ats-tool/gnunet-ats.c
- src/ats/ats_api2_application.c
- src/ats/ats_api2_transport.c
- src/ats/ats_api_connectivity.c
-@@ -11,10 +19,10 @@ src/ats/ats_api_performance.c
- src/ats/ats_api_scanner.c
- src/ats/ats_api_scheduling.c
- src/ats/gnunet-ats-solver-eval.c
--src/ats/gnunet-service-ats_addresses.c
-+src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats.c
-+src/ats/gnunet-service-ats_addresses.c
- src/ats/gnunet-service-ats_connectivity.c
--src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats_normalization.c
- src/ats/gnunet-service-ats_performance.c
- src/ats/gnunet-service-ats_plugins.c
-@@ -26,14 +34,6 @@ src/ats/plugin_ats2_simple.c
- src/ats/plugin_ats_mlp.c
- src/ats/plugin_ats_proportional.c
- src/ats/plugin_ats_ril.c
--src/ats-tests/ats-testing.c
--src/ats-tests/ats-testing-experiment.c
--src/ats-tests/ats-testing-log.c
--src/ats-tests/ats-testing-preferences.c
--src/ats-tests/ats-testing-traffic.c
--src/ats-tests/gnunet-ats-sim.c
--src/ats-tests/gnunet-solver-eval.c
--src/ats-tool/gnunet-ats.c
- src/auction/gnunet-auction-create.c
- src/auction/gnunet-auction-info.c
- src/auction/gnunet-auction-join.c
-@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c
- src/cadet/cadet_api_list_tunnels.c
- src/cadet/cadet_test_lib.c
- src/cadet/desirability_table.c
--src/cadet/gnunet-cadet.c
- src/cadet/gnunet-cadet-profiler.c
-+src/cadet/gnunet-cadet.c
- src/cadet/gnunet-service-cadet.c
- src/cadet/gnunet-service-cadet_channel.c
- src/cadet/gnunet-service-cadet_connection.c
-@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c
- src/consensus/plugin_block_consensus.c
- src/conversation/conversation_api.c
- src/conversation/conversation_api_call.c
--src/conversation/gnunet-conversation.c
- src/conversation/gnunet-conversation-test.c
--src/conversation/gnunet_gst.c
--src/conversation/gnunet_gst_test.c
--src/conversation/gnunet-helper-audio-playback.c
-+src/conversation/gnunet-conversation.c
- src/conversation/gnunet-helper-audio-playback-gst.c
--src/conversation/gnunet-helper-audio-record.c
-+src/conversation/gnunet-helper-audio-playback.c
- src/conversation/gnunet-helper-audio-record-gst.c
-+src/conversation/gnunet-helper-audio-record.c
- src/conversation/gnunet-service-conversation.c
-+src/conversation/gnunet_gst.c
-+src/conversation/gnunet_gst_test.c
- src/conversation/microphone.c
- src/conversation/plugin_gnsrecord_conversation.c
- src/conversation/speaker.c
-@@ -111,7 +111,6 @@ src/dht/dht_api.c
- src/dht/dht_test_lib.c
- src/dht/gnunet-dht-get.c
- src/dht/gnunet-dht-monitor.c
--src/dht/gnunet_dht_profiler.c
- src/dht/gnunet-dht-put.c
- src/dht/gnunet-service-dht.c
- src/dht/gnunet-service-dht_clients.c
-@@ -120,6 +119,7 @@ src/dht/gnunet-service-dht_hello.c
- src/dht/gnunet-service-dht_neighbours.c
- src/dht/gnunet-service-dht_nse.c
- src/dht/gnunet-service-dht_routing.c
-+src/dht/gnunet_dht_profiler.c
- src/dht/plugin_block_dht.c
- src/dns/dns_api.c
- src/dns/gnunet-dns-monitor.c
-@@ -129,8 +129,8 @@ src/dns/gnunet-service-dns.c
- src/dns/gnunet-zonewalk.c
- src/dns/plugin_block_dns.c
- src/exit/gnunet-daemon-exit.c
--src/exit/gnunet-helper-exit.c
- src/exit/gnunet-helper-exit-windows.c
-+src/exit/gnunet-helper-exit.c
- src/fragmentation/defragmentation.c
- src/fragmentation/fragmentation.c
- src/fs/fs_api.c
-@@ -155,8 +155,8 @@ src/fs/gnunet-auto-share.c
- src/fs/gnunet-daemon-fsprofiler.c
- src/fs/gnunet-directory.c
- src/fs/gnunet-download.c
--src/fs/gnunet-fs.c
- src/fs/gnunet-fs-profiler.c
-+src/fs/gnunet-fs.c
- src/fs/gnunet-helper-fs-publish.c
- src/fs/gnunet-publish.c
- src/fs/gnunet-search.c
-@@ -176,10 +176,10 @@ src/gns/gns_tld_api.c
- src/gns/gnunet-bcd.c
- src/gns/gnunet-dns2gns.c
- src/gns/gnunet-gns-benchmark.c
--src/gns/gnunet-gns.c
- src/gns/gnunet-gns-helper-service-w32.c
- src/gns/gnunet-gns-import.c
- src/gns/gnunet-gns-proxy.c
-+src/gns/gnunet-gns.c
- src/gns/gnunet-service-gns.c
- src/gns/gnunet-service-gns_interceptor.c
- src/gns/gnunet-service-gns_resolver.c
-@@ -187,19 +187,19 @@ src/gns/nss/nss_gns.c
- src/gns/nss/nss_gns_query.c
- src/gns/plugin_block_gns.c
- src/gns/plugin_gnsrecord_gns.c
-+src/gns/w32nsp-install.c
-+src/gns/w32nsp-resolve.c
-+src/gns/w32nsp-uninstall.c
-+src/gns/w32nsp.c
- src/gnsrecord/gnsrecord.c
- src/gnsrecord/gnsrecord_crypto.c
- src/gnsrecord/gnsrecord_misc.c
- src/gnsrecord/gnsrecord_serialization.c
- src/gnsrecord/plugin_gnsrecord_dns.c
--src/gns/w32nsp.c
--src/gns/w32nsp-install.c
--src/gns/w32nsp-resolve.c
--src/gns/w32nsp-uninstall.c
- src/hello/address.c
- src/hello/gnunet-hello.c
--src/hello/hello.c
- src/hello/hello-ng.c
-+src/hello/hello.c
- src/hostlist/gnunet-daemon-hostlist.c
- src/hostlist/gnunet-daemon-hostlist_client.c
- src/hostlist/gnunet-daemon-hostlist_server.c
-@@ -222,8 +222,8 @@ src/namecache/namecache_api.c
- src/namecache/plugin_namecache_flat.c
- src/namecache/plugin_namecache_postgres.c
- src/namecache/plugin_namecache_sqlite.c
--src/namestore/gnunet-namestore.c
- src/namestore/gnunet-namestore-fcfsd.c
-+src/namestore/gnunet-namestore.c
- src/namestore/gnunet-service-namestore.c
- src/namestore/gnunet-zoneimport.c
- src/namestore/namestore_api.c
-@@ -238,10 +238,10 @@ src/nat-auto/gnunet-service-nat-auto.c
- src/nat-auto/gnunet-service-nat-auto_legacy.c
- src/nat-auto/nat_auto_api.c
- src/nat-auto/nat_auto_api_test.c
--src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-client-windows.c
--src/nat/gnunet-helper-nat-server.c
-+src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-server-windows.c
-+src/nat/gnunet-helper-nat-server.c
- src/nat/gnunet-nat.c
- src/nat/gnunet-service-nat.c
- src/nat/gnunet-service-nat_externalip.c
-@@ -250,16 +250,16 @@ src/nat/gnunet-service-nat_mini.c
- src/nat/gnunet-service-nat_stun.c
- src/nat/nat_api.c
- src/nat/nat_api_stun.c
--src/nse/gnunet-nse.c
- src/nse/gnunet-nse-profiler.c
-+src/nse/gnunet-nse.c
- src/nse/gnunet-service-nse.c
- src/nse/nse_api.c
- src/nt/nt.c
-+src/peerinfo-tool/gnunet-peerinfo.c
-+src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerinfo/gnunet-service-peerinfo.c
- src/peerinfo/peerinfo_api.c
- src/peerinfo/peerinfo_api_notify.c
--src/peerinfo-tool/gnunet-peerinfo.c
--src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerstore/gnunet-peerstore.c
- src/peerstore/gnunet-service-peerstore.c
- src/peerstore/peerstore_api.c
-@@ -295,7 +295,6 @@ src/regex/regex_internal_dht.c
- src/regex/regex_test_graph.c
- src/regex/regex_test_lib.c
- src/regex/regex_test_random.c
--src/rest/gnunet-rest-server.c
- src/rest-plugins/json_reclaim.c
- src/rest-plugins/oidc_helper.c
- src/rest-plugins/plugin_rest_copying.c
-@@ -306,27 +305,28 @@ src/rest-plugins/plugin_rest_namestore.c
- src/rest-plugins/plugin_rest_openid_connect.c
- src/rest-plugins/plugin_rest_peerinfo.c
- src/rest-plugins/plugin_rest_reclaim.c
-+src/rest/gnunet-rest-server.c
- src/rest/rest.c
- src/revocation/gnunet-revocation.c
- src/revocation/gnunet-service-revocation.c
- src/revocation/plugin_block_revocation.c
- src/revocation/revocation_api.c
--src/rps/gnunet-rps.c
- src/rps/gnunet-rps-profiler.c
-+src/rps/gnunet-rps.c
- src/rps/gnunet-service-rps.c
- src/rps/gnunet-service-rps_custommap.c
- src/rps/gnunet-service-rps_sampler.c
- src/rps/gnunet-service-rps_sampler_elem.c
- src/rps/gnunet-service-rps_view.c
--src/rps/rps_api.c
- src/rps/rps-sampler_client.c
- src/rps/rps-sampler_common.c
- src/rps/rps-test_util.c
-+src/rps/rps_api.c
- src/scalarproduct/gnunet-scalarproduct.c
--src/scalarproduct/gnunet-service-scalarproduct_alice.c
--src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
-+src/scalarproduct/gnunet-service-scalarproduct_alice.c
-+src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/scalarproduct_api.c
- src/secretsharing/gnunet-secretsharing-profiler.c
- src/secretsharing/gnunet-service-secretsharing.c
-@@ -352,15 +352,16 @@ src/statistics/gnunet-statistics.c
- src/statistics/statistics_api.c
- src/template/gnunet-service-template.c
- src/template/gnunet-template.c
-+src/testbed-logger/gnunet-service-testbed-logger.c
-+src/testbed-logger/testbed_logger_api.c
- src/testbed/generate-underlay-topology.c
- src/testbed/gnunet-daemon-latency-logger.c
- src/testbed/gnunet-daemon-testbed-blacklist.c
- src/testbed/gnunet-daemon-testbed-underlay.c
- src/testbed/gnunet-helper-testbed.c
--src/testbed/gnunet_mpi_test.c
- src/testbed/gnunet-service-test-barriers.c
--src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed.c
-+src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed_cache.c
- src/testbed/gnunet-service-testbed_connectionpool.c
- src/testbed/gnunet-service-testbed_cpustatus.c
-@@ -368,20 +369,19 @@ src/testbed/gnunet-service-testbed_links
- src/testbed/gnunet-service-testbed_meminfo.c
- src/testbed/gnunet-service-testbed_oc.c
- src/testbed/gnunet-service-testbed_peers.c
--src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/gnunet-testbed-profiler.c
--src/testbed-logger/gnunet-service-testbed-logger.c
--src/testbed-logger/testbed_logger_api.c
--src/testbed/testbed_api_barriers.c
-+src/testbed/gnunet_mpi_test.c
-+src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/testbed_api.c
-+src/testbed/testbed_api_barriers.c
- src/testbed/testbed_api_hosts.c
- src/testbed/testbed_api_operations.c
- src/testbed/testbed_api_peers.c
- src/testbed/testbed_api_sd.c
- src/testbed/testbed_api_services.c
- src/testbed/testbed_api_statistics.c
--src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_test.c
-+src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_topology.c
- src/testbed/testbed_api_underlay.c
- src/testing/gnunet-testing.c
-@@ -393,29 +393,29 @@ src/transport/gnunet-communicator-tcp.c
- src/transport/gnunet-communicator-udp.c
- src/transport/gnunet-communicator-unix.c
- src/transport/gnunet-helper-transport-bluetooth.c
--src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-helper-transport-wlan-dummy.c
-+src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-service-tng.c
--src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport.c
-+src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport_hello.c
- src/transport/gnunet-service-transport_manipulation.c
- src/transport/gnunet-service-transport_neighbours.c
- src/transport/gnunet-service-transport_plugins.c
- src/transport/gnunet-service-transport_validation.c
--src/transport/gnunet-transport.c
- src/transport/gnunet-transport-certificate-creation.c
- src/transport/gnunet-transport-profiler.c
- src/transport/gnunet-transport-wlan-receiver.c
- src/transport/gnunet-transport-wlan-sender.c
-+src/transport/gnunet-transport.c
- src/transport/plugin_transport_http_client.c
- src/transport/plugin_transport_http_common.c
- src/transport/plugin_transport_http_server.c
- src/transport/plugin_transport_smtp.c
- src/transport/plugin_transport_tcp.c
- src/transport/plugin_transport_template.c
--src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_udp.c
-+src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_unix.c
- src/transport/plugin_transport_wlan.c
- src/transport/plugin_transport_xt.c
-@@ -424,6 +424,11 @@ src/transport/tcp_connection_legacy.c
- src/transport/tcp_server_legacy.c
- src/transport/tcp_server_mst_legacy.c
- src/transport/tcp_service_legacy.c
-+src/transport/transport-testing-filenames.c
-+src/transport/transport-testing-loggers.c
-+src/transport/transport-testing-main.c
-+src/transport/transport-testing-send.c
-+src/transport/transport-testing.c
- src/transport/transport_api2_address.c
- src/transport/transport_api2_communication.c
- src/transport/transport_api2_core.c
-@@ -436,11 +441,6 @@ src/transport/transport_api_manipulation
- src/transport/transport_api_monitor_peers.c
- src/transport/transport_api_monitor_plugins.c
- src/transport/transport_api_offer_hello.c
--src/transport/transport-testing.c
--src/transport/transport-testing-filenames.c
--src/transport/transport-testing-loggers.c
--src/transport/transport-testing-main.c
--src/transport/transport-testing-send.c
- src/util/bandwidth.c
- src/util/benchmark.c
- src/util/bio.c
-@@ -453,8 +453,8 @@ src/util/configuration_loader.c
- src/util/container_bloomfilter.c
- src/util/container_heap.c
- src/util/container_meta_data.c
--src/util/container_multihashmap32.c
- src/util/container_multihashmap.c
-+src/util/container_multihashmap32.c
- src/util/container_multipeermap.c
- src/util/container_multishortmap.c
- src/util/crypto_abe.c
-@@ -476,15 +476,15 @@ src/util/dnsparser.c
- src/util/dnsstub.c
- src/util/getopt.c
- src/util/getopt_helpers.c
--src/util/gnunet-config.c
- src/util/gnunet-config-diff.c
-+src/util/gnunet-config.c
- src/util/gnunet-ecc.c
- src/util/gnunet-helper-w32-console.c
- src/util/gnunet-resolver.c
- src/util/gnunet-scrypt.c
- src/util/gnunet-service-resolver.c
--src/util/gnunet-timeout.c
- src/util/gnunet-timeout-w32.c
-+src/util/gnunet-timeout.c
- src/util/gnunet-uri.c
- src/util/helper.c
- src/util/load.c
-@@ -513,13 +513,13 @@ src/util/tun.c
- src/util/w32cat.c
- src/util/win.c
- src/util/winproc.c
--src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-helper-vpn-windows.c
-+src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-service-vpn.c
- src/vpn/gnunet-vpn.c
- src/vpn/vpn_api.c
--src/zonemaster/gnunet-service-zonemaster.c
- src/zonemaster/gnunet-service-zonemaster-monitor.c
-+src/zonemaster/gnunet-service-zonemaster.c
- src/fs/fs_api.h
- src/include/compat.h
- src/include/gnunet_common.h
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,6 +47,7 @@ gnunetinclude_HEADERS = \
- gnunet_container_lib.h \
- gnunet_conversation_service.h \
- gnunet_core_service.h \
-+ gnunet_credential_service.h \
- gnunet_crypto_lib.h \
- gnunet_curl_lib.h \
- gnunet_datacache_lib.h \
---- /dev/null
-+++ b/src/include/gnunet_credential_service.h
-@@ -0,0 +1,375 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2014 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @author Martin Schanzenbach
-+ *
-+ * @file
-+ * API to the Credential service
-+ *
-+ * @defgroup credential Credential service
-+ * Credentials
-+ *
-+ * @{
-+ */
-+#ifndef GNUNET_CREDENTIAL_SERVICE_H
-+#define GNUNET_CREDENTIAL_SERVICE_H
-+
-+#include "gnunet_util_lib.h"
-+#include "gnunet_gns_service.h"
-+#include "gnunet_identity_service.h"
-+
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#if 0 /* keep Emacsens' auto-indent happy */
-+}
-+#endif
-+#endif
-+
-+
-+/**
-+ * Connection to the Credential service.
-+ */
-+struct GNUNET_CREDENTIAL_Handle;
-+
-+/**
-+ * Handle to control a lookup operation.
-+ */
-+struct GNUNET_CREDENTIAL_Request;
-+
-+/*
-+* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
-+*/
-+enum GNUNET_CREDENTIAL_CredentialFlags {
-+
-+ //Subject had credentials before, but have been revoked now
-+ GNUNET_CREDENTIAL_FLAG_REVOKED=0,
-+
-+ //Subject flag indicates that the subject is a holder of this credential and may present it as such
-+ GNUNET_CREDENTIAL_FLAG_SUBJECT=1,
-+
-+ //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
-+ GNUNET_CREDENTIAL_FLAG_ISSUER=2
-+
-+};
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecord {
-+
-+ /**
-+ * Number of delegation sets in this record
-+ */
-+ uint32_t set_count;
-+
-+ /**
-+ * Length of delegation sets
-+ */
-+ uint64_t data_size;
-+ /**
-+ * Followed by set_count DelegationSetRecords
-+ *
-+ */
-+};
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecordSet {
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Length of attribute, may be 0
-+ */
-+ uint32_t subject_attribute_len;
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationSet {
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ uint32_t subject_attribute_len;
-+
-+ /**
-+ * The subject attribute
-+ */
-+ const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A delegation
-+ */
-+struct GNUNET_CREDENTIAL_Delegation {
-+
-+ /**
-+ * The issuer of the delegation
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *issuer_attribute;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t subject_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A credential
-+ */
-+struct GNUNET_CREDENTIAL_Credential {
-+
-+ /**
-+ * The issuer of the credential
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this credential was issued to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Signature of this credential
-+ */
-+ struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+ /**
-+ * Expiration of this credential
-+ */
-+ struct GNUNET_TIME_Absolute expiration;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *issuer_attribute;
-+
-+};
-+
-+
-+
-+/**
-+ * Initialize the connection with the Credential service.
-+ *
-+ * @param cfg configuration to use
-+ * @return handle to the Credential service, or NULL on error
-+ */
-+struct GNUNET_CREDENTIAL_Handle *
-+GNUNET_CREDENTIAL_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
-+
-+
-+/**
-+ * Shutdown connection with the Credentail service.
-+ *
-+ * @param handle connection to shut down
-+ */
-+void
-+GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle);
-+
-+
-+/**
-+ * Iterator called on obtained result for an attribute verification.
-+ *
-+ * @param cls closure
-+ * @param d_count the number of delegations processed
-+ * @param delegation_chain the delegations processed
-+ * @param c_count the number of credentials found
-+ * @param credential the credentials
-+ */
-+typedef void (*GNUNET_CREDENTIAL_CredentialResultProcessor) (void *cls,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_Delegation *delegation_chain,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *credential);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls,
-+ uint32_t success);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation removal.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls,
-+ uint32_t success);
-+
-+
-+/**
-+ * Performs attribute verification.
-+ * Checks if there is a delegation chain from
-+ * attribute ``issuer_attribute'' issued by the issuer
-+ * with public key ``issuer_key'' maps to the attribute
-+ * ``subject_attribute'' claimed by the subject with key
-+ * ``subject_key''
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer_key the issuer public key
-+ * @param issuer_attribute the issuer attribute
-+ * @param subject_key the subject public key
-+ * @param credential_count number of credentials
-+ * @param credentials the subject credentials
-+ * @param proc function to call on result
-+ * @param proc_cls closure for processor
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+ const char *issuer_attribute,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
-+ uint32_t credential_count,
-+ const struct GNUNET_CREDENTIAL_Credential *credentials,
-+ GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+ void *proc_cls);
-+
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+ const char *issuer_attribute,
-+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
-+ GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+ void *proc_cls);
-+
-+/**
-+ * Delegate an attribute
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that should be used to delegate the attribute
-+ * @param attribute the name of the attribute to delegate
-+ * @param subject the subject of the delegation
-+ * @param delegated_attribute the name of the attribute that is delegated to
-+ * @param proc the result callback
-+ * @param proc_cls the result closure context
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+ struct GNUNET_IDENTITY_Ego *issuer,
-+ const char *attribute,
-+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+ const char *delegated_attribute,
-+ GNUNET_CREDENTIAL_DelegateResultProcessor proc,
-+ void *proc_cls);
-+
-+/**
-+ * Remove a delegation
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that was used to delegate the attribute
-+ * @param attribute the name of the attribute that is delegated
-+ * @param proc the callback
-+ * @param proc_cls callback closure
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+ struct GNUNET_IDENTITY_Ego *issuer,
-+ const char *attribute,
-+ GNUNET_CREDENTIAL_RemoveDelegateResultProcessor proc,
-+ void *proc_cls);
-+
-+
-+
-+/**
-+ * Issue an attribute to a subject
-+ *
-+ * @param issuer the ego that should be used to issue the attribute
-+ * @param subject the subject of the attribute
-+ * @param attribute the name of the attribute
-+ * @param expiration the TTL of the credential
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+ const char *attribute,
-+ struct GNUNET_TIME_Absolute *expiration);
-+
-+
-+
-+/**
-+ * Cancel pending lookup request
-+ *
-+ * @param lr the lookup request to cancel
-+ */
-+void
-+GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr);
-+
-+
-+#if 0 /* keep Emacsens' auto-indent happy */
-+{
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+
-+/** @} */ /* end of group */
+++ /dev/null
-From 5be7a51b0980909719670953c938ee724627ad90 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 15:30:26 +0100
-Subject: [PATCH] credential: include headers in dist sources
-
----
- src/credential/Makefile.am | 3 +++
- src/include/Makefile.am | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
---- a/src/credential/Makefile.am
-+++ b/src/credential/Makefile.am
-@@ -68,8 +68,11 @@ gnunet_service_credential_LDADD = \
-
-
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
- credential_api.c \
-+ credential_serialization.h \
- credential_serialization.c \
-+ credential_misc.h \
- credential_misc.c
- libgnunetcredential_la_LIBADD = \
- $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,7 +47,7 @@ gnunetinclude_HEADERS = \
- gnunet_container_lib.h \
- gnunet_conversation_service.h \
- gnunet_core_service.h \
-- gnunet_credential_service.h \
-+ gnunet_credential_service.h \
- gnunet_crypto_lib.h \
- gnunet_curl_lib.h \
- gnunet_datacache_lib.h \
-@@ -107,7 +107,7 @@ gnunetinclude_HEADERS = \
- gnunet_regex_service.h \
- gnunet_rest_lib.h \
- gnunet_rest_plugin.h \
-- gnunet_rps_service.h \
-+ gnunet_rps_service.h \
- gnunet_revocation_service.h \
- gnunet_scalarproduct_service.h \
- gnunet_scheduler_lib.h \
---- /dev/null
-+++ b/src/credential/credential.h
-@@ -0,0 +1,221 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2013 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential.h
-+ * @brief IPC messages between CREDENTIAL API and CREDENTIAL service
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_H
-+#define CREDENTIAL_H
-+
-+#include "gnunet_credential_service.h"
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+
-+/**
-+ * Message from client to Credential service to collect credentials.
-+ */
-+struct CollectMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Subject public key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPrivateKey subject_key;
-+
-+ /**
-+ * Trust anchor
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Length of the issuer attribute
-+ */
-+ uint16_t issuer_attribute_len;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /* Followed by the zero-terminated attribute */
-+
-+};
-+
-+
-+/**
-+ * Message from client to Credential service to verify attributes.
-+ */
-+struct VerifyMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Subject public key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Trust anchor
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Number of credentials
-+ */
-+ uint32_t c_count;
-+
-+ /**
-+ * Length of the issuer attribute
-+ */
-+ uint16_t issuer_attribute_len;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /* Followed by the zero-terminated attribute and credentials to look up */
-+
-+};
-+
-+
-+/**
-+ * Message from CREDENTIAL service to client: new results.
-+ */
-+struct DelegationChainResultMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /**
-+ * Indicates if credential has been found at all
-+ */
-+ uint32_t cred_found GNUNET_PACKED;
-+
-+ /**
-+ * The number of delegations in the response
-+ */
-+ uint32_t d_count GNUNET_PACKED;
-+
-+ /**
-+ * The number of credentials in the response
-+ */
-+ uint32_t c_count GNUNET_PACKED;
-+
-+ /* followed by ad_count GNUNET_CREDENTIAL_RecordData structs*/
-+
-+};
-+
-+struct DelegationRecordData
-+{
-+ /**
-+ * Subject key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Subject attributes
-+ */
-+ uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct ChainEntry
-+{
-+ /**
-+ * Issuer key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Subject key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Issuer attributes
-+ */
-+ uint32_t issuer_attribute_len GNUNET_PACKED;
-+
-+ /**
-+ * Subject attributes
-+ */
-+ uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct CredentialEntry
-+{
-+
-+ /**
-+ * The signature for this credential by the issuer
-+ */
-+ struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+ /**
-+ * Signature meta
-+ */
-+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-+
-+ /**
-+ * Public key of the issuer
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this credential was issued to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Expiration time of this credential
-+ */
-+ uint64_t expiration GNUNET_PACKED;
-+
-+ /**
-+ * Issuer attribute length
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * Followed by the attribute string
-+ */
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+#endif
-+
---- /dev/null
-+++ b/src/credential/credential_misc.h
-@@ -0,0 +1,35 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2013 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential_misc.h
-+ * @brief Credential helper functions
-+ */
-+#ifndef CREDENTIAL_MISC_H
-+#define CREDENTIAL_MISC_H
-+
-+
-+
-+char*
-+GNUNET_CREDENTIAL_credential_to_string (const struct GNUNET_CREDENTIAL_Credential *cred);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_from_string (const char* str);
-+
-+#endif
---- /dev/null
-+++ b/src/credential/credential_serialization.h
-@@ -0,0 +1,159 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2009-2013, 2016 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+
-+/**
-+ * @file credential/credential_serialization.h
-+ * @brief API to serialize and deserialize delegation chains
-+ * and credentials
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_SERIALIZATION_H
-+#define CREDENTIAL_SERIALIZATION_H
-+
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_constants.h"
-+#include "gnunet_credential_service.h"
-+
-+/**
-+ * Calculate how many bytes we will need to serialize
-+ * the given delegation record
-+ *
-+ * @param ds_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @return the required size to serialize
-+ */
-+size_t
-+GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
-+ const struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+/**
-+ * Serizalize the given delegation record entries
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @param dest_size size of the destination
-+ * @param dest where to store the result
-+ * @return the size of the data, -1 on failure
-+ */
-+ssize_t
-+GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_DelegationSet *dsr,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+/**
-+ * Deserialize the given destination
-+ *
-+ * @param len size of the serialized delegation recird
-+ * @param src the serialized data
-+ * @param d_count the number of delegation chain entries
-+ * @param dsr where to put the delegation chain entries
-+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+ */
-+int
-+GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
-+ const char *src,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+ /**
-+ * Calculate how many bytes we will need to serialize
-+ * the given delegation chain and credential
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+ * @param c_count number of credential entries
-+ * @param cd a #GNUNET_CREDENTIAL_Credential
-+ * @return the required size to serialize
-+ */
-+ size_t
-+ GNUNET_CREDENTIAL_delegation_chain_get_size (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+ /**
-+ * Serizalize the given delegation chain entries and credential
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+ * @param c_count number of credential entries
-+ * @param cd a #GNUNET_CREDENTIAL_Credential
-+ * @param dest_size size of the destination
-+ * @param dest where to store the result
-+ * @return the size of the data, -1 on failure
-+ */
-+ ssize_t
-+ GNUNET_CREDENTIAL_delegation_chain_serialize (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+ /**
-+ * Deserialize the given destination
-+ *
-+ * @param len size of the serialized delegation chain and cred
-+ * @param src the serialized data
-+ * @param d_count the number of delegation chain entries
-+ * @param dd where to put the delegation chain entries
-+ * @param c_count number of credential entries
-+ * @param cd where to put the credential data
-+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+ */
-+ int
-+ GNUNET_CREDENTIAL_delegation_chain_deserialize (size_t len,
-+ const char *src,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *cd);
-+ size_t
-+ GNUNET_CREDENTIAL_credentials_get_size (unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+ssize_t
-+GNUNET_CREDENTIAL_credentials_serialize (unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credentials_deserialize (size_t len,
-+ const char *src,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credential_serialize (struct GNUNET_CREDENTIAL_Credential *cred,
-+ char **data);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_deserialize (const char* data,
-+ size_t data_size);
-+#endif
-+/* end of credential_serialization.h */
---- a/src/credential/Makefile.in
-+++ b/src/credential/Makefile.in
-@@ -714,8 +714,11 @@ gnunet_service_credential_LDADD = \
- $(GN_LIBINTL)
-
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
- credential_api.c \
-+ credential_serialization.h \
- credential_serialization.c \
-+ credential_misc.h \
- credential_misc.c
-
- libgnunetcredential_la_LIBADD = \
+++ /dev/null
-From c776664d488028f844ae6045e60f693a8624bfac Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:06:06 +0100
-Subject: [PATCH] reclaim-attribute: include header in dist sources
-
----
- src/reclaim-attribute/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/src/reclaim-attribute/Makefile.am
-+++ b/src/reclaim-attribute/Makefile.am
-@@ -20,6 +20,7 @@ lib_LTLIBRARIES = \
- libgnunetreclaimattribute.la
-
- libgnunetreclaimattribute_la_SOURCES = \
-+ reclaim_attribute.h \
- reclaim_attribute.c
- libgnunetreclaimattribute_la_LIBADD = \
- $(top_builddir)/src/util/libgnunetutil.la \
---- /dev/null
-+++ b/src/reclaim-attribute/reclaim_attribute.h
-@@ -0,0 +1,56 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2012-2015 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @author Martin Schanzenbach
-+ * @file reclaim-attribute/reclaim_attribute.h
-+ * @brief GNUnet reclaim identity attributes
-+ *
-+ */
-+#ifndef RECLAIM_ATTRIBUTE_H
-+#define RECLAIM_ATTRIBUTE_H
-+
-+#include "gnunet_reclaim_service.h"
-+
-+struct Attribute
-+{
-+ /**
-+ * Attribute type
-+ */
-+ uint32_t attribute_type;
-+
-+ /**
-+ * Attribute version
-+ */
-+ uint32_t attribute_version;
-+
-+ /**
-+ * Name length
-+ */
-+ uint32_t name_len;
-+
-+ /**
-+ * Data size
-+ */
-+ uint32_t data_size;
-+
-+ //followed by data_size Attribute value data
-+};
-+
-+#endif
+++ /dev/null
-From 6c0f43552d627b93f99f7fd40d63815f323958c3 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:16:13 +0100
-Subject: [PATCH] reclaim: include reclaim.conf in source dist
-
----
- src/reclaim/Makefile.am | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/src/reclaim/Makefile.am
-+++ b/src/reclaim/Makefile.am
-@@ -17,9 +17,10 @@ SQLITE_PLUGIN = libgnunet_plugin_reclaim
- endif
-
- EXTRA_DIST = \
-+ reclaim.conf \
- test_reclaim_defaults.conf \
-- test_reclaim.conf \
-- $(check_SCRIPTS)
-+ test_reclaim.conf \
-+ $(check_SCRIPTS)
-
- pkgcfgdir= $(pkgdatadir)/config.d/
-
---- /dev/null
-+++ b/src/reclaim/reclaim.conf
-@@ -0,0 +1,23 @@
-+[reclaim]
-+START_ON_DEMAND = NO
-+RUN_PER_USER = YES
-+#PORT = 2108
-+HOSTNAME = localhost
-+BINARY = gnunet-service-reclaim
-+ACCEPT_FROM = 127.0.0.1;
-+ACCEPT_FROM6 = ::1;
-+UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-reclaim.sock
-+UNIX_MATCH_UID = NO
-+UNIX_MATCH_GID = YES
-+TOKEN_EXPIRATION_INTERVAL = 30 m
-+DATABASE = sqlite
-+
-+[reclaim-rest-plugin]
-+#ADDRESS = https://identity.gnu:8000#/login
-+ADDRESS = https://ui.reclaim/#/login
-+PSW = secret
-+JWT_SECRET = secret
-+EXPIRATION_TIME = 1d
-+
-+[reclaim-sqlite]
-+FILENAME = $GNUNET_DATA_HOME/reclaim/sqlite.db
+++ /dev/null
-From da16f9c20dda74dc689c9564d1791cc2af3ede9d Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:23:40 +0100
-Subject: [PATCH] rest-plugins: include headers in dist sources
-
----
- src/rest-plugins/Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/src/rest-plugins/Makefile.am
-+++ b/src/rest-plugins/Makefile.am
-@@ -30,6 +30,7 @@ endif
-
- libgnunet_plugin_rest_reclaim_la_SOURCES = \
- plugin_rest_reclaim.c \
-+ json_reclaim.h \
- json_reclaim.c
- libgnunet_plugin_rest_reclaim_la_LIBADD = \
- $(top_builddir)/src/identity/libgnunetidentity.la \
-@@ -117,6 +118,7 @@ libgnunet_plugin_rest_gns_la_LDFLAGS = \
-
- libgnunet_plugin_rest_openid_connect_la_SOURCES = \
- plugin_rest_openid_connect.c \
-+ oidc_helper.h \
- oidc_helper.c
- libgnunet_plugin_rest_openid_connect_la_LIBADD = \
- $(top_builddir)/src/identity/libgnunetidentity.la \
---- /dev/null
-+++ b/src/rest-plugins/oidc_helper.h
-@@ -0,0 +1,111 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2010-2015 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @file reclaim/oidc_helper.h
-+ * @brief helper library for OIDC related functions
-+ * @author Martin Schanzenbach
-+ */
-+
-+#ifndef JWT_H
-+#define JWT_H
-+
-+#define JWT_ALG "alg"
-+
-+/* Use 512bit HMAC */
-+#define JWT_ALG_VALUE "HS512"
-+
-+#define JWT_TYP "typ"
-+
-+#define JWT_TYP_VALUE "jwt"
-+
-+#define SERVER_ADDRESS "https://api.reclaim"
-+
-+/**
-+ * Create a JWT from attributes
-+ *
-+ * @param aud_key the public of the audience
-+ * @param sub_key the public key of the subject
-+ * @param attrs the attribute list
-+ * @param expiration_time the validity of the token
-+ * @param secret_key the key used to sign the JWT
-+ * @return a new base64-encoded JWT string.
-+ */
-+char*
-+OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
-+ const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
-+ const struct GNUNET_TIME_Relative *expiration_time,
-+ const char *nonce,
-+ const char *secret_key);
-+
-+/**
-+ * Builds an OIDC authorization code including
-+ * a reclaim ticket and nonce
-+ *
-+ * @param issuer the issuer of the ticket, used to sign the ticket and nonce
-+ * @param ticket the ticket to include in the code
-+ * @param nonce the nonce to include in the code
-+ * @return a new authorization code (caller must free)
-+ */
-+char*
-+OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+ const struct GNUNET_RECLAIM_Ticket *ticket,
-+ const char* nonce);
-+
-+/**
-+ * Parse reclaim ticket and nonce from
-+ * authorization code.
-+ * This also verifies the signature in the code.
-+ *
-+ * @param audience the expected audience of the code
-+ * @param code the string representation of the code
-+ * @param ticket where to store the ticket
-+ * @param nonce where to store the nonce
-+ * @return GNUNET_OK if successful, else GNUNET_SYSERR
-+ */
-+int
-+OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
-+ const char* code,
-+ struct GNUNET_RECLAIM_Ticket **ticket,
-+ char **nonce);
-+
-+/**
-+ * Build a token response for a token request
-+ * TODO: Maybe we should add the scope here?
-+ *
-+ * @param access_token the access token to include
-+ * @param id_token the id_token to include
-+ * @param expiration_time the expiration time of the token(s)
-+ * @param token_response where to store the response
-+ */
-+void
-+OIDC_build_token_response (const char *access_token,
-+ const char *id_token,
-+ const struct GNUNET_TIME_Relative *expiration_time,
-+ char **token_response);
-+/**
-+ * Generate a new access token
-+ */
-+char*
-+OIDC_access_token_new ();
-+
-+
-+#endif
---- /dev/null
-+++ b/src/rest-plugins/json_reclaim.h
-@@ -0,0 +1,48 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2009-2018 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+/**
-+ * @file rest-plugins/json_reclaim.h
-+ * @brief JSON handling of reclaim data
-+ * @author Martin Schanzenbach
-+ */
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_json_lib.h"
-+#include "gnunet_reclaim_service.h"
-+#include "gnunet_reclaim_attribute_lib.h"
-+
-+/**
-+ * JSON Specification for Reclaim claims.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_ATTRIBUTE_Claim to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_claim (struct GNUNET_RECLAIM_ATTRIBUTE_Claim **attr);
-+
-+/**
-+ * JSON Specification for Reclaim tickets.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_Ticket to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_ticket (struct GNUNET_RECLAIM_Ticket **ticket);
--- /dev/null
+diff --git a/src/include/Makefile.am b/src/include/Makefile.am
+index ca0f6050d..bd8eca256 100644
+--- a/src/include/Makefile.am
++++ b/src/include/Makefile.am
+@@ -127,6 +127,7 @@ gnunetinclude_HEADERS = \
+ gnunet_time_lib.h \
+ gnunet_transport_service.h \
+ gnunet_transport_address_service.h \
++ gnunet_transport_application_service.h \
+ gnunet_transport_communication_service.h \
+ gnunet_transport_core_service.h \
+ gnunet_transport_hello_service.h \
+--- /dev/null 2019-04-03 22:31:17.799489053 +0200
++++ b/src/include/gnunet_transport_application_service.h 2019-04-05 14:30:10.326602964 +0200
+@@ -0,0 +1,100 @@
++/*
++ This file is part of GNUnet.
++ Copyright (C) 2010-2015, 2018, 2019 GNUnet e.V.
++
++ GNUnet is free software: you can redistribute it and/or modify it
++ under the terms of the GNU Affero General Public License as published
++ by the Free Software Foundation, either version 3 of the License,
++ or (at your option) any later version.
++
++ GNUnet is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Affero General Public License for more details.
++
++ You should have received a copy of the GNU Affero General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ SPDX-License-Identifier: AGPL3.0-or-later
++ */
++/**
++ * @file
++ * Bandwidth allocation API for applications to interact with
++ *
++ * @author Christian Grothoff
++ * @author Matthias Wachs
++ *
++ * @defgroup TRANSPORT service
++ * Bandwidth allocation
++ *
++ * @{
++ */
++#ifndef GNUNET_TRANSPORT_APPLICATION_SERVICE_H
++#define GNUNET_TRANSPORT_APPLICATION_SERVICE_H
++
++#include "gnunet_constants.h"
++#include "gnunet_util_lib.h"
++
++/**
++ * Handle to the TRANSPORT subsystem for making suggestions about
++ * connections the peer would like to have.
++ */
++struct GNUNET_TRANSPORT_ApplicationHandle;
++
++
++/**
++ * Initialize the TRANSPORT application client handle.
++ *
++ * @param cfg configuration to use
++ * @return ats application handle, NULL on error
++ */
++struct GNUNET_TRANSPORT_ApplicationHandle *
++GNUNET_TRANSPORT_application_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
++
++
++/**
++ * Shutdown TRANSPORT application client.
++ *
++ * @param ch handle to destroy
++ */
++void
++GNUNET_TRANSPORT_application_done (struct GNUNET_TRANSPORT_ApplicationHandle *ch);
++
++
++/**
++ * Handle for suggestion requests.
++ */
++struct GNUNET_TRANSPORT_ApplicationSuggestHandle;
++
++
++/**
++ * An application would like to communicate with a peer. TRANSPORT should
++ * allocate bandwith using a suitable address for requiremetns @a pk
++ * to transport.
++ *
++ * @param ch handle
++ * @param peer identity of the peer we need an address for
++ * @param pk what kind of application will the application require (can be
++ * #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect)
++ * @param bw desired bandwith, can be zero (we will still try to connect)
++ * @return suggestion handle, NULL if request is already pending
++ */
++struct GNUNET_TRANSPORT_ApplicationSuggestHandle *
++GNUNET_TRANSPORT_application_suggest (struct GNUNET_TRANSPORT_ApplicationHandle *ch,
++ const struct GNUNET_PeerIdentity *peer,
++ enum GNUNET_MQ_PreferenceKind pk,
++ struct GNUNET_BANDWIDTH_Value32NBO bw);
++
++
++/**
++ * We no longer care about communicating with a peer.
++ *
++ * @param sh handle
++ */
++void
++GNUNET_TRANSPORT_application_suggest_cancel (struct GNUNET_TRANSPORT_ApplicationSuggestHandle *sh);
++
++/** @} */ /* end of group */
++
++#endif
++/* end of file gnunet_ats_application_service.h */
--- /dev/null
+From 53969c9d9a95234ee845fa0542a330f788ad2a2c Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Fri, 5 Apr 2019 14:41:44 +0200
+Subject: [PATCH] include credential_*.h in dist
+
+---
+ src/credential/Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/credential/Makefile.am b/src/credential/Makefile.am
+index aaac0d2c2..f2550eca6 100644
+--- a/src/credential/Makefile.am
++++ b/src/credential/Makefile.am
+@@ -70,7 +70,9 @@ gnunet_service_credential_LDADD = \
+ libgnunetcredential_la_SOURCES = \
+ credential_api.c credential.h \
+ credential_serialization.c \
+- credential_misc.c
++ credential_serialization.h \
++ credential_misc.c \
++ credential_misc.h
+ libgnunetcredential_la_LIBADD = \
+ $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
+ libgnunetcredential_la_LDFLAGS = \
+--
+2.21.0
+
+--- /dev/null 2019-04-03 22:31:17.799489053 +0200
++++ b/src/credential/credential_serialization.h 2019-01-28 21:42:05.304419524 +0100
+@@ -0,0 +1,159 @@
++/*
++ This file is part of GNUnet.
++ Copyright (C) 2009-2013, 2016 GNUnet e.V.
++
++ GNUnet is free software: you can redistribute it and/or modify it
++ under the terms of the GNU Affero General Public License as published
++ by the Free Software Foundation, either version 3 of the License,
++ or (at your option) any later version.
++
++ GNUnet is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Affero General Public License for more details.
++
++ You should have received a copy of the GNU Affero General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ SPDX-License-Identifier: AGPL3.0-or-later
++*/
++
++
++/**
++ * @file credential/credential_serialization.h
++ * @brief API to serialize and deserialize delegation chains
++ * and credentials
++ * @author Martin Schanzenbach
++ */
++#ifndef CREDENTIAL_SERIALIZATION_H
++#define CREDENTIAL_SERIALIZATION_H
++
++#include "platform.h"
++#include "gnunet_util_lib.h"
++#include "gnunet_constants.h"
++#include "gnunet_credential_service.h"
++
++/**
++ * Calculate how many bytes we will need to serialize
++ * the given delegation record
++ *
++ * @param ds_count number of delegation chain entries
++ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
++ * @return the required size to serialize
++ */
++size_t
++GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
++ const struct GNUNET_CREDENTIAL_DelegationSet *dsr);
++
++/**
++ * Serizalize the given delegation record entries
++ *
++ * @param d_count number of delegation chain entries
++ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
++ * @param dest_size size of the destination
++ * @param dest where to store the result
++ * @return the size of the data, -1 on failure
++ */
++ssize_t
++GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count,
++ const struct GNUNET_CREDENTIAL_DelegationSet *dsr,
++ size_t dest_size,
++ char *dest);
++
++
++/**
++ * Deserialize the given destination
++ *
++ * @param len size of the serialized delegation recird
++ * @param src the serialized data
++ * @param d_count the number of delegation chain entries
++ * @param dsr where to put the delegation chain entries
++ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
++ */
++int
++GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
++ const char *src,
++ unsigned int d_count,
++ struct GNUNET_CREDENTIAL_DelegationSet *dsr);
++
++ /**
++ * Calculate how many bytes we will need to serialize
++ * the given delegation chain and credential
++ *
++ * @param d_count number of delegation chain entries
++ * @param dd array of #GNUNET_CREDENTIAL_Delegation
++ * @param c_count number of credential entries
++ * @param cd a #GNUNET_CREDENTIAL_Credential
++ * @return the required size to serialize
++ */
++ size_t
++ GNUNET_CREDENTIAL_delegation_chain_get_size (unsigned int d_count,
++ const struct GNUNET_CREDENTIAL_Delegation *dd,
++ unsigned int c_count,
++ const struct GNUNET_CREDENTIAL_Credential *cd);
++
++ /**
++ * Serizalize the given delegation chain entries and credential
++ *
++ * @param d_count number of delegation chain entries
++ * @param dd array of #GNUNET_CREDENTIAL_Delegation
++ * @param c_count number of credential entries
++ * @param cd a #GNUNET_CREDENTIAL_Credential
++ * @param dest_size size of the destination
++ * @param dest where to store the result
++ * @return the size of the data, -1 on failure
++ */
++ ssize_t
++ GNUNET_CREDENTIAL_delegation_chain_serialize (unsigned int d_count,
++ const struct GNUNET_CREDENTIAL_Delegation *dd,
++ unsigned int c_count,
++ const struct GNUNET_CREDENTIAL_Credential *cd,
++ size_t dest_size,
++ char *dest);
++
++
++ /**
++ * Deserialize the given destination
++ *
++ * @param len size of the serialized delegation chain and cred
++ * @param src the serialized data
++ * @param d_count the number of delegation chain entries
++ * @param dd where to put the delegation chain entries
++ * @param c_count number of credential entries
++ * @param cd where to put the credential data
++ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
++ */
++ int
++ GNUNET_CREDENTIAL_delegation_chain_deserialize (size_t len,
++ const char *src,
++ unsigned int d_count,
++ struct GNUNET_CREDENTIAL_Delegation *dd,
++ unsigned int c_count,
++ struct GNUNET_CREDENTIAL_Credential *cd);
++ size_t
++ GNUNET_CREDENTIAL_credentials_get_size (unsigned int c_count,
++ const struct GNUNET_CREDENTIAL_Credential *cd);
++
++ssize_t
++GNUNET_CREDENTIAL_credentials_serialize (unsigned int c_count,
++ const struct GNUNET_CREDENTIAL_Credential *cd,
++ size_t dest_size,
++ char *dest);
++
++
++int
++GNUNET_CREDENTIAL_credentials_deserialize (size_t len,
++ const char *src,
++ unsigned int c_count,
++ struct GNUNET_CREDENTIAL_Credential *cd);
++
++
++int
++GNUNET_CREDENTIAL_credential_serialize (struct GNUNET_CREDENTIAL_Credential *cred,
++ char **data);
++
++struct GNUNET_CREDENTIAL_Credential*
++GNUNET_CREDENTIAL_credential_deserialize (const char* data,
++ size_t data_size);
++#endif
++/* end of credential_serialization.h */
+--- /dev/null 2019-04-03 22:31:17.799489053 +0200
++++ b/src/credential/credential_misc.h 2019-01-28 21:42:05.304419524 +0100
+@@ -0,0 +1,35 @@
++/*
++ This file is part of GNUnet
++ Copyright (C) 2012-2013 GNUnet e.V.
++
++ GNUnet is free software: you can redistribute it and/or modify it
++ under the terms of the GNU Affero General Public License as published
++ by the Free Software Foundation, either version 3 of the License,
++ or (at your option) any later version.
++
++ GNUnet is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Affero General Public License for more details.
++
++ You should have received a copy of the GNU Affero General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++ SPDX-License-Identifier: AGPL3.0-or-later
++ */
++/**
++ * @file credential/credential_misc.h
++ * @brief Credential helper functions
++ */
++#ifndef CREDENTIAL_MISC_H
++#define CREDENTIAL_MISC_H
++
++
++
++char*
++GNUNET_CREDENTIAL_credential_to_string (const struct GNUNET_CREDENTIAL_Credential *cred);
++
++struct GNUNET_CREDENTIAL_Credential*
++GNUNET_CREDENTIAL_credential_from_string (const char* str);
++
++#endif
--- /dev/null
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=kea
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
+PKG_BUILD_DEPENDS:=boost log4cplus kea/host
+HOST_BUILD_DEPENDS:=boost boost/host log4cplus/host
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)/
+
+PKG_HASH:=edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=MPL-2.0
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
+
+define Package/kea/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=ISC Kea
+ URL:=https://www.isc.org/kea
+endef
+
+define Package/kea/description
+ Kea is an open source DHCPv4/DHCPv6 server being developed by Internet
+ Systems Consortium. Kea is a high-performance, extensible DHCP server
+ engine that is designed to be easily modified and extended with hooks
+ libraries. It provides DHCPv4 and DHCPv6 servers, a dynamic DNS update
+ module, a portable DHCP library, libdhcp++, control agent that provides
+ management REST interface, and a DHCP benchmarking tool, perfdhcp.
+endef
+
+define Package/kea-libs
+ $(call Package/kea/Default)
+ TITLE+= Libraries
+ DEPENDS:=+libopenssl +log4cplus \
+ +boost +boost-python3 +boost-system
+endef
+
+define Package/kea-dhcp4
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v4
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-dhcp6
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v6
+ DEPENDS:=@IPV6 +kea-libs
+endef
+
+define Package/kea-dhcp-ddns
+ $(call Package/kea/Default)
+ TITLE+= DHCP - DDNS
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-admin
+ $(call Package/kea/Default)
+ TITLE+= Admin
+ DEPENDS:= +kea-libs +python3
+endef
+
+define Package/kea-ctrl
+ $(call Package/kea/Default)
+ TITLE+= Control
+ DEPENDS:= +kea-dhcp4 +IPV6:kea-dhcp6 \
+ +kea-dhcp-ddns
+endef
+
+define Package/kea-lfc
+ $(call Package/kea/Default)
+ TITLE+= lfc
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-perfdhcp
+ $(call Package/kea/Default)
+ TITLE+= perfdhcp
+ DEPENDS:=+kea-libs
+endef
+
+CONFIGURE_ARGS += \
+ --with-log4cplus="$(STAGING_DIR)/usr" \
+ $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
+
+CONFIGURE_VARS += \
+ cross_compiling="yes"
+
+HOST_CONFIGURE_ARGS += \
+ --enable-static-link \
+ --enable-boost-headers-only \
+ --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
+ --with-boost-include="$(STAGING_DIR)/usr/include"
+
+HOST_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+TARGET_CXXFLAGS += \
+ -fdata-sections \
+ -ffunction-sections
+
+TARGET_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+# Only compile the kea-msg-compiler which we need for
+# package compilation
+define Host/Compile
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/exceptions $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/util $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/log $(HOST_MAKE_FLAGS)
+endef
+
+define Host/Install
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/lib/log/compiler/kea-msg-compiler \
+ $(STAGING_DIR_HOSTPKG)/bin/
+endef
+
+define Build/Compile
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/lib/log/compiler
+ $(INSTALL_BIN) $(STAGING_DIR_HOSTPKG)/bin/kea-msg-compiler \
+ $(PKG_BUILD_DIR)/src/lib/log/compiler/
+ $(call Build/Compile/Default)
+endef
+
+define Package/kea-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/kea-dhcp4/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp4 $(1)/usr/sbin/kea-dhcp4
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp4.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp6/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp6 $(1)/usr/sbin/kea-dhcp6
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp6.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp-ddns/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp-ddns $(1)/usr/sbin/kea-dhcp-ddns
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp-ddns.conf $(1)/etc/kea/
+endef
+
+define Package/kea-admin/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin
+endef
+
+define Package/kea-ctrl/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keactrl $(1)/usr/sbin/keactrl
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-ctrl-agent $(1)/usr/sbin/kea-ctrl-agent
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/keactrl.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-ctrl-agent.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-netconf.conf $(1)/etc/kea/
+endef
+
+define Package/kea-lfc/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-lfc $(1)/usr/sbin/kea-lfc
+endef
+
+define Package/kea-perfdhcp/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/perfdhcp $(1)/usr/sbin/perfdhcp
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,kea-libs))
+$(eval $(call BuildPackage,kea-dhcp4))
+$(eval $(call BuildPackage,kea-dhcp6))
+$(eval $(call BuildPackage,kea-dhcp-ddns))
+$(eval $(call BuildPackage,kea-admin))
+$(eval $(call BuildPackage,kea-ctrl))
+$(eval $(call BuildPackage,kea-lfc))
+$(eval $(call BuildPackage,kea-perfdhcp))
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -594,10 +594,10 @@ AC_TRY_COMPILE([
+ AC_MSG_RESULT(no))
+
+ AC_MSG_CHECKING(for usuable C++11 regex)
+-AC_TRY_RUN([
++AC_TRY_COMPILE([
+ #include <regex>
+-#include <iostream>
+-int main() {
++#include <iostream>],
++[int main() {
+ const std::regex regex(".*");
+ const std::string string = "This should match!";
+ const auto result = std::regex_search(string, regex);
--- /dev/null
+--- a/m4macros/ax_crypto.m4
++++ b/m4macros/ax_crypto.m4
+@@ -454,7 +454,7 @@ EOF
+ dnl Check availability of SHA-2
+ AC_MSG_CHECKING([support of SHA-2])
+ LIBS_SAVED=${LIBS}
+- LIBS="$LIBS $CRYPTO_LIBS"
++ LIBS="$LIBS $CRYPTO_LIBS -lpthread"
+ CPPFLAGS_SAVED=${CPPFLAGS}
+ CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS"
+ AC_LINK_IFELSE(
--- /dev/null
+--- a/src/bin/admin/Makefile.am
++++ b/src/bin/admin/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install kea-admin in sbin.
+ sbin_SCRIPTS = kea-admin
+--- a/src/bin/agent/Makefile.am
++++ b/src/bin/agent/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/d2/Makefile.am
++++ b/src/bin/d2/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp4/Makefile.am
++++ b/src/bin/dhcp4/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp6/Makefile.am
++++ b/src/bin/dhcp6/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/keactrl/Makefile.am
++++ b/src/bin/keactrl/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install keactrl in sbin and the keactrl.conf required by the keactrl
+ # in etc. keactrl will look for its configuration file in the etc folder.
+--- a/src/bin/lfc/Makefile.am
++++ b/src/bin/lfc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/netconf/Makefile.am
++++ b/src/bin/netconf/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/perfdhcp/Makefile.am
++++ b/src/bin/perfdhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/shell/Makefile.am
++++ b/src/bin/shell/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
+
+--- a/src/hooks/dhcp/high_availability/Makefile.am
++++ b/src/hooks/dhcp/high_availability/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/lease_cmds/Makefile.am
++++ b/src/hooks/dhcp/lease_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/stat_cmds/Makefile.am
++++ b/src/hooks/dhcp/stat_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/user_chk/Makefile.am
++++ b/src/hooks/dhcp/user_chk/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiodns/Makefile.am
++++ b/src/lib/asiodns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiolink/Makefile.am
++++ b/src/lib/asiolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cc/Makefile.am
++++ b/src/lib/cc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cfgrpt/Makefile.am
++++ b/src/lib/cfgrpt/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+--- a/src/lib/config/Makefile.am
++++ b/src/lib/config/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/config_backend/Makefile.am
++++ b/src/lib/config_backend/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cql/Makefile.am
++++ b/src/lib/cql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CQL_CPPFLAGS)
+--- a/src/lib/cryptolink/Makefile.am
++++ b/src/lib/cryptolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
+--- a/src/lib/database/Makefile.am
++++ b/src/lib/database/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp/Makefile.am
++++ b/src/lib/dhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp_ddns/Makefile.am
++++ b/src/lib/dhcp_ddns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcpsrv/Makefile.am
++++ b/src/lib/dhcpsrv/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . testutils tests benchmarks
++SUBDIRS = . benchmarks
+
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ kea_lfc_location = @prefix@/sbin/kea-lfc
+--- a/src/lib/dns/Makefile.am
++++ b/src/lib/dns/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/eval/Makefile.am
++++ b/src/lib/eval/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/exceptions/Makefile.am
++++ b/src/lib/exceptions/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS=$(KEA_CXXFLAGS)
+--- a/src/lib/hooks/Makefile.am
++++ b/src/lib/hooks/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/http/Makefile.am
++++ b/src/lib/http/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/Makefile.am
++++ b/src/lib/log/Makefile.am
+@@ -2,7 +2,6 @@ SUBDIRS = interprocess .
+ if !CROSS_COMPILING
+ SUBDIRS += compiler
+ endif
+-SUBDIRS += tests
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/interprocess/Makefile.am
++++ b/src/lib/log/interprocess/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\"
+--- a/src/lib/mysql/Makefile.am
++++ b/src/lib/mysql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS)
+--- a/src/lib/pgsql/Makefile.am
++++ b/src/lib/pgsql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS)
+--- a/src/lib/process/Makefile.am
++++ b/src/lib/process/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
+--- a/src/lib/stats/Makefile.am
++++ b/src/lib/stats/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/Makefile.am
++++ b/src/lib/util/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . io unittests tests python threads
++SUBDIRS = . io python threads
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/threads/Makefile.am
++++ b/src/lib/util/threads/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+--- a/src/lib/yang/Makefile.am
++++ b/src/lib/yang/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils pretests tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS)
--- /dev/null
+if PACKAGE_keepalived
+
+menu "Configuration"
+
+config KEEPALIVED_BFD
+ bool
+ default n
+ prompt "Enable BFD support"
+ help
+ Builds support for BFD
+
+config KEEPALIVED_SHA1
+ bool
+ default y
+ prompt "Enable SHA1 support in genhash"
+ help
+ Builds support for using SHA1 with genhash
+
+config KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS support"
+ help
+ Builds support for IPVS
+
+config KEEPALIVED_LVS_SYNCD
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS syncd daemon control"
+ help
+ Builds support for configuring IPVS syncd daemon
+
+config KEEPALIVED_LVS_64BIT_STATS
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS 64 bit stats"
+ help
+ Builds support for IPVS 64 bit stats
+
+config KEEPALIVED_FWMARK
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable support for setting FWMARK on sockets"
+ help
+ Builds support for setting firewall mark on checker sockets
+
+config KEEPALIVED_SNMP_CHECKER
+ depends on KEEPALIVED_LVS
+ bool
+ default n
+ prompt "Enable SNMP support for checker (LVS)"
+ help
+ Builds support for using SNMP with LVS
+
+config KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable VRRP support"
+ help
+ Builds support for VRRP
+
+config KEEPALIVED_IPTABLES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable iptables for VIP filtering"
+ help
+ Builds support for using iptables/ipsets for filtering packets
+ to VIPs
+
+config KEEPALIVED_SNMP_VRRP
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRP"
+ help
+ Builds support for using SNMP with VRRP
+
+config KEEPALIVED_SNMP_RFC2
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv2 (RFC2787)"
+ help
+ Builds support for using RFC2787 SNMP support for VRRPv2
+
+config KEEPALIVED_SNMP_RFC3
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv3 (RFC6527)"
+ help
+ Builds support for using RFC6527 SNMP support for VRRPv3
+
+config KEEPALIVED_SNMP_REPLY_V3_FOR_V2
+ depends on KEEPALIVED_SNMP_RFC3
+ bool
+ default n
+ prompt "Enable SNMP v3 responses for VRRPv2 instances"
+ help
+ Builds support for using SNMP v3 responses for VRRPv2 instances
+
+config KEEPALIVED_DBUS
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable DBus support"
+ help
+ Builds support for using DBus with VRRP
+
+config KEEPALIVED_JSON
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable JSON support with VRRP"
+ help
+ Builds support for using JSON output for VRRP
+
+config KEEPALIVED_VRRP_AUTH
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable (removed) VRRPv2 authentication"
+ help
+ Builds support for using (removed) VRRPv2 authentication
+ Note: authentication was removed from the VRRPv2 specification
+ by RFC3768 in 2004.
+ Use of this option is non-compliant and can cause problems.
+ Avoid using if possible, except when using unicast, where it
+ can be helpful.
+
+config KEEPALIVED_CHECKSUM_COMPAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable checksum compatibility"
+ help
+ Builds support for interworking with instances using
+ old(incorrect) checksum method
+
+config KEEPALIVED_ROUTES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for VRRP instances managing routes and rules"
+ help
+ Builds support for VRRP instances adding and removing IP
+ routes and rules
+
+config KEEPALIVED_LINKBEAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for linkbeat"
+ help
+ Builds support for using linkbeat polling to monitor the state
+ of interfaces
+
+endmenu
+
+endif # PACKAGE_keepalived
include $(TOPDIR)/rules.mk
PKG_NAME:=keepalived
-PKG_VERSION:=2.0.10
+PKG_VERSION:=2.0.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=40e0e55afed9ca313d621a9c5878579696fafb5504dab521aadaf20ba6e7f597
+PKG_HASH:=1bf586e56ee38b47b82f2a27b27e04d0e5b23f1810db6a8e801bde9d3eb8617b
PKG_CPE_ID:=cpe:/a:keepalived:keepalived
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Ben Kelly <ben@benjii.net> \
Florian Eckert <fe@dev.tdt.de>
+PKG_CONFIG_DEPENDS += \
+ KEEPALIVED_VRRP \
+ KEEPALIVED_LVS \
+ KEEPALIVED_IPTABLES \
+ KEEPALIVED_BFD \
+ KEEPALIVED_SNMP_VRRP \
+ KEEPALIVED_SNMP_CHECKER \
+ KEEPALIVED_SNMP_RFC2 \
+ KEEPALIVED_SNMP_RFC3 \
+ KEEPALIVED_SNMP_REPLY_V3_FOR_V2 \
+ KEEPALIVED_DBUS \
+ KEEPALIVED_JSON \
+ KEEPALIVED_ROUTES \
+ IPV6
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
+define Package/keepalived/config
+ source "$(SOURCE)/Config.in"
+endef
+
+# specifying +(IPV6&&KEEPALIVED_IPTABLES) in the DEPENDS definition doesn't work
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES)$(CONFIG_IPV6),yy)
+ KEEPALIVED_DEPENDS_LIBIP6TC=+libip6tc
+endif
+
+# The +kmod-nf-ipvs line should be +KEEPALIVED_LVS:kmod-nf-ipvs,
+# but make menuconfig then reports :error: recursive dependency detected!
+# !!FIXME DEPENDS:= +KEEPALIVED_LVS:kmod-nf-ipvs
define Package/keepalived
SECTION:=net
CATEGORY:=Network
- TITLE:=Failover and monitoring daemon for LVS clusters
+ TITLE:=VRRP with failover and monitoring daemon for LVS clusters
URL:=http://www.keepalived.org/
DEPENDS:= \
- +libopenssl \
- +libip4tc \
- +IPV6:libip6tc \
- +libxtables \
- +kmod-macvlan \
+ +libnl-genl \
+libmagic \
- +libnl-route \
- +libnfnetlink \
- +kmod-nf-ipvs
+ +KEEPALIVED_VRRP:kmod-macvlan \
+ +KEEPALIVED_VRRP:libnl-route \
+ +KEEPALIVED_VRRP:libnfnetlink \
+ +KEEPALIVED_SHA1:libopenssl \
+ +KEEPALIVED_IPTABLES:libip4tc \
+ $(KEEPALIVED_DEPENDS_LIBIP6TC) \
+ +KEEPALIVED_IPTABLES:libxtables \
+ +KEEPALIVED_IPTABLES:libipset \
+ +(KEEPALIVED_SNMP_VRRP||KEEPALIVED_SNMP_CHECKER||KEEPALIVED_SNMP_RFC2||KEEPALIVED_SNMP_RFC3):libnetsnmp \
+ +KEEPALIVED_JSON:libjson-c \
+ +KEEPALIVED_DBUS:glib2
endef
define Package/keepalived/description
- Failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
+ VRRP with failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
endef
define Package/keepalived/conffiles
endef
CONFIGURE_ARGS+= \
- --disable-libipset \
- --disable-libnl \
- --enable-sha1 \
- --disable-snmp \
- --with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)" \
- --with-init=SYSV
+ --with-init=SYSV \
+ --disable-nftables
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),)
+CONFIGURE_ARGS += \
+ --disable-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),)
+CONFIGURE_ARGS += \
+ --disable-lvs
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_BFD),y)
+CONFIGURE_ARGS += \
+ --enable-bfd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SHA1),y)
+CONFIGURE_ARGS += \
+ --enable-sha1
+endif
+
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),y)
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES),)
+CONFIGURE_ARGS += \
+ --disable-iptables
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_IPSETS),)
+CONFIGURE_ARGS += \
+ --disable-libipset-dynamic
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_VRRP),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv2
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv3
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ifeq ($(CONFIG_KEEPALIVED_SNMP_REPLY_V3_FOR_V2),)
+CONFIGURE_ARGS += \
+ --disable-snmp-reply-v3-for-v2
+endif
+endif # CONFIG_KEEPALIVED_SNMP_RFC3
+
+ifeq ($(CONFIG_KEEPALIVED_JSON),y)
+CONFIGURE_ARGS += \
+ --enable-json
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP_AUTH),)
+CONFIGURE_ARGS += \
+ --disable-vrrp-auth
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_CHECKSUM_COMPAT),)
+CONFIGURE_ARGS += \
+ --disable-checksum-compat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+CONFIGURE_ARGS += \
+ --enable-dbus
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LINKBEAT),)
+CONFIGURE_ARGS += \
+ --disable-linkbeat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_ROUTES),)
+CONFIGURE_ARGS += \
+ --disable-routes
+endif
+endif # CONFIG_KEEPALIVED_VRRP
-MAKE_FLAGS += \
- STRIP="/bin/true" \
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),y)
+ifeq ($(CONFIG_KEEPALIVED_LVS_SYNCD),)
+CONFIGURE_ARGS += \
+ --disable-lvs-syncd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS_64BIT_STATS),)
+CONFIGURE_ARGS += \
+ --disable-lvs-64bit-stats
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_FWMARK),)
+CONFIGURE_ARGS += \
+ --disable-fwmark
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_CHECKER),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-checker
+endif
+
+endif # CONFIG_KEEPALIVED_LVS
+
+
+MAKE_FLAGS += STRIP="/bin/true"
+TARGET_CFLAGS += -I$(LINUX_DIR)
define Package/keepalived/install
$(INSTALL_DIR) $(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived \
+ $(1)/usr/sbin/
+
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash \
+ $(1)/usr/bin/
+
$(INSTALL_DIR) $(1)/etc/keepalived
- $(CP) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \
+ $(1)/etc/keepalived/
+
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived
+ $(INSTALL_BIN) ./files/keepalived.init \
+ $(1)/etc/init.d/keepalived
+
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) ./files/keepalived.config $(1)/etc/config/keepalived
+ $(INSTALL_CONF) ./files/keepalived.config \
+ $(1)/etc/config/keepalived
+
$(INSTALL_DIR) $(1)/etc
- $(INSTALL_CONF) ./files/keepalived.user $(1)/etc/keepalived.user
+ $(INSTALL_CONF) ./files/keepalived.user \
+ $(1)/etc/keepalived.user
+
$(INSTALL_DIR) $(1)/etc/hotplug.d/keepalived
- $(INSTALL_DATA) ./files/hotplug-user $(1)/etc/hotplug.d/keepalived/01-user
+ $(INSTALL_DATA) ./files/hotplug-user \
+ $(1)/etc/hotplug.d/keepalived/01-user
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER)$(CONFIG_KEEPALIVED_SNMP_RFC2)$(CONFIG_KEEPALIVED_SNMP_RFC3),)
+ $(INSTALL_DIR) $(1)/usr/share/snmp/mibs
+endif
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER),)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt \
+ $(1)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRP-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRP-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRPv3-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRPv3-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+ $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf \
+ $(1)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf
+
+ $(INSTALL_DIR) $(1)/usr/share/dbus-1/interfaces
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml
+endif
+
endef
$(eval $(call BuildPackage,keepalived))
# option vrrp_mcast_group4 "224.0.0.18" # optional, default 224.0.0.18
# option vrrp_mcast_group6 "f02::12" # optional, default ff02::12
# option linkbeat_use_polling "1"
+# option vrrp_startup_delay "5"
#config ipaddress
# option name "ipaddress0"
config_get notification_email $1 notification_email
print_list_indent notification_email
- print_elems_indent $1 $INDENT_1 notification_email_from smtp_server smtp_connect_timeout \
- router_id vrrp_mcast_group4 vrrp_mcast_group6
+ print_elems_indent $1 $INDENT_1 \
+ notification_email_from \
+ smtp_server \
+ smtp_connect_timeout \
+ router_id \
+ vrrp_mcast_group4 \
+ vrrp_mcast_group6 \
+ vrrp_startup_delay
}
print_ipaddress_indent() {
--- /dev/null
+--- a/configure.ac 2019-03-30 12:47:15.935627522 +0000
++++ b/configure.ac 2019-03-30 12:47:55.590028792 +0000
+@@ -272,8 +272,7 @@ AC_ARG_ENABLE(Werror,
+ [AS_HELP_STRING([--enable-Werror], [compile with warnings being errors])])
+
+ AC_ARG_WITH([systemdsystemunitdir],
+- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])])
+
+ # Set the kernel headers path
+ if test -n "$kernel_src_path"; then
+@@ -551,7 +550,7 @@ do
+ eval $LOCAL_WARN_VAR=yes
+ add_to_var([KA_CFLAGS], [-W$WARN])
+ AC_DEFINE_UNQUOTED([$WARN_VAR], [ 1 ])
+- AS_IF([test -z $WARN_VAR_SHORT], [],
++ AS_IF([test -z "$WARN_VAR_SHORT"], [],
+ [AC_DEFINE_UNQUOTED([$WARN_VAR_SHORT], [ 1 ])]
+ )
+ ],
+@@ -2451,41 +2450,39 @@ AM_CONDITIONAL([RPM_BIP], [test $RPM_NO_
+
+ dnl ----[ Determine system init type]----
+ INIT_TYPE=
+-if test -z $init_type; then
++AS_IF(
++ [test -n "$init_type"], [INIT_TYPE=$init_type],
++ [test -n "$with_systemdsystemunitdir"], [INIT_TYPE=systemd],
++ [
+ /sbin/init --version 2>/dev/null | grep -q upstart
+- if test $? -eq 0; then
+- INIT_TYPE=upstart
+- else
++ AS_IF(
++ [test $? -eq 0], [INIT_TYPE=upstart],
++ [
+ init_path=`which systemctl 2>/dev/null`
+- if test \( $? -eq 0 -a -x "$init_path" \); then
++ AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
++ [
+ systemctl | grep -q -- "-\.mount"
+- if test $? -eq 0; then
+- INIT_TYPE=systemd
+- fi
+- fi
+- if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
++ AS_IF([test $? -eq 0], [INIT_TYPE=systemd])
++ ])
++ AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \)],
++ [
+ init_path=`which openrc-run 2>/dev/null`
+- if test \( $? -eq 0 -a -x "$init_path" \); then
++ AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
++ [
+ head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
+- if test $? -eq 0; then
+- INIT_TYPE=openrc
+- fi
+- fi
+- fi
+- if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
+- INIT_TYPE=SYSV
+- fi
+- fi
+-else
+- INIT_TYPE=$init_type
+-fi
++ AS_IF([test $? -eq 0], [INIT_TYPE=openrc])
++ ])
++ ])
++ AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \)], [INIT_TYPE=SYSV])
++ ])
++ ])
++AS_IF([test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \)], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+
+ dnl ----[Default keepalived configuration file]----
+ AS_IF([test $default_config_file],
+ [
+ AS_IF([test $default_config_file = yes -o $default_config_file = no],
+- AC_MSG_ERROR([A filename must be specified for default-config-file])
+- ])
++ [AC_MSG_ERROR([A filename must be specified for default-config-file])])
+ CONFIG_FILE=$default_config_file
+ add_config_opt([DEFAULT_CONFIG_FILE=${default_config_file}])
+ ],
+@@ -2493,7 +2490,7 @@ AS_IF([test $default_config_file],
+ AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], ["$default_config_file"], [The default configuration file])
+ AC_SUBST([DEFAULT_CONFIG_FILE], [$default_config_file])
+
+-if test -z $INIT_TYPE; then
++if test -z "$INIT_TYPE"; then
+ INIT_TYPE=undetected
+ elif test $INIT_TYPE = systemd; then
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+--- a/configure 2019-03-30 12:47:25.313485929 +0000
++++ b/configure 2019-03-30 12:48:08.009841269 +0000
+@@ -1631,7 +1631,7 @@ Optional Packages:
+ --with-default-config-file=FILE
+ Default configuration file
+ --with-systemdsystemunitdir=DIR
+- Directory for systemd service files
++ Directory for systemd service files]
+
+ Some influential environment variables:
+ PKG_CONFIG path to pkg-config utility
+@@ -3858,8 +3858,6 @@ fi
+ # Check whether --with-systemdsystemunitdir was given.
+ if test "${with_systemdsystemunitdir+set}" = set; then :
+ withval=$with_systemdsystemunitdir;
+-else
+- with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+ fi
+
+
+@@ -5931,7 +5929,7 @@ $as_echo "yes" >&6; }
+ #define $WARN_VAR 1
+ _ACEOF
+
+- if test -z $WARN_VAR_SHORT; then :
++ if test -z "$WARN_VAR_SHORT"; then :
+
+ else
+ cat >>confdefs.h <<_ACEOF
+@@ -12520,44 +12518,58 @@ fi
+
+
+ INIT_TYPE=
+-if test -z $init_type; then
++if test -n "$init_type"; then :
++ INIT_TYPE=$init_type
++elif test -n "$with_systemdsystemunitdir"; then :
++ INIT_TYPE=systemd
++else
++
+ /sbin/init --version 2>/dev/null | grep -q upstart
+- if test $? -eq 0; then
++ if test $? -eq 0; then :
+ INIT_TYPE=upstart
+- else
++else
++
+ init_path=`which systemctl 2>/dev/null`
+- if test \( $? -eq 0 -a -x "$init_path" \); then
++ if test \( $? -eq 0 -a -x "$init_path" \); then :
++
+ systemctl | grep -q -- "-\.mount"
+- if test $? -eq 0; then
++ if test $? -eq 0; then :
+ INIT_TYPE=systemd
+- fi
+- fi
+- if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
++fi
++
++fi
++ if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then :
++
+ init_path=`which openrc-run 2>/dev/null`
+- if test \( $? -eq 0 -a -x "$init_path" \); then
++ if test \( $? -eq 0 -a -x "$init_path" \); then :
++
+ head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
+- if test $? -eq 0; then
++ if test $? -eq 0; then :
+ INIT_TYPE=openrc
+- fi
+- fi
+- fi
+- if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
++fi
++
++fi
++
++fi
++ if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then :
+ INIT_TYPE=SYSV
+- fi
+- fi
+-else
+- INIT_TYPE=$init_type
++fi
++
++fi
++
++fi
++if test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \); then :
++ with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+ fi
+
+ if test $default_config_file; then :
+
+ if test $default_config_file = yes -o $default_config_file = no; then :
+ as_fn_error $? "A filename must be specified for default-config-file" "$LINENO" 5
+-
+ fi
+ CONFIG_FILE=$default_config_file
+ CONFIG_OPTIONS="$CONFIG_OPTIONS DEFAULT_CONFIG_FILE=${default_config_file}"
+- ]
++
+ else
+ default_config_file="/etc/$PACKAGE/$PACKAGE.conf"
+ fi
+@@ -12569,7 +12581,7 @@ _ACEOF
+ DEFAULT_CONFIG_FILE=$default_config_file
+
+
+-if test -z $INIT_TYPE; then
++if test -z "$INIT_TYPE"; then
+ INIT_TYPE=undetected
+ elif test $INIT_TYPE = systemd; then
+ systemdsystemunitdir=$with_systemdsystemunitdir
$(call Package/net-snmp/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libnl-tiny
+ DEPENDS:=+libnl-tiny +libpci
TITLE:=Open source SNMP implementation (libraries)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
+PKG_VERSION:=1.15.10
PKG_RELEASE:=1
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787
+PKG_HASH:=b865743abd52bce4745d0f7e7fedde3cafbaaab617b022c105e3e4e456537c3c
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
Ansuel Smith <ansuelsmth@gmail.com>
CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
CONFIG_NGINX_RTMP_MODULE \
CONFIG_NGINX_TS_MODULE \
+ CONFIG_OPENSSL_ENGINE \
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server
URL:=http://nginx.org/
- DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+ DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL:libopenssl \
+NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
endef
endef
Package/nginx-ssl/description = $(Package/nginx/description) \
- This varian is compiled with SSL support enabled. To enable additional module \
+ This variant is compiled with SSL support enabled. To enable additional module \
select them in the nginx default configuration menu.
define Package/nginx-all-module
endef
Package/nginx-all-module/description = $(Package/nginx/description) \
- This varian is compiled with ALL module selected.
+ This variant is compiled with ALL module selected.
define Package/nginx/config
source "$(SOURCE)/Config.in"
PKG_NAME:=pptpd
PKG_VERSION:=1.4.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/poptop
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
include $(INCLUDE_DIR)/package.mk
define Package/pptpd
validate_login_section() {
uci_load_validate pptpd login "$1" "$2" \
'username:string' \
- 'password:string'
+ 'password:string' \
+ 'remoteip:string'
}
validate_pptpd_section() {
[ -n "$username" ] || return 0
[ -n "$password" ] || return 0
+ [ -n "$remoteip" ] || remoteip=*
- echo "$username pptp-server $password *" >> $CHAP_SECRETS
+ echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
}
setup_config() {
PKG_NAME:=prosody
PKG_VERSION:=0.11.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://prosody.im/downloads/source
SUBMENU:=Instant Messaging
DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop
TITLE:=XMPP server
- URL:=http://prosody.im/
+ URL:=https://prosody.im/
USERID:=prosody=54:prosody=54
endef
/etc/prosody/prosody.cfg.lua
endef
-TARGET_CFLAGS += $(FPIC)
-
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_LDFLAGS += -shared
+MAKE_FLAGS += LD="$(TARGET_CC)"
define Build/Configure
# this is *NOT* GNU autoconf stuff
--with-lua-include="$(STAGING_DIR)/usr/include" \
--with-lua-lib="$(STAGING_DIR)/usr/lib" \
--cflags="$(TARGET_CFLAGS)" \
- --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \
+ --ldflags="$(TARGET_LDFLAGS)" \
--c-compiler="$(CC)" \
- --linker="$(LD)" \
--datadir="/etc/prosody/data" \
)
endef
-# LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
- PREFIX="/usr" \
define Package/prosody/install
$(INSTALL_DIR) $(1)/etc/init.d
paxctl -v /usr/bin/ > /dev/null 2>&1
[ $$? -ne 0 ] && {
cp /usr/bin/lua /tmp
- paxctl -c -m /tmp/lua > /dev/null 2>&1
+ paxctl -c -m /tmp/lua > /dev/null 2>&1
cp -f /tmp/lua /usr/bin/lua
}
}
include $(TOPDIR)/rules.mk
PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.40
-PKG_RELEASE:=2
+PKG_VERSION:=1.41
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/lnslbrty/ptunnel-ng/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=ad2f2032a79ad41e871c00d28c94670c10ed74920de54d977fe0a33a65fcac76
+PKG_HASH:=b61855dcffe920fd188e5239464b049231f83e550e24e76669eb49d59991baff
PKG_LICENSE:=BSD-3
PKG_LICENSE_FILES:=COPYING
CONFIGURE_ARGS += \
--disable-pcap \
- --disable-selinux
-
-CONFIGURE_VARS += \
- ac_cv_header_bsd_stdlib_h=no \
- ac_cv_search_arc4random=no
+ --disable-selinux \
+ --with-rngdev=/dev/urandom
define Package/ptunnel-ng/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rosy-file-server
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rosy-file-server
+ SUBMENU:=File Transfer
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Rosy File Server over HTTP
+ PKGARCH:=all
+endef
+
+define Package/rosy-file-server/description
+ This package is a configuration management for luci-app-rosy-file-server.
+endef
+
+define Package/rosy-file-server/conffiles
+/etc/config/rosy-file-server
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/rosy-file-server/install
+ $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
+ $(INSTALL_BIN) ./files/rosyfs.init $(1)/etc/init.d/rosyfs
+ $(INSTALL_CONF) ./files/rosyfs.config $(1)/etc/config/rosyfs
+endef
+
+$(eval $(call BuildPackage,rosy-file-server))
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+config rosyfs default
+
+ # Web title
+ option title 'Rosy File Server'
+
+ # Path to share
+ option target '/www'
+
+ option disabled '0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+START=99
+USE_PROCD=1
+SHARE_PATH=/www/rosyfs-share
+
+service_triggers() {
+ procd_add_reload_trigger rosyfs
+}
+
+start_service() {
+ config_load rosyfs
+ config_get disabled default disabled '0'
+ config_get target default target ''
+
+ [ $disabled -eq 1 ] && return
+
+ [ -n "$target" -a ! "$(readlink $SHARE_PATH)" = "$target" ] && {
+ rm -f $SHARE_PATH
+ ln -s $target $SHARE_PATH
+ }
+}
+
+stop_service() {
+ rm -f $SHARE_PATH
+}
PKG_NAME:=tor
PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
--disable-libscrypt \
--disable-unittests \
--disable-lzma \
+ --disable-zstd \
--with-tor-user=tor \
--with-tor-group=tor
PKG_NAME:=unbound
PKG_VERSION:=1.9.1
-PKG_RELEASE:=1
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unbound.net/downloads
+PKG_SOURCE_URL:=https://www.unbound.net/downloads
PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound
+
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
define Package/unbound/Default
TITLE:=Validating Recursive DNS Server
- URL:=http://www.unbound.net/
- DEPENDS:=+libopenssl
+ URL:=https://www.unbound.net/
+ DEPENDS:=+libopenssl +@OPENSSL_WITH_EC
endef
define Package/unbound
--disable-dsa \
--disable-gost \
--enable-allsymbols \
+ --enable-ecdsa \
--enable-tfo-client \
--enable-tfo-server \
--with-libexpat="$(STAGING_DIR)/usr" \
--- /dev/null
+if PACKAGE_btrfs-progs
+
+config BTRFS_PROGS_ZSTD
+ bool "Build with zstd support"
+ default n
+ help
+ This allows you to manage BTRFS with zstd compression
+
+endif
PKG_NAME:=btrfs-progs
PKG_VERSION:=4.20.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libuuid +zlib +zstd +libblkid +liblzo +libpthread
+ DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
TITLE:=Btrfs filesystems utilities
URL:=https://btrfs.wiki.kernel.org/
endef
GPL and open for contribution from anyone.
endef
+define Package/btrfs-progs/config
+ source "$(SOURCE)/Config.in"
+endef
+
progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
btrfs-select-super btrfstune mkfs.btrfs
--disable-convert \
--disable-documentation \
--disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
PKG_NAME:=prometheus-node-exporter-lua
PKG_VERSION:=2018.12.30
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
local function scrape()
- metric("node_nf_conntrack_entries", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
- metric("node_nf_conntrack_entries_limit", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
+ local count = get_contents("/proc/sys/net/netfilter/nf_conntrack_count")
+ local max = get_contents("/proc/sys/net/netfilter/nf_conntrack_max")
+ if count ~= "" then
+ metric("node_nf_conntrack_entries", "gauge", nil, string.sub(count, 1, -2))
+ end
+ if max ~= "" then
+ metric("node_nf_conntrack_entries_limit", "gauge", nil, string.sub(max, 1, -2))
+ end
end
return { scrape = scrape }
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tang
+PKG_VERSION:=6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=1df78b48a52d2ca05656555cfe52bd4427c884f5a54a2c5e37a7b39da9e155e3
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tang
+ SECTION:=utils
+ TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party
+ DEPENDS:=+libhttp-parser +xinetd +jose +bash
+ URL:=https://github.com/latchset/tang
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/tang/description
+ Tang is a small daemon for binding data to the presence of a third party.
+endef
+
+define Package/tang/conffiles
+/etc/xinetd.d/tangdx
+/usr/share/tang/db/
+endef
+
+define Package/tang/install
+ $(INSTALL_DIR) $(1)/usr/libexec
+ $(INSTALL_DIR) $(1)/etc/xinetd.d/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/tangd* $(1)/usr/libexec/
+ $(INSTALL_BIN) ./files/tangdw $(1)/usr/libexec/
+ $(CP) ./files/tangdx $(1)/etc/xinetd.d/
+endef
+
+define Package/tang/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ mkdir -p /usr/share/tang/db && mkdir -p /usr/share/tang/cache
+ KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l)
+ if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
+ /usr/libexec/tangd-keygen /usr/share/tang/db/
+ elif [ "${KEYS}" = "1" ]; then # having 1 key should not happen
+ (>&2 echo "Please check the Tang's keys in /usr/share/tang/db \
+and regenate cache using /usr/libexec/tangd-update script.")
+ else
+ /usr/libexec/tangd-update /usr/share/tang/db/ /usr/share/tang/cache/
+ fi
+ (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \
+ || echo -e "tangd\t\t8888/tcp" >> /etc/services
+fi
+endef
+
+$(eval $(call BuildPackage,tang))
--- /dev/null
+#!/bin/sh
+echo "==================================" >> /var/log/tangd.log
+echo `date`: >> /var/log/tangd.log
+/usr/libexec/tangd $1 2>> /var/log/tangd.log
--- /dev/null
+service tangd
+{
+ port = 8888
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/libexec/tangdw
+ server_args = /usr/share/tang/cache
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = no
+}
--- /dev/null
+diff --git a/Makefile.am b/Makefile.am
+index 14bf91d..dfa6d07 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+-
+ AM_CFLAGS = @TANG_CFLAGS@ @jose_CFLAGS@
+ LDADD = @jose_LIBS@ @http_parser_LIBS@
+
+@@ -7,21 +5,11 @@ nagiosdir = $(libdir)/nagios/plugins
+ cachedir = $(localstatedir)/cache/$(PACKAGE_NAME)
+ jwkdir = $(localstatedir)/db/$(PACKAGE_NAME)
+
+-nodist_systemdsystemunit_DATA = \
+- units/tangd@.service \
+- units/tangd.socket \
+- units/tangd-update.path \
+- units/tangd-update.service \
+- units/tangd-keygen.service
+-
+ dist_libexec_SCRIPTS = src/tangd-update src/tangd-keygen
+ libexec_PROGRAMS = src/tangd
+-nagios_PROGRAMS = src/tang
+-man1_MANS = doc/tang-nagios.1
+ man8_MANS = doc/tang.8
+
+ src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+-src_tang_SOURCES = src/nagios.c
+
+ %: %.in
+ $(AM_V_GEN)mkdir -p "`dirname "$@"`"
+@@ -32,11 +20,9 @@ src_tang_SOURCES = src/nagios.c
+ $(srcdir)/$@.in > $@
+
+ AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
+-TESTS = tests/adv tests/rec tests/nagios
++TESTS = tests/adv tests/rec
+
+-CLEANFILES = $(nodist_systemdsystemunit_DATA)
+ EXTRA_DIST = \
+- $(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
+ COPYING \
+ $(TESTS) \
+ $(man1_MANS) \
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index b51bb31..4b37d30 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,32 +27,6 @@ AC_CHECK_LIB([http_parser], [http_parser_execute],
+ [AC_MSG_ERROR([http-parser required!])])
+
+ PKG_CHECK_MODULES([jose], [jose >= 8])
+-PKG_CHECK_MODULES([systemd], [systemd])
+-
+-AC_ARG_WITH([systemdsystemunitdir],
+- [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
+- [],
+- [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+-
+-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+-
+-for ac_prog in systemd-socket-activate systemd-activate; do
+- AC_CHECK_PROG([SD_ACTIVATE], [$ac_prog], [$as_dir/$ac_prog], [],
+- [$PATH$PATH_SEPARATOR$($PKG_CONFIG --variable=systemdutildir systemd)])
+- test -n "$SD_ACTIVATE" && break
+-done
+-
+-test -n "$SD_ACTIVATE" || AC_MSG_ERROR([systemd-socket-activate required!])
+-
+-AC_MSG_CHECKING([systemd-socket-activate inetd flag])
+-if $SD_ACTIVATE --help | grep -q inetd; then
+- SD_ACTIVATE="$SD_ACTIVATE --inetd"
+- AC_MSG_RESULT([--inetd])
+-else
+- AC_MSG_RESULT([(default)])
+-fi
+-
+-AC_SUBST(SD_ACTIVATE)
+
+ TANG_CFLAGS="\
+ -Wall \
--- /dev/null
+diff --git a/src/tangd-update b/src/tangd-update
+index 652dbef..01aa842 100755
+--- a/src/tangd-update
++++ b/src/tangd-update
+@@ -33,8 +33,8 @@ fi
+
+ [ ! -d "$2" ] && mkdir -p -m 0700 "$2"
+
+-src=`realpath "$1"`
+-dst=`realpath "$2"`
++src=`readlink -f "$1"`
++dst=`readlink -f "$2"`
+
+ payl=()
+ sign=()