From 85ce08f6c8bb42359279e6c07ca90f78af30747a Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 9 Oct 2024 11:31:52 +1300 Subject: [PATCH] feat: Update boilerplate to TLP 6.0 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 #1171 --- xml2rfc/boilerplate_tlp.py | 71 +++++++++++++++++++++++++++++++++++++ xml2rfc/writers/base.py | 6 +++- xml2rfc/writers/preptool.py | 11 +++--- 3 files changed, 83 insertions(+), 5 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 1a38b6f3b..7469ab693 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -255,4 +255,75 @@ """, ], }, + "6.0": { + # TODO: Update the source URL + "draft": [ + """ + This Internet-Draft is submitted in full conformance with the + provisions of BCP 78 and BCP 79. + """, + ], + "IETF": [ + """ + Copyright (c) {year} IETF Intellectual Property Management + Corporation (IPMC) and the persons identified as the + document authors. All rights reserved. + """, + """ + This document is subject to BCP 78 and the IETF IPMC's Legal + Provisions Relating to IETF Documents + () 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. + """, + ], + "alt": [ + """ + Copyright (c) {year} IETF Intellectual Property Management + Corporation (IPMC) and the persons identified as the + document authors. All rights reserved. + """, + """ + This document is subject to BCP 78 and the IETF IPMC's Legal + Provisions Relating to IETF Documents + () 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. + """, + ], + "noModification": [ + """ + 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. + """, + ], + "noDerivatives": [ + """ + 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. + """, + ], + "pre5378": [ + """ + 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. + """, + ], + }, } diff --git a/xml2rfc/writers/base.py b/xml2rfc/writers/base.py index 16cf7819e..96e73d620 100644 --- a/xml2rfc/writers/base.py +++ b/xml2rfc/writers/base.py @@ -190,7 +190,7 @@ class BaseRfcWriter: 'table_align': 'center', 'table_style': 'full', 'ttcol_align': 'left', - 'ipr': 'trust200902', + 'ipr': 'tlp202412', 'submissionType': 'IETF', 'consensus': 'no', } @@ -438,6 +438,10 @@ class BaseRfcWriter: # Valid IPR attributes supported_ipr = [ + 'tlp202412', + 'noModificationTlp202412', + 'noDerivativesTlp202412', + 'pre5378Tlp202412', 'trust200902', 'noModificationTrust200902', 'noDerivativesTrust200902', diff --git a/xml2rfc/writers/preptool.py b/xml2rfc/writers/preptool.py index 2b0ec08dc..8f74b0d17 100644 --- a/xml2rfc/writers/preptool.py +++ b/xml2rfc/writers/preptool.py @@ -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 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: @@ -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')