diff --git a/.github/workflows/release-integrity.yml b/.github/workflows/release-integrity.yml new file mode 100644 index 0000000..77d29ff --- /dev/null +++ b/.github/workflows/release-integrity.yml @@ -0,0 +1,53 @@ +name: Application release integrity +on: + pull_request: + paths: + - scripts/verify_release.py + - scripts/tests/** + - .github/workflows/release-integrity.yml + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: Application release tag to verify + required: true + type: string +permissions: + contents: read +jobs: + gate-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: python3 -m unittest discover -s scripts/tests -v + verify: + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && !startsWith(github.event.release.tag_name, 'examples-')) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + - name: Download and validate application release + env: + GH_TOKEN: ${{ github.token }} + RELEASE_TAG: ${{ inputs.tag || github.event.release.tag_name }} + run: | + mkdir release-check + gh release download "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --pattern BUILD-MANIFEST.json --pattern '*.zip' --dir release-check + python3 - <<'PY' + import json, os, pathlib, subprocess + root = pathlib.Path('release-check') + m = json.loads((root/'BUILD-MANIFEST.json').read_text()) + commit = m['source_commit'] + import re + assert re.fullmatch('[0-9a-f]{40}', commit), 'Invalid source commit' + tag_commit = subprocess.check_output(['git','rev-parse',os.environ['RELEASE_TAG']+'^{commit}'], text=True).strip() + assert tag_commit == commit, 'Release tag and source manifest differ' + project = root/'project.pbxproj' + project.write_bytes(subprocess.check_output(['git','show',commit+':DVMetaDataBurnIn.xcodeproj/project.pbxproj'])) + subprocess.run(['python3','scripts/verify_release.py','--tag',os.environ['RELEASE_TAG'], + '--manifest',str(root/'BUILD-MANIFEST.json'),'--archive',str(root/pathlib.Path(m['archive']['name']).name), + '--project',str(project)], check=True) + PY diff --git a/DEV.md b/DEV.md index 59fe7a9..09ff43b 100644 --- a/DEV.md +++ b/DEV.md @@ -1,3 +1,16 @@ # Development Notes - Libraries in `Resources/scripts/lib` must be side-effect free; `env.zsh` must be sourced first in the entrypoint. + +## Release integrity + +Before publishing any new application package, create external and embedded `BUILD-MANIFEST.json` files identifying the exact full source commit, release tag and application version. The external manifest also records the archive name/size/SHA-256, executable hash and bundled-tool hashes; the unchanged Preview 1 manifest is a concrete example. Keep the tag pointing at that source commit. Include all bundled notices, including the DVRescue supplement appended to `Resources/licenses/NOTICE.txt`. + +Run against the exact source checkout and final ZIP: + +```sh +python3 scripts/verify_release.py --tag v1.0.7-maintenance.2 --manifest /path/to/BUILD-MANIFEST.json --archive /path/to/application.zip --project DVMetaDataBurnIn.xcodeproj/project.pbxproj +python3 -m unittest discover -s scripts/tests -v +``` + +Use the intended tag and actual paths. This example is not a new release announcement. Never upload after a failed check. The `Application release integrity` workflow repeats validation on newly published application releases, or manually for a specified tag, and compares the tag's source project to the archive. Example-data releases are excluded. Historical packages without manifests are not retrospectively certified. The existing 1.0.4beta ZIP contains version 1.0.3; its tag and bytes are preserved, with actual runtime provenance unknown. Integrity checks do not establish licensing compliance, signing, GUI or player acceptance. diff --git a/Resources/licenses/NOTICE.txt b/Resources/licenses/NOTICE.txt index 916fa77..e8d59fe 100644 --- a/Resources/licenses/NOTICE.txt +++ b/Resources/licenses/NOTICE.txt @@ -22,3 +22,352 @@ Author page: https://nicholaskruse.com/work/uavosd VCR OSD Mono Font, by Riciery Leal Distributed as free for personal and commercial use per the author’s comments. Source: https://www.dafont.com/font-comment.php?file=vcr_osd_mono + + +DVRescue 24.07 distribution notice supplement — 2026-11-13 + +Applies to executable SHA-256: +396f26f02b6ad16fa406b890964df20ddc16424a0c99314892ec12859283ad4f + +This supplements, and does not replace, existing notices in DVMetaDataBurnIn. +The application remains MIT Copyright (c) 2025 Zach Zarzycki. +This product uses MediaInfo library, Copyright (c) 2002-2024 MediaArea.net SARL. +https://mediaarea.net/MediaInfo + +Texts below are preserved from MediaArea's official DVRescue 24.07 all-in-one +source package. Source-bundle inclusion alone is not proof that every optional +component is linked. The matching binary contains MediaInfoLib, ZenLib, serial, +TinyXML2 and DeckLink wrapper type information. It dynamically uses Apple's +system zlib, libc++ and frameworks, which this application does not redistribute. + +This is a partial remediation, not certification of a complete dependency +inventory. The source archive omits DeckLinkAPI.h, although the binary contains +DeckLink support. The exact SDK version/terms and any additional build-specific +components still need publisher evidence (#195). No unverified build identity +or third-party permission is asserted. See the accompanying provenance JSON. + + +===== DVRescue original publisher notice ===== +Source: dvrescue/LICENSE.txt + +BSD 3-Clause License + +Copyright (c) 2019-2020, Moving Image Preservation of Puget Sound +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== MediaInfoLib 24.06 ===== +Source: MediaInfoLib/LICENSE + +BSD 2-Clause License + +Copyright (c) 2002-2024, MediaArea.net SARL +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== ZenLib (source bundle 0.4.41; binary version unconfirmed) ===== +Source: ZenLib/License.txt + +Copyright (c) 2002-2020 MediaArea.net SARL. All rights reserved. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +===== Serial ===== +Source: dvrescue/Source/ThirdParty/serial/LICENSE + +Copyright (c) 2012 William Woodall, John Harrison + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== CCDecoder ===== +Source: dvrescue/Source/ThirdParty/ccdecoder/ccdecoder.h + +/* + * ccdecoder - A standalone Closed Captions (CC) decoder + * Copyright (C) 2012-2012 MediaArea.net SARL, Info@MediaArea.net + * Copyright (C) 2012-2012 RGB Networks + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + ***************************************************************************/ + +===== TinyXML2 ===== +Source: MediaInfoLib/Source/ThirdParty/tinyxml2/tinyxml2.h + +/* +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +===== tfsxml ===== +Source: MediaInfoLib/Source/ThirdParty/tfsxml/tfsxml.h + +/* Copyright (c) MediaArea.net SARL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +(MIT License) + +*/ + +===== AES ===== +Source: MediaInfoLib/Source/ThirdParty/aes-gladman/aes.h + +/* +--------------------------------------------------------------------------- +Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved. + +The redistribution and use of this software (with or without changes) +is allowed without the payment of fees or royalties provided that: + + source code distributions include the above copyright notice, this + list of conditions and the following disclaimer; + + binary distributions include the above copyright notice, this list + of conditions and the following disclaimer in their documentation. + +This software is provided 'as is' with no explicit or implied warranties +in respect of its operation, including, but not limited to, correctness +and fitness for purpose. +--------------------------------------------------------------------------- +Issue Date: 20/12/2007 + + This file contains the definitions required to use AES in C. See aesopt.h + for optimisation details. +*/ + +===== SHA1 ===== +Source: MediaInfoLib/Source/ThirdParty/sha1-gladman/sha1.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 01/08/2005 +*/ + +===== SHA2 ===== +Source: MediaInfoLib/Source/ThirdParty/sha2-gladman/sha2.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 01/08/2005 +*/ + +===== HMAC ===== +Source: MediaInfoLib/Source/ThirdParty/hmac-gladman/hmac.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is an implementation of HMAC, the FIPS standard keyed hash function +*/ + +===== MD5 ===== +Source: MediaInfoLib/Source/ThirdParty/md5/md5.c + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ diff --git a/docs/COMMUNITY_VALIDATION.md b/docs/COMMUNITY_VALIDATION.md index 79f80ac..9dd5b73 100644 --- a/docs/COMMUNITY_VALIDATION.md +++ b/docs/COMMUNITY_VALIDATION.md @@ -78,7 +78,7 @@ zsh "$APP_RES/scripts/dvmetaburn.zsh" --mode=single --layout=stacked --format=mo python3 "$REPO/scripts/verify_train_demo.py" --ffmpeg "$FFMPEG" --ffprobe "$FFPROBE" --dvrescue "$DVRESCUE" --reference "$SOURCE" "$WORK/generated/train-check_conv.mov" > "$WORK/verification.json" ``` -Use separate destinations for concurrent runs and keep originals untouched. Scratch is deliberately retained here for diagnosis. CLI success is a CLI result. A GUI report should separately describe file selection, progress, folder queue behavior, Finder workspace access and Stop. Cancellation can leave a partial final output ([#198](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/198)); test with disposable derivatives in a new destination. +Use separate destinations for concurrent runs and keep originals untouched. Scratch is deliberately retained here for diagnosis. CLI success is a CLI result. A GUI report should separately describe file selection, progress, folder queue behavior, Finder workspace access and Stop. Stable and the original Preview 1 can leave a partial final output on cancellation; current maintenance stages and validates outputs, then refuses collisions ([#198](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/198)); test with disposable derivatives in a new destination. ## 5. Observe playback and report the result diff --git a/docs/LICENSING.md b/docs/LICENSING.md index e8b0d4c..1dc41bb 100644 --- a/docs/LICENSING.md +++ b/docs/LICENSING.md @@ -9,7 +9,7 @@ See the [distribution audit](THIRD_PARTY_DISTRIBUTION_AUDIT.md) for all eight pu | Component | Observed version and notice | Scope and remaining evidence | | --- | --- | --- | | FFmpeg | Bundled x86_64 `8.0.1-tessus`; `-buildconf` includes `--enable-gpl --enable-version3`; `-L` states GPL version 3 or later. [GPLv3 text](../Resources/licenses/COPYING.GPLv3), [existing FFmpeg notice](../Resources/licenses/LICENSE.md). | This specific binary reports GPL-3.0-or-later. Other FFmpeg configurations can have different terms. The executable now matches the supplier download by SHA-256. Exact corresponding source/build materials and complete external-library notices remain unresolved in issue #194. | -| DVRescue | Bundled x86_64 24.07, reporting MediaInfoLib 24.06. [BSD-3-Clause notice](../Resources/licenses/dvrescue_LICENSE.txt), copyright 2019–2025 MIPoPS. | Preserve its notice. The bundled notice does not fully inventory dependency licensing; this is not a complete distribution audit. | +| DVRescue | Bundled x86_64 24.07, reporting MediaInfoLib 24.06. [BSD-3-Clause notice](../Resources/licenses/dvrescue_LICENSE.txt), copyright 2019–2025 MIPoPS. | Official 24.07 package matches the binary. Verified dependency notices are now appended to the bundled notice and supplied beside historical downloads; exact DeckLink SDK/build mapping remains open in #195. | | UAV OSD fonts | UAV-OSD-Mono and UAV-OSD-Sans-Mono; attribution to Nicholas Kruse. | Existing notice references free personal/commercial use and author pages; author-linked font bytes and use permission are verified, while explicit redistribution/embedding terms remain unresolved in issue #196. | | VCR OSD Mono | Attribution to Riciery Leal (mrmanet). | Existing notice relies on author comments for permission; author-linked font bytes and use permission are verified, while explicit redistribution/embedding terms remain unresolved in issue #196. | @@ -22,7 +22,7 @@ Resources/bin/ffmpeg -L Resources/bin/dvrescue --version ``` -The application's MIT license does not replace component terms. These observations do not establish blanket distribution compliance. Resolving the source/build and font-notice gaps is follow-up work; this documentation change does not replace bundled binaries or rewrite third-party terms. +The application's MIT license does not replace component terms. These observations do not establish blanket distribution compliance. Verified DVRescue notice gaps are partially repaired by the [supplement](audit/2026-11-13/DVRESCUE-NOTICES.txt). Exact remaining FFmpeg, DeckLink/build and font evidence is listed in the distribution audit. No bundled binary or third-party terms were replaced. ## Train footage and extracted frames diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 4f3151e..357c5b2 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -1,11 +1,11 @@ # Verified project status -Audited November 13, 2026. This is the current summary; dated reports below preserve historical evidence. +Updated November 13, 2026 after PR #200 and maintenance engineering verification. This is the current summary; dated reports below preserve historical evidence. ## Application and branch policy -- **Stable application: 1.0.6.** `main` at `da0a3b97126578d45d24e65573e85367c1f7979e` retains the pre-maintenance runtime. Its public package is still named [1.0.6 beta](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/1.0.6beta); “stable” describes the owner's retained baseline, not completed compatibility certification. -- **Maintenance preview: 1.0.7.** `maintenance/1.0.7` at `ad21e2bbedfc00a2c97f7d1771f12fe8c046811b` retains the runtime from preview commit `5f7e13e0b9f94b98bfef32c5d828aae614265583`. [Preview 1](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/v1.0.7-maintenance.1) remains a prerelease. Documentation commits after these audit baselines do not promote application code. +- **Stable application: 1.0.6.** The stable runtime restored at `da0a3b97126578d45d24e65573e85367c1f7979e` remains on `main`, which retains the pre-maintenance runtime. Its public package is still named [1.0.6 beta](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/1.0.6beta); “stable” describes the owner's retained baseline, not completed compatibility certification. +- **Experimental implementation: 1.0.7.** [`maintenance/1.0.7`](https://github.com/shardsofaperture/DVMetaDataBurnIn/tree/maintenance/1.0.7) includes runtime fix `2802355` for final-output safety and H.264 field signaling. [Preview 1](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/v1.0.7-maintenance.1) is still the original `5f7e13e` package and does **not** contain those fixes. No stable release or tag is changed. - PR #191 prematurely integrated maintenance code; [PR #193](https://github.com/shardsofaperture/DVMetaDataBurnIn/pull/193) restored stable runtime on main. That historical integration is **superseded**, not ongoing authorization. Main and maintenance share public documentation/licensing corrections. Only owner testing and explicit acceptance can authorize future runtime integration. - All eight published app ZIPs contain x86_64 FFmpeg and DVRescue executables. The stable 1.0.6 app executable (and older apps) has x86_64/arm64 slices; preview 1.0.7 is x86_64-only. An arm64 UI slice does not make the Intel tools native or prove Apple Silicon operation. Current packages declare macOS **12.0 minimum**. Native build/tool evidence is Intel macOS 14 with Xcode 15.4; this is not testing across all macOS 12+ versions. Native Apple Silicon and Rosetta operation remain unverified. No Windows/Linux application support is claimed. Preview signing is ad-hoc, not notarized. @@ -25,8 +25,16 @@ Source references for maintenance claims: [encode.zsh](https://github.com/shards Published evidence is the separate [train example release](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/examples-train-dv-v1), its original/derivative hashes, stream measurements, metadata rows, transition images and reproduction commands. The owner's supplied MP4 has unknown producing app version; only the four identified maintenance derivatives are bound to `5f7e13e`. CLI results do not prove GUI acceptance. No independent tester reports or adoption evidence were established by this audit; owner-supplied footage and maintainer-run checks are identified as such. +## Completed engineering and distribution corrections + +PR #200 integrated documentation only. Main's Swift, Xcode project, runtime scripts, tools and fonts still match the restored 1.0.6 baseline. Narrow shared documentation updates preserve that boundary. + +Maintenance runtime `2802355` passes 33 synthetic regressions and three shell checks, including failed/cancelled encodes, destination collisions and extracted H.264 bitstream flags. Fresh train CLI checks preserve 238 DV frames and PCM in MOV, correctly signal 238 bottom-field-first H.264 frames in MP4/MKV, retain 476 progressive frames at 60p and nine subtitles ending at 7.95 seconds. [Machine-readable results](https://github.com/shardsofaperture/DVMetaDataBurnIn/blob/maintenance/1.0.7/docs/audit/2026-11-13/maintenance-output-verification.json) and the [maintenance report](https://github.com/shardsofaperture/DVMetaDataBurnIn/blob/maintenance/1.0.7/docs/MAINTENANCE_1.0.7.md) distinguish these checks from player/GUI acceptance. Historical table rows above describe Preview 1, not the new code. + +The original official DVRescue 24.07 package now matches the distributed executable byte for byte. Twelve verified notice texts are preserved in [the supplement](audit/2026-11-13/DVRESCUE-NOTICES.txt) and appended to the existing bundled notice. [Provenance](audit/2026-11-13/dvrescue-provenance.json) also identifies remaining DeckLink/build-manifest uncertainty; #195 is not closed by partial notice repair. The [release integrity gate](../scripts/verify_release.py) rejects mismatched tags, manifests, built versions and hashes. The historical 1.0.4beta ZIP remains unchanged and labeled as containing version 1.0.3; its actual runtime provenance is not inferred from either label. + ## Outstanding work -Before claiming distribution readiness, resolve [FFmpeg corresponding source and notices #194](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/194), [DVRescue dependency evidence #195](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/195), and [font redistribution/embedding evidence #196](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/196). The [distribution audit](THIRD_PARTY_DISTRIBUTION_AUDIT.md) distinguishes confirmed facts from missing evidence; opening issues does not resolve them. The application MIT license is verified and unchanged. +Application submission evidence is materially improved, but **complete distribution readiness cannot yet be claimed**. Exact FFmpeg corresponding source/build materials and dependency notices (#194), DVRescue DeckLink SDK/build mapping (#195), and explicit font redistribution/embedding evidence (#196) remain external evidence dependencies. See the [distribution audit](THIRD_PARTY_DISTRIBUTION_AUDIT.md) for exact findings. Application MIT terms and authorship remain unchanged. -Before promoting 1.0.7, complete owner GUI acceptance, broader player/subtitle testing, visual motion and audio-quality checks, more real-camera scenarios, and applicable platform acceptance. Use the [community validation guide](COMMUNITY_VALIDATION.md) and the [maintenance report](https://github.com/shardsofaperture/DVMetaDataBurnIn/blob/maintenance/1.0.7/docs/MAINTENANCE_1.0.7.md). Direct DV/Digital8 and HDV capture remain [planned development](ROADMAP.md), not implemented capabilities. +Accepting the entire 1.0.7 release is not required to complete documentation, notice repair or the packaging gate. Before promoting 1.0.7, complete GUI queues/Stop, player subtitle/motion/audio review, broader real-camera cases and platform acceptance. #197 remains open for its explicit moving-picture/player criterion after the automated field-signaling fix. #198 concerns publication safety, with GUI acceptance tracked separately. Use the [community validation guide](COMMUNITY_VALIDATION.md). Direct DV/Digital8 and HDV capture remain [planned](ROADMAP.md). diff --git a/docs/THIRD_PARTY_DISTRIBUTION_AUDIT.md b/docs/THIRD_PARTY_DISTRIBUTION_AUDIT.md index 2921f64..491a280 100644 --- a/docs/THIRD_PARTY_DISTRIBUTION_AUDIT.md +++ b/docs/THIRD_PARTY_DISTRIBUTION_AUDIT.md @@ -46,3 +46,17 @@ DVRescue SHA-256 is `396f26f02b6ad16fa406b890964df20ddc16424a0c99314892ec1285928 [Font-origin checks](audit/2026-11-13/font-origin-checks.json) record source download URLs, hashes, package contents and name-table versions. Author statements establish free use, including commercial use. They do not explicitly settle unmodified app redistribution, font attachment in MKV, or all attribution conditions. No OFL, public-domain dedication or new license is inferred. [#196](https://github.com/shardsofaperture/DVMetaDataBurnIn/issues/196) specifies the permission evidence needed; nobody was contacted by this audit. Existing notices and binaries remain intact. Application archives and train media were not replaced. [Sample rights](LICENSING.md#train-footage-and-extracted-frames) remain distinct from software/font rights. No issue is resolved solely because this document now records it. + +## Distribution remediation, November 13, 2026 + +The [DVRescue provenance receipt](audit/2026-11-13/dvrescue-provenance.json) identifies the original [official 24.07 DMG](https://mediaarea.net/download/binary/dvrescue/24.07/dvrescue_CLI_24.07_Mac.dmg), SHA-256 `6cda2ec5f951ebe5984da2fd5a1cbe574831bb2aa7d21de0da8218625aa12484`. Extracting its package without installing it yields exactly the application's `396f26f0…` executable. The newer 24.07.1 package differs and was not substituted. + +The official [all-in-one 24.07 source bundle](https://mediaarea.net/download/binary/dvrescue/24.07/dvrescue_CLI_24.07_GNU_FromSource.tar.gz) contains MediaInfoLib **24.06**, matching the binary, plus ZenLib source 0.4.41 and bundled third-party notices. This resolves the misleading split-download 24.04 lead. Twelve original notice texts are now preserved in [DVRESCUE-NOTICES.txt](audit/2026-11-13/DVRESCUE-NOTICES.txt), with source-file hashes in the receipt, and appended to [the existing bundled NOTICE](../Resources/licenses/NOTICE.txt) so future Xcode builds include them. Original copyright texts remain intact, including both the publisher's 2019–2020 DVRescue notice and the preexisting 2019–2025 notice. + +For every historical application release, additive `DVRESCUE-NOTICES-2026-11-13.txt`, `DVRESCUE-PROVENANCE-2026-11-13.json`, and `DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt` accompany the unchanged ZIP. Their download links and hashes are verified after upload. These materials repair missing verified notices; they do not claim a complete dependency audit. Binary type information establishes MediaInfoLib, ZenLib, serial, TinyXML2 and DeckLink support. System zlib/libc++/frameworks are dynamically referenced and are not redistributed here. The source bundle omits `DeckLinkAPI.h`; an exact publisher build manifest, SDK revision and applicable notice mapping are still needed. Source-bundle versions are not asserted as independently proven binary versions. #195 remains open for that narrow requirement. + +FFmpeg: the supplier page, version-specific API, binary configuration and public source leads still do not provide exact patches, static-library source revisions and controlling build scripts for `430d60fb…`. No generic upstream tarball is presented as corresponding source. #194 needs the publisher's exact build/source materials and durable delivery alongside all affected downloads. Replacement cannot repair missing provenance for already-published historical bytes; no replacement or source compilation was performed. + +Fonts: author-linked font packages and author use statements were rechecked. Explicit permission covering app redistribution and MKV font attachment is still absent; third-party font catalog labels are not substituted for the authors' terms. #196 needs permission from Nicholas Kruse (both UAV fonts) and Riciery Leal (VCR OSD Mono), including attribution conditions, or authoritative preexisting terms covering these exact files. Existing train assets and fonts remain unchanged. No supplier or author was contacted and no permission was invented. + +Historical packaging: `1.0.4beta` contains Info.plist 1.0.3. Its release notes already disclose this. The new [release gate](../scripts/verify_release.py) and [GitHub workflow](../.github/workflows/release-integrity.yml) compare tag, source project version, external/embedded manifests, app Info.plist and archive/executable/tool hashes. [Packaging instructions](../DEV.md#release-integrity) describe the pre-publication check. Seven focused tests and the unchanged Preview 1 ZIP pass. The historical ZIP hash remains `72c89f3312820091b5f58ee9075cc72c59abbf768020c6299d074212584f9972`; no claim is made that its mismatch is only cosmetic. diff --git a/docs/audit/2026-11-13/DVRESCUE-NOTICES.txt b/docs/audit/2026-11-13/DVRESCUE-NOTICES.txt new file mode 100644 index 0000000..29e8dbb --- /dev/null +++ b/docs/audit/2026-11-13/DVRESCUE-NOTICES.txt @@ -0,0 +1,347 @@ +DVRescue 24.07 distribution notice supplement — 2026-11-13 + +Applies to executable SHA-256: +396f26f02b6ad16fa406b890964df20ddc16424a0c99314892ec12859283ad4f + +This supplements, and does not replace, existing notices in DVMetaDataBurnIn. +The application remains MIT Copyright (c) 2025 Zach Zarzycki. +This product uses MediaInfo library, Copyright (c) 2002-2024 MediaArea.net SARL. +https://mediaarea.net/MediaInfo + +Texts below are preserved from MediaArea's official DVRescue 24.07 all-in-one +source package. Source-bundle inclusion alone is not proof that every optional +component is linked. The matching binary contains MediaInfoLib, ZenLib, serial, +TinyXML2 and DeckLink wrapper type information. It dynamically uses Apple's +system zlib, libc++ and frameworks, which this application does not redistribute. + +This is a partial remediation, not certification of a complete dependency +inventory. The source archive omits DeckLinkAPI.h, although the binary contains +DeckLink support. The exact SDK version/terms and any additional build-specific +components still need publisher evidence (#195). No unverified build identity +or third-party permission is asserted. See the accompanying provenance JSON. + + +===== DVRescue original publisher notice ===== +Source: dvrescue/LICENSE.txt + +BSD 3-Clause License + +Copyright (c) 2019-2020, Moving Image Preservation of Puget Sound +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== MediaInfoLib 24.06 ===== +Source: MediaInfoLib/LICENSE + +BSD 2-Clause License + +Copyright (c) 2002-2024, MediaArea.net SARL +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== ZenLib (source bundle 0.4.41; binary version unconfirmed) ===== +Source: ZenLib/License.txt + +Copyright (c) 2002-2020 MediaArea.net SARL. All rights reserved. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +===== Serial ===== +Source: dvrescue/Source/ThirdParty/serial/LICENSE + +Copyright (c) 2012 William Woodall, John Harrison + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== CCDecoder ===== +Source: dvrescue/Source/ThirdParty/ccdecoder/ccdecoder.h + +/* + * ccdecoder - A standalone Closed Captions (CC) decoder + * Copyright (C) 2012-2012 MediaArea.net SARL, Info@MediaArea.net + * Copyright (C) 2012-2012 RGB Networks + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + ***************************************************************************/ + +===== TinyXML2 ===== +Source: MediaInfoLib/Source/ThirdParty/tinyxml2/tinyxml2.h + +/* +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +===== tfsxml ===== +Source: MediaInfoLib/Source/ThirdParty/tfsxml/tfsxml.h + +/* Copyright (c) MediaArea.net SARL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +(MIT License) + +*/ + +===== AES ===== +Source: MediaInfoLib/Source/ThirdParty/aes-gladman/aes.h + +/* +--------------------------------------------------------------------------- +Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved. + +The redistribution and use of this software (with or without changes) +is allowed without the payment of fees or royalties provided that: + + source code distributions include the above copyright notice, this + list of conditions and the following disclaimer; + + binary distributions include the above copyright notice, this list + of conditions and the following disclaimer in their documentation. + +This software is provided 'as is' with no explicit or implied warranties +in respect of its operation, including, but not limited to, correctness +and fitness for purpose. +--------------------------------------------------------------------------- +Issue Date: 20/12/2007 + + This file contains the definitions required to use AES in C. See aesopt.h + for optimisation details. +*/ + +===== SHA1 ===== +Source: MediaInfoLib/Source/ThirdParty/sha1-gladman/sha1.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 01/08/2005 +*/ + +===== SHA2 ===== +Source: MediaInfoLib/Source/ThirdParty/sha2-gladman/sha2.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 01/08/2005 +*/ + +===== HMAC ===== +Source: MediaInfoLib/Source/ThirdParty/hmac-gladman/hmac.h + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is an implementation of HMAC, the FIPS standard keyed hash function +*/ + +===== MD5 ===== +Source: MediaInfoLib/Source/ThirdParty/md5/md5.c + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ diff --git a/docs/audit/2026-11-13/dvrescue-provenance.json b/docs/audit/2026-11-13/dvrescue-provenance.json new file mode 100644 index 0000000..87d20a7 --- /dev/null +++ b/docs/audit/2026-11-13/dvrescue-provenance.json @@ -0,0 +1,112 @@ +{ + "verified_on": "2026-11-13", + "binary_sha256": "396f26f02b6ad16fa406b890964df20ddc16424a0c99314892ec12859283ad4f", + "official_package": { + "url": "https://mediaarea.net/download/binary/dvrescue/24.07/dvrescue_CLI_24.07_Mac.dmg", + "sha256": "6cda2ec5f951ebe5984da2fd5a1cbe574831bb2aa7d21de0da8218625aa12484", + "pkg_sha256": "4975e65c4fcc8f1974971fb5ecdca908c7118f3ca42c4e076dd0e364942b4483", + "extracted_binary_path": "Payload/usr/local/bin/dvrescue", + "extracted_binary_sha256": "396f26f02b6ad16fa406b890964df20ddc16424a0c99314892ec12859283ad4f", + "matches_all_eight_audited_application_releases": true + }, + "source_package": { + "url": "https://mediaarea.net/download/binary/dvrescue/24.07/dvrescue_CLI_24.07_GNU_FromSource.tar.gz", + "sha256": "e3089cf62757bb2a87bb38c353acf37c03195bcc8bcbf17565f7cb9b8ee51a72", + "MediaInfoLib_version_in_source": "24.06", + "ZenLib_version_in_source": "0.4.41", + "relationship": "Official same-release source bundle, not a reproduced or certified exact build." + }, + "original_notice_matches_source": true, + "supplement_sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "notice_sources": [ + { + "component": "DVRescue original publisher notice", + "source_path": "dvrescue/LICENSE.txt", + "source_file_sha256": "1f5d32d4ce23eb17c41ff1e78fb12860d9d04dfa2dd2a73f6f6deecde6b0fe55", + "notice_extraction": "complete file" + }, + { + "component": "MediaInfoLib 24.06", + "source_path": "MediaInfoLib/LICENSE", + "source_file_sha256": "0da6dfefb15805c2b3ce678ee79e77ab17ceb72c0f5c05b7fde7a4bcd72e10b2", + "notice_extraction": "complete file" + }, + { + "component": "ZenLib (source bundle 0.4.41; binary version unconfirmed)", + "source_path": "ZenLib/License.txt", + "source_file_sha256": "054f4c5881d8906df8b1255fdbb2eaa78f7422829cfa1c67eb1c9e252493bdde", + "notice_extraction": "complete file" + }, + { + "component": "Serial", + "source_path": "dvrescue/Source/ThirdParty/serial/LICENSE", + "source_file_sha256": "bb12b3c857da4804ccd00816a1daae298e75d314012346bb1a8995a496e2f9d0", + "notice_extraction": "complete file" + }, + { + "component": "CCDecoder", + "source_path": "dvrescue/Source/ThirdParty/ccdecoder/ccdecoder.h", + "source_file_sha256": "1059632148829e62e1dbfe0cff17dd1bbe176d663310f00614f64fb14983d1b9", + "notice_extraction": "first complete block comment" + }, + { + "component": "TinyXML2", + "source_path": "MediaInfoLib/Source/ThirdParty/tinyxml2/tinyxml2.h", + "source_file_sha256": "5818b3ac3d93901fe1e3cb3b629acc1dd60fc3a5b4bf5b300d85d105e4f30761", + "notice_extraction": "first complete block comment" + }, + { + "component": "tfsxml", + "source_path": "MediaInfoLib/Source/ThirdParty/tfsxml/tfsxml.h", + "source_file_sha256": "05010af214bdb43aef3c101848e24dec8ccd13e8106a2185830a937cd18ef924", + "notice_extraction": "first complete block comment" + }, + { + "component": "AES", + "source_path": "MediaInfoLib/Source/ThirdParty/aes-gladman/aes.h", + "source_file_sha256": "d3e9d50fd725d383e347b6dabd1f628e2b161eae686f7b0fdd90e459b7d0aa5f", + "notice_extraction": "first complete block comment" + }, + { + "component": "SHA1", + "source_path": "MediaInfoLib/Source/ThirdParty/sha1-gladman/sha1.h", + "source_file_sha256": "29afe2942fe194d6363519bcfe71059534805c6b515bdfcf34eff674838453da", + "notice_extraction": "first complete block comment" + }, + { + "component": "SHA2", + "source_path": "MediaInfoLib/Source/ThirdParty/sha2-gladman/sha2.h", + "source_file_sha256": "24666d80313c8340eb67da183a78c9a227d7969fd3b541a001b23f9ed2546379", + "notice_extraction": "first complete block comment" + }, + { + "component": "HMAC", + "source_path": "MediaInfoLib/Source/ThirdParty/hmac-gladman/hmac.h", + "source_file_sha256": "bd31fff867c6a12d935843735e780abf92ab1855c714ae848d22a62fde07c976", + "notice_extraction": "first complete block comment" + }, + { + "component": "MD5", + "source_path": "MediaInfoLib/Source/ThirdParty/md5/md5.c", + "source_file_sha256": "4326950bed41acf6aa7180dadea2c49fb27a84d0d16754b1e65434e337ee1cf5", + "notice_extraction": "first complete block comment" + } + ], + "unresolved": [ + "DeckLink SDK revision and redistribution notice mapping: source bundle omits DeckLinkAPI.h despite binary DeckLink type information.", + "Publisher build manifest confirming all static component revisions and modifications." + ], + "dynamic_dependencies": [ + "\t/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)", + "\t/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1858.112.0)", + "\t/System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation (compatibility version 1.0.0, current version 2.0.0)", + "\t/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)", + "\t/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)", + "\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)", + "\t/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)", + "\t/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)", + "\t/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)" + ], + "supplement_repository_path": "docs/audit/2026-11-13/DVRESCUE-NOTICES.txt", + "bundled_notice": "Resources/licenses/NOTICE.txt (original text retained; supplement appended)" +} diff --git a/docs/audit/2026-11-13/dvrescue-supplement-delivery.json b/docs/audit/2026-11-13/dvrescue-supplement-delivery.json new file mode 100644 index 0000000..1ca7d99 --- /dev/null +++ b/docs/audit/2026-11-13/dvrescue-supplement-delivery.json @@ -0,0 +1,202 @@ +[ + { + "tag": "v1.0.7-maintenance.1", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/v1.0.7-maintenance.1/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/v1.0.7-maintenance.1/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/v1.0.7-maintenance.1/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "1.0.6beta", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.6beta/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.6beta/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.6beta/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "1.0.5beta", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.5beta/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.5beta/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.5beta/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "1.0.4beta", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.4beta/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.4beta/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.4beta/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "1.0.0beta", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.0beta/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.0beta/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/1.0.0beta/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "0.3.0alpha", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.3.0alpha/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.3.0alpha/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.3.0alpha/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "0.2.0alpha", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.2.0alpha/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.2.0alpha/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/0.2.0alpha/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + }, + { + "tag": "alpha", + "original_assets_unchanged": true, + "release_body_readback_matches": true, + "supplements": [ + { + "name": "DVRESCUE-NOTICES-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/alpha/DVRESCUE-NOTICES-2026-11-13.txt", + "sha256": "a2f0c9345256d868dc9d4a80852de302bff49e61cf5b002fe3111c18f4c13e05", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-PROVENANCE-2026-11-13.json", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/alpha/DVRESCUE-PROVENANCE-2026-11-13.json", + "sha256": "e4d9e07cafc192f330fc8af1862701a27a9dcd248bbd5036b09ad6dfbb4f9dc8", + "public_readback_matches": true + }, + { + "name": "DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "url": "https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/download/alpha/DVRESCUE-SUPPLEMENT-SHA256SUMS-2026-11-13.txt", + "sha256": "eacdc36ec174587c1f118b6664ff42dea8a3e3151269b414e06e118fc9bc6073", + "public_readback_matches": true + } + ] + } +] diff --git a/readme.md b/readme.md index 589a169..b0e4b58 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,9 @@ A free, open-source macOS application for preserving the recording context of le > I created this because I could not find a suitable free, open-source macOS workflow for recovering and displaying my original camcorder recording dates without assembling command-line tools myself. — Zach Zarzycki (ThePolish) -**[Download the current application (1.0.6 beta)](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/1.0.6beta)** · **[Train demonstration: original and processed videos](docs/examples/TRAIN_DV_PRESERVATION.md)** · **[Preservation roadmap](docs/ROADMAP.md)** +**[Recommended established release: v1.0.6 (published as beta)](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/1.0.6beta)** · **[Train demonstration: original and processed videos](docs/examples/TRAIN_DV_PRESERVATION.md)** · **[Preservation roadmap](docs/ROADMAP.md)** + +**Active experimental development:** [`maintenance/1.0.7`](https://github.com/shardsofaperture/DVMetaDataBurnIn/tree/maintenance/1.0.7) · [Preview 1 download](https://github.com/shardsofaperture/DVMetaDataBurnIn/releases/tag/v1.0.7-maintenance.1) · [tests and known limitations](https://github.com/shardsofaperture/DVMetaDataBurnIn/blob/maintenance/1.0.7/docs/MAINTENANCE_1.0.7.md). The branch includes newer fixes than the unchanged preview package. Stable application source remains [v1.0.6 on main](https://github.com/shardsofaperture/DVMetaDataBurnIn/tree/main). The train demonstration includes the complete supplied DV AVI, the owner's timestamped MP4, and separately identified maintenance-generated comparisons. Downloadable hashes, measured stream properties, genuine before/after frames, and reproduction commands make the results inspectable. diff --git a/scripts/tests/test_release_integrity.py b/scripts/tests/test_release_integrity.py new file mode 100644 index 0000000..6d814e3 --- /dev/null +++ b/scripts/tests/test_release_integrity.py @@ -0,0 +1,66 @@ +import hashlib +import importlib.util +import json +from pathlib import Path +import plistlib +import tempfile +import unittest +import zipfile + +spec = importlib.util.spec_from_file_location('verify_release', Path(__file__).parents[1]/'verify_release.py') +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) + + +class IntegrityTests(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.archive = self.root/'app.zip' + self.project = self.root/'project.pbxproj' + self.project.write_text('MARKETING_VERSION = 1.0.7;\nMARKETING_VERSION = 1.0.7;') + self.manifest = dict(release_tag='v1.0.7-maintenance.2', version='1.0.7', source_commit='a'*40, + executable_sha256=hashlib.sha256(b'app').hexdigest(), bundled_tools_sha256={}) + self.package() + + def package(self, version='1.0.7', embedded=None): + with zipfile.ZipFile(self.archive, 'w') as z: + z.writestr('App.app/Contents/Info.plist', plistlib.dumps(dict(CFBundleShortVersionString=version, CFBundleExecutable='App'))) + z.writestr('App.app/Contents/MacOS/App', b'app') + z.writestr('App.app/Contents/Resources/BUILD-MANIFEST.json', json.dumps(embedded or self.manifest)) + self.manifest['archive'] = dict(name='app.zip', bytes=self.archive.stat().st_size, + sha256=hashlib.sha256(self.archive.read_bytes()).hexdigest()) + + def check(self): + return module.verify('v1.0.7-maintenance.2', self.manifest, self.archive, self.project) + + def test_valid_package(self): + self.assertEqual(self.check()['result'], 'passed') + + def test_historical_style_plist_mismatch(self): + self.package(version='1.0.6') + with self.assertRaisesRegex(ValueError, 'Info.plist'): self.check() + + def test_project_mismatch(self): + self.project.write_text('MARKETING_VERSION = 1.0.6;') + with self.assertRaisesRegex(ValueError, 'Source project'): self.check() + + def test_manifest_version_mismatch(self): + self.manifest['version'] = '1.0.6' + with self.assertRaisesRegex(ValueError, 'Tag and manifest'): self.check() + + def test_embedded_commit_mismatch(self): + self.package(embedded=dict(self.manifest, source_commit='b'*40)) + with self.assertRaisesRegex(ValueError, 'Embedded build'): self.check() + + def test_archive_tampering(self): + self.manifest['archive']['sha256'] = '0'*64 + with self.assertRaisesRegex(ValueError, 'SHA-256'): self.check() + + def test_executable_mismatch(self): + self.manifest['executable_sha256'] = '0'*64 + with self.assertRaisesRegex(ValueError, 'executable hash'): self.check() + + +if __name__ == '__main__': unittest.main() diff --git a/scripts/verify_release.py b/scripts/verify_release.py new file mode 100644 index 0000000..f6b2e1a --- /dev/null +++ b/scripts/verify_release.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Fail closed on application release identity; Python standard library only.""" +import argparse +import hashlib +import json +from pathlib import Path +import plistlib +import re +import zipfile + + +def verify(tag, manifest, archive, project=None): + match = re.fullmatch(r'v?(\d+\.\d+\.\d+)(?:beta|alpha|[-.][A-Za-z0-9.-]+)?', tag) + if not match: + raise ValueError('Not an application version tag') + version = match[1] + if manifest['release_tag'] != tag or manifest['version'] != version: + raise ValueError('Tag and manifest version differ') + commit = manifest['source_commit'] + if not re.fullmatch(r'[0-9a-f]{40}', commit): + raise ValueError('Manifest requires a full source commit') + if project: + versions = re.findall(r'MARKETING_VERSION = ([^;]+);', project.read_text()) + if not versions or set(versions) != {version}: + raise ValueError('Source project and release version differ') + identity = manifest['archive'] + if archive.name != identity['name'] or archive.stat().st_size != identity['bytes']: + raise ValueError('Archive name or size differs from manifest') + if hashlib.sha256(archive.read_bytes()).hexdigest() != identity['sha256']: + raise ValueError('Archive SHA-256 differs from manifest') + with zipfile.ZipFile(archive) as z: + if z.testzip() is not None: + raise ValueError('ZIP CRC failure') + plists = [n for n in z.namelist() if n.endswith('.app/Contents/Info.plist') and not n.startswith('__MACOSX/')] + if len(plists) != 1: + raise ValueError('Expected exactly one application Info.plist') + plist = plistlib.loads(z.read(plists[0])) + if plist['CFBundleShortVersionString'] != version: + raise ValueError('Built Info.plist and release version differ') + prefix = plists[0].removesuffix('Info.plist') + embedded = json.loads(z.read(prefix+'Resources/BUILD-MANIFEST.json')) + for key in ('release_tag', 'version', 'source_commit'): + if embedded[key] != manifest[key]: + raise ValueError('Embedded build identity differs: '+key) + binary = z.read(prefix+'MacOS/'+plist['CFBundleExecutable']) + if hashlib.sha256(binary).hexdigest() != manifest['executable_sha256']: + raise ValueError('App executable hash differs') + for tool, expected in manifest['bundled_tools_sha256'].items(): + if tool not in ('ffmpeg', 'dvrescue'): + raise ValueError('Unexpected bundled tool') + if hashlib.sha256(z.read(prefix+'Resources/'+tool)).hexdigest() != expected: + raise ValueError('Bundled tool hash differs: '+tool) + return {'tag': tag, 'version': version, 'source_commit': commit, + 'archive_sha256': identity['sha256'], 'result': 'passed'} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--tag', required=True) + parser.add_argument('--manifest', type=Path, required=True) + parser.add_argument('--archive', type=Path, required=True) + parser.add_argument('--project', type=Path) + args = parser.parse_args() + try: + print(json.dumps(verify(args.tag, json.loads(args.manifest.read_text()), args.archive, args.project), indent=2)) + except (ValueError, KeyError, OSError, zipfile.BadZipFile) as error: + parser.exit(1, 'Release validation failed: '+str(error)+'\n') + + +if __name__ == '__main__': + main()