data packages
Thomas Schwinge <[email protected]> Fri, 30 Jan 2004 00:48:59 +0100
| Newsgroups | gmane.comp.djb.package |
|---|---|
| Message-ID | <[email protected]> |
Hello! In media res: At present there is no possibility for a package to have a affiliated data package. The wast majority of packages doesn't need a data package but let's take admin/runit <URL:http://smarden.org/runit/> as an example for a package needing one - at least in my opinion. Gerrit Pape has registered admin/runit. Binary and documentation files are installed into /package/admin/runit-xxx, but the configuration files - describing how you want to have your system booted - still live in /etc/runit as do the files used to signal runit to bring the system down. It's obvious that the configuration files can not be put into /package/admin/runit-xxx - that would make them affiliated to version xxx of admin/runit. The state files also can not be put there because you may want to have /package mounted read only. So, I would suggest putting these files into package/admin/runit-data - the same way as Paul Jarc is doing it for configuration files of slashpackage-foreign packages <URL:http://multivac.cwru.edu./spf/>. Doing so would (or could) result in this layout: /package/admin/runit-xxx/conf/runit-data -> /package/admin/runit-data /package/admin/runit-yyy/conf/runit-data -> /package/admin/runit-data-old /package/admin/runit-data -> runit-data-default /package/admin/runit-data-default and /package/admin/runit-data-old are either directories or symlinks. runit would then access its configuration and state files using /package/admin/runit-xxx/conf/runit-date/* and when installing a new version package/build should just create the symlink /package/admin/runit-zzz/conf/runit-data -> /package/admin/runit-data. Configuration files could be in /package/admin/runit-data/conf/*. Data that will get modified while a program of the package is running could be in /package/admin/runit-data/var/* - whereas .../var could be symlinked to /fs/std-var/package/admin/runit-data/var. Packages providing services to be run via daemontools etc. could also have e.g. /package/web/djbdns-data/service/dnscache. This directory then again would get symlinked to /service. A web proxy could store its cache in /package/web/proxy-data/cache - with /package/web/proxy-data/cache again beeing symlinked to /fs/std-var/package/web/proxy-data/cache. The proxy itself would not even know about the data package. It would just store the cached sites in /package/web/proxy-xxx/conf/proxy-data/cache/. A virus scanner could use virus definition files located in /package/misc/virscan-xxx/conf/virscan-data/data. In fact they would reside in /fs/std-var/package/misc/virscan-data/data - on a partition mounted read write so that the definition files could be updated although /package being mounted read only and they could be updated without installing a new version of misc/virscan. What do you think about that? Regards, Thomas