diff --git a/.github/workflows/check-license.py b/.github/workflows/check-license.py new file mode 100755 index 0000000..8c19aa1 --- /dev/null +++ b/.github/workflows/check-license.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +# This file is part of Moonfire NVR, a security camera network video recorder. +# Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +# SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. +"""Checks that expected header lines are present. + +Call in either of two modes: + +has-license.py FILE [...] + check if all files with certain extensions have expected lines. + This is useful in a CI action. + +has-license.py + check if stdin has expected lines. + This is useful in a pre-commit hook, as in + git-format-staged --no-write --formatter '.../has-license.py' '*.rs' +""" +import re +import sys + +# Filenames matching this regexp are expected to have the header lines. +FILENAME_MATCHER = re.compile(r'.*\.(py|rs|sh|sql)$') + +MAX_LINE_COUNT = 10 + +EXPECTED_LINES = [ + re.compile(r'This file is part of Moonfire NVR, a security camera network video recorder\.'), + re.compile(r'Copyright \(C\) 20\d{2} The Moonfire NVR Authors; see AUTHORS and LICENSE\.txt\.'), + re.compile(r'SPDX-License-Identifier: GPL-v3\.0-or-later WITH GPL-3\.0-linking-exception\.'), +] + +def has_license(f): + """Returns if all of EXPECTED_LINES are present within the first + MAX_LINE_COUNT lines of f.""" + needed = set(EXPECTED_LINES) + i = 0 + for line in f: + if i == 10: + break + i += 1 + for e in needed: + if e.search(line): + needed.remove(e) + break + if not needed: + return True + return False + + +def file_has_license(filename): + with open(filename, 'r') as f: + return has_license(f) + + +def main(args): + if not args: + sys.exit(0 if has_license(sys.stdin) else 1) + + missing = [f for f in args + if FILENAME_MATCHER.match(f) and not file_has_license(f)] + if missing: + print('The following files are missing expected copyright/license headers:') + print('\n'.join(missing)) + sys.exit(1) + + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81dc380..e0ebe94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,3 +60,10 @@ jobs: - run: cd ui && npm ci - run: cd ui && npm run build - run: cd ui && npm run lint + license: + name: Check copyright/license headers + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py diff --git a/LICENSE.txt b/LICENSE.txt index 94a9ed0..1e32b87 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,3 +1,14 @@ +Moonfire NVR is licensed under the GPLv3 (reproduced below). The +following additional permissions are granted under GNU GPL version 3 section 7: + +If you modify this Program, or any covered work, by linking or combining it +with OpenSSL (or a modified version of that library such as BoringSSL or ring), +containing parts covered by the terms of the OpenSSL and/or SSLeay licenses, +the licensors of this Program grant you additional permission to convey the +resulting work. + +================================================================================ + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 diff --git a/README.md b/README.md index 1eecc50..103af7e 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,10 @@ make this possible: # Documentation -* [License](LICENSE.txt) — GPLv3 +* [License](LICENSE.txt) — + [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) + with [https://spdx.org/licenses/GPL-3.0-linking-exception.html](GPL-3.0-linking-exception) + for OpenSSL. * [Installing](guide/install.md) * [Building from source](guide/build.md) * [UI Development](guide/developing-ui.md) diff --git a/docker/Dockerfile b/docker/Dockerfile index 84bccbc..2219aba 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,7 @@ # syntax=docker/dockerfile:1.2.1 +# This file is part of Moonfire NVR, a security camera network video recorder. +# Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +# SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. # See documentation here: # https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md diff --git a/docker/dev-common.bash b/docker/dev-common.bash index 19b86a7..8b2d660 100755 --- a/docker/dev-common.bash +++ b/docker/dev-common.bash @@ -1,4 +1,8 @@ #!/bin/bash +# This file is part of Moonfire NVR, a security camera network video recorder. +# Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +# SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. + # Build the "dev" target. See Dockerfile. set -o errexit diff --git a/docker/dev.bash b/docker/dev.bash index 49efaa7..965f608 100755 --- a/docker/dev.bash +++ b/docker/dev.bash @@ -1,4 +1,8 @@ #!/bin/bash +# This file is part of Moonfire NVR, a security camera network video recorder. +# Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +# SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. + # Build the "dev" target. See Dockerfile. set -o errexit diff --git a/server/Cargo.toml b/server/Cargo.toml index 12beec4..b582898 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -3,6 +3,7 @@ name = "moonfire-nvr" version = "0.6.1" authors = ["Scott Lamb "] edition = "2018" +license-file = "../LICENSE.txt" [features] diff --git a/server/base/Cargo.toml b/server/base/Cargo.toml index 502b706..6fc53b6 100644 --- a/server/base/Cargo.toml +++ b/server/base/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.1" authors = ["Scott Lamb "] readme = "../README.md" edition = "2018" +license-file = "../../LICENSE.txt" [features] nightly = [] diff --git a/server/base/clock.rs b/server/base/clock.rs index 606e5ae..d4450a1 100644 --- a/server/base/clock.rs +++ b/server/base/clock.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Clock interface and implementations for testability. diff --git a/server/base/error.rs b/server/base/error.rs index 6815805..cc34968 100644 --- a/server/base/error.rs +++ b/server/base/error.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use failure::{Backtrace, Context, Fail}; use std::fmt::{self, Write}; diff --git a/server/base/lib.rs b/server/base/lib.rs index d04c662..a4e9d3f 100644 --- a/server/base/lib.rs +++ b/server/base/lib.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. pub mod clock; mod error; diff --git a/server/base/strutil.rs b/server/base/strutil.rs index 7a215c0..c593a94 100644 --- a/server/base/strutil.rs +++ b/server/base/strutil.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use nom::branch::alt; use nom::bytes::complete::{tag, take_while1}; diff --git a/server/base/time.rs b/server/base/time.rs index 9a9ddb9..75c8fa5 100644 --- a/server/base/time.rs +++ b/server/base/time.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Time and durations for Moonfire NVR's internal format. diff --git a/server/db/Cargo.toml b/server/db/Cargo.toml index 7a5b1ef..f287832 100644 --- a/server/db/Cargo.toml +++ b/server/db/Cargo.toml @@ -4,6 +4,7 @@ version = "0.6.1" authors = ["Scott Lamb "] readme = "../README.md" edition = "2018" +license-file = "../../LICENSE.txt" [features] nightly = [] diff --git a/server/db/auth.rs b/server/db/auth.rs index 52cce08..8a5b9ce 100644 --- a/server/db/auth.rs +++ b/server/db/auth.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::schema::Permissions; use base::strutil; diff --git a/server/db/build.rs b/server/db/build.rs index 750d454..ccce16c 100644 --- a/server/db/build.rs +++ b/server/db/build.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. fn main() -> Result<(), Box> { Ok(protobuf_codegen_pure::Codegen::new() diff --git a/server/db/check.rs b/server/db/check.rs index 22b2b9e..5caa119 100644 --- a/server/db/check.rs +++ b/server/db/check.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Subcommand to check the database and sample file dir for errors. diff --git a/server/db/coding.rs b/server/db/coding.rs index 94f2f92..69fd0cb 100644 --- a/server/db/coding.rs +++ b/server/db/coding.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Binary encoding/decoding. diff --git a/server/db/compare.rs b/server/db/compare.rs index 3332f23..d7a6d3a 100644 --- a/server/db/compare.rs +++ b/server/db/compare.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use failure::Error; use prettydiff::diff_slice; diff --git a/server/db/db.rs b/server/db/db.rs index 2fae598..bd63164 100644 --- a/server/db/db.rs +++ b/server/db/db.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Database access logic for the Moonfire NVR SQLite schema. //! diff --git a/server/db/dir.rs b/server/db/dir.rs index 17c355f..4cf8d93 100644 --- a/server/db/dir.rs +++ b/server/db/dir.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Sample file directory management. //! diff --git a/server/db/fs.rs b/server/db/fs.rs index e03c142..05eb7fa 100644 --- a/server/db/fs.rs +++ b/server/db/fs.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2019 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use nix::fcntl::OFlag; use nix::sys::stat::Mode; diff --git a/server/db/lib.rs b/server/db/lib.rs index cf05560..ed4b7ed 100644 --- a/server/db/lib.rs +++ b/server/db/lib.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. #![cfg_attr(all(feature = "nightly", test), feature(test))] diff --git a/server/db/proto/schema.proto b/server/db/proto/schema.proto index 4a44e0e..7fb5312 100644 --- a/server/db/proto/schema.proto +++ b/server/db/proto/schema.proto @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; syntax = "proto3"; diff --git a/server/db/raw.rs b/server/db/raw.rs index f35a806..f9814af 100644 --- a/server/db/raw.rs +++ b/server/db/raw.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Raw database access: SQLite statements which do not touch any cached state. diff --git a/server/db/recording.rs b/server/db/recording.rs index f246fc6..cb0e776 100644 --- a/server/db/recording.rs +++ b/server/db/recording.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::coding::{append_varint32, decode_varint32, unzigzag32, zigzag32}; use crate::db; diff --git a/server/db/schema.sql b/server/db/schema.sql index 23704ee..a1f4e0b 100644 --- a/server/db/schema.sql +++ b/server/db/schema.sql @@ -1,33 +1,7 @@ -- This file is part of Moonfire NVR, a security camera network video recorder. --- Copyright (C) 2016-2020 The Moonfire NVR Authors --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- In addition, as a special exception, the copyright holders give --- permission to link the code of portions of this program with the --- OpenSSL library under certain conditions as described in each --- individual source file, and distribute linked combinations including --- the two. --- --- You must obey the GNU General Public License in all respects for all --- of the code used other than OpenSSL. If you modify file(s) with this --- exception, you may extend this exception to your version of the --- file(s), but you are not obligated to do so. If you do not wish to do --- so, delete this exception statement from your version. If you delete --- this exception statement from all source files in the program, then --- also delete it here. --- --- This program 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 General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- +-- Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +-- SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; + -- schema.sql: SQLite3 database schema for Moonfire NVR. -- See also design/schema.md. diff --git a/server/db/signal.rs b/server/db/signal.rs index 6267a10..098bba4 100644 --- a/server/db/signal.rs +++ b/server/db/signal.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2019 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::coding; use crate::db::FromSqlUuid; diff --git a/server/db/testutil.rs b/server/db/testutil.rs index 4c62da7..6f1d901 100644 --- a/server/db/testutil.rs +++ b/server/db/testutil.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::db; use crate::dir; diff --git a/server/db/upgrade/mod.rs b/server/db/upgrade/mod.rs index c44c370..a711965 100644 --- a/server/db/upgrade/mod.rs +++ b/server/db/upgrade/mod.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades the database schema. /// diff --git a/server/db/upgrade/v0.sql b/server/db/upgrade/v0.sql index 6a7f71c..245bc76 100644 --- a/server/db/upgrade/v0.sql +++ b/server/db/upgrade/v0.sql @@ -1,33 +1,7 @@ -- This file is part of Moonfire NVR, a security camera network video recorder. --- Copyright (C) 2016 The Moonfire NVR Authors --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- In addition, as a special exception, the copyright holders give --- permission to link the code of portions of this program with the --- OpenSSL library under certain conditions as described in each --- individual source file, and distribute linked combinations including --- the two. --- --- You must obey the GNU General Public License in all respects for all --- of the code used other than OpenSSL. If you modify file(s) with this --- exception, you may extend this exception to your version of the --- file(s), but you are not obligated to do so. If you do not wish to do --- so, delete this exception statement from your version. If you delete --- this exception statement from all source files in the program, then --- also delete it here. --- --- This program 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 General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- +-- Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +-- SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; + -- schema.sql: SQLite3 database schema for Moonfire NVR. -- See also design/schema.md. diff --git a/server/db/upgrade/v0_to_v1.rs b/server/db/upgrade/v0_to_v1.rs index 0ba2b81..725390f 100644 --- a/server/db/upgrade/v0_to_v1.rs +++ b/server/db/upgrade/v0_to_v1.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 0 schema to a version 1 schema. use crate::db; diff --git a/server/db/upgrade/v1.sql b/server/db/upgrade/v1.sql index 376a413..a9109ca 100644 --- a/server/db/upgrade/v1.sql +++ b/server/db/upgrade/v1.sql @@ -1,33 +1,7 @@ -- This file is part of Moonfire NVR, a security camera network video recorder. --- Copyright (C) 2016 The Moonfire NVR Authors --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- In addition, as a special exception, the copyright holders give --- permission to link the code of portions of this program with the --- OpenSSL library under certain conditions as described in each --- individual source file, and distribute linked combinations including --- the two. --- --- You must obey the GNU General Public License in all respects for all --- of the code used other than OpenSSL. If you modify file(s) with this --- exception, you may extend this exception to your version of the --- file(s), but you are not obligated to do so. If you do not wish to do --- so, delete this exception statement from your version. If you delete --- this exception statement from all source files in the program, then --- also delete it here. --- --- This program 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 General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- +-- Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +-- SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; + -- schema.sql: SQLite3 database schema for Moonfire NVR. -- See also design/schema.md. diff --git a/server/db/upgrade/v1_to_v2.rs b/server/db/upgrade/v1_to_v2.rs index f873187..41a79ec 100644 --- a/server/db/upgrade/v1_to_v2.rs +++ b/server/db/upgrade/v1_to_v2.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 1 schema to a version 2 schema. use crate::dir; diff --git a/server/db/upgrade/v2_to_v3.rs b/server/db/upgrade/v2_to_v3.rs index c1f5372..44d5dcd 100644 --- a/server/db/upgrade/v2_to_v3.rs +++ b/server/db/upgrade/v2_to_v3.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 2 schema to a version 3 schema. /// Note that a version 2 schema is never actually used; so we know the upgrade from version 1 was diff --git a/server/db/upgrade/v3.sql b/server/db/upgrade/v3.sql index 9f4dd92..bd7471f 100644 --- a/server/db/upgrade/v3.sql +++ b/server/db/upgrade/v3.sql @@ -1,33 +1,7 @@ -- This file is part of Moonfire NVR, a security camera network video recorder. --- Copyright (C) 2016 The Moonfire NVR Authors --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- In addition, as a special exception, the copyright holders give --- permission to link the code of portions of this program with the --- OpenSSL library under certain conditions as described in each --- individual source file, and distribute linked combinations including --- the two. --- --- You must obey the GNU General Public License in all respects for all --- of the code used other than OpenSSL. If you modify file(s) with this --- exception, you may extend this exception to your version of the --- file(s), but you are not obligated to do so. If you do not wish to do --- so, delete this exception statement from your version. If you delete --- this exception statement from all source files in the program, then --- also delete it here. --- --- This program 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 General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- +-- Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +-- SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; + -- schema.sql: SQLite3 database schema for Moonfire NVR. -- See also design/schema.md. diff --git a/server/db/upgrade/v3_to_v4.rs b/server/db/upgrade/v3_to_v4.rs index 90ba4e0..0c25547 100644 --- a/server/db/upgrade/v3_to_v4.rs +++ b/server/db/upgrade/v3_to_v4.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2019 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 3 schema to a version 4 schema. use failure::Error; diff --git a/server/db/upgrade/v4_to_v5.rs b/server/db/upgrade/v4_to_v5.rs index 892098f..6b2f7fd 100644 --- a/server/db/upgrade/v4_to_v5.rs +++ b/server/db/upgrade/v4_to_v5.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2019 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 4 schema to a version 5 schema. /// diff --git a/server/db/upgrade/v5.sql b/server/db/upgrade/v5.sql index 5d29035..25fd1c4 100644 --- a/server/db/upgrade/v5.sql +++ b/server/db/upgrade/v5.sql @@ -1,33 +1,7 @@ -- This file is part of Moonfire NVR, a security camera network video recorder. --- Copyright (C) 2016 The Moonfire NVR Authors --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- In addition, as a special exception, the copyright holders give --- permission to link the code of portions of this program with the --- OpenSSL library under certain conditions as described in each --- individual source file, and distribute linked combinations including --- the two. --- --- You must obey the GNU General Public License in all respects for all --- of the code used other than OpenSSL. If you modify file(s) with this --- exception, you may extend this exception to your version of the --- file(s), but you are not obligated to do so. If you do not wish to do --- so, delete this exception statement from your version. If you delete --- this exception statement from all source files in the program, then --- also delete it here. --- --- This program 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 General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- +-- Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +-- SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.'; + -- schema.sql: SQLite3 database schema for Moonfire NVR. -- See also design/schema.md. diff --git a/server/db/upgrade/v5_to_v6.rs b/server/db/upgrade/v5_to_v6.rs index db975e9..0efbb64 100644 --- a/server/db/upgrade/v5_to_v6.rs +++ b/server/db/upgrade/v5_to_v6.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades a version 4 schema to a version 5 schema. use byteorder::{BigEndian, ByteOrder, WriteBytesExt}; diff --git a/server/db/writer.rs b/server/db/writer.rs index e51de7e..99f5923 100644 --- a/server/db/writer.rs +++ b/server/db/writer.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Sample file directory management. //! diff --git a/server/src/analytics.rs b/server/src/analytics.rs index 82889f3..9eb21a4 100644 --- a/server/src/analytics.rs +++ b/server/src/analytics.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Video analytics via TensorFlow Lite and an Edge TPU. //! diff --git a/server/src/body.rs b/server/src/body.rs index 361899e..c1774e5 100644 --- a/server/src/body.rs +++ b/server/src/body.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2018 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Tools for implementing a `http_serve::Entity` body composed from many "slices". diff --git a/server/src/cmds/check.rs b/server/src/cmds/check.rs index bdb838e..e77b71b 100644 --- a/server/src/cmds/check.rs +++ b/server/src/cmds/check.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2018-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Subcommand to check the database and sample file dir for errors. diff --git a/server/src/cmds/config/cameras.rs b/server/src/cmds/config/cameras.rs index cf6fa56..327de16 100644 --- a/server/src/cmds/config/cameras.rs +++ b/server/src/cmds/config/cameras.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2017-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::stream::{self, Opener, Stream}; use base::strutil::{decode_size, encode_size}; diff --git a/server/src/cmds/config/dirs.rs b/server/src/cmds/config/dirs.rs index 288f30a..823fd40 100644 --- a/server/src/cmds/config/dirs.rs +++ b/server/src/cmds/config/dirs.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2017 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2017 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use base::strutil::{decode_size, encode_size}; use cursive::traits::{Boxable, Identifiable}; diff --git a/server/src/cmds/config/mod.rs b/server/src/cmds/config/mod.rs index 688dba7..0487ffe 100644 --- a/server/src/cmds/config/mod.rs +++ b/server/src/cmds/config/mod.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2017 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2017 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Text-based configuration interface. //! diff --git a/server/src/cmds/config/users.rs b/server/src/cmds/config/users.rs index 0b7b5b3..79d586e 100644 --- a/server/src/cmds/config/users.rs +++ b/server/src/cmds/config/users.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2017 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2017 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use cursive::traits::{Boxable, Identifiable}; use cursive::views; diff --git a/server/src/cmds/init.rs b/server/src/cmds/init.rs index a425df0..b9f9df1 100644 --- a/server/src/cmds/init.rs +++ b/server/src/cmds/init.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use failure::Error; use log::info; diff --git a/server/src/cmds/login.rs b/server/src/cmds/login.rs index 5e4f0bd..109e591 100644 --- a/server/src/cmds/login.rs +++ b/server/src/cmds/login.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Subcommand to login a user (without requiring a password). diff --git a/server/src/cmds/mod.rs b/server/src/cmds/mod.rs index 0b6b5cc..d16b5c9 100644 --- a/server/src/cmds/mod.rs +++ b/server/src/cmds/mod.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use db::dir; use failure::{Error, Fail}; diff --git a/server/src/cmds/run.rs b/server/src/cmds/run.rs index cce8671..353b573 100644 --- a/server/src/cmds/run.rs +++ b/server/src/cmds/run.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::stream; use crate::streamer; diff --git a/server/src/cmds/sql.rs b/server/src/cmds/sql.rs index 8277d23..6c16d17 100644 --- a/server/src/cmds/sql.rs +++ b/server/src/cmds/sql.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2019-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Subcommand to run a SQLite shell. diff --git a/server/src/cmds/ts.rs b/server/src/cmds/ts.rs index aec35b5..7a3fa7f 100644 --- a/server/src/cmds/ts.rs +++ b/server/src/cmds/ts.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use failure::Error; use structopt::StructOpt; diff --git a/server/src/cmds/upgrade/mod.rs b/server/src/cmds/upgrade/mod.rs index 8f2c807..4810278 100644 --- a/server/src/cmds/upgrade/mod.rs +++ b/server/src/cmds/upgrade/mod.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. /// Upgrades the database schema. /// diff --git a/server/src/h264.rs b/server/src/h264.rs index 73170a1..1e9cfe8 100644 --- a/server/src/h264.rs +++ b/server/src/h264.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! H.264 decoding //! diff --git a/server/src/json.rs b/server/src/json.rs index 7a876eb..1b2c406 100644 --- a/server/src/json.rs +++ b/server/src/json.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use db::auth::SessionHash; use failure::{format_err, Error}; diff --git a/server/src/main.rs b/server/src/main.rs index 49564f7..602b60c 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. #![cfg_attr(all(feature = "nightly", test), feature(test))] diff --git a/server/src/mp4.rs b/server/src/mp4.rs index 74b9728..077822d 100644 --- a/server/src/mp4.rs +++ b/server/src/mp4.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! `.mp4` virtual file serving. //! diff --git a/server/src/slices.rs b/server/src/slices.rs index b0b3b2f..89f32fc 100644 --- a/server/src/slices.rs +++ b/server/src/slices.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. //! Tools for implementing a `http_serve::Entity` body composed from many "slices". diff --git a/server/src/stream.rs b/server/src/stream.rs index df3e964..2c2d58a 100644 --- a/server/src/stream.rs +++ b/server/src/stream.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2016 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::h264; use cstr::cstr; diff --git a/server/src/streamer.rs b/server/src/streamer.rs index 0a4d639..048fd90 100644 --- a/server/src/streamer.rs +++ b/server/src/streamer.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::h264; use crate::stream; diff --git a/server/src/web.rs b/server/src/web.rs index cdc71e6..ec3b4f4 100644 --- a/server/src/web.rs +++ b/server/src/web.rs @@ -1,32 +1,6 @@ // This file is part of Moonfire NVR, a security camera network video recorder. -// Copyright (C) 2016-2020 The Moonfire NVR Authors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// In addition, as a special exception, the copyright holders give -// permission to link the code of portions of this program with the -// OpenSSL library under certain conditions as described in each -// individual source file, and distribute linked combinations including -// the two. -// -// You must obey the GNU General Public License in all respects for all -// of the code used other than OpenSSL. If you modify file(s) with this -// exception, you may extend this exception to your version of the -// file(s), but you are not obligated to do so. If you do not wish to do -// so, delete this exception statement from your version. If you delete -// this exception statement from all source files in the program, then -// also delete it here. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// Copyright (C) 2020 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt. +// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception. use crate::body::Body; use crate::json;