documentation

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

commit e2492db4b2f63f1ebf22a0adad3c4c4838a9c531
parent 43aa6d372fe2f6400c2eb234ea5da7458ebff0b8
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed,  7 Dec 2016 11:24:50 +0100

Move(Infrastructure and Packages to Developer-Documentation)

Diffstat:
Ddocs/Infrastructure.md | 79-------------------------------------------------------------------------------
Ddocs/Package.md | 157-------------------------------------------------------------------------------
Mmkdocs.yml | 2--
3 files changed, 0 insertions(+), 238 deletions(-)

diff --git a/docs/Infrastructure.md b/docs/Infrastructure.md @@ -1,79 +0,0 @@ -Morphux Server Infrastructure -============================= - -## Overview - -### Package 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 - -### Git Server -Server that stores maintainers and previous versions of a package. - - -## Life of a package in a nutshell - -- 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 - -## Step by step - -### Creation of a package - -- If the package is new to Morphux, the maintainer / admin have to create a new Git as follow -repository: gitpkg.morphux.org/packagename.git -- The master branch is the dev version of the package -- The git repository should contain the full package, sources included -- As soon as the maintainer / admin push the data into a branch like `version-XX.XX`, -the build system automatically test the package. - -### Test a package -- The build system is mostly 'Vanilla' VMs of Morphux -- The build system test the package by cloning the maintainer repository, and execute -a test mpm binary. -- This binary will try to compile the package, with the informations provided by the maintainer in the `package.json` -- If the compilation works, the system will try to deduce some information: - - Size of the installed package - - Compilation time - - Files installed and modified by the package - - Extract the binaries installed by the package -- Then, the build system will add these informations into the package -- If all of those steps are sucessfull, the version is marked as good, -and the database server will take over - -### Add a package to the database -- Some basic informations are extracted from the package, in order to respond quickly -on an install request: - - Name of the package - - Version of the package - - Dependencies of the package - - Compilation time of the package - - Installed size of the package - - Files installed by the package -- Once done, the package will be compressed, encrypted and moved to a -ftp server. diff --git a/docs/Package.md b/docs/Package.md @@ -1,157 +0,0 @@ -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/mkdocs.yml b/mkdocs.yml @@ -3,8 +3,6 @@ pages: - Home: index.md - Introduction: Introduction.md - Install: Install.md - - Packages: Package.md - - Infrastructure: Infrastructure.md theme: null theme_dir: theme repo_url: https://github.com/Morphux/Documentation