Maus Package Metadata Specifation
From XOmB wiki
A package manager is only as good as the package it can handle. So I figured, why not make a package that is robust in what it can specify to the package manager and why not make it scriptable. This not only makes it so that you have system that is fairly future proof, as things change you just have to update your script, it also makes it fairly easy for experienced users to open up the package file in a text editor to customize the install for their system, try doing that with a deb or rpm.
Contents |
[edit] Metadata Objects
- Note: any objects below that are required for any package to be accepted by Mausoleum will be starred
[edit] name *
The name of the package. You may name a package whatever you want as long as there are no spaces.
[edit] version
Holds a version number, this is not yet implemented since I have not yet decided how I want to handle versioning.
[edit] repo *
The git repo holding the program you wish to install.
[edit] commit-object *
This ensures that regardless of what the developers commit, you will get a specific commit of the program you want. Hopefully a full tested version if this is a public package.
[edit] patch-repo
If there are patches that you know need to be made in order to have the program play nice on your system. For example, XOmB specific code vs Linux specific code, you can put the code in a repo and then get it this way during install.
[edit] install-steps *
This holds the number of steps involved in the install script which follows this line for the cooresponding number of lines. The install script must be in minid, more on this below.
[edit] uninstall-steps *
Everything that is installed must be capable of uninstalling. This works exactly like the install-steps object.
[edit] Scripting
All install and uninstall scripts must be done using the minid scripting language. Follow the link below to learn more about the language. This was chosen because the package manager is written in minid and there is built in functionality to take code in as a string and compile it into a function. This being said, anything written as part of a script must be valid within a function. I was talking to the language developer and it seems that I can restrict the commands allowed by the install and uninstall scripts if I deem them unsafe, things like "rm -rf /" can be put on a bad command list to ensure the safety of a users machine who may use a malicious package.
[edit] Sample Package
This is a package file I keep around as my test for when I am working on implememnting the package specification. It just installs a simple program that prints a message out to the terminal.
#this is a comment
name = print_name
version = n/a
commit-object = 6bed306619ae173fb4855dfd993d303b30c18271
repo = git://github.com/greenmanspirit/print_name.git
patch-repo = git://github.com/brianmadden/print_name.git
install-steps = 2
os.system("make")
os.system("mv print_name /bin")
uninstall-steps = 1
os.system("rm /bin/print_name")