Make UDP port validations clearer, allow receive port to be 2238 if forwarding is not enabled, and only use port after it's been validated

merge-requests/31/head
Paul Traina 2020-11-07 22:58:20 +00:00
rodzic 85c99cba03
commit 3dcdb1a2a3
18 zmienionych plików z 130 dodań i 29 usunięć

1
.gitignore vendored
Wyświetl plik

@ -9,3 +9,4 @@ debian/*.substvars
debian/tmp
.DS_Store
node_modules
package-lock.json

Wyświetl plik

@ -25,12 +25,19 @@ build1:
paths:
- build/*
script:
- dpkg --add-architecture i386
- apt-get update
- apt-get -y install git dh-make build-essential autoconf autotools-dev
- apt-get -y install npm wine wine32
- apt-get -y install git dh-make build-essential devscripts lintian diffutils patch \
patchutils quilt
- apt-get -y build-dep .
- dpkg-buildpackage -uc -us
- mkdir build
- mv ../*.{deb,dsc,buildinfo,tar.xz,changes} build/
- mkdir build build/debian
- mv ../*.{deb,dsc,buildinfo,tar.xz,changes} build/debian/
- debian/rules clean
- npm install
- npm run dist
- (cd package.nw/build ; mv *.zip *.exe *.7z *.json ../build)
# test1:
# stage: test

Wyświetl plik

@ -40,3 +40,33 @@ We suggest using the `macos/run.sh` script to launch GridTracker while developin
of NWJS if needed, and use it to run the app.
To access the Developer Tools, right-click on an unused area of a window, or press F12.
# Building for Distribution
## Docker Build Environment
The following code uses docker to create a build environment for packaging
GridTracker for distribution. It can be used to support, or in lieu of,
GitLab's CI/CD chain.
- `docker/run-docker.sh`
1. Build a build-environment container. This container does NOT carry the source code
of GridTracker inside it, it is merely a build container.
2. Execute the build container, linking it up to the current directory and `../gridtracker-dist`
- `docker/build-all.sh`
1. Package the full debian release for gridtracker (which does not require binaries).
2. Build npmjs+gridtracker native binaries for Win (32, 64) including installers,
Mac OS (Intel 64), and Linux (I386 and AMD64) binaries.
THe Linux binaries are for use in non-debian/raspbian/ubuntu distributions.
TODO:
3. Package up a release for Fedora/RPM distributions.
Temporary artifacts are left in:
gridtracker/node_modules (including cached copies of npmjs binaries)
gridtracker/package-json.lock
Final build results are left in:
gridtracker-dist/
gridtracker-dist/debian

7
debian/changelog vendored
Wyświetl plik

@ -1,16 +1,15 @@
gridtracker (1.20.1104) unstable; urgency=low
gridtracker (1.20.1107) unstable; urgency=low
[Tag Loomis/Paul Traina/Sebastian Delmont]
* GridTracker is now Open Source! Copyright assigned to GridTracker.org and
is BSD 3-clause.
[Paul Traina]
[ Paul Traina ]
* Disable fit to QTH when in PSK mode
* Higlight confirmed DXCC countries in DXCC report
* Unify worked/confirmed/unworked in WAC/WAS/CQ Zones/ITU Zones reports
* In call roster, when requiring LoTW, don't show stations that don't meet
time limits.
* Support auto-building CI/CD for GitLab and Debian Packaging
[Sebastian Delmont]
[ Sebastian Delmont ]
* Improve roster controls
* Clean up and pretify HTML and JSON code, reformat code base.
* Make UDP port vaildation behavior clearer, allow recevie on 2238 if

2
debian/control vendored
Wyświetl plik

@ -1,5 +1,5 @@
Source: gridtracker
Section: non-free/hamradio
Section: hamradio
Priority: optional
Maintainer: Tag Loomis <n0ttl@tagloomis.com>
Build-Depends: debhelper (>= 12.1)

5
debian/source/options vendored 100644
Wyświetl plik

@ -0,0 +1,5 @@
tar-ignore
tar-ignore=.DS_Store
tar-ignore=node_modules
tar-ignore=package-lock.json
tar-ignore=package.nw/dist

16
docker/Dockerfile 100644
Wyświetl plik

@ -0,0 +1,16 @@
# Generic builder environment for GridTracker using nwjs-builder-phoenix and debian.
# NOTE: We assume an amd64 environment that is capable of running i386 and wine (which
# are needed for resource hacking for Windows.
FROM debian:buster
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y npm wine wine32 && \
apt-get install -y build-essential devscripts lintian diffutils patch \
patchutils quilt git dgit
VOLUME /build/gridtracker
VOLUME /build/dist
WORKDIR /build/gridtracker
CMD docker/build-all.sh

Wyświetl plik

@ -0,0 +1,9 @@
#!/bin/bash
apt-get -y build-dep .
dpkg-buildpackage -uc -us
test -d ../dist/debian || mkdir -p ../dist/debian
mv ../*.{deb,dsc,buildinfo,changes,tar.xz} ../dist/debian
debian/rules clean
npm install
npm run dist
mv package.nw/dist/*.{exe,7z,zip,json} ../dist

Wyświetl plik

@ -0,0 +1,8 @@
#!/bin/sh
# Build a docker environment and run it to do the build
docker build -t gridtracker-build docker
test -d ../gridtracker-dist || mkdir ../gridtracker-dist
docker run --rm \
-v `/bin/pwd`:/build/gridtracker \
-v `/bin/pwd`/../gridtracker-dist:/build/dist \
gridtracker-build $*

Wyświetl plik

@ -1,3 +1,9 @@
# [Deprecated]
Use standard "npm run start" and "npm run dist" commands.
# MacOS-specific notes and instructions
# Development Environment

Wyświetl plik

@ -1,4 +1,4 @@
NWJS_VERSION=0.49.0
NWJS_VERSION=0.49.2
if [ ! -e build/macos/nwjs-v$NWJS_VERSION-osx-x64/nwjs.app ]; then
echo "Downloading NWJS $NWJS_VERSION"

Wyświetl plik

@ -1,4 +1,4 @@
NWJS_VERSION=0.49.0
NWJS_VERSION=0.49.2
NWJS_FULL_NAME=nwjs-sdk-v$NWJS_VERSION-osx-x64
if [ ! -e build/macos/$NWJS_FULL_NAME/nwjs.app ]; then

13
package-lock.json wygenerowano
Wyświetl plik

@ -1,13 +0,0 @@
{
"name": "gridtracker-development",
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"prettier": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==",
"dev": true
}
}
}

Wyświetl plik

@ -1,11 +1,15 @@
{
"name": "gridtracker-development",
"devDependencies": {
"prettier": "2.1.2"
"nwjs-builder-phoenix": "^1.15.0",
"prettier": "^2.1.2"
},
"scripts": {
"test": "npm run prettier-check",
"prettier-check": "npx prettier --check package.nw",
"prettier-write": "npx prettier --write package.nw"
"prettier-write": "npx prettier --write package.nw",
"dist": "build --tasks win-x86,win-x64,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ package.nw",
"distsome": "build --debug --tasks linux-x64,mac-x64 --mirror https://dl.nwjs.io/ package.nw",
"start": "run --mirror https://dl.nwjs.io/ package.nw"
}
}

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 76 KiB

Wyświetl plik

@ -1,8 +1,8 @@
// GridTracker ©2020 GridTracker.org
// All rights reserved.
// See LICENSE for more information.
var gtVersion = 1200927;
var gtBeta = "Elsa III";
var gtVersion = 1201107;
var gtBeta = "Phoenix";
var g_startVersion = 0;
if (typeof localStorage.currentVersion != "undefined")

Wyświetl plik

@ -1,6 +1,11 @@
{
"name": "GridTracker",
"product_string": "GridTracker",
"product_string_do_not_use": "gridtracker",
"version": "1.20.1107",
"description": "GridTracker, an amateur radio companion",
"author": "Steven Tag Loomis (N0TTL) and GridTracker.org",
"license": "BSD-3-Clause",
"main": "GridTracker.html",
"window": {
"id": "mainWindow",
"icon": "gridview.png",
@ -12,5 +17,29 @@
"webkit": {
"plugin": true
},
"main": "GridTracker.html"
"scripts": {
"test": "npm run prettier-check",
"prettier-check": "npx prettier --check .",
"prettier-write": "npx prettier --write .",
"start": "run --mirror https://dl.nwjs.io/ ."
},
"build": {
"nwVersion": "0.48.4",
"targets": [
"zip",
"nsis7z"
],
"mac": {
"icon": "gridview.icns",
"copyright": "Copyright (c) 2020 GridTracker.org",
"plistStrings": {
"CFBundleIdentifier": "org.gridtracker.gridtracker",
"CFBundleDocumentTypes": []
}
},
"win": {
"icon": "gridview.ico",
"copyright": "Copyright (c) 2020 GridTracker.org"
}
}
}