CoolWeb
C Packages Home

Introduction

About the PM Contributing Using the package manager on systems Features What it cannot do

Installation

Installing the package manager

Getting started

Basic operations Useflags

Installing a package

How to install a package Options

Configuration file

Introduction Valid variables

Path variables

Introduction PKG Repo path DB Path Cache Path Prefix Dest

Creating your own package

documentation for package manager


Introduction

About this package manager

This is a package manager made for Linux From Scratch for solving the issue of upgrading of packages and dependency hell, not to be intended to be used with real distros. I know most of the code is unoptimized but hey it works. This package manager is purely written in bash script and is made by one person and no AI. Inspired by pacman and portage

Contributing

If you care to contribute, it would help alot if you contribute in fixing small bugs and expanding the package repository. Theres like 200+ packages built in LFS which would be a pain for me

Using the package manager in your system.

You can use this package manager on your system, but you have to take precaution because this package manager has not been tested enough to find bugs. Incase you find any bugs raise an issue on GitHub or contact me through discord (rblox0213) or mail me.

While building base LFS

Now using this while building LFS is a little tricky. Because most of the stuff required by Veiler is not present on the system. The thing is, you cannot use Veiler to build package before chapter 8, because those packages are cross compiled so that they can be compiled cleanly and be isolated from the host system. So, you can use the package manager in chapter 8, where it is actually most effective ( because theres so many damn packages ). So even after you manage to reach chapter 8 and get the package manager installed on the system, there are few things you need to do before using it. They are:



Features

Can install packages
Can uninstall packages
Source based
Useflags are supported
A somewhat working dependency resolving algorithm
Package integrity verification using checksums
Uses a proper database with a structure
Has some powerful options
Different modes
Allows you to not install documentation
Allows you to run test suites
Confirmation prompts
Information related to disk spaces
Can detect circular dependencies
Package aliases
Package groups
Control over dependecies

What it cannot do

Run hooks
Do rollbacks
Resolve conflicts
Use multiple repos
Use helpers

Installing the package manager


To get started, run git clone https://github.com/ilovetrees242/Veiler.git

Once done, cd into the new cloned repo and run ./install.sh as root


The package manager will install several directories and files, and the package manager itself into the root filesystem.


/var/db/Veiler : This is the default directory which the package manager uses to store its sync database and local database for the respective packages



/etc/Veiler.conf : The configuration file

/var/cache/Veiler: The default cache path for the package manger

/usr/lib/Veiler : The library directory for the package manager, which the package manager uses to store various libraries

Getting started


Basic operations

Here are the operations you can do with the package manager:


Using useflags while installing packages

USEFLAGS in this package manager are implemented the same way as they were in gentoo. There are global useflags which set useflags visible to all packages, and local useflags that only set useflags for a specific package.

How to set global useflags:


/etc/Veiler/veiler.conf: You can use this file and set the USEFLAGS variable to the desired useflags you want for the packages to be installed. These useflags must be space seperated in order to work properly. Example: USEFLAGS="+MULTILIB -NLS -RPATH"

How to set local useflags:


/etc/Veiler/package.use: You can use this file and enter the name of the package in a new line, followed by "->" and then the useflags seperated by space. Example: which -> -RPATH +GNULD -NLS

Installing a package


To install a package, you must run sudo Veiler unveil [PKGNAME] [OPTIONS]


Example packages can be acl, gettext, neofetch, which, bash, etc. Please note that the build scripts for these packages must be formatted correctly else it will perform wrong instructions

Using the options



Using the configuration file


Introduction

You will find the configuration file for Veiler at /etc/Veiler/veiler.conf after installing the package manager. You can use the configuration file to set default options everytime you perform an action with the package manager instead of having to use commandline options again and again

Variables

A table of variables which are valid


