Skip to content

Commit

Permalink
Merge branch 'master' into invt_modbus
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov authored Oct 21, 2023
2 parents 0fa5231 + 94139cb commit 3e0b66a
Show file tree
Hide file tree
Showing 508 changed files with 30,357 additions and 4,337 deletions.
82 changes: 82 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# EditorConfig is awesome: https://EditorConfig.org
# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

# top-most EditorConfig file
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

max_line_length = 80

indent_style = tab
tab_width = 4
#indent_style = space
#indent_size = 4

# Platform-dependent, except for certain interpreters
# whose sources must use LF, see .gitattributes
###end_of_line = lf

#ij_formatter_enabled = false

[.editorconfig]
trim_trailing_whitespace = false

[*.{bat,cmd,ps1}]
end_of_line = crlf

[*.{am,hwdb,service,target,path}{,.in}]
end_of_line = lf
line_comment = #

[*.sh{,.in}]
end_of_line = lf
line_comment = #

# Borrowed from https://github.com/armbian/build/blob/master/.editorconfig
shell_variant = bash
binary_next_line = false
switch_case_indent = true
space_redirects = true
keep_padding = false
function_next_line = false

[*.{m4,ac}{,.in}]
end_of_line = lf
line_comment = dnl

[*.{conf,sample}{,.in}]
max_line_length = 76
line_comment = #

[*.txt{,.in},*.adoc{,.in},AUTHORS,COPYING,INSTALL.nut,MAINTAINERS,NEWS,README,TODO,UPGRADING]
max_line_length = 76
indent_style = space
indent_size = 4

# Assumes asciidoc comments:
block_comment_start = ////////
block_comment_end = ////////

[*.{yaml,yml,json}{,.in}]
indent_style = space
indent_size = 4

################################################################
# Primary concern: C/C++ style
# See also docs/developers.txt => Code Style chapter

[*.{c,h,cpp}{,.in}]
spaces_around_operators = true
spaces_around_brackets = none

# Plus one TAB:
continuation_indent_size = 1

indent_brace_style = K&R

block_comment_start = /*
block_comment_end = */
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
*.am text eol=lf
*.hwdb text eol=lf

# Aspell claims issues finding `utf-8\r` sometimes (from heading line of
# the dictionary file), with messages like this:
# .cset" could not be opened for reading or does not exist.lib/aspell/utf-8
# which tends to happen in mixed-OS development environments. Tracer shows it:
# read(3, "personal_ws-1.1 en 3225 utf-8\r\nA"..., 4096) = 4096
# access("/usr/lib/aspell/utf-8\r.cset", F_OK) = -1 ENOENT (No such file or directory)
/docs/nut.dict text eol=lf

