CapCreeperGR 497c94cbc0 Added a $BPM_PKG_ARCH variable to source script
Added a "keep" field to package descriptor files which will prevent the specified files from being overwritten
Completely revamped the bpm-setup script in the bpm-utils package
2024-04-23 17:27:34 +03:00
2024-03-25 09:41:59 +02:00
2024-03-26 21:50:17 +02:00

Bubble Package Manager (BPM)

A simple package manager

BPM is a simple package manager for Linux systems

Features

  • Simple to use subcommands
  • Can install binary and source packages
  • Can be easily installed on practically any system
  • No bloat

Information

BPM is still in very early development. It should not be installed on any system you use seriously. I recommend trying this out in a VM or container. In addition to this, this is one of the first projects I have made using the go programming language so code quality may not be the best. This project was made to help me learn go and how linux systems work better. It is not meant to replace the big package managers in any way

Build from source

BPM requires go 1.22 or above to be built properly

git clone https://gitlab.com/bubble-package-manager/bpm.git
cd bpm
mkdir build
go build -o ./build/bpm capcreepergr.me/bpm

You are now able to copy the executable in the ./build directory in a VM or container's /usr/bin/ directory

How to use

You are able to install bpm packages by typing the following:

bpm install /path/to/package.bpm

You may also use the -y flag as shown below to bypass the installation confirmation prompt

bpm install -y /path/to/package.bpm

Flags must strictly be typed before the first package path otherwise they'll be read as package locations themselves

You can remove an installed package by typing the following

bpm remove package_name

The -y flag applies here as well if you wish to skip the removal confirmation prompt

For information on the rest of the commands simply use the help command or pass in no arguments at all

bpm help

Package Creation

Creating a package for BPM is simple

To create a package you need to

  1. Create a working directory
mkdir my_bpm_package
  1. Create a pkg.info file following this format (You can find examples in the test_packages directory)
name: my_package
description: My package's description
version: 1.0
architecture: x86_64
type: <binary/source>
depends: dependency1,dependency2
make_depends: make_depend1,make_depend2

depends and make depends are optional fields, you may skip them if you'd like

Binary Packages

  1. If you are making a binary package, simply create a 'files' directory
mkdir files
  1. Copy all your binaries along with the directories they reside in (i.e files/usr/bin/my_binary)
  2. Either copy the bpm-create script from the bpm-utils test package into your /usr/local/bin directory or install the bpm-utils.bpm package
  3. Run the following
bpm-create <filename.bpm>
  1. It's done! You now hopefully have a working BPM package!

Source Packages

  1. If you are making a source package, you need to create a 'source.sh' file
touch source.sh
  1. If you would like to bundle patches or other files with your source package create a 'source-files' directory and place your files in there. They will be extracted to the same location as the source.sh file during compilation
  2. You are able to run bash code in source.sh. BPM will extract this file in a directory under /tmp and it will be run there
  3. Your goal is to download your program's source code with either git, wget, curl, etc. and put the binaries under a folder called 'output' in the root of the temp directory. There is a simple example script with helpful comments in the htop-src test package
  4. When you are done making your source.sh script run the following to create a package archive
bpm-create <filename.bpm>
  1. That's it! Your source package should now be compiling correctly!
Languages
Go 99%
Makefile 1%