diff --git a/index.md b/index.md index 5903107..be87300 100644 --- a/index.md +++ b/index.md @@ -1,8 +1,8 @@ # A tiny GNU/Linux distribution -Matterlinux is a tiny [free/libre](https://www.gnu.org/philosophy/free-sw.html) and +MatterLinux is a tiny [free/libre](https://www.gnu.org/philosophy/free-sw.html) and [open source](https://opensource.com/resources/what-open-source) GNU/Linux distribution for `amd64` systems. It has its own package management system and its own package repos. -All source code for MatterLinux is licensed under GPLv3 and avaliable on the +All source code for MatterLinux is licensed under GPLv3 and available on the [MatterLinux Git Server](https://git.matterlinux.xyz/Matter). ## Goals & Status @@ -14,16 +14,16 @@ follow the development of the project: - [+] Package system - [+] Website -- [+] Offical repos (`base` and `desktop`) +- [+] Official repos (`base` and `desktop`) - [>] Wiki/documentation - [>] First release - [x] Expanding `desktop` repo (100 packages) ## Contributing -Currently active contributers are: +Currently active contributors are: - (Maintainer) [ngn](mailto:ngn13proton@proton.me) Consider helping out if you are interested in this project. To do so, join [matterlinux@conference.jabbers.one](xmpp:matterlinux@conference.jabbers.one?join) -to request an account for the the git server. You can also send an email to the maintainer. +to request an account for the git server. You can also send an email to the maintainer. diff --git a/wiki/main.md b/wiki/main.md index 79ac6dc..9535370 100644 --- a/wiki/main.md +++ b/wiki/main.md @@ -13,12 +13,12 @@ don't have a link yet. | Post-Installation | Make your system (somewhat) usable | ## Packaging -| Name | Description | -| ------------------------------------- | ----------------------------------------------------- | -| Repo | Learn about MatterLinux repos and how they work | -| [Package](wiki/package) | Learn about MatterLinux packages | -| [Package Managment](wiki/package_man) | Learn about MatterLinux package manager | -| Mirrors | Discover repo mirrors and learn how you can setup one | +| Name | Description | +| -------------------------------------- | ----------------------------------------------------- | +| [Repo](wiki/repo) | Learn about MatterLinux repos and how they work | +| [Package](wiki/package) | Learn about MatterLinux packages | +| [Package Management](wiki/package_man) | Learn about MatterLinux package manager | +| Mirrors | Discover repo mirrors and learn how you can setup one | ## Other | Name | Description | diff --git a/wiki/pkg.md b/wiki/pkg.md index dc84ee5..b1824e0 100644 --- a/wiki/pkg.md +++ b/wiki/pkg.md @@ -1,4 +1,4 @@ -A MatterLinux package is a compiled files of a software, tool or a libary. +A MatterLinux package is a compiled files of a software, tool or a library. # Format MatterLinux packages uses the **M**atterLinux **P**ackaging **F**ormat, `MPF`. Don't let fancy name @@ -12,7 +12,7 @@ example package containing `bash` version `5.2.15` is named `bash_5.2.15.mpf`. ### Structure File structure of a package matches with the MatterLinux root file structure. This is important -as a package will most likely be extracted in a MatterLinux root filesystem. +as a package will most likely be extracted in a MatterLinux root file system. For example, we can take a look at the `which` package, to do this you can download the `MPF` file and list its contents with the `tar tf` command: @@ -58,7 +58,7 @@ downloads the target package(s) from the repos, these packages are in the format After downloading and verifying the target package(s), `mp` extracts the packages using `libarchive`. To learn more about this process see the [page for package management](/wiki/package_man). -It's also possible to install packages manualy. To do this you can grab a package you want +It's also possible to install packages manually. To do this you can grab a package you want and extract it to your the root directory by running: `tar xvf -C /` # Building @@ -100,11 +100,11 @@ build() { This `pkg.sh` file is for the `which` package (version `2.21`). Let's start by breaking down the variables: -- `NAME`: Specifies the package name. A package should be named after the software, tool or libary +- `NAME`: Specifies the package name. A package should be named after the software, tool or library it provides. Preferably the name should not contain `_` to avoid confusion with naming. -- `DESC`: A short description about the software, tool or the libary that package provides. +- `DESC`: A short description about the software, tool or the library that package provides. Explain what it does, what it contains etc. -- `VERSION`: Version of the software, tool or libary the package provides. If you are using a +- `VERSION`: Version of the software, tool or library the package provides. If you are using a git commit version, you can name the version `LAST_VERSION+COMMIT_ID` - `FILES`: Upstream files and patches needed to build this package, you can use `http`, `https` or `ftp` protocols. diff --git a/wiki/pkg_man.md b/wiki/pkg_man.md index ff6edfd..5640659 100644 --- a/wiki/pkg_man.md +++ b/wiki/pkg_man.md @@ -1,16 +1,16 @@ -Package management is the process of installing, updating and removing software, tools and libaries. +Package management is the process of installing, updating and removing software, tools and libraries. On GNU/Linux systems, package management is usually done with a package manager. # MatterLinux Package Manager In a Matter system, package management is generally done with the MatterLinux Package Manager (`mp`). -`mp` lets you install, remove, update and search different MatterLinux packages accross different repos. +`mp` lets you install, remove, update and search different MatterLinux packages across different repos. ### Installation `mp` should be already installed on a MatterLinux system. However if you want to install `mp` from the source, then you should follow [this section](https://git.matterlinux.xyz/matter/mp#installation) from the README. -Note that you should run all the `mp` and releated commands as the root user. +Note that you should run all the `mp` and related commands as the root user. ### Configuration Configuration file for `mp` can be found at `/etc/mp/cfg`. This file is used specify repos and @@ -51,7 +51,7 @@ Another configuration option that you can use is the `MP_ROOT` option. Unlike th this option is not specified in the configuration file, it's specified as an enviroment variable. This option lets you change the target root directory. By default `mp` install all the packages to `/`, -stores all the information under the `/` etc. By chaning the target root directory you can change this. +stores all the information under the `/` etc. By changing the target root directory you can change this. For example lets say you want to install all the packages to `/tmp/testroot`. To do so, first you will need to setup a root file system structure inside `/tmp/testroot`: @@ -75,13 +75,13 @@ Now you can use `mp` with the `MP_ROOT` variable, for example: To sync remote repo information and package lists, you can use the `mp-repo` command. After running it `mp` will: -1. Download the repo metada for all the repos. Repo metadata is located at `REPO_URI/repo` +1. Download the repo metadata for all the repos. Repo metadata is located at `REPO_URI/repo` 2. Parse the repo metadata and download all the repo package lists. These lists are located at `REPO_URI/REPO_NAME.tar.gz` 3. Move and extract the repo lists to `$MP_ROOT/var/lib/mp/repos/REPO_NAME` and parse the plain package lists (`pkgs`) 4. Tell you the repo signatures -You can add these signatures to your pubring with `gpg`: +You can add these signatures to your public key ring with `gpg`: ``` # gpg --receive-keys [fingerprint] ``` @@ -120,7 +120,7 @@ After running this command, `mp` will: 2. Find all the files that `which` package extracted during the installation 3. Ask you if you want to continue with the removal 4. Delete all the files found in the step 2 -5. Remove the the package entry for the `which` package from `$MP_ROOT/var/lib/mp/db` and `$MP_ROOT/var/lib/mp/files` +5. Remove the package entry for the `which` package from `$MP_ROOT/var/lib/mp/db` and `$MP_ROOT/var/lib/mp/files` You can also remove multiple packages: ``` diff --git a/wiki/repo.json b/wiki/repo.json new file mode 100644 index 0000000..067cdb3 --- /dev/null +++ b/wiki/repo.json @@ -0,0 +1,6 @@ +{ + "id": "repo", + "title": "Repo", + "author": "ngn", + "date": "11/01/24" +} diff --git a/wiki/repo.md b/wiki/repo.md new file mode 100644 index 0000000..b6e2c7d --- /dev/null +++ b/wiki/repo.md @@ -0,0 +1,115 @@ +A MatterLinux repo is a FTP or web server that contains unique [packages](/wiki/pkg) + +# Structure +A repo contains: + +- Packages (`.mpf`) +- Package signatures (`.mpf.sig`) +- Repo metadata +- Package list + +### Package Files and Signatures +MatterLinux repos contain at least two package. Each package also has a PGP signature +that can be used to verify the package. These signatures belong to public key fingerprint +specified in the repo metadata. + +### Repo Metadata +Repo metadata contains information about the repo itself. Such as the repo name, +author and the public key used to sign the packages. + +This metadata can be found in the `repo` file at the root of the repo. For example +the repo metadata for `https://pkgs.matterlinux.xyz/base` is located at +`https://pkgs.matterlinux.xyz/base/repo`. `INI` format is used for this metadata file. + +### Package List +A list containing all packages and all the package metadata can be found in an +archive file named after the repo. For example the package list for +`https://pkgs.matterlinux.xyz/base` is located at `https://pkgs.matterlinux.xyz/base/base.tar.gz`. + +This archive file contains a file named `pkgs`, which contains repo package list in the +`INI` format. It contains the package names, descriptions, versions, sums and dependencies. + +### Repo Source +Source for a repo has a simple structure that also contains all the source files for the packages. +For example lets take a look the structure of the [`base`](https://pkgs.matterlinux.xyz/base) +repo source: +``` +├── dist +│   ├── acl_2.3.1.mpf +│   ├── acl_2.3.1.mpf.sig +│   ├── base.tar.gz +│  ... +│   ├── repo +│   ├── sed_4.9.mpf +│   ├── sed_4.9.mpf.sig +│  ... +├── LICENSE.txt +├── README.md +├── repo.sh +├── sign-dist.sh +└── src + ├── acl + │   └── pkg.sh + ├── attr + │   └── pkg.sh + ├── autoconf + │   └── pkg.sh + ├── automake + │   └── pkg.sh + ├── bash + │   ├── pkg.sh + │   ├── skelprof + │   └── skelrc + ... +``` +Let's break this down: + +- `LICENSE.txt`: License used for the repo. **All the packages in the repo should use a license +compatible with this license.** +- `README.md`: README file. Contains a small description about the repo. +- `repo.sh`: Repo script contains information about the repo, later used to build the +repo metadata. +- `src`: Contains package sources (package scripts, extra patches, configuration files etc.) +- `dist`: Contains the compiled (built) packages. +- `sign-dist.sh`: An extra shell script that you can find in the official repos. It is just a +small script that is used to sign all the packages in the `dist` directory if they are built +without the signatures. + +# Usage +MatterLinux provides 2 different official repos: + +- [`base`](https://pkgs.matterlinux.xyz/base): Contains base system packages such as `glibc`, `systemd`, +`linux` etc. +- [`desktop`](https://pkgs.matterlinux.xyz/desktop): Additional packages users may want to install +for a more ideal desktop system. + +This repos can provide packages for users, these packages can be managed using the +[MatterLinux Package Manager (`mp`)](https://git.matterlinux.xyz/matter/mp). For more information see the page for [package management](/wiki/package_man). + +### Building an already existing repo +To build an already existing repo, such as the `base` or the `desktop` repo, first you will need to +download the repos source. Source for the `base` and the `desktop` repo can be found on +[MatterLinux Git Server](https://git.matterlinux.xyz/matter). + +After downloading the repo source, you will need to install the `mp-repo` tool, which is the tool +used for building MatterLinux repos. To do so please follow the steps [here](https://git.matterlinux.xyz/Matter/mp-repo#installation). + +Finally to build the repo: +``` +mp-repo +``` + +You will mostly likely want to disable package signing though, as you are probably not the +owner of the repo: +``` +mp-repo --no-sign +``` + +### Creating a new repo +If you want to create an unofficial repo, setup the folder structure for the source repo as +explained above. Then create a repo script, you can copy one from the official repos and +edit it. + +After adding your packages and building them with `mp-repo`, you can host them on an FTP +or a web server to make it available to other people. Also you can add this unofficial repo +to this wiki page [by creating an issue](https://git.matterlinux.xyz/Matter/content/issues).