Skip to content

Commit

Permalink
Replace embedded license with reference to AG 30
Browse files Browse the repository at this point in the history
  • Loading branch information
palemieux committed Aug 20, 2024
1 parent 8099cc6 commit e2d30d5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 51 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build SMPTE document

on: [push, pull_request]
on:
push:
pull_request:
release:
types: [published]

env:
AWS_REGION: us-east-1
Expand All @@ -11,7 +15,12 @@ env:
jobs:
build:
runs-on: ubuntu-latest
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
if: >
github.repository_owner == 'SMPTE' && (
(github.event_name == 'push' && github.ref == 'refs/heads/main')
|| github.event_name == 'pull_request'
|| github.event_name == 'release'
)
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
Expand All @@ -24,14 +33,13 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
submodules: true

- name: Set repository name
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV

- name: Check out all branches with the exception of the current branch
run: CUR_BRANCH=$(git rev-parse --abbrev-ref HEAD); for i in `git branch -a | grep remote | grep -v HEAD | grep -v ${CUR_BRANCH}`; do git branch --track ${i#remotes/origin/} $i; done
run: CUR_BRANCH=$(git rev-parse --abbrev-ref HEAD); for i in `git branch -a | grep remote | grep -v "remotes/pull" | grep -v HEAD | grep -v ${CUR_BRANCH}`; do git branch --track ${i#remotes/origin/} $i; done

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand All @@ -44,7 +52,7 @@ jobs:
if: github.repository != 'SMPTE/html-pub'
with:
AWS_S3_REGION: ${{env.AWS_REGION}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -54,7 +62,7 @@ jobs:
if: github.repository == 'SMPTE/html-pub'
with:
AWS_S3_REGION: ${{env.AWS_REGION}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
49 changes: 6 additions & 43 deletions doc/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<a>https://datatracker.ietf.org/doc/html/rfc7405.txt</a></li>
<li><cite id="bib-ietf-rfc-8259">IETF RFC 8259</cite>, The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray,
<a>http://www.ietf.org/rfc/rfc8259.txt</a></li>
<li><cite id="bib-ag-30">SMPTE AG 30</cite>, Software License <a>https://www.smpte.org/about/policies-and-governance</a></li>
</ul>
</section>

Expand Down Expand Up @@ -283,72 +284,34 @@ <h2>Copyright and License</h2>
<h3>License</h3>

<p>
Any <a>SMPTE JSON Structure</a> or <a>SMPTE JSON Schema Resource</a>, whether provided within the prose or as an Additional Element of an Engineering Document, shall be licensed according to <a href="#sec-json-doc-license"></a>.
</p>

<p class="note">
The license portion of Annex A is verbatim the BSD-3-Clause license available at <a>https://spdx.org/licenses/BSD-3-Clause.html</a>.
Any <a>SMPTE JSON Structure</a> or <a>SMPTE JSON Schema Resource</a>, whether provided within the prose or as an Additional Element of an Engineering Document, shall be licensed according to <a href="#bib-ag-30"></a>.
</p>
</section>

<section id="sec-cc-license-schema-resources">
<h3>Copyright and License in <a>SMPTE JSON Schema Resource</a>s</h3>

<p>Any <a>SMPTE JSON Schema Resource</a> shall include the copyright and license provided in <a href="#sec-json-doc-license"></a> in the form of the <code>$comment</code> element specified in <a href="#sec-cc-license-element"></a>.</p>
<p>Any <a>SMPTE JSON Schema Resource</a> shall include the copyright and license provided in <a href="#bib-ag-30"></a> in the form of the <code>$comment</code> element specified in <a href="#sec-cc-license-element"></a>.</p>

</section>
</section>

<section class="annex" id="sec-json-doc-license">
<h2>JSON Document License</h2>

<pre>
Copyright (c), Society of Motion Pictures and Television Engineers.

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.
</pre>

</section>

<section class="annex" id="sec-cc-license-element">
<h2>Copyright and License Element</h2>

<p>
The following JSON elements present the SMPTE copyright notice and the JSON Schema identifier, a URI, which is useable as a URL to access the JSON Schema Definition Document which presents, among other things, the JSON Document License shown in <a href="#sec-json-doc-license"></a>.
The following JSON elements present the SMPTE copyright notice and the JSON Schema identifier, a URI, which is useable as a URL to access the JSON Schema Definition Document which presents, among other things, the license specified at <a href="#bib-ag-30"></a>.
</p>

<pre>"$comment": "Copyright (c), Society of Motion Pictures and Television Engineers. Licensed under BSD-3-Clause (https://spdx.org/licenses/BSD-3-Clause.html)."</pre>
<pre>"$comment": "See SMPTE AG 30 (https://www.smpte.org/about/policies-and-governance) for copyright and license information."</pre>

<p>The following example JSON Schema incorporates the above element in accordance with <a href="#sec-cc-license-schema-resources"></a>, with the initial keyword order recommended in <a href="#sec-keyword-order"></a>.</p>

<pre>
{
"$schema": "https://json-schema.org/draft/2020-12/meta/core",
"$id": "https://smpte-ra.org/json-schema/2199-1/2022/foo",
"$comment": "Copyright (c), Society of Motion Pictures and Television Engineers. Licensed under BSD-3-Clause (https://spdx.org/licenses/BSD-3-Clause.html).",
"$comment": "See SMPTE AG 30 (https://www.smpte.org/about/policies-and-governance) for copyright and license information.",
"title": "foo",
"type": "object",
"description": "This is an example schema for a fictitious foo object.",
Expand Down
2 changes: 1 addition & 1 deletion tooling
Submodule tooling updated 55 files
+13 −5 .github/workflows/main.yml
+1 −1 .smpte-build.json
+7 −0 css/smpte-errors.css
+335 −80 css/smpte.css
+1,343 −141 doc/main.html
+41 −0 doc/snippets/list-sample-complex.txt
+8 −0 doc/snippets/pre-commit
+7 −1 doc/snippets/skeleton.html
+27 −0 doc/snippets/tab-sample-tabledata-centercell.txt
+27 −0 doc/snippets/tab-sample-tabledata-colcenter.txt
+30 −0 doc/snippets/tab-sample-tabledata-colspan.txt
+52 −0 doc/snippets/tab-sample-tabledata-complex.txt
+27 −0 doc/snippets/tab-sample-tabledata-defaultalign.txt
+32 −0 doc/snippets/tab-sample-tabledata-multiheader.txt
+26 −0 doc/snippets/tab-sample-tabledata-rowspan.txt
+190 −1 js/common.mjs
+36 −0 js/patchPDF.js
+724 −197 js/validate.mjs
+3,295 −1,874 package-lock.json
+7 −5 package.json
+407 −72 scripts/build.mjs
+2 −2 scripts/validate.mjs
+509 −225 smpte.js
+ static/smpte-icon.png
+39 −30 test/resources/html/validation/annex-reference-valid.html
+0 −1 test/resources/html/validation/bibliography-valid.html
+0 −1 test/resources/html/validation/body-order-invalid.html
+31 −0 test/resources/html/validation/dl-valid.html
+0 −1 test/resources/html/validation/effectiveDateTime-invalid.html
+0 −1 test/resources/html/validation/elements-invalid.html
+0 −1 test/resources/html/validation/elements-valid.html
+21 −0 test/resources/html/validation/empty-anchor-invalid.html
+23 −0 test/resources/html/validation/example-valid.html
+0 −1 test/resources/html/validation/general-valid.html
+23 −0 test/resources/html/validation/note-valid.html
+30 −0 test/resources/html/validation/ol-valid.html
+0 −1 test/resources/html/validation/om-valid.html
+26 −0 test/resources/html/validation/one-subclause-invalid.html
+23 −0 test/resources/html/validation/pub-version-valid.html
+18 −0 test/resources/html/validation/pubConfidential-invalid.html
+18 −0 test/resources/html/validation/pubConfidential-valid.html
+0 −1 test/resources/html/validation/pubDateTime-invalid.html
+0 −1 test/resources/html/validation/pubState-invalid.html
+18 −0 test/resources/html/validation/pubVersion-invalid.html
+22 −0 test/resources/html/validation/st-missing-suite-title-invalid.html
+21 −0 test/resources/html/validation/st-standalone-valid.html
+23 −0 test/resources/html/validation/st-valid.html
+29 −0 test/resources/html/validation/terms-2-invalid.html
+36 −0 test/resources/html/validation/terms-2-valid.html
+36 −0 test/resources/html/validation/terms-3-invalid.html
+29 −0 test/resources/html/validation/terms-invalid.html
+42 −0 test/resources/html/validation/terms-note-to-entry-2-valid.html
+14 −3 test/resources/html/validation/terms-valid.html
+16 −8 test/src/testValidation.mjs
+31 −2 workflows/action.yml

0 comments on commit e2d30d5

Please sign in to comment.