From 56da31184dc50468d3cadda40984f342642a3396 Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 9 Oct 2024 11:31:52 +1300 Subject: [PATCH 1/9] 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') From b58ffcb1cd1387c577fff9014d2abb72574a8761 Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 9 Oct 2024 11:44:46 +1300 Subject: [PATCH 2/9] test: Update tests --- tests/input/elements.xml | 4 ++-- tests/input/rfc99999.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/input/elements.xml b/tests/input/elements.xml index 67eecd9fc..f2d7badef 100644 --- a/tests/input/elements.xml +++ b/tests/input/elements.xml @@ -1,6 +1,6 @@ - @@ -91,7 +91,7 @@ - + This is the abstract. diff --git a/tests/input/rfc99999.xml b/tests/input/rfc99999.xml index 239ddc2a9..36826c219 100644 --- a/tests/input/rfc99999.xml +++ b/tests/input/rfc99999.xml @@ -5,7 +5,7 @@ ]> - + Fake RFC From 40efa8ff755e24540479af391e266845abac84e9 Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Sat, 12 Oct 2024 00:17:33 +1300 Subject: [PATCH 3/9] fix: Change IPMC to IPM Drop corporation from the name. --- xml2rfc/boilerplate_tlp.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 7469ab693..5aaf17a9f 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -265,30 +265,28 @@ ], "IETF": [ """ - Copyright (c) {year} IETF Intellectual Property Management - Corporation (IPMC) and the persons identified as the - document authors. All rights reserved. + Copyright (c) {year} IETF Intellectual Property Management (IPM) + and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPMC's Legal + This document is subject to BCP 78 and the IETF IPM'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 + Section 4.e of the IPM 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. + Copyright (c) {year} IETF Intellectual Property Management (IPM) + and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPMC's Legal + This document is subject to BCP 78 and the IETF IPM's Legal Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents @@ -315,7 +313,7 @@ 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 + material may not have granted the IETF IPM 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 From a7bd7478efd44966c52e3e5673a7c37929e1e94c Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Tue, 15 Oct 2024 07:22:28 +1300 Subject: [PATCH 4/9] fix: Update 6.0 boilerplate text --- xml2rfc/boilerplate_tlp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 5aaf17a9f..9be7b7d81 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -265,11 +265,11 @@ ], "IETF": [ """ - Copyright (c) {year} IETF Intellectual Property Management (IPM) + Copyright (c) {year} IETF Intellectual Property Management Corporation and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPM's Legal + This document is subject to BCP 78 and the IETF IPM Technical Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents @@ -282,11 +282,11 @@ ], "alt": [ """ - Copyright (c) {year} IETF Intellectual Property Management (IPM) + Copyright (c) {year} IETF Intellectual Property Management Corporation and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPM's Legal + This document is subject to BCP 78 and the IETF IPM Technical Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents From 2cbce15d97e543c5f53ea50bd6d0af8a7ecb31c2 Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 23 Oct 2024 10:30:51 +1300 Subject: [PATCH 5/9] fix: Update 6.0 boilerplate to say "IETF IPM Technical Legal Provisions" --- xml2rfc/boilerplate_tlp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 9be7b7d81..3f16a7fd0 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -269,14 +269,14 @@ and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPM Technical + This document is subject to BCP 78 and the IETF IPM Technical 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 IPM Legal Provisions and are provided without + Section 4.e of the IETF IPM Technical Legal Provisions and are provided without warranty as described in the Revised BSD License. """, ], @@ -286,7 +286,7 @@ and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPM Technical + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents From dae20dccc39876800e71efec8c858dd0400734bb Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Wed, 23 Oct 2024 10:36:13 +1300 Subject: [PATCH 6/9] fix: Update 6.0 boilerplate URL --- xml2rfc/boilerplate_tlp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 3f16a7fd0..6428c2586 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -271,7 +271,7 @@ """ This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - () in effect on the date of + () 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 @@ -288,7 +288,7 @@ """ This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - () in effect on the date of + () 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. From c7bbd153d1c919e1eb3eca59528f726fff1aa8c6 Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Thu, 24 Oct 2024 08:11:16 +1300 Subject: [PATCH 7/9] chore: Run yestests pre-changes --- tests/valid/indexes.pages.text | 12 ++++++------ tests/valid/indexes.prepped.xml | 6 +++--- tests/valid/indexes.text | 6 +++--- tests/valid/indexes.v3.html | 8 ++++---- tests/valid/manpage.txt | 2 +- tests/valid/sourcecode.pages.text | 14 +++++++------- tests/valid/sourcecode.prepped.xml | 6 +++--- tests/valid/sourcecode.text | 6 +++--- tests/valid/sourcecode.v3.html | 8 ++++---- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/valid/indexes.pages.text b/tests/valid/indexes.pages.text index 8ececd1b5..627d17999 100644 --- a/tests/valid/indexes.pages.text +++ b/tests/valid/indexes.pages.text @@ -3,9 +3,9 @@ Network Working Group H. Person, Ed. -Internet-Draft October 22, 2024 +Internet-Draft October 23, 2024 Intended status: Experimental -Expires: April 25, 2025 +Expires: April 26, 2025 xml2rfc index tests @@ -26,7 +26,7 @@ Status of This Memo time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on April 25, 2025. + This Internet-Draft will expire on April 26, 2025. Copyright Notice @@ -53,7 +53,7 @@ Table of Contents -Person Expires April 25, 2025 [Page 1] +Person Expires April 26, 2025 [Page 1] Internet-Draft xml2rfc index tests October 2024 @@ -109,7 +109,7 @@ Index -Person Expires April 25, 2025 [Page 2] +Person Expires April 26, 2025 [Page 2] Internet-Draft xml2rfc index tests October 2024 @@ -165,4 +165,4 @@ Author's Address -Person Expires April 25, 2025 [Page 3] +Person Expires April 26, 2025 [Page 3] diff --git a/tests/valid/indexes.prepped.xml b/tests/valid/indexes.prepped.xml index 79e9f8b41..1bc59bdf1 100644 --- a/tests/valid/indexes.prepped.xml +++ b/tests/valid/indexes.prepped.xml @@ -1,5 +1,5 @@ - + @@ -20,7 +20,7 @@ - +
Status of This Memo @@ -41,7 +41,7 @@ material or to cite them other than as "work in progress." - This Internet-Draft will expire on 25 April 2025. + This Internet-Draft will expire on 26 April 2025.
diff --git a/tests/valid/indexes.text b/tests/valid/indexes.text index 69d166bc9..d59c6a413 100644 --- a/tests/valid/indexes.text +++ b/tests/valid/indexes.text @@ -3,9 +3,9 @@ Network Working Group H. Person, Ed. -Internet-Draft October 22, 2024 +Internet-Draft October 23, 2024 Intended status: Experimental -Expires: April 25, 2025 +Expires: April 26, 2025 xml2rfc index tests @@ -26,7 +26,7 @@ Status of This Memo time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on April 25, 2025. + This Internet-Draft will expire on April 26, 2025. Copyright Notice diff --git a/tests/valid/indexes.v3.html b/tests/valid/indexes.v3.html index da81bfe6a..236a16dcd 100644 --- a/tests/valid/indexes.v3.html +++ b/tests/valid/indexes.v3.html @@ -23,7 +23,7 @@ Person -Expires April 25, 2025 +Expires April 26, 2025 [Page] @@ -36,12 +36,12 @@
indexes-00
Published:
- +
Intended Status:
Experimental
Expires:
-
+
Author:
@@ -71,7 +71,7 @@

