Factor-packman:package-layout

From Zen/-/ackers

Jump to: navigation, search

A Factor package should have the following layout:

[ package-root/ ]
   |-> src/
   |-> package-spec.factor
   |-> checksum.md5
   

The src/ directory contains all the Factor source files and sub-directories for the library.

The [ package-spec.factor ] file contains the specification for the package. This file is used by the package manager to correctly install & manage the package. Thus, this file contains the META-DATA for the package that is used by the package manager. It contains information such as:

   o) The package name
   o) The package version
   o) The package description
   o) dependencies
   o) library / application author name + contact details
   o) packager's name + contact details.
   o) etc.
   

The [ package-spec.factor ] file is a file containing valid Factor code which can be loaded by the Factor environment and can be accessed using Factor code. The *packages* vocabulary loads this file to gain access to the package information and manage the package correctly.

The [ checksum.md5 ] file contains the MD5 hashes of all the files in the src/ dir AS WELL AS the MD5 hash of the package-desc.factor file. This data is used to verify the integrity of the package after download and before install. This information MUST be available and a package is NOT valid without the checksum information. This file can also be named "checksum.sha256". This tells the package manager that we are using SHA256 hashes to verify the package instead of MD5. Both formats will be supported. However, MD5 support will be added first and only later will SHA256 support be added for verifying the integrity of the files in the package.

Personal tools