package management discussion - Programming On Unix

Users browsing this thread: 1 Guest(s)
eadwardus
Members
I wrote a package manager: https://github.com/eltanin-os/venus
Complemented by a ports-like {source-based package manager/build system}: https://github.com/eltanin-os/ports

It fetches, does a integrity check, and unpack the files into the $root directory. It's actually a little more complex than one would expect a "simple package manager" to be, it has its own archiver and manifest/config file format.
The "database" is a directory $root/var/pkg with the data files
$root/var/pkg/remote: packages that can be fetched
$root/var/pkg/*: arbitrary sources (such as a cd, another hd, etc.)
$root/var/pkg/local: installed packages
A "database entry" looks like this:
Code:
name:foo
version:1.0
license:MIT
description:dummy package
rdeps{
        # runtime dependencies
        coreutils#*
}
mdeps{
        # construction dependencies
        libc#1.0
}
files{
        # path fletcher32-hash
        bin/file01 86166cc0
}
It's painful to deal with cases where you want to statically link a package, but some of its dependencies can only be linked dynamically, so you need to differ construction/static deps from runtime/dynamic ones.

It has a configuration file under /etc/venus.conf or $HOME/.config/venus.conf
See an example below using /usr/local as $root:
Code:
arch:x86_64
fetch:curl -LO
root:/usr/local
safeurl:https://myrepo.com
uncompress:lzip -dc
url:https://mymirror.com
There are two repository entries to avoid needing to trust a mirror, as the integrity values (crypto hash) and entries would be downloaded from the official repository.

It has no automatic dependency resolution to this moment, although i am considering to add a simple recursive one (similar to the one used by the ports).

About the discussion on separating the packages under /whatever/package_name, like nix/guix/janus/gobo does: It seems a good way to organize things at first, but then you fall to the problem that the entire OS expect a different organization; most of the advantages of separating the packages are lost when you try to solve this (maybe union being an exception, but then you have its own problems)


Messages In This Thread
package management discussion - by sth - 26-05-2020, 05:55 PM
RE: package management discussion - by z3bra - 26-05-2020, 07:00 PM
RE: package management discussion - by sth - 26-05-2020, 07:18 PM
RE: package management discussion - by z3bra - 26-05-2020, 07:35 PM
RE: package management discussion - by sth - 26-05-2020, 07:41 PM
RE: package management discussion - by sth - 26-05-2020, 09:41 PM
RE: package management discussion - by venam - 27-05-2020, 01:51 AM
RE: package management discussion - by z3bra - 27-05-2020, 03:49 PM
RE: package management discussion - by sth - 28-05-2020, 06:05 PM
RE: package management discussion - by z3bra - 28-05-2020, 08:10 PM
RE: package management discussion - by jkl - 29-05-2020, 03:58 AM
RE: package management discussion - by z3bra - 29-05-2020, 05:18 AM
RE: package management discussion - by ckester - 29-05-2020, 05:24 PM
RE: package management discussion - by movq - 31-05-2020, 02:47 AM
RE: package management discussion - by z3bra - 31-05-2020, 04:14 AM
RE: package management discussion - by sth - 31-05-2020, 05:28 PM
RE: package management discussion - by jkl - 01-06-2020, 06:06 AM
RE: package management discussion - by movq - 01-06-2020, 02:26 PM
RE: package management discussion - by eadwardus - 05-07-2020, 02:32 PM