# Some files are binary always:
*.png bin
*.ico bin
Expand Down
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: networkupstools
open_collective: networkupstools
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
as for which text documents to update. See also docs/developer-guide.txt
for general points on NUT architecture and design.
* Please note that we require "Signed-Off-By" tags in each Git Commit
message, to conform to the common DCO (Developer Certificate of Origin)
as posted in LICENSE-DCO at root of NUT codebase as well as published
at https://developercertificate.org/
* The checklist below is more of a reminder of steps to take and "dangers"
to look out for. PRs to update this template are also welcome :)
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '32 12 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
# TODO: Want to find Python sources to test like with LGTM, see https://github.com/networkupstools/nut/issues/1726

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ Makefile
Makefile.in
## Parent directory only
/aclocal.m4
/ar-lib
/autom4te.cache/
/ChangeLog
/ChangeLog.adoc
/config.guess
/config.log
/config.status
/config.sub
/config.h
/config.cache
/configure
/conf_nut_report_feature
/config.nut_report_feature.log*
/conf??????/
/conf??*.file
/dir.??????/
/dir?.???????/
/configure-test*/
Expand All @@ -35,13 +38,22 @@ Makefile.in
/cscope.*
/depcomp
/INSTALL
/INSTALL.nut
/NEWS
/README
/TODO
/UPGRADING
/install-sh
/libtool
/ltmain.sh
/missing
/test-driver
*-spellchecked
*.adoc-parsed
*.adoc*.tmp
*.txt*.tmp
/cppcheck*.xml
/.ci*.txt*
/.ci*.log
/.ci*.log.*
.dirstamp
Expand Down Expand Up @@ -70,6 +82,7 @@ __pycache__/
.gdb_history
/nbproject
/.idea
/.vscode
/*.iml

# Coredumps
Expand Down
19 changes: 15 additions & 4 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
# This is a blatant ripoff of the fields found in the Linux kernel's CREDITS
# file. If we need more data, those fields can always be added later.
#
# N = name, E = email, W = web address, D = description, P = PGP info,
# N = name, E = email, W = web address, D = description, P = PGP info,
# S = snailmail address, etc.
#
# This file is supposed to be roughly alpha-sorted by the last name, but
# if you want to hide at the bottom, that's fine by me. Just clarify
# your preference when submitting changes to this file.

N: Axel Gembe
E: [email protected]
W: http://axel.gembe.net/
D: Added APC Modbus support
P: rsa4096/43109AAC 11E6 515C B8A4 26C6 07C1 36A4 1CB3 AA21 4310 9AAC

N: Stephen Brown
E: [email protected]
W: http://www.datalimbo.net/
D: Hacked genericups to add TrippLite Lan2.x support (Internet Office 700)
D: Hacked genericups to add TrippLite Lan2.x support (Internet Office 700)

N: Bill Carlson
E: [email protected]
Expand Down Expand Up @@ -54,7 +60,7 @@ D: Provided a Best Fortress for development of a Best driver (bestups)

N: Russell Kroll
E: [email protected]
W: http://www.networkupstools.org/
W: https://www.networkupstools.org/
D: Original NUT author and coordinator
P: 1024D/9DC0E77E 6A5C 7D2D 7945 C022 6104 D421 D61D C97F 9DC0 E77E

Expand Down Expand Up @@ -140,7 +146,7 @@ E: [email protected]

N: Walt Holman
E: [email protected]
D: Hacked up the cpsups driver for CyberPower text protocol UPSes
D: Hacked up the cpsups driver for CyberPower text protocol UPSes

N: Fabio Di Niro
E: [email protected]
Expand Down Expand Up @@ -174,3 +180,8 @@ D: Author of bcmxcp driver, 3-phase work.
N: Giuseppe Corbelli
E: [email protected]
D: Author of asem driver

N: zakx
E: [email protected]
D: Updating device support docs after unnecessarily writing a redundant
D: driver first
24 changes: 24 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,27 @@
The Perl client module (scripts/perl/Nut.pm) is released under the same
license as Perl itself. That is to say either GPL version 1 or (at your option)
any later version, or the "Artistic License".

Several fallback implementations for methods absent from standard library of
an end-user's current build platform are derived from source code available
under the two-clause BSD license (common/strptime.c, common/strnlen.c)

Various methods may be adapted from code or ideas posted on Stack Exchange
sites (comments in NUT sources refer to original posts in this case), which
according to https://stackoverflow.com/help/licensing are made available under
different Creative Commons Attribution-ShareAlike license (CC BY-SA) versions
depending on contribution timestamp.

Several autoconf methods under m4/ directory are derived from curl codebase
and were originally available under curl license. Which is not unlike the MIT
license, see https://daniel.haxx.se/blog/2022/06/17/curl-is-reuse-compliant/

To the best of our knowledge, conditions of the 2/3-clause BSD, MIT, curl and
CC BY-SA licenses allow redistribution and reuse of the codebase in projects
made available under GPL license terms, as long as attribution is provided.

NUT contributors are encouraged to "sign off" their git commits as a conscious
act done under Developer's Certificate of Origin. See the copy of "LICENSE-DCO"
in the root of this distribution, but please note that it is not a "license" on
its own - rather a proclamation that work was done and submitted according to
applicable open-source licenses.
Loading

0 comments on commit 3e0b66a

Please sign in to comment.