Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Platform Compatibility #1113

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Cross Platform Compatibility #1113

wants to merge 9 commits into from

Conversation

lhunath
Copy link

@lhunath lhunath commented Nov 23, 2019

NOTE: This is not intended to be merged into master as-is. It's a starting point to indicate what's necessary to make Countly run on FreeBSD.

REMAINING TASKS:

  1. freebsd-specific install script.
  2. find a good solution for the node-time incompatibility. Submit the patch upstream or fork it. The project appears to be inactive.
  3. find a good solution for puppeteer. Ideally, it should be able to download its browser on FreeBSD like it does the other platforms.
  4. [optional] update code & dependencies for the latest Node (12/13). Currently there is a lot of code that uses currently deprecated - then incompatible - v8-type code. Consequently, Countly does not run under the latest release of Node and requires a system with a downgraded Node (v10).

IN THIS COMMIT:

BUG FIXED: uninitialized local structs lead to EAI_BADHINTS when connecting to APNs.

BUG FIXED: missing select() after connect() lead to write() before complete handshake when connecting to APNs.

Replace assumption of 127.0.0.1 as host address with configured address where possible.

Call bash using /usr/bin/env which is in a reliable location cross-platform - bash is not always in /bin.

Remove sudo and --unsafe-perms from local npm install; running these as root is unnecessary.

FreeBSD rc start-up scripts.

Patched version of node-time that works on FreeBSD & updates some deprecated node API.

Remove package-lock.json from the repository - these are local files.

Update apn nan to bring it in-line with core & improved node version support.

Fixes to build apn on FreeBSD.

Build against repository-local libnghttp2.

NOTE:
puppeteer cannot download & install Chromium on FreeBSD so you'll need to install it locally (pkg install chromium) and run npm install as:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true PUPPETEER_EXECUTABLE_PATH=/usr/local/bin/chrome npm install

lhunath and others added 7 commits November 23, 2019 13:05
Remove sudo and --unsafe-perms from local npm install; running these as root is unnecessary.

FreeBSD rc start-up scripts.

Patched version of node-time that works on FreeBSD & updates some deprecated node API.

Remove package-lock.json from the repository - these are local files.

Update apn nan to bring it in-line with core & improved node version support.

Fixes to build apn on FreeBSD & with a locally installed libnghttp2.

Note: puppeteer cannot download & install chrome on FreeBSD so you need to install it locally and run npm install with:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true PUPPETEER_EXECUTABLE_PATH=/usr/local/bin/chrome npm install
Don't assume bash is in /bin

Don't assume bind address is 127.0.0.1

Logs need to be in countly's log dir to be found by server plugin

Use sudo to run countly script

Cross-platform ntpq & stat usage fixes

Build against local libnghttp2
@ar2rsawseen
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 1
           

See the complete overview on Codacy

@@ -3,6 +3,7 @@ module.exports = function(grunt) {
grunt.initConfig({
eslint: {
options: {
fix: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy Issue found: Mixed spaces and tabs.

@lhunath lhunath changed the title Countly on FreeBSD Cross Platform Compatibility Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants