gnu-system-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] The GNU system's package system


From: Alfred M. Szmidt
Subject: [RFC] The GNU system's package system
Date: Sat, 15 May 2004 07:15:16 +0200
User-agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (sparc64-unknown-linux-gnu) MULE/5.0 (SAKAKI)

I made my copy of the "design" document for the package system at
http://www.update.uu.se/~ams/gnu/GNU-package-system.  It is more or
less a step-by-step document of how I will write the package system,
and not a standard.  This is my working copy, so feel free to commen
about things.  But please quote the time-stamp when discussing the
document.

I have also attached it to this mail, a update will be sent to this
list once in a while when I feel big changes have been done to the
document.


===File ~/gnu/GNU-package-system============================
* The GNU package system        -*- Outline -*-

Time-stamp: <2004-05-15 03:21:50 ams>

* Terminology

"package" refers to a binary package unless noted otherwise.

"stow" refers to both stow and stowfs. Any options provided by the
stow program, shall be supported by the stow translator, and vice
versa.

Anything in square-brackets ([]), are my own thoughts and will be
removed in some future revision of this document.

* Package format

All nodes that are related to the package format shall start with a
plus-sign (+).

[Clarify the binary format for the file, it will be just a flat
 tgz-ball.]

[Maybe dump them in a {stow} directory, and remove the + sign from
 them, this will create less clutter in the file-listing if the amount
 of nodes provided by stow becomes large.]

** +arch

The value of `uname -m' for the platform which the package was
compiled for, may have the value `none' if it runs on all platforms.

** +md5sum

MD5 listing of all files in the package.  The only file that will be
excluded from this listing is the `+md5sum.sig' file.

** +md5sum.sig

A detached GPG armoured signature of `+md5sum'.

[gpg --detach-sign --armor +md5sum]

** +short-description
** +long-description
** +manifest

[Why not make this into one file, a Makefile, and provide these as
 targets instead?  This makes it easier to write the actual scripts
 for the port maintainer.]

The following are non-interactive scripts.

** +post-install
** +pre-install
** +post-deinstall
** +pre-deinstall

* Nodes provided by stow

All nodes that are provided by stow shall start with a comma-sign (,).

[More files that should be provided?]

** ,depends

`,depends' is list of unfulfilled dependencies in the following
format:

  PACKAGE (PREDICATE VERSION), ...

Where PREDICATE is one of the following predicates: < <= = > =>.  If
PREDICATE is null, then it defaults to equal.  If the whole
`(PREDICATE VERSION)' clause is absent, then any version of the
package PACKAGE will do.  Whitespaces shall be ignore.

If all dependencies are fulfilled, then this node will not show up in
the file-listing.

* Package construction

* Installation of packages

The following steps will happen when one installs a package:

1) Unpack the package (if it is already unpacked, skip to 2).

2) Copied, or symlinked into /packages.

3) The following are performed by stow:

  a) Check dependencies, update `,depends' node accordingly.

  b) Run pre-install script.

  c) Merge package into the file-system, skipping any nodes that are
     related to stow, or the package format.

  d) Fix files according to what is described in `+manifest'.

  e) Run post-install script.

If a error occurs during any of these steps, stow shall clean up to
the same state was was before the package was installed.

* Deinstallation of packages

The following steps happen when one deinstalls a package:

[Should we store a backup of changed files?]

[Clarify...]

1) Check what dependencies break.  Do this recursively until all
   dependencies have been cleared up.

2) Run pre-deinstall script.
 
3) Unmerge the package
 
4) Run post-deinstall script.
 
5) To completely remove the package from the system, we just remove
   the node /stow/PKG-VER here, otherwise this will be a no-op.

* Front-ends for stow

** Command-line

[Something similar to apt-get]

** GUI

[This will have to be done sooner or later...]

* Issues that have not been pondered about

** Download locations

Packages will be stored at some ftp site in the following manner:

  ftp.foo.org/some/directory/PKG/PKG-VER_N-ARCH.tgz

Where N is a package revision number which must be updated for each
commit into the ports-like system that is related to the package.
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]