package managers
i’ve been into package managers for some time and i always wondered why developers have to define dependencies manually and not supported by a program using ‘a syscall interface monitoring all OPEN calls‘ in combination to something like ldd for the built binary.
the idea is pretty simple:
- first try to compile the program you want to packet. if all compiles then you probably have installed all required libraries on the system. (i assume PATH and LD_LIBRARY_PATH wasn’t altered).
- next create a package as an ebuild for instance. the ‘configure’ and ‘make’ step can be called by ‘emerge’. emerge could then monitor everything, as
- on ‘build time’ of the package all OPEN syscalls are monitored and every single file which is opened (which in theory belongs to a different installed ‘known’ package) is checked for the owner package. a group of packages which the ‘build step’ belongs to is acquired, and
- finally after the source has successfully compiled the binary is processed by ‘ldd’ which usually looks like:
# ldd `which htop`
linux-vdso.so.1 => (0×00007fffce0a7000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0×00007f305f907000)
libm.so.6 => /lib/libm.so.6 (0×00007f305f684000)
libc.so.6 => /lib/libc.so.6 (0×00007f305f328000)
libdl.so.2 => /lib/libdl.so.2 (0×00007f305f124000)
/lib64/ld-linux-x86-64.so.2 (0×00007f305fb64000)
now every library the binary depends on is expected to be from a specific package (again – which in theory belongs to a different installed ‘known’ package) - finally all this automatically detected dependencies are reported to the package maintainer and one probably could also check the existing dependencies for the package to see if they match.
- another important point would be if a package, NO read: if a upstream package is removing support for something which requires an external library, does include a dependency which is not used anymore it could be dropped automatically as well.
i did not test if that would actually work but i can’t think of any issue why it should not.
i’ve had some other ideas as well, if you are curious you can read the article in my wiki [1]. if you want to contribute please don’t use the comment field, just write me an email or ask me for a wiki account and you can change it directly.
my goal is to evaluate a mixture of the concept of ebuilds – everything built from source – with having binary packages combined to a p2p network in both hosting ‘already compiled packages’ as well as a distributed compile farm. currently it’s a mixture of german and english but i might fix that soon. another important goal is to merge package management at some yet unknown point to remove redundant work and to have a common package manager for all linux distribution as well as all other distributaions as mac os x and windows.
spoken in analogies: the same process for building a cross platform package manager is ‘cmake’ for cross platform build system generation which was (or currently is) replacing ‘autotools’.
links
[1] http://lastlog.de/wiki/index.php/Verteiltes_Paketsystem





So... This week has been just one blessing after the other. I mean, seriously, it's been an amazing week! I've been recording this great band in my studio, I've been rockin' the code at my day-job, and things are just great.


















