"SystemBook" Software Specifications

Version 0.2

Alexander Lang

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.


Table of Contents

1. Introduction
1.1. Purpose of this document
1.2. Scope of the project
1.3. Definitions, Acronymns, and Abbreviations
1.4. Document overview
2. Overall Description
2.1. Who will want to use SystemBook
2.2. SystemBook Content Structure
2.2.1. Introduction
2.2.2. Pages
2.2.3. Chapters
2.2.4. Tasks
2.3. SystemBook Functional Requirements
2.3.1. Introduction
2.3.2. Display pages
2.3.3. Execute instructions
2.3.4. Edit pages
2.3.5. Add pages
2.3.6. Remove pages
2.3.7. Search for pages
2.3.8. Merge changes between pages
2.3.9. Import pages
2.3.10. Export pages
2.3.11. Extending SystemBook abilities
3. Specific Requirements
3.1. Detailed Description of Functional Requirements
3.2. Performance
3.3. Quality Requirements
3.4. Other Requirements

Chapter 1. Introduction

1.1. Purpose of this document

This document contains a description of the “SystemBook” software. This document will contain the functional requirements of the project and how the developers will achieve all the objectives. The SRS will serve as a guide for the users and the developers. Section 2 is concentrated more on the user perspective and Section 3 is directed more for the developers.

1.2. Scope of the project

As the name “SystemBook” is trying to suggest, SystemBook is a software that helps you manage your source-based UNIX/Linux system, presenting its user an interactive book. The books content describes and explains how software is installed/updated/removed. Think of the content as a LFS-Book that the user can read and modify and the SystemBook software can execute. So the project is actualy split in two parts: the SystemBook software on one side and the SystemBook content on the other. (Actualy this separation is the same as in gentoos portage: the portage software and the portage tree)

1.3. Definitions, Acronymns, and Abbreviations

LFS

Linux From Scratch

portage

gentoos package management system

ebuild

shell scripts containig package informations and instructions, used by portage

SystemBook content

The LFS-Style book, consisting of a collection of pages containing all the information needed to manage a system

1.4. Document overview

Section 2.0, the general description, gives an “executive overview” and is very user-oriented. It expounds on the functional and data requirements of the application. It also lists the limitations, assumptions and dependencies of the application. Section 3.0, the specific requirements section, includes the developers technical view of the users's expectation of the application. It also touches on the performance and quality requirements of the application and provides a solid definition of the interface.

Chapter 2. Overall Description

2.1. Who will want to use SystemBook

SystemBook is primarily intended for experienced LFS-users and LFS-developers. It may also attract power-users of other source-based distributions such as gentoo.

2.2. SystemBook Content Structure

2.2.1. Introduction

The SystemBook content is a collection of “pages” containing all the information needed by the SystemBook software. Imagine pages as LFS-pages with the abilities of ebuild scripts.

2.2.2. Pages

The SystemBook content is a book. A book consists of pages. As the SystemBook content is a “software book” it's only a collection of pages, no cover (nothing else) is needed.

Every page has a number of properties. The values of these properties make every page unique and identifable. The properties common to all types of pages are:

2.2.2.1. Name

The name is the primary identification property of a page. “name” is a free form string

2.2.2.2. Version

The version is an additional identification prperty of a page. “version” is a free form string. (So if you think your page does not need a version, you can leaf it blank)

2.2.2.3. Revision

The “revision” is the final identification prprety of a page. It is an integer value that defaults to zero, and increases if the page changes, but name and version stay the same. It is mainly used if you fix errors in pages. New pages always have a revision value of zero.

2.2.2.4. Author

The “author” is the person (or program) who wrote the page. As readers of the page we would like to know his name and possibly how to contact him. “author” is a document of defined structure that can be validated.

2.2.2.5. License

The author has to define the terms for legal use of his page. “license” is a simple string, its possible values are restricted to a number of known licenses.

2.2.2.6. ChangeLog

Since pages can be modified, we want to keep track of what changed. “ChangeLog” is a document of defined structure and can be validated.

2.2.2.7. Description

This is sort of a summary of what the page is about. “description” is a document of defined structure and can be validated.

2.2.2.8. Source

Not all pages have to written from scratch, they can also be derived from allredy existing pages or external resources. This property is used to remember these sources. “source” is a document of defined structure and can be validated.

2.2.3. Chapters

Chapters are a special type of pages. They inherit all the properties of normal pages. Additionaly Chapters contain references to pages that are “part” of this chapter. As chapters are only special pages, they can of corse reference other chapters, making it possible to create a tree of chapters. Besides the refereces to its members each chapter has a “priority” property. The priority serves to determin the order in witch chapters are searched for pages.

2.2.4. Tasks

Tasks are a special type of pages. They inherit all the properties of normal pages. Think of tasks as the ebuild-skripts of SystemBook. To accomplish this tasks need some more properties:

2.2.4.1. stability

Indicates how likely something goes wrong when executing the task. “stability” is a string, its possible values are restricted.

2.2.4.2. Coexists

indicates if this task replaces other tasks with the same name, installed on the system, or if it coexists with them. As an exemple, you may want to have multiple versions of the gnu autotools installed, so the tasks responsible for installing this packages would have this property set to “yes”. “coexists” is a string, its possible values are yes and no.

2.2.4.3. Provides

