documentation

developer documentation
Log | Files | Refs | README | git clone https://git.ne02ptzero.me/git/documentation

commit 0c5fe7cbd6f70b025aa621fadda1e01fc194bd75
Author: louis.solofrizzo <louis.solofrizzo@stormshield.eu>
Date:   Mon, 21 Nov 2016 11:45:17 +0100

Add(Base Documentation)

Diffstat:
AInfrastructure.md | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
APackage.md | 157+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AREADME.md | 4++++
3 files changed, 223 insertions(+), 0 deletions(-)

diff --git a/Infrastructure.md b/Infrastructure.md @@ -0,0 +1,62 @@ +Morphux Server Infrastructure +============================= + +# Overview + +``` +┌──────────────────────┐ +│ │ +│ Packages Website │ +│ │ +└──────────────────────┘ +``` + +Website that list all the packages available on the distribution. +Languages: PHP / HTML / CSS + +``` +┌──────────────────────┐ +│ │ +│ Build system │ +│ │ +└──────────────────────┘ +``` + +System that build new packages / new versions of packages, on multiple +arch through VMs. +Languages: Python ? + +``` +┌──────────────────────┐ +│ │ +│ MPM server │ +│ │ +└──────────────────────┘ +``` + +Server that respond to an user request to install a package. +Languages: C, Go, C++ ? + +``` +┌──────────────────────┐ +│ │ +│ Package Database │ +│ │ +└──────────────────────┘ +``` + +Server that stores informations about packages +Language: SQL + + +# Life of a package + +- Maintainer create a package +- Package is send to the build system +- VMS build the package, check if there's no dependencies problems +- Build system fill out the package automatic information: + - Size of the installed package + - Compilation time + - Files installed by the package + - Extract the binaries installed by the package +- The build system add the package to the Package database diff --git a/Package.md b/Package.md @@ -0,0 +1,157 @@ +Morphux Package Skeleton +======================== + +# Basic Skeleton +``` +.: +package.json scripts srcs patches + +./scripts: +after.sh before.sh + +./srcs: +main.c +Makefile + +./patches: +name.patch +``` + +# Basic template +```json +{ + "package": { + "name": "package-name", + "version": "version", + "description": "Short description of the package" + }, + "compilation": { + "patches": ["name.patch"], + "configure": [ + {"option-with-argument": "value"}, + "option-without-argument", + ], + "make": "", + "test": "", + "install": "install", + }, + "dependencies": { + "needed": [ + "package-version" + ], + "recommended": [], + "optionnal": [] + } +} +``` + +## Package Section +```json + "package": { + "name": "package-name", + "version": "version", + "description": "Short description of the package" + } +``` +- `name` is the package name. Like `openssh` +- `version` is the package version. Like `7.0-p1` +- `description` is a short description about the package. + +## Compilation Section +```json + "compilation": { + "patches": ["name.patch"], + "configure": [ + {"option-with-argument": "value"}, + "option-without-argument", + ], + "make": "", + "test": "", + "install": "" + } +``` +- `patches` is an array of patches file to apply _before_ the compilation. +All the patches must be stored in the patches/ directory. +- `configure` is an array of ./configure options. In this example the output +command will be: `./configure --option-with-argument=value --option-without-argument` + +Note that the options with argument are defined through an object. +- `make` is the default make command. If blank, the command `make` is executed. +- `test` describe the test command, through a makefile. For example, if the value is +`test-all`, the command executed will be `make test-all` +- `install` is the default install command. If blank, the command `make install` +is executed. + +## Dependencies section +```json +"dependencies": { + "needed": [ + "package-version" + ], + "recommended": [], + "optionnal": [] + } +``` +- `needed` is a list of packages that _must_ be present and installed in order +to compile / install the package. The format is the following: `package-version`. +For example `openssl-7.0`. +- `recommended` is a list of packages that improve the stability of the package. +- `optionnal` is a list of packages totally optionnals. For example, documentation. + +# Before and After script +In the directory `script/` we can found the two differents scripts: +- `before.sh` +- `after.sh` + +These are simple shell scripts executed before and after the install. + +**Note**: Since we don't know what shell is installed user-side, all install scripts +_must_ be executed with /bin/sh. + +# Optionnal +All optionnals sections must be added in the template file, after the required +sections. + +## Group Management +If a package needs to add a group to the system, the following must be used: +```json +"group": [ + { + "group_name": "group_login", + "guid": 50 + } +] +``` +Note that groups will always be added **before** the users + +## User Management +If a package needs to add a user to the system, the following must be used: +```json +"user": [ + { + "username": "login", + "comment": "comment about the user", + "home_dir": "/default/home/directory", + "group": "default_group", + "shell": "/bin/false", + "uid": "50" + } +] +``` + +## Kernel Configuration +If a package need a particular kernel configuration, the following must be used: +```json +"kernel": [ + "KERNEL_CONFIG_NAME_1", + "KERNEL_CONFIG_NAME_2" +] +``` + +## SysV Configuration +If a package need a init.d script, the following must be used: +```json +"init": [ + // Not decided yet +] +``` diff --git a/README.md b/README.md @@ -0,0 +1,4 @@ +# Morphux Documentation + +- [Infrastructure](Infrastructure.md) +- [Package](Package.md)