Operation variables
NameTypePurposeUsage
VEILERQUIETBooleanTo enable or disable quiet modeSet to 0 or 1
VEILERTESTSTo enable or disable running test suites
VEILERDOCTo enable or disable installing documentation
VEILERASKTo enable or disable confirmation prompts
VEILERMBETo enable displaying sizes in megabytes (MiB)
VEILERONLYBUILDTo disable installation of packages
VEILERSKIPINTEGRITYTo enable or disable package integrity verification
VEILERSKIPCLEANTo enable or disable cleaning before building a package
VEILERSKIPDEPSTo enable or disable dependency resolution (for optional dependencies too if you have useflags set)
VEILERSKIPINSTTo enable or disable skipping building packages which are already installed
VEILERSKIPDESCTo enable or disable matching arguments provided to search with package descriptions too
VEILERNOROOTTo enable or disable needing superuser priveledges for building packages
Path variables
NameTypeDescriptionUsage
VEILERDESTStringThis variable contains the final destination where packages will be installed. Default value is / ( root directory ). Changing it will require it to be an absolute path, otherwise package manager will breakProvide an absolute path to the directory you want to install packages into. Example: /home/LFS/Dest
PKGREPOThis variable contains the URL of the package repository ( https, ftp, http ). Default value is https://ilovetrees242.github.io/Supplements/Website/PackagesSet the value of this variable to be a valid URL to the package repository you want to use. See PKG Repo path for more information
VEILERCACHEPATHThis variable contains an absolute path to the cache path of the package manager. Default value is /var/cache/Veiler See Cache Path for more information.Set an absolute path to the directory you want to use as an cache directory. WARNING: If you use a non empty directory, like your users home directory then EVERY directory inside that directory will be deleted if $VEILERSKIPCLEAN is set to 0
VEILERDBPATHThis variable contains an absolute path to the database of the package manager. The package manager uses this database to get information related to packages, like their name, version, source, etc. See DB Path for more information. Using an empty directory as the DBPATH will make the package manager "confused" ( as it will have nowhere to get data from ). Default value is /var/db/VeilerTo use this, make sure the DB directory exists, and has the subdirectories local and sync with package entries as directories. Set an absolute path to the database you want to use.
VEILERCONFIGPATHThis variable contains an absolute path to the configuration file for Veiler. Though it would not make sense to have the path to the configuration file inside the configuration file. This variable is set inside the package manager to /etc/Veiler/veiler.conf. You can use another configuration file using the --config option.To use this, do not set this variable inside any existing configuration file, but pass the path to it manually through command line, or you can change it inside the package manager
VEILERPREFIXThis variable contains an absolute path to the prefix under which packages should be installed. By default its set to /usr but you can change it to something like /usr/local. Under your $VEILERDEST, the prefix will be created. Use this for non system-wide installations or custom installations.To use this, simply change the value to the directory you would like as your prefix, example: /usr/local. Again this must be an absolute path in order to work correctly.

Path variables


Introduction

This section will contain information about the path variables, which affect the usage of certain directories by the package manager. These variables are simply just path to directories with a special purpose


PKG Repo path


Introduction


PKG Repo path basically contains the URL to the package hosting repository. The package manager uses wget to download files from the internet through the https. The hosting package repository must contain to things:



How to use

To use PKGREPO, you need to first of all host the repository, and then the package manager will download packages from the repository through http. Patches should be applied in the buildscript itself. The [PKGREPO]/Packages is what you need to set as PKGREPO. Once you do that, it should contains tarballs like this:


build-[PKGNAME]-[PKGVERSION].tar.gz

After you have that, the tarball should contain the file called MOONBUILD along with another file called integrity.sha256


Note

[PKGNAME] and [PKGVERSION] should match MOONPKGNAME and MOONPKGVERSION in the info file in the database of the package manager


DB Path


Introduction


The DB path is the database of the package manager, non-sql which lives on the filesystem. Instead of SQL or JSON to query data, the package manager queries a package entry in $VEILERDBPATH/sync. If the package is not found, the package manager will exit with an error. Otherwise, it will proceed with the installation. Each package entry mainly contains 5 files:


Creating your own packages

Introduction

Alright, last but not least creating your own packages. This section will explain things like adding the package to the database entry, creating a buildscript for it and adding it to the package repo

Things required for a package

Creating a buildscript for a package