diff --git a/BUILD b/BUILD index d95cbdbd06..32a67ee2f5 100644 --- a/BUILD +++ b/BUILD @@ -12,7 +12,8 @@ # ******************************************************************************* load("@rules_python//python:pip.bzl", "compile_pip_requirements") -load("@score_docs_as_code//:docs.bzl", "docs") +load("@score_docs_as_code//:bzl/bundle_rules.bzl", "bundle_source_files") +load("@score_docs_as_code//:docs.bzl", "docs", "docs_bundle") load("@score_tooling//:defs.bzl", "copyright_checker", "dash_license_checker", "setup_starpls") load("@score_tooling//third_party/format:macros.bzl", "use_format_targets") load("//:project_config.bzl", "PROJECT_CONFIG") @@ -108,6 +109,26 @@ use_format_targets(languages = [ exports_files(["MODULE.bazel"]) # Docs +_IS_ROOT_MODULE = repository_name() == "@" + +bundle_source_files( + name = "platform_docs_sources", + bundle = "@score_platform//:docs_bundle", +) + +genrule( + name = "platform_glossary_rst", + srcs = [":platform_docs_sources"], + outs = ["platform_glossary/glossary.rst"], + cmd = "cp $$(printf '%s\\n' $(SRCS) | grep '/docs/features/lifecycle/glossary[.]rst$$') $@", +) + +docs_bundle( + name = "platform_glossary", + srcs = [":platform_glossary_rst"], + entry_doc = "glossary", +) + docs( bundles = [ { @@ -118,7 +139,15 @@ docs( "bundle": "//score/health_monitor:docs", "mount_at": "components/health_monitor", }, - ], + ] + ([ + # Glossary is located in score_platform but we also need to + # avoid duplication during integration in ref_int repository + { + "attach_to": "features/lifecycle/index", + "bundle": ":platform_glossary", + "mount_at": "features/lifecycle", + }, + ] if _IS_ROOT_MODULE else []), external_needs = [ "@score_platform//:needs_json", # This allows linking to feature requirements. "@score_process_description//:needs_json", # This allows linking to requirements (wp__requirements_comp, etc.) from the process_description repository. diff --git a/docs/features/lifecycle/glossary.rst b/docs/features/lifecycle/glossary.rst deleted file mode 100644 index f0075d78b0..0000000000 --- a/docs/features/lifecycle/glossary.rst +++ /dev/null @@ -1,124 +0,0 @@ -.. - # ******************************************************************************* - # Copyright (c) 2025 Contributors to the Eclipse Foundation - # - # See the NOTICE file(s) distributed with this work for additional - # information regarding copyright ownership. - # - # This program and the accompanying materials are made available under the - # terms of the Apache License Version 2.0 which is available at - # https://www.apache.org/licenses/LICENSE-2.0 - # - # SPDX-License-Identifier: Apache-2.0 - # ******************************************************************************* - -Glossary -======== - -.. glossary:: - Lifecycle Feature - Feature providing support for starting and stopping processes. - - Launch Manager - Component to start and stop processes on a POSIX like operating system. - - Health Monitor - Provides process local monitoring functionalities such as deadline monitoring - and logical program flow monitoring. - - Control Interface - Interface to control the lifecycle of the system, e.g. to start and stop processes. - - Alive Interface - Interface to monitor the aliveness of a process. - - Sandbox - A sandbox is a set of configurations, which are applied to a process when it - is started. It can include environment variables, secpol policies, cgroup - configurations, user and group IDs etc. - - Health Monitor Interface - Interface to monitor the health of a process, e.g. to check if a process is - alive or if it is running as expected. - - Alive Monitoring - Checks if an application reports an alive state in a certain period. - - Deadline Monitoring - Monitor to detect if a state was reached within a specified time related to - another event. - - Logical Programflow Monitoring - Monitor to detect if certain states were reached in a defined sequence and - time interval. - - Run State - An Run State defines a set of components, which are in status running - and are supervised by the software platform. If the health management system - detects abnormal situation it can change the :term:`Run State`. - - Component - A configurable unit in the Launch Manager that describes an executable and its runtime environment (sandbox). Components can be grouped together in Run Targets to define system operational states. - - Lifecycle Component - Node of the dependency tree. - - Process - Instantiation of an Executable programs running on the system that are managed by the Launch Manager. - - UID - User Identifier - a unique number assigned to each user on a Unix-like operating system. - - GID - Group Identifier - a unique number assigned to each group on a Unix-like operating system. - - Polling Interval - The time interval between successive checks of a condition or status. - - Working Directory - The current directory from which a process is executed, also known as CWD (Current Working Directory). - - File Descriptor - A handle used by a process to access files or other input/output resources. - - Procmgr - Process Manager - a QNX system component that manages process creation and execution. - - ASLR - Address Space Layout Randomization - a security technique that randomizes the memory layout of processes. - - Recovery Action - Actions taken by the Launch Manager when a process fails or terminates abnormally. - - Ready Condition - A configurable condition that must be satisfied before a component is considered ready and operational. Ready conditions can include file system checks, network availability, or custom application-specific signals. - - Ready conditions can either be reported by the component itself through the Lifecycle Interface or determined via external state monitoring. External state examples include: process started, file is available, socket was opened, or that the process finished successfully. - - Liveliness - The state indicating that a process is active and responding as expected. - - Watchdog - A monitoring mechanism that detects system failures and can trigger recovery actions. - - Interval - A period of time between events or measurements. - - QNX - A real-time operating system commonly used in embedded systems. - - - DSS - Device Safe State - a safe operational state that a system can enter during failures. - - DAG - Directed Acyclic Graph - a data structure used to represent dependencies between processes. - - SWC - Software Components - modular software units that can be independently managed. - - Run target - A named collection of processes and their dependencies that can be launched, stopped, or switched as a group to achieve a specific operational mode or configuration. - - Operating System - The system software that manages computer hardware and software resources and provides common services for computer programs. diff --git a/docs/features/lifecycle/index.rst b/docs/features/lifecycle/index.rst index 284c4ffa07..39936e6065 100644 --- a/docs/features/lifecycle/index.rst +++ b/docs/features/lifecycle/index.rst @@ -32,4 +32,3 @@ For the main feature description and requirements, see the belonging Feature in safety_analysis/aou_requirements.rst safety_planning/index.rst security_planning/index.rst - glossary