Updating news and creating the first wiki pages

This commit is contained in:
ngn 2024-01-06 23:21:42 +03:00
parent 7981cdaa80
commit c8023cc4a2
13 changed files with 241 additions and 8 deletions

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,3 +1,3 @@
{
"name": "Index"
"title": "Index"
}

View File

@ -2,21 +2,22 @@
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
All source code for MatterLinux is licensed under GPLv3 and avaliable on
[Matterlinux Git Server](https://git.matterlinux.xyz/matterlinux).
## Goals & Status
The project aims to create a tiny and simple yet still usable GNU/Linux system from the
scratch. So the project is not based on any other distribution, nor it's package ecosystem.
Currently matterlinux is under development, here is a rough roadmap if you want to
Currently MatterLinux is under development, here is a rough roadmap if you want to
follow the development of the project:
- [+] Package system
- [+] Website
- [+] Offical repos (`base` and `desktop`)
- [>] Wiki/documentation
- [x] First release
- [>] First release
- [x] Expanding `desktop` repo (100 packages)
## Contributing
Currently active contributers are:

View File

@ -1,6 +1,6 @@
{
"id": "progress-base",
"name": "Progress of the base repo",
"title": "Progress of the base repo",
"date": "15/12/23",
"author": "ngn"
}

View File

@ -1,6 +1,6 @@
{
"id": "a-bootable-system",
"name": "A bootable system",
"title": "A bootable system",
"date": "22/12/23",
"author": "ngn"
}

View File

@ -5,7 +5,7 @@ Well, at least in theory, there is no documentation so good luck figuring
it out yourself.
## Details
![](/images/boot.png)
![](/assets/boot.png)
Currently the `base` repo has (I think) 114 packages while the `desktop`
repo only has 3, and yes I will be expanding both of these repos overtime.

View File

@ -1,6 +1,6 @@
{
"id": "finally-a-website",
"name": "Finally a website!",
"title": "Finally a website!",
"date": "09/12/23",
"author": "ngn"
}

6
news/wiki.json Normal file
View File

@ -0,0 +1,6 @@
{
"id": "new_wiki",
"title": "New wiki!",
"date": "06/01/24",
"author": "ngn"
}

49
news/wiki.md Normal file
View File

@ -0,0 +1,49 @@
2 weeks ago, in the last post I said that I will start working on the wiki.
Well... I technically didn't lie, I worked on the wiki, but not on the wiki pages,
on the wiki itself `:)`
Anyway here all the updates:
## Re-Re-write: `mp-repo`
Yes, I rewrote `mp-repo`, *again*. This is the last time I swear. I did so because
I realized that `mp-build`, the tool for building packages, is completely useless.
The package manager (`mp`) does not support standalone packages anyway, so we don't
really a seperate tool to build packages, `mp-repo` may handle that as well. So
that's what I did, I rewrote `mp-repo`, in bash, and added the functionality of
building packages. As a result `mp-build` is now deprecated, source code for `mp-build`
is now in a private repository.
## Repos are now up!
`base` and `desktop` repos are now up at [pkgs.matterlinux.xyz](https://pkgs.matterlinux.xyz)!
So now it's possible to download packages without building them. The signatures are
used for the repos belong to me (ngn) and its [F9E70878C2FB389AEC2BA34CA3654DF5AD9F641D](https://keys.openpgp.org/vks/v1/by-fingerprint/F9E70878C2FB389AEC2BA34CA3654DF5AD9F641D).
Now that MatterLinux have working repos, I will start working on a mirror tool, that people
can use to setup mirrors easily. I want repos to be more accessible, the MatterLinux server
is located in Turkey, so it does not have the greatest *accessibility* for the most part of
the world.
## The new wiki
After writing 2 pages using the MediaWiki, I got really annoyed by the its syntax. Like FFS
just use markdown or something! Anyway, I also didn't like the look of the themes, so after
few minutes of scrolling in the [awesome-selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted#wikis) list, I picked wikmd, and after installing it with docker, I realized that it's running in development mode, I couldn't find anyway to change that and I didn't want to build the
docker image myself.
So I decided to pick another one, WikiJS, which turned out to be pretty bloat.
After checking out few more of the wiki software on the list, I found out that they are all bad-
I mean, they are not bad but they were just not what I was looking for. So I decided to expand
the MatterLinux's website so I can use it as a wiki. And that's what I did, I moved around a lot
of the server code, and added a new `/wiki` route, which just simply acts like the `/news` route.
Go ahead and [check it out!](/wiki)
## What's next?
I will finish writing all the important pages, currently the most important page is the
`installation` page, when its done, well, I will publish the first release archive and it
will be possible to install MatterLinux!
After that I will start expanding the `desktop` repo and I will also work on the mirror tool
that I mentioned.
I think that's all for now, see you in the next post.

6
wiki/main.json Normal file
View File

@ -0,0 +1,6 @@
{
"id": "main",
"title": "Welcome to MatterLinux Wiki!",
"author": "ngn",
"date": "06/01/24"
}

28
wiki/main.md Normal file
View File

@ -0,0 +1,28 @@
You can use this page as a catalog, it will let you discover other pages. If you want to
edit a page or create a new page, make a pull-request to [website-content](https://git.matterlinux.xyz/matterlinux/website-content) repository.
**Important:** Wiki is currently under development, so some of the pages on the tables
don't have a link yet.
## Installation
| Name | Description |
| --------------------- | ----------------------------------------------- |
| Introduction | Learn about MatterLinux and other general stuff |
| Installation | Learn how to install a base MatterLinux system |
| 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 | Learn about MatterLinux package manager |
| Mirrors | Discover repo mirrors and learn how you can setup one |
## Other
| Name | Description |
| -------------------------------- | ------------------------------------------------------- |
| Bugs and Issues | Learn how you can report bugs and issues to developers |
| Contributing | Learn how you can contribute to MatterLinux |
| Contact | Learn how you can contact developers and users |
| Licensing | Licensing for the MatterLinux repositories and software |

6
wiki/pkg.json Normal file
View File

@ -0,0 +1,6 @@
{
"id": "package",
"title": "Package",
"author": "ngn",
"date": "06/01/24"
}

137
wiki/pkg.md Normal file
View File

@ -0,0 +1,137 @@
A MatterLinux package is a compiled files of a software, tool or a libary.
# Format
MatterLinux packages uses the **M**atterLinux **P**ackaging **F**ormat, `MPF`. Don't let fancy name
mislead you, a basic `MPF` file is just a renamed `TAR GZ` archive. The reason that packages use the
`.mpf` extension and not the `.tar.gz` extension is to make it easier to recognize and easier to work
with in the scripts and the tools.
### Naming
A package is named after the software and the version of that software that it provides. For
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.
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:
```
usr/
usr/share/
usr/share/man/
usr/share/man/man1/
usr/share/man/man1/which.1
usr/share/info/
usr/share/info/dir
usr/share/info/which.info
usr/bin/
usr/bin/which
```
### Install Scripts
Some packages may contain an install script, `install.sh`, this shell script is ran by the
[MatterLinux Package Manager (`mp`)](/wiki/package_man) using the bash shell, right after the
extraction.
This script is used to do post-install actions, such as adding users, groups etc.
This script is located at the root of the package. For example let's take a look
at the `systemd` package:
```
...
etc/X11/xinit/
etc/X11/xinit/xinitrc.d/
etc/X11/xinit/xinitrc.d/50-systemd-user.sh
etc/credstore.encrypted/
install.sh
usr/
usr/lib/
usr/lib/libudev.so
usr/lib/libnss_resolve.so.2
...
```
# Usage
While installing a package using the [MatterLinux Package Manager (`mp`)](/wiki/package_man), `mp`
downloads the target package(s) from the repos, these packages are in the format discussed above.
After downloading and verifying the target package(s), `mp` extracts the packages [using the `tar`
tool](https://git.matterlinux.xyz/Matterlinux/mp/src/main/src/utils/util.c#L103).
To learn more about this process see the [page for `mp`](/wiki/package_man).
It's also possible to install packages manualy. To do this you can grab a package you want
and extract it to your the root directory by running: `tar xvf <package_version.mpf> -C /`
# Building
Package are built with the `mp-repo` tool. In order to build a package, you will need the source
for the repo that contains the package. This is because a package itself does not store any metadata,
this is all handled by the repo.
To learn more about the `mp-repo` tool, and how you can use it to build packages, see the
[repo package](/wiki/repo).
### Package Source
Source code for a packages can be found in the source code of the repo that the package is in.
Source files for a repo will be located under the `src` directory.
### Package Script
Each package source contains a `pkg.sh` shell script. This is the source script that is used to
build the package. In the build process, this shell script gets imported by the `mp-repo` tool
using the `source` command.
Let's take a closer look at a `pkg.sh` file:
```
NAME="which"
DESC="Shows the full path of (shell) commands"
VERSION="2.21"
FILES=("https://ftp.gnu.org/gnu/which/which-$VERSION.tar.gz")
HASHES=("097ff1a324ae02e0a3b0369f07a7544a")
DEPENDS=()
build() {
tar xf $NAME-$VERSION.tar.gz
cd $NAME-$VERSION
./configure --prefix=/usr && make
make DESTDIR=$ROOTDIR install
cd .. && rm -rf $NAME-$VERSION
}
```
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
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.
Explain what it does, what it contains etc.
- `VERSION`: Version of the software, tool or libary 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.
You can also specify multiple files. These files will be downloaded by `mp-repo` in the build
process.
- `HASHES`: Hashes for the files you specify. You can use `MD5`, `SHA1`, `SHA256` or `SHA512` sums.
And yes, you need to specify hashes for all the files, using the same order with the `FILES` variable.
- `DEPENDS`: Package(s) that this package depends on.
Now let's take a look at the `build` function. Each package needs a `build` function, this
function is called by `mp-repo` after downloading and verifying all the packages. It will be
called in the `$ROOTDIR`. This directory will contain all the downloaded files, any files
in this directory will be included into the build, so don't forget to cleanup.
**Note:** You don't need to cleanup the downloaded files, they will be cleaned by the `mp-repo`.
- `tar xf $NAME-$VERSION.tar.gz`: Extract the downloaded archive file.
- `cd $NAME-$VERSION`: Change directory into the extracted directory.
- `./configure --prefix=/usr && make`: Builds the `which` tool, different packages may have
different build instructions. These instruction are usually provided by the upstream. You can
also check out [LFS](https://www.linuxfromscratch.org/lfs/view/12.0-systemd/) and [BLFS](https://www.linuxfromscratch.org/blfs/view/12.0-systemd/) for instructions.
- `make DESTDIR=$ROOTDIR install`: Install the package. Make sure that you are installing the package
into the `$ROOTDIR` and not the root file system.
- `cd .. && rm -rf $NAME-$VERSION`: Change directory back into `$ROOTDIR` and clean the extracted archive.
Check out [`base`](https://git.matterlinux.xyz/Matterlinux/base) and
[`desktop`](https://git.matterlinux.xyz/Matterlinux/desktop) repo sources for more
example `pkg.sh` scripts.