[rtems-central commit] spec: Generalize requirement references

Sebastian Huber sebh at rtems.org
Wed Sep 15 13:42:37 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    b65856c669e1b6781b29a2911a907ee7b6155bb2
Changeset: http://git.rtems.org/rtems-central/commit/?id=b65856c669e1b6781b29a2911a907ee7b6155bb2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 15 10:56:41 2021 +0200

spec: Generalize requirement references

---

 spec/spec/external-reference-file.yml              | 27 +++++++++++++++
 spec/spec/external-reference-generic.yml           | 38 ++++++++++++++++++++++
 ...erence-list.yml => external-reference-list.yml} |  6 ++--
 ...rement-reference.yml => external-reference.yml} | 19 ++++++-----
 spec/spec/requirement-reference-type.yml           | 24 --------------
 spec/spec/requirement-validation.yml               |  5 ++-
 spec/spec/requirement.yml                          |  2 +-
 spec/spec/sha256.yml                               | 18 ++++++++++
 8 files changed, 102 insertions(+), 37 deletions(-)

diff --git a/spec/spec/external-reference-file.yml b/spec/spec/external-reference-file.yml
new file mode 100644
index 0000000..f2b6d79
--- /dev/null
+++ b/spec/spec/external-reference-file.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: spec-member
+  uid: root
+- role: spec-refinement
+  spec-key: type
+  spec-value: file
+  uid: external-reference
+spec-description: |
+  It specifies a reference to a file.
+spec-example: null
+spec-info:
+  dict:
+    attributes:
+      hash:
+        description: |
+          It shall be the SHA256 hash value of the content of the referenced
+          file.
+        spec-type: sha256
+    description: null
+    mandatory-attributes: all
+spec-name: External File Reference
+spec-type: external-reference-file
+type: spec
diff --git a/spec/spec/external-reference-generic.yml b/spec/spec/external-reference-generic.yml
new file mode 100644
index 0000000..f8f3d33
--- /dev/null
+++ b/spec/spec/external-reference-generic.yml
@@ -0,0 +1,38 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: spec-member
+  uid: root
+- role: spec-refinement
+  spec-key: type
+  spec-value: define
+  uid: external-reference
+- role: spec-refinement
+  spec-key: type
+  spec-value: function
+  uid: external-reference
+- role: spec-refinement
+  spec-key: type
+  spec-value: group
+  uid: external-reference
+- role: spec-refinement
+  spec-key: type
+  spec-value: macro
+  uid: external-reference
+- role: spec-refinement
+  spec-key: type
+  spec-value: variable
+  uid: external-reference
+spec-description: |
+  It specifies a reference to an object of the specified type.
+spec-example: null
+spec-info:
+  dict:
+    attributes: {}
+    description: null
+    mandatory-attributes: all
+spec-name: Generic External Reference
+spec-type: external-reference-generic
+type: spec
diff --git a/spec/spec/requirement-reference-list.yml b/spec/spec/external-reference-list.yml
similarity index 71%
rename from spec/spec/requirement-reference-list.yml
rename to spec/spec/external-reference-list.yml
index 505cbc8..3b77961 100644
--- a/spec/spec/requirement-reference-list.yml
+++ b/spec/spec/external-reference-list.yml
@@ -10,7 +10,7 @@ spec-example: null
 spec-info:
   list:
     description: null
-    spec-type: requirement-reference
-spec-name: Requirement Reference List
-spec-type: requirement-reference-list
+    spec-type: external-reference
+spec-name: External Reference List
+spec-type: external-reference-list
 type: spec
diff --git a/spec/spec/requirement-reference.yml b/spec/spec/external-reference.yml
similarity index 51%
rename from spec/spec/requirement-reference.yml
rename to spec/spec/external-reference.yml
index 599963a..623f6be 100644
--- a/spec/spec/requirement-reference.yml
+++ b/spec/spec/external-reference.yml
@@ -1,6 +1,6 @@
 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
 enabled-by: true
 links:
 - role: spec-member
@@ -12,15 +12,18 @@ spec-info:
     attributes:
       identifier:
         description: |
-          It shall be the type-specific identifier of the reference target.
-          For *group* references use the Doxygen group identifier.
+          It shall be the type-specific identifier of the referenced object.
+          For *group* references use the Doxygen group identifier.  For *file*
+          references use a file system path to the file.
         spec-type: str
       type:
-        description: null
-        spec-type: requirement-reference-type
+        description: |
+          It shall be the type of the referenced object.
+        spec-type: name
     description: |
-      This set of attributes specifies a requirement reference.
+      This set of attributes specifies a reference to some object external to
+      the specification.
     mandatory-attributes: all
-spec-name: Requirement Reference
-spec-type: requirement-reference
+spec-name: External Reference
+spec-type: external-reference
 type: spec
diff --git a/spec/spec/requirement-reference-type.yml b/spec/spec/requirement-reference-type.yml
deleted file mode 100644
index 3fbd655..0000000
--- a/spec/spec/requirement-reference-type.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: spec-member
-  uid: root
-spec-description: null
-spec-example: null
-spec-info:
-  str:
-    assert:
-      in:
-      - define
-      - file
-      - function
-      - group
-      - macro
-      - variable
-    description: |
-      It specifies the type of a requirement reference.
-spec-name: Requirement Reference Type
-spec-type: requirement-reference-type
-type: spec
diff --git a/spec/spec/requirement-validation.yml b/spec/spec/requirement-validation.yml
index dadba7a..0e6d6b9 100644
--- a/spec/spec/requirement-validation.yml
+++ b/spec/spec/requirement-validation.yml
@@ -1,6 +1,6 @@
 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
 enabled-by: true
 links:
 - role: spec-member
@@ -18,6 +18,9 @@ spec-info:
         description: |
           Validation by test is done through ${test-case:/spec-name} items.
         spec-type: requirement-validation-method
+      references:
+        description: null
+        spec-type: external-reference-list
       text:
         description: |
           It shall provide the validation evidence depending on the validation
diff --git a/spec/spec/requirement.yml b/spec/spec/requirement.yml
index 3018b8c..275cf5a 100644
--- a/spec/spec/requirement.yml
+++ b/spec/spec/requirement.yml
@@ -33,7 +33,7 @@ spec-info:
         spec-type: optional-str
       references:
         description: null
-        spec-type: requirement-reference-list
+        spec-type: external-reference-list
       requirement-type:
         description: |
           It shall be the requirement item type.
diff --git a/spec/spec/sha256.yml b/spec/spec/sha256.yml
new file mode 100644
index 0000000..8390311
--- /dev/null
+++ b/spec/spec/sha256.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: spec-member
+  uid: root
+spec-description: null
+spec-example: null
+spec-info:
+  str:
+    assert:
+    - re: ^[A-Za-z0-9+_=-]{44}$
+    description: |
+      It shall be a SHA256 hash value encoded in base64url.
+spec-name: SHA256 Hash Value
+spec-type: sha256
+type: spec



More information about the vc mailing list