Sidai team: how it manages packagesThis document says (will say?) everything you need to know about `package management', Sidai-style. We begin with `essential' and move toward `esoteric'.ToDo:more Contents:
Concepts: installing, deploying, revealingThe `pattern' that we apply to every package, however strange, is that it is installed, then deployed onto each host, and finally revealed to the users.
Methods to the madness:
Packaging `flow' (and associated methods)There is a common `flow' associated with Sidai-style packages, as they move from non-existent, to installed, to deployed, to revealed. The flow obviously fits open-source builds, but it is readily `bent' to apply to other packages (often by making various methods into no-ops).If you are not conversant with this flow, ARK package .xml files will be a mystery. Again, remember that whatever these methods do by default can be overridden, possibly in sneaky ways. What is described here are their conventional actions.
Un-packaging: going `backwards'Packaging `flows' crib sheet
Directories used in package managementYou can call your directories anything you like when doing Sidai-style package management. Just set things up in your site's team.xml and your package/ALL.xml. That said, here's what we use:
Your site's package/ALL.xml fileOne proto-package that tends to look different from others is your site's ALL package. This is where you record facts-and-figures that should be true for most/all of the packages at your site; e.g., what platforms you support.You should have an `ALL' proto-package for your site, which all of your real packages have as a(n ultimate) prototype. Now: ARK, in its general sense, does not mandate much about what this proto-package includes. You could do things we haven't even thought of. That said, most current ARK users probably want to know how a standard-issue Sidai-style package/ALL.xml file works. What follows is an annotation of the `glasli1' team's ALL proto-package. Remember that packages can-and-do override what's in ALL. What's here are the unless-you-say-otherwise defaults. First, standard preliminaries: <package name="ALL" xml-version="1" prototype="yes"> <description> Say whatever you like... </description>If you are a Sidai-style team, you might well have its things-true-for-all-packages proto-package (ALL) as a prototype: <prototypes> <prototype team="sidai" name="ALL"/> </prototypes><file-namespaces> are the user-visible file namespaces where a package's good will be revealed (made available): <file-namespaces><list> <item>/our</item> </list></file-namespaces>In this case, we would expect an executable `wibble' from the package to be revealed to users as /our/bin/wibble. A package can be revealed in multiple <file-namespaces>. For example, we put Perl in the usual /our namespace, but we also arrange for the main executable to appear in /usr/local/bin. The <namespace-deploy-map> is a table that maps file namespaces (reveal areas) to deploy areas: <namespace-deploy-map><table> <!-- the first one (/our) is the primary --> <entry name="/our">/our/.-ark-deploy</entry> <entry name="/usr/local">/usr/local/.-ark-deploy</entry> <entry name="/">/.-ark-deploy</entry> </table></namespace-deploy-map>The <hosts-supported> table lists proto-hosts which identify the platforms supported by a package. In package/ALL, you'll identify the main platforms at your site. Individual packages can override this list (of course). <hosts-supported><list> <item>sparc-solaris2.6</item> <item>ia32-linux-rh6.1</item> </list></hosts-supported>A reasonably common way for a package to override the default <hosts-supported> is simply to supply a <hosts-not-supported> table. The effect: is <hosts-supported> minus <hosts-not-supported>. The <proxy-hosts> list matches proto-hosts (which are almost certainly mentioned in <hosts-supported> tables hither and yon...) to real hosts (of the right type). Our convention is to put all of the proxy-host info for a site into package/ALL, but you don't have to. <proxy-hosts><table> <entry name="ALL">slicker</entry> <entry name="ia32-linux-rh6.1">clarence</entry> <entry name="sparc-solaris">slicker</entry> <entry name="sparc-solaris-amanda-server">slimy</entry> <entry name="sparc-solaris-license-server">slicker</entry> <entry name="sparc-solaris-mail-server">slicker</entry> <entry name="sparc-solaris-web-server">slicker</entry> <entry name="sparc-solaris2.6">slicker</entry> <entry name="sparcv9-solaris2.6">slinger</entry> </table></proxy-hosts>The <packages-install-dir> table matches proto-hosts to install areas. (This is a Sidai-team thing. The ``golden bits'' for a package end up in its install area; we then deploy onto individual hosts from the install-area; then reveal things (to the users) from what has been deployed.)
<packages-install-dir><table>
<entry name="ALL">/sys/.-ark-install-ALL</entry>
<entry name="ia32-linux-rh6.1">/sys/.-ark-install-ia32-linux-rh6.1</entry>
<entry name="sparc-solaris">/sys/.-ark-install-sparc-solaris</entry>
<entry name="sparc-solaris-amanda-server">
/sys/.-ark-install-sparc-solaris-amanda-server
</entry>
<entry name="sparc-solaris-license-server">
/sys/.-ark-install-sparc-solaris-license-server
</entry>
<entry name="sparc-solaris-mail-server">
/sys/.-ark-install-sparc-solaris-mail-server
</entry>
<entry name="sparc-solaris-web-server">
/sys/.-ark-install-sparc-solaris-web-server</entry>
<entry name="sparc-solaris2.6">/sys/.-ark-install-sparc-solaris2.6</entry>
<entry name="sparcv9-solaris2.6">/sys/.-ark-install-sparcv9-solaris2.6</entry>
</table></packages-install-dir>
The <ark-dirs> table
specifies a few common directories where we keep ARK stuff.
For example, PKGS_SRC is a directory where we stash
(mostly open-source) package tarballs. See also: the team <ark-dirs>
table.
<ark-dirs><table> <entry name="GENERATED_PKGS"> /sys/ark-gen-pkg </entry> <entry name="PKGS_BUILD"> /sys/ark-builds </entry> <entry name="PKGS_SRC"> /d/open-src </entry> </table></ark-dirs>Finally: what `umask' to use by default when running package-method code: <PKGS-UMASK>002</PKGS-UMASK> </package> A package's status fieldFor packages, the <status> should be one of: pending, built, installed, deployed, revealed, deprecated, external, or historical.About a deprecated package: Don't delete anything associated with the package, or do anything to build it, or mess with it. In general, leave everything associated with it alone, in a `frozen' state. |