time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

- This Internet-Draft will expire on April 25, 2025.

+ This Internet-Draft will expire on April 26, 2025.

diff --git a/tests/valid/rfc99999.pages.text b/tests/valid/rfc99999.pages.text index 14a0ac081..6fc5f9b77 100644 --- a/tests/valid/rfc99999.pages.text +++ b/tests/valid/rfc99999.pages.text @@ -30,18 +30,19 @@ Status of This Memo Copyright Notice - Copyright (c) 2024 IETF Trust and the persons identified as the - document authors. All rights reserved. + Copyright (c) 2024 IETF Intellectual Property Management Corporation + and the persons identified as the document authors. All rights + reserved. - This document is subject to BCP 78 and the IETF Trust's Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - (https://trustee.ietf.org/license-info) in effect on the date of + (https://www.ietf-ipm.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 - Trust Legal Provisions and are provided without warranty as described - in the Revised BSD License. + IETF IPM Technical Legal Provisions and are provided without warranty + as described in the Revised BSD License. Table of Contents diff --git a/tests/valid/rfc99999.prepped.xml b/tests/valid/rfc99999.prepped.xml index 4e014172c..bda1777f1 100644 --- a/tests/valid/rfc99999.prepped.xml +++ b/tests/valid/rfc99999.prepped.xml @@ -1,5 +1,5 @@ - + @@ -41,18 +41,18 @@
Copyright Notice - Copyright (c) 2024 IETF Trust and the persons identified as the - document authors. All rights reserved. + Copyright (c) 2024 IETF Intellectual Property Management Corporation + and the persons identified as the document authors. All rights reserved. - This document is subject to BCP 78 and the IETF Trust's Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - () in effect on the date of + () 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 Trust Legal Provisions and are provided without + Section 4.e of the IETF IPM Technical Legal Provisions and are provided without warranty as described in the Revised BSD License.
diff --git a/tests/valid/rfc99999.text b/tests/valid/rfc99999.text index 14a0ac081..6fc5f9b77 100644 --- a/tests/valid/rfc99999.text +++ b/tests/valid/rfc99999.text @@ -30,18 +30,19 @@ Status of This Memo Copyright Notice - Copyright (c) 2024 IETF Trust and the persons identified as the - document authors. All rights reserved. + Copyright (c) 2024 IETF Intellectual Property Management Corporation + and the persons identified as the document authors. All rights + reserved. - This document is subject to BCP 78 and the IETF Trust's Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - (https://trustee.ietf.org/license-info) in effect on the date of + (https://www.ietf-ipm.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 - Trust Legal Provisions and are provided without warranty as described - in the Revised BSD License. + IETF IPM Technical Legal Provisions and are provided without warranty + as described in the Revised BSD License. Table of Contents diff --git a/tests/valid/rfc99999.txt b/tests/valid/rfc99999.txt index 14a0ac081..6fc5f9b77 100644 --- a/tests/valid/rfc99999.txt +++ b/tests/valid/rfc99999.txt @@ -30,18 +30,19 @@ Status of This Memo Copyright Notice - Copyright (c) 2024 IETF Trust and the persons identified as the - document authors. All rights reserved. + Copyright (c) 2024 IETF Intellectual Property Management Corporation + and the persons identified as the document authors. All rights + reserved. - This document is subject to BCP 78 and the IETF Trust's Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - (https://trustee.ietf.org/license-info) in effect on the date of + (https://www.ietf-ipm.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 - Trust Legal Provisions and are provided without warranty as described - in the Revised BSD License. + IETF IPM Technical Legal Provisions and are provided without warranty + as described in the Revised BSD License. Table of Contents diff --git a/tests/valid/rfc99999.v2v3.xml b/tests/valid/rfc99999.v2v3.xml index 35cc25673..56f1ee297 100644 --- a/tests/valid/rfc99999.v2v3.xml +++ b/tests/valid/rfc99999.v2v3.xml @@ -5,7 +5,7 @@ ]> - + Fake RFC diff --git a/tests/valid/rfc99999.v3.html b/tests/valid/rfc99999.v3.html index 58440cc3b..f23926281 100644 --- a/tests/valid/rfc99999.v3.html +++ b/tests/valid/rfc99999.v3.html @@ -87,17 +87,17 @@

- Copyright (c) 2024 IETF Trust and the persons identified as the - document authors. All rights reserved.

+ Copyright (c) 2024 IETF Intellectual Property Management Corporation + and the persons identified as the document authors. All rights reserved.

- This document is subject to BCP 78 and the IETF Trust's Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents - (https://trustee.ietf.org/license-info) in effect on the date of + (https://www.ietf-ipm.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 Trust Legal Provisions and are provided without + Section 4.e of the IETF IPM Technical Legal Provisions and are provided without warranty as described in the Revised BSD License.

From a186c43d45faa16ce9f3d1ef9d3bfe50fdefc3ee Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Thu, 24 Oct 2024 08:35:31 +1300 Subject: [PATCH 9/9] fix: Remove extra space --- xml2rfc/boilerplate_tlp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml2rfc/boilerplate_tlp.py b/xml2rfc/boilerplate_tlp.py index 6428c2586..e3b0f1ec8 100644 --- a/xml2rfc/boilerplate_tlp.py +++ b/xml2rfc/boilerplate_tlp.py @@ -269,7 +269,7 @@ and the persons identified as the document authors. All rights reserved.
""", """ - This document is subject to BCP 78 and the IETF IPM Technical Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents @@ -286,7 +286,7 @@ and the persons identified as the document authors. All rights reserved. """, """ - This document is subject to BCP 78 and the IETF IPM Technical Legal + This document is subject to BCP 78 and the IETF IPM Technical Legal Provisions Relating to IETF Documents () in effect on the date of publication of this document. Please review these documents