Normaly, what a task provides coresponds to its identification (name, version, revision), but sometimes (most likely when more then one task is doing similar things) you may want to identify the tasks accomplishment with a value other then its name-version-revision. This is usefull, if a package depends on something that can be provided by several other packages. Take a dependency on X11 for example: X11 can be provided by xorg or by XFree86, so both their tasks would set “provides” to X11. “provides” is a free formed string.

2.2.4.4. Configuration

A task can be configured through the use of variables. “configuration” is a table that stores the names, values and type of these variables. “configuration” is a document of defined structure and can be validated.

2.2.4.5. Instructions

Every task has a list of instructions. An “instruction” is a document of defined structure and can be validated. Every “instruction” consists of the following elements:

2.2.4.5.1. Role

Each instruction has a “role” and each role has a status. The execution of an instruction changes the role's status. Possible values for role are:

download

if the instruction is for downloading something

configure

if the instruction configures something

build

if the instruction builds something

install

if the instruction installes something

uninstall

if the instruction uninstalles something

environment

if the instruction changes the shell-environment. The status of such instructions is resetted after each session.

The status can assume the following values:

NotExecuted

SucessfullyExecuted

Failed

2.2.4.5.2. Dependencies

The sucessfull execution of an instruction may depend on the status of other instructions. This other instructions may be part of the same task, or part of other tasks. Every “dependency” holds a reference to an instruction and specifies the value the reference target has to have. Wildcats in the reference are allowed, as long as at least one target can be found.

2.2.4.5.3. Shellinput

The “shellinput” holds the actual code that is going to be executed. You shuld make use of the configuration variables here. The output that this code produces is logged in the “shelllog”. The shelllog stores the stdout and the stderr. Each shellinput has a shelllog. “shellinput” is a document of defined structure and can be validated.

2.2.4.5.4. Explanation

Each instruction shuld have an educational explanation of what is beeing done. “explanation” is a document of defined structure and can be validated. (xhtml and docbook can be considered as possible syntaxes for this purpose)

2.2.4.5.5. Filelog

For each instruction the changes to the filesystem will be logged. The filelog will store lists of added, removed and changed files. For the changed files it will store a list of patches that log the changes.“filelog” is a document of defined structure and can be validated.

2.3. SystemBook Functional Requirements

2.3.1. Introduction

The SystemBook software will be able to display pages and execute their instructions. It will be able to edit pages, add new ones, remove old ones, search for pages, merge changes between pages, import pages from different resources with different syntaxes, export them in different syntaxes.

2.3.2. Display pages

The SystemBook software will have at least one userinterface that can display pages to the user, ideally it will have more than one. The interface will alow the user to navigate through the pages.

2.3.3. Execute instructions

When it comes to executing instructions, the SystemBook software will be just like a LFS-user and feed the shellcode to a shell. The SystemBook software will be very diligent and create all the logs automaitcally. How this is done will be explained in pages form a SystemBook chapter, with will be part of the software. The SystemBook software will have at least on userinterface that lets him select and execute instructions.

2.3.4. Edit pages

The SystemBook software will have at least one userinterface that can edit pages. If the user saves the page after changeing it and did not change the pages identification, the revision will be automaticaly increased. The source property will also be automaticaly set to the original page, because after an edit the page is always saved as a new one, keeping the original unchanged.

2.3.5. Add pages

The SystemBook software will have at least one userinterface that can add pages to the content tree. This interface will also allow the user to create the pages he wants to add.

2.3.6. Remove pages

The SystemBook software will have at least one userinterface that allows the user to select and remove pages from the content tree.

2.3.7. Search for pages

The SystemBook software will have at least one userinterface that allows the user to search for pages in the content tree. Every page property can be a filter for the search.

2.3.8. Merge changes between pages

The SystemBook software will have at least one userinterface that allows the user to merge changes between pages if they have the same source.

2.3.9. Import pages

Writing pages for a whole distribution can be a lot of work, therefore the SystemBook software will have at least one userinterface that allows the user to import resources that use different syntaxes, and convert them to pages. Such resources can be LFS and BLFS books, or ebuild scripts.

2.3.10. Export pages

We do not want our users to be selfish, therefore the SystemBook software will have at least one userinterface that allows the user to export pages converting them to resources that use different syntaxes. Idealy the export syntaxes will cover all the import ones.

2.3.11. Extending SystemBook abilities

The abilities SystemBook has are highly dependent on its content. As the content can be easily extended with new pages, so can the SystemBook abilities. A chapter called SystemBook will be part of the software package and provide some useful pages.

Chapter 3. Specific Requirements

3.1. Detailed Description of Functional Requirements

In parts of the content complex formatted descriptions and explanations would improve readability. As we do not want to reinvent the wheel, DocBook sysntax will be used for this parts of pages.

3.2. Performance

Distributions can grow verry large, so SystemBook will have to handl trees with large numbers of pages. The most time consuming activity will probably be the execution of the instructions, but SystemBook will have no influence on that. All other activitis SystemBook is capable of should be as fast as possible, therefore at least preformance-critical parts have to be written in a compiled language, prefferibly c++. The content-tree will be stored in a database to improve performance.

3.3. Quality Requirements

SystemBook has to be absolutly stabe, as a crash could leaf the whole system corrupted. It has to do a lot of error checking and output usefull error messages if they happen. SystemBook should be able to check the system integrity and in case this test fails be able to restore a sane state.

3.4. Other Requirements

None at this time.