Skip to content

Commit

Permalink
feat: Update boilerplate to TLP 6.0
Browse files Browse the repository at this point in the history
This changes copyright from IETF Trust to IETF Intellectual Property Management
Corporation (IPMC).

This introduces boilerplate version 6.0.

This introduces the following new `ipr` values for v3 specification:
    * `tpl202412`
    * `noModificationTpl202412`
    * `noDerivativesTpl202412`
    * `pre5378Tpl202412`

This sets `tpl202412` as the default value for `ipr` attribute.

Fixes ietf-tools#1171
  • Loading branch information
kesara committed Oct 9, 2024
1 parent 0b4bea0 commit 549a21d
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 5 deletions.
71 changes: 71 additions & 0 deletions xml2rfc/boilerplate_tlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,75 @@
</t>""",
],
},
"6.0": {
# TODO: Update the source URL
"draft": [
"""<t>
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
</t>""",
],
"IETF": [
"""<t>
Copyright (c) {year} IETF Intellectual Property Management
Corporation (IPMC) and the persons identified as the
document authors. All rights reserved.
</t>""",
"""<t>
This document is subject to BCP 78 and the IETF IPMC's Legal
Provisions Relating to IETF Documents
(<eref target="{scheme}://trustee.ietf.org/license-info"/>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the IPMC Legal Provisions and are provided without
warranty as described in the Revised BSD License.
</t>""",
],
"alt": [
"""<t>
Copyright (c) {year} IETF Intellectual Property Management
Corporation (IPMC) and the persons identified as the
document authors. All rights reserved.
</t>""",
"""<t>
This document is subject to BCP 78 and the IETF IPMC's Legal
Provisions Relating to IETF Documents
(<eref target="{scheme}://trustee.ietf.org/license-info"/>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document.
</t>""",
],
"noModification": [
"""<t>
This document may not be modified, and derivative works of it may
not be created, except to format it for publication as an RFC or
to translate it into languages other than English.
</t>""",
],
"noDerivatives": [
"""<t>
This document may not be modified, and derivative works of it may
not be created, and it may not be published except as an
Internet-Draft.
</t>""",
],
"pre5378": [
"""<t>
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF IPMC the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s)
controlling the copyright in such materials, this document may not
be modified outside the IETF Standards Process, and derivative
works of it may not be created outside the IETF Standards Process,
except to format it for publication as an RFC or to translate it
into languages other than English.
</t>""",
],
},
}
6 changes: 5 additions & 1 deletion xml2rfc/writers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class BaseRfcWriter:
'table_align': 'center',
'table_style': 'full',
'ttcol_align': 'left',
'ipr': 'trust200902',
'ipr': 'tlp202412',
'submissionType': 'IETF',
'consensus': 'no',
}
Expand Down Expand Up @@ -438,6 +438,10 @@ class BaseRfcWriter:

# Valid IPR attributes
supported_ipr = [
'tlp202412',
'noModificationTlp202412',
'noDerivativesTlp202412',
'pre5378Tlp202412',
'trust200902',
'noModificationTrust200902',
'noDerivativesTrust200902',
Expand Down
11 changes: 7 additions & 4 deletions xml2rfc/writers/preptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ def boilerplate_insert_copyright_notice(self, e, p):
subtype = self.root.get('submissionType')
if not ipr:
self.die(self.root, "Missing ipr attribute on <rfc> element.")
if not ipr.endswith('trust200902'):
if not (ipr.endswith("tlp202412") or ipr.endswith("trust200902")):
self.die(self.root, "Unknown ipr attribute: %s" % (self.root.get('ipr'), ))
#
if self.date < tlp_2_start_date:
Expand All @@ -1112,11 +1112,14 @@ def boilerplate_insert_copyright_notice(self, e, p):
elif self.date < tlp_4_start_date:
tlp = "3.0"
stream = "n/a"
else:
elif ipr.endswith("trust200902"):
# The only difference between 4.0 and 5.0 is selective URL scheme,
# which we handle using the http cutover date, through interpolation:
tlp = "5.0"
stream = 'IETF' if subtype == 'IETF' else 'alt'
tlp = "5.0"
stream = "IETF" if subtype == "IETF" else "alt"
else:
tlp = "6.0"
stream = "IETF" if subtype == "IETF" else "alt"
format_dict = {'year': self.date.year, }
format_dict['scheme'] = 'http' if self.date < self.boilerplate_https_date else 'https'
section = self.element('section', numbered='false', toc='exclude', anchor='copyright')
Expand Down

0 comments on commit 549a21d

Please sign in to comment.