HomeLinux

What is it ?

Homelinux is a simple package manager to handle installation of packages in your home directory by rebuilding them from sources. The main use case if a user (or developper) running into a non root environnement and needs some extra-package he can't or don't want to install into the system. Thanks to HomeLinux you can handle the installation of the source package by checking the dependencies available on the current system and automatically installing the missing one.

The goal is to provide a quick access to the latest version available for all packaging without regarding on the stability. It make HomeLinux an interesting tool to test usage of all up-to-date version of packages together to find new build issues.

Another usage of HomeLinux can be for HPC datacenters to build quicly some fixed prefix to provide new version to the users without changing the operating system. Thanks to HomeLinux it is easier to build a new prefix with updated version in another directory and making the user moving slowly to new versions by chaning the prefix they inherit from for their home personal prefix.

Features

It is inspirated from gentoo package manager and import most of its semantic.

Pre-requist

Homelinux is currently configured to be used on top of debian8 but there is no strict restiction which limit it's usage on other platform except that it will not autodetect the presence of native packages. In this case it will tend to rebuild more packages than required.

The only dependencies are nodejs, npm and the necessary to download and build basic packages (tar,wget,gcc, make...).

CAUTION, you need a recent vesion of nodejs otherwise homelinux silently fail to detect the system packages due to lack of child_process.execSync().

If you want to be able to uninstall the packages or make clean update with previous removal of the files, you might want to enable usage of GNU stow in the config file. You previously need to install stow in your system or into the prefix as a first package to be install with stow disabled.

Installation

First fetch the NPM dependencies :

npm install

Then, install and create your prefix with make command :

make install PREFIX=$HOME/usr

Then configure your prefix if needed by editing the file. You can find documentation about the configuration into doc/config.md.

nano $HOME/usr/homelinux.json

You can also setup global user configuration by copying userconf.json :

cp userconf.json ~/.homelinux.json
nano ~/.homelinux.json

Now you can load the configuration into your ~/.bashrc :

eval "`$HOME/usr/bin/hl env`"

Before usage you need to create the cache with :

hl update-db
hl build-cache

If you want to be able to uninstall the packages, make clean update or create bin packages, you need to install stow (or use the one from the system).

hl install stow
#Then enable usage of stow in config file of prefix
nano $HOME/usr/homelinux.json

If you use inheritance and want to install a package into an inherited prefix, you need to switch to this prefix first to make it as active prefix.

eval "`hl switch $HOME/usrbase`"

Basic usage

You can use the given commands to install search or sync your repos :

    #provide environnement variables
    hl env

    #update your package DB (fetch gentoo...)
    hl update-db

    #install package
    hl install bash                      # use name, automatic search db
    hl install app-shells/bash           # force subdir in gentoo way
    hl install gentoo/htop               # use the gentoo archive (nodeps)
    hl install github/svalat/svUnitTest  # from github repos, use last release
    hl install urls/htop                 # Use from packages/urls.lst

    #for non HL packages (gentooo, github...) you can provide some deps
    #infos and conf options into homelinux/packages/quickpackages/, see examples.

    #you can force the vesion to install with
    hl install htop=4.8   #exact version
    hl install htop<4.8   #less than
    hl install htop<=4.8  #less eq than
    hl install 'htop!4.8' #no this one
    hl install htop~4.8   #regexpn allow all 4.8.X, take last avail
    hl install htop:4     #slot based

    #search in avail packages
    hl search htop

    #list installed packages
    hl ls

    #Whatch generated quickpackages
    hl gen-package gentoo/htop
    hl gen-full-package gentoo/htop

    #whatch generated install script
    hl gen-install gentoo/htop

What it setup

Currently HomeLinux setup the environenement variables for you to fully configure the prefix :

Create packages

To create package, check doc/package.md. If you don't want to provide full packages but just want to use as most as possible the default options, you can use the quick package approach defined into doc/quickpackage.md.

Run unit tests

HomeLinux provide some internal unit tests which can by run with mocha :

    npm install mocha
    ./node_modules/.bin/mocha ./tests

Licence

HomeLinux is distributed under BSD licence and currently mainly developped by S├ębastien Valat.