diff options
| author | Arslaan Pathan <[email protected]> | 2026-09-17 15:21:11 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-09-17 15:21:11 +1200 |
| commit | 00c9756268b27f3fcccfe9dbc5334284b423bd28 (patch) | |
| tree | 1c8b69145648e8402696dd101a891d4037c5e275 /README.md | |
| parent | 2f6b9f48320438787bf452d693fde81d2d31bebf (diff) | |
| download | mbpk-00c9756268b27f3fcccfe9dbc5334284b423bd28.tar.xz mbpk-00c9756268b27f3fcccfe9dbc5334284b423bd28.zip | |
clean slate
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 127 |
1 files changed, 2 insertions, 125 deletions
@@ -1,126 +1,3 @@ -# mbpk - -**M**inimal **B**inary **P**ackage **K**it - -## What is mbpk? - -`mbpk` is a dead-simple binary package manager, primarily developed for [Yerba Linux](https://git.arslaancodes.com/yerbalinux.git/about). - -Core functions are handled in libmbpk, whereas the commands themselves are simply wrappers around the library. - -## Package Format - -A package is a `.tar.zst` archive with the file extension `.mpk`. - -### Structure - -``` -pkgname-1.2.3.mpk --> pkg.ini # Metadata --> _install.tar.zst # This will be extracted to / --> post-install # Optional, runs after install --> pre-remove # Optional, runs before remove -``` - -#### pkg.ini - -```ini -name = pkgname -version = 1.2.3 -desc = testing testing 123, i like chicken nuggets, not 3 -deps = dep1 dep2 dep -maintainer = French Hacker <[email protected]> -license = WTFPL -``` - -#### Scripts - -- `post-install`: Runs after `_install.tar.zst` is extracted -- `pre-remove`: Runs before files are removed - -If they don't exist, mbpk simply ignores them. -If they do exist, they are executed at their respective times. -Failure to execute these scripts will be ignored and the package manager will continue, warning the user. - -## Repositories - -Repository configuration is stored in `/etc/mbpk-repos.ini`. - -Configuration format is as follows: -```ini -# Example repository configuration for mbpk -# Format: name = url - -[core] -url = https://yerba.arslaancodes.com/repo/core - -[extra] -url = https://yerba.arslaancodes.com/repo/extra -``` - -Repos will be synchronized by copying them into `/var/lib/mbpk-repo/`. -For example, the repos from the previous configuration example would be at the following locations: -- `/var/lib/mbpk-repo/core` -- `/var/lib/mbpk-repo/extra` - -### Structure - -Repository structure is as follows: - -``` -core/ # Example repository name --> repo.ini # Repository metadata --> pkg/ - -> pkgname.ini # Package metadata - -> pkgname2.ini # More package metadata --> files/ - -> pkgname-1.2.3.mpk # Example package file -``` - -#### repo.ini - -```ini -name = core -desc = Core repo for Yerba Linux -url = https://yerba.arslaancodes.com/repo/core -packages = pkgname pkgname2 (...) -``` - -#### pkg/pkgname.ini - -```ini -name = pkgname -version = 1.2.3 -desc = testing testing 123, i like chicken nuggets, not 3 -url = https://yerba.arslaancodes.com/repo/core/files/pkgname-1.2.3.mpk -deps = dep1 dep2 dep3 -maintainer = French Hacker <[email protected]> -license = WTFPL -``` - -## Database & Package Installation/Removal - -The database is dead-simple. - -Upon installing a package, the .mpk file will first be extracted to `/var/lib/mbpk/<package-name>`. From there, the package manager will continue to extract `_install.tar.zst` to `/`. - -This installation flow ensures that the package database is automatically handled, because `/var/lib/mbpk` itself acts as a database of all packages. - -Removal of a package is simple: -- Read package metadata from the database -- Check for `pre-remove`, and run if it exists -- Use libarchive to list all files in `_install.tar.zst` and remove them respectively - -## Usage - -`mbpk` is not one standalone command-line tool, it is actually a combination of many binaries wrapping the `libmbpk` library. - -- `mbpk-install <pkgname>`: installs a package from a repository -- `mbpk-install-local <pkgname>`: installs a local package file -- `mbpk-remove <pkgname>`: removes a package -- `mbpk-list`: lists all installed packages -- `mbpk-update`: updates package repositories -- `mbpk-upgrade <pkgname>`: upgrades the specified package -- `mbpk-search <term>`: searches repositories for a specified term -- `mbpk-info <pkgname>`: shows metadata of a requested installed package +# mbpk (Minimal Binary Package Kit) +xbps but rootless |
