SourceMageDocs Script Documentation


usr/sbin/alter
=back =head1 LICENSE This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
usr/sbin/cabal
Control a set of SourceMage boxes on a network. This documentation was written by someone who never used cabal or looked at this code before.
usr/sbin/cast
Script to cast spells.
usr/sbin/cleanse
This script should clean up the sorcery files, particularly the depends and packages files. It should validate the files remove corrupted lines, and ensure the information all agrees with itself. It is also to clean out unused lines and files.
usr/sbin/confmeld
Script to install staged config files.
usr/sbin/delve
usr/sbin/dispel
Dispel is the spell removal utility. It can be called by the user or by intone.
usr/sbin/gaze
(gaze into the crystal ball)
usr/sbin/scribbler
Copyright 2002 by the Source Mage Team
usr/sbin/scribe
usr/sbin/sorcery
=head1 SYNOPSIS Sorcery is a spell management utility =head1 DESCRIPTION ... =head1 COPYRIGHT Original version Copyright 2001 by Kyle Sallee Additions/corrections Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
usr/sbin/summon
=head1 SYNOPSIS summon is a script for downloading spell source files =head1 DESCRIPTION ... =head1 COPYRIGHT Original version Copyright 2001 by Kyle Sallee Some parts copyright 2002 by Anders Bruun Olsen et al Other additions/corrections Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
usr/sbin/vcast
=head1 SYNOPSIS vcast is front-end to cast to activate voyeurism in a separate xterm if possible. =head1 DESCRIPTION ... =head1 COPYRIGHT Original version Copyright 2001 by Kyle Sallee Additions/corrections Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
usr/sbin/xsorcery
=head1 SYNOPSIS xsorcery is the X version of sorcery =head1 DESCRIPTION ... =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/build_api/api1
=head1 SYNOPSIS Functions for dealing with the actual compiling/installation of spells and walking through casts 'pass 4' pipeline. If BUILD_API is '1' =head1 DESCRIPTION Contains functions for the build api version 1 which has the following steps: PRE_BUILD -> BUILD -> POST_BUILD -> POST_INSTALL -> TRIGGERS =head1 COPYRIGHT Copyright (C) 2004 The Source Mage Team =head1 FUNCTIONS
var/lib/sorcery/modules/build_api/api2
=head1 SYNOPSIS Functions for dealing with the actual compiling/installation of spells and walking through casts 'pass 4' pipeline. =head1 DESCRIPTION Contains functions for the build api version 2 which has the following steps: PRE_BUILD -> BUILD -> PRE_INSTALL -> INSTALL -> POST_INSTALL -> FINAL -> TRIGGERS =head1 COPYRIGHT Copyright (C) 2002 The Source Mage Team =head1 FUNCTIONS
var/lib/sorcery/modules/build_api/common
=head1 SYNOPSIS Functions for dealing with the actual compiling/installation of spells and walking through casts 'pass 4' pipeline. =head1 DESCRIPTION =head1 COPYRIGHT Copyright (C) 2002 The Source Mage Team =head1 FUNCTIONS
var/lib/sorcery/modules/dl_handlers/dl_bzr
=head1 COPYRIGHT Copyright 2004 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_cvs
=head1 SYNOPSIS Download handler for downloading cvs urls. =head1 DESCRIPTION This file contains functions for I files through cvs. In order for cvs urls to be downloaded, the I spell must have been cast. This script first determines if cvs has been installed before attempting to download a cvs url. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team Copyright 2005 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_dir
=head1 SYNOPSIS Url handler functions for grabbing directory urls. =head1 DESCRIPTION This type of url was added as a response to the following request: I'm an AbiWord developer, and I keep the latest source tree in my abi directory. If I could make the abi spell (not to be confused with the abispell) use my current CVS checked-out tree, that would be nice. This file contains functions for I (actually it just copies, tars, and compresses) directories which can be accessed through the local file system. Url's of this type are specified using the format dir:// where is the full path to a directory that will be tarred and compressed for use by sorcery in casting a spell. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_file
This file contains functions for I (actually it just copies) files which can be accessed through the local file system. Url's of this type are specified using the format file:// where is the full path to the file.
var/lib/sorcery/modules/dl_handlers/dl_git
=head1 COPYRIGHT Copyright 2004 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_hg
=head1 COPYRIGHT Copyright 2008 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_rsync
=head1 SYNOPSIS Url handler functions for downloading rsync urls. =head1 DESCRIPTION This file contains functions for I files through rsync. In order for rsync urls to be downloaded, the I spell must have been cast. This script first determines if rsync has been installed before attempting to download a rsync url. =head1 RSYNC URL Format rsync://SERVER::MODULE_NAME The above url will download the latest version of the specified module. =head1 EXAMPLES Suppose we want to download the latest version of the sorcery stable grimoire via rsync. We'd use the following url: rsync://codex.sourcemage.org::stable =head1 IMPLEMENTATION NOTE Downloading is supported but rsync url verification is not currently supported. =head1 COPYRIGHT Copyright 2003 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_svn
=head1 COPYRIGHT Copyright 2004 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/dl_handlers/dl_tla
=back =head1 LICENSE This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
var/lib/sorcery/modules/dl_handlers/dl_wget
=head1 SYNOPSIS Url handler functions for downloading http, https, and ftp urls =head1 DESCRIPTION This file contains functions for downloading and verifying http, https, and ftp urls. This file uses the "wget" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
var/lib/sorcery/modules/libapi
This library contains all sorcery functions which a spell may use. If the function isn't listed here, it may disapear without warning. If you use a funtion which isn't listed here, you'd better have a good reason. Better yet, raise a bug on the topic and the needed function will probably get added.
var/lib/sorcery/modules/libcast
A spell follows the following path during its installation: PREPARE -> DETAILS -> PRE_BUILD -> BUILD, or COMPILE/INSTALL -> POST_BUILD -> POST_INSTALL -> TRIGGERS Each of these steps, along with some interim steps of dealing with conflicts and security are handled here as well.
var/lib/sorcery/modules/libcodex
A grimoire is a book containing one or more spells. A codex is a collection of one or more grimoires. There are functions for listing the available grimiores, listing spells in a grimoire, listing sections in a grimoire, etc. Note: Each of the functions that returns a spell, section, or grimoire returns the full path. Functions that explicitly return a spell I or section I do not return the full path.
grimoires
This section contains some notes on grimoires.
Grimoire Layout
The codex functions expect each grimoire to be a directory. Each directory entry in a grimoire directory is considered to be a section. All directory entries in a section are considered to be a spell if they included an executable file named F
.
Multiple grimoires
Multiple grimoires are specified by setting entries in the I array. For example, to set two additional grimoires, you would put something like the following in your local SMGL grimoire file (F).
GRIMOIRE_DIR[1]=/path/to/alternate/grimoire
GRIMOIRE_DIR[2]=/path/to/other/alternate/grimoire
Grimoires are processed/searched in increasing order starting at index 0. The SMGL configuration file provides the value for the default grimoire as I or simply I. The following two lines show how to reorder the default grimoire so that it's not searched first (in this example it will be searched second).
GRIMOIRE_DIR[1]=$GRIMOIRE
GRIMOIRE_DIR[0]=/path/to/grimoire/to/search/first
There is no limitation on the number of grimoires that can be specified. It is also possible to add and remove grimoires using the codex_add_grimoire and codex_remove_grimoire functions. Copyright 2002 by the Source Mage Team
var/lib/sorcery/modules/libcrossinstall
Library for doing install_root stuff. It is home to menu's for install_root and related variables. Future install_root specific and cross install related code might live here.
var/lib/sorcery/modules/libdepends
A spell is represented as a node containing some pieces of data seperated by colons. spell:dependent spell:on/off:type:casting_flag:is_a_target_flag
var/lib/sorcery/modules/libdepengine
In the simple model, without triggers, we color graph nodes (spells) white, and as we recursiely visit them, mark them grey. When all of a spell's children have been visited, and successfully cast, we cast the spell, and mark the node either black:0 or black: (eg black:34) for success or failure respectively. If a child fails we mark the current node black: and return. In the case that we visit a child that is grey, a dependency loop is detected, currently we ignore it and build the tail spell anyway, in the future we could break optional depends and cast some spell twice. The more complex model implemented below includes the above, but after a spell builds (or fails), it colors itself brown and executes its triggers. This is a little more complicated because there could be multiple triggers on a single spell and cycles are frequent. If successful, the spell marks each trigger as a 'pending trigger' . Then if that spell is the last triggerer, the trigger is registered (possibly from another spell), and the trigger is not grey (depends cycle, indicating it is unsafe to cast the spell) the spell is cast in a special variant of the above algorithm. The key difference is that if a grey node is encountered (depends cycle), instead of breaking it, the spell gracefully backs off and the trigger is left on the pending triggers list while other triggers are executed. All the triggers for the spell are executed similarly until there are no triggers left, or no progress is made. If after all spells are cast there are still pending triggers they are built at that point without the graceful cycle handling.
var/lib/sorcery/modules/libdispel
Functions for dispelling spells.
var/lib/sorcery/modules/libdownload
This file contains functions for accessing download handlers. Download handlers handle the physical acquiring of files as opposed to the more abstract process of parsing and manipulating urls. A url handler will specify a download handler for a given url. dl handlers may call back to url handlers to have a url parsed it is up to the dl handler to interprit the results of the url parsing as it may be different for each type of url. dl handlers are responsible for connecting to the internet if they need to. WRITING NEW DL HANDLERS
Current dl handlers only need a single function
"dl_get_" This function takes the following arguments:
$target
$url_list List of urls to get the target from
$hints Hints, these help the function determine what
type of thing it is downloading or other tunables.
$dl_target Name of variable in which to store the name of the
result directory or file
$dl_type Name of the variable in which to store the type of
thing downloaded
The target parameter is advisory, it is a hint at what might be downloaded. The hints value is a list, values of interest to a particular dl_handler should be prefixed "dl_", the handler may define any hints which it see's necessary. There are also well defined hints: "tree" "file" these indicate that the type of thing being downloaded is probably a tree or file despite what we may think. The basic form of a dl handler's get function is simply a loop over each url until one successfully downloads, it should then set the target and type reference variable successfully.
var/lib/sorcery/modules/libgcc
The basic usage is as follows:
- If a spell works with the latest version of gcc, do nothing.
- To change the compiler version for a spell, add a GCC_VERSION field
to the spells DETAILS specifying major.minor version of gcc it needs,
e.g. GCC_VERSION=3.4
- add a 'depends gccXX' to the spell where XX == majorminor,
e.g. 'depends gcc34'
- add 'invoke_gcc' to the top of PRE_BUILD if the spell has a
custom PRE_BUILD file
var/lib/sorcery/modules/libgpg
var/lib/sorcery/modules/libgrimoire
These functions can be used in the PRE_BUILD, BUILD, POST_BUILD and POST_INSTALL sections of spells. Original version Copyright 2001 by Kyle Sallee Additions/Corrections Copyright 2002 by the Source Mage Team
var/lib/sorcery/modules/libhash
Set of functions for working with an associative array type data structure. Values can be stored and retrieved using strings as the index into the data structure instead of numbers. The hash data structure provided in this file allows you to store values into fields of a table. The 'hash_put' function takes the name of the table, a field name in the table, and the value to be stored in the table. The 'hash_get' function retrieves a value from the table given the table and field name.
To store a value into a field of a table, use hash_put:
hash_put "myTable" "aField" "theValue"
The value stored in the table can be retrieved with hash_get:
hash_get "myTable" "aField"
In this example, the hash_get function would echo "theValue".
hash_get_ref can also be used here and has the benefit of being forkless.

IMPLEMENTATION NOTE


Bash does not provide direct support for hash tables. These functions are implemented by first building a variable using the table name and field name, then using the eval function to store (retrieve) value into (from) the variable.
The idea for the hash data structure in bash was inspired by a short example by Phil Howard which shows the use of hashes in bash. Phil Howard's original example can be found here: http://www.codebits.com/bit.cfm?BitID=92
var/lib/sorcery/modules/libinitd
Installation steps performed by this script:
pre install:
  • Determine if the script is a facility provider, if it is then ask the user whether it should be the default provider. install:
    • Determine which runlevel the script should be placed in.
    • Make a backup if there already is a different version of the script in the target location.
    • Install the script with permissions 754.
    • Determine if the script sources any config file from /etc/sysconfig.
    • For each config file:
      • Install the config file if there is no existing copy installed.
      • Otherwise merge new options into existing copy.
    post install:
  • When the spell has been installed successfully then change the /etc/sysconfig/facilities-file if the user wanted the script to be a default provider.
  • var/lib/sorcery/modules/liblock
    This source code is based on the fact that mkdir will create a directory atomically. If two processes try to create a dir, one and only one will succeed immediately when interrupting the current process, we need to unlock all current locks. Therefor, we need a list of locks for the current process. And we need to update this list at the same time we got the lock. liblock is used to lock and unlock resources. It should be deadlock free, and clean up locks after processes that had locks die without unlocking the files. It uses the directory $LOCK_DIR defined in /etc/sorcery/config
    var/lib/sorcery/modules/libmedia
    =head1 SYNOPSIS Functions for dealing with screen and sound settings =head1 DESCRIPTION Provides color schemes =head1 COPYRIGHT Copyright (C) 2004 The Source Mage Team =head1 FUNCTIONS
    var/lib/sorcery/modules/libmisc
    This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    var/lib/sorcery/modules/libqueue
    var/lib/sorcery/modules/libresurrect
    <http://www.sourcemage.org>
    var/lib/sorcery/modules/libscreen
    var/lib/sorcery/modules/libsecurity
    Copyright 2002 by the Source Mage Team
    var/lib/sorcery/modules/libsorcery
    This should really be home to things related to the sorcery script itself, not a repository for other functions. (Andrew 5/29/04)
    var/lib/sorcery/modules/libspell
    This file implements SourceMage's spell file inheritence scheme. In a nutshell, sorcery implements a default for each and every spell file, usually this is "true". There can be an override at the grimoire or section level, in addition to the spell file itself. This means you can write a spell level PRE_BUILD, do some stuff then call default_pre_build, which will run a section level PRE_BUILD if it exists, or run a grimoire level PRE_BUILD if that exists, or run the sorcery supplied default. See bug 10914.
    var/lib/sorcery/modules/libstage
    Functions for desling with the stage root and installing files from the stage root
    var/lib/sorcery/modules/libstate
    Handles storage of state information, incluing depends and package files. Also handles looking information up about what is installed and what depends on what.
    var/lib/sorcery/modules/libsummon
    This just wraps up calls to run_details, get_spell_files_and_urls and download_files. Along with doing the logging and other stuff. This is mainly to reduce duplication of code between cast and summon and to make it so cast doesn't have to actually run the summon script.
    var/lib/sorcery/modules/libtablet
    tablet layout version 0:
    layout 0 is anything unversioned with all its problems, if a
    tablet like this is seen it should be updated to version 1,
    the defects that exist are enumerated below, future tablet
    versions will not require this as they will be more fully
    documented and formal accessor functions will deal with interfacing
    with them
    tablet layout version 1:
    $TABLET_PATH/$SPELL//
    build_api
    depends
    grimoire_name
    grimoire/
    logs/[install,md5sum,compile] (links to real files)
    roots (all important FOO_ROOT values)
    section/
    section_name
    sources (the sources and urls used)
    spell/
    spell_config
    spell_config.p
    status (installed or held)
    tb_version (tablet version)
    updated (value of $UPDATED)
    patchlevel (value of $PATCHLEVEL) (optional,
    defaults to 0)
    security_patch (value of $SECURITY_PATCH)
    (optional, defaults to 0, name still undecided upon)
    updated (value of $UPDATED)
    version (value of $VERSION)
    cache symlink to cache archive
    known defects pre tablet version 1 (and the functions that fix them) :
    no version file : tablet_0_repair_version
    no updated file : tablet_0_repair_updated
    spell//, should be spell/
    tablet_0_repair_spell DONE
    no tb_version : tablet_0_repair (bumps to version 1)
    Terminology:
    "the tablet" the directory $TABLET_PATH and everything in it
    "tablet chapter" A spell's directory within the tablet eg:
    $TABLET_PATH/$SPELL/...
    "tablet page" A specific instance of a spell in a chapter eg:
    $TABLET_PATH/$SPELL//...
    this is sometimes called a tablet dir, but I'm trying to phase that out
    Accessors Routines (thus far):
    tablet_get_spell_file
    tablet_get_section_file
    tablet_get_grimoire_file
    tablet_get_build_api
    tablet_get_version
    tablet_get_updated
    tablet_get_patchlevel
    tablet_get_security_patch
    tablet_get_depends
    tablet_get_sub_depends
    tablet_get_rsub_depends
    tablet_get_status
    tablet_get_sources
    tablet_get_spell_filter
    tablet_get_section_filter
    tablet_get_grimoire_filter
    tablet_load_roots
    tablet_unload_roots
    tablet_get_tb_version
    tablet_get_spell_name_from_path
    Cleanse routines:
    tablet_cleanse_tablet : Fix the whole tablet
    tablet_cleanse_chapter : Fix a chapter
    tablet_coalesce_files : hardlink identical files to save space
    tablet_fix_duplicates
    determine if a tablet points back at itself through the install log
    
    var/lib/sorcery/modules/libtime
    This file holds various statistical functions and an interface to the activity log for getting the input data.
    var/lib/sorcery/modules/libtrack
    Functions for dealing with tracking of files, and other installwatch related things.
    var/lib/sorcery/modules/libtriggers
    Functions used to manage triggers. Used both by spells and by the sorcery scripts.
    var/lib/sorcery/modules/libunpack
    These functions can be used in the PRE_BUILD, BUILD, POST_BUILD and POST_INSTALL sections of spells. Original version Copyright 2001 by Kyle Sallee Additions/Corrections Copyright 2002 by the Source Mage Team New World libunpack Additions/Corrections by Seth Woolley (2005)
    var/lib/sorcery/modules/liburl
    This file contains functions for downloading and verifying urls. It does this by extracting information from a url with url handlers specific to that url type. The url handler also determines a download handler to actually download the url. FIXME For example, the request to download the following url is made through the generic F function: http://machinename.com/path/to/file.tar.bz2 The F function parses the url prefix (in this case, http) and passes the url to the http download handler (F). A similar approach is used for url verification. This file provides an infrastructure that makes it relatively easy to add new url handlers. In order to add new handlers, all that has to be done is add a new file to the sorcerer library directory with the new url handler functions defined in the file. This new file will automatically be discovered and used by the sorcerer scripts. The following section describes how to add new url handlers in a little more detail.

    WRITING NEW URL HANDLERS

    This section describes the steps needed to write new url handlers.

    Decide on the Url Format

    Urls must be of the form ://
    . The prefix should be something unique. Only the prefix is used by this script, the address is not parsed or used, simply passed to the appropriate url handler.

    Create a File to Hold the New Url Handling Functions

    In the SGL library directory (i.e., the directory pointed to by the SGL_LIBRARY variable), create a new file called url_. For example, if your new url prefix is I, you should create a new file called F. The file should be executable.

    Implement Url Handlers

    The next step is to write the actual functions that will handle url requests and put them in the new file you just created. The functions that must be implemented are:
    url__bucketize 
    url__crack 
    url__expand 
    url__hostname 
    url__is_valid 
    url__netselect 
    url__verify 
    
    The easiest way to figure out what to do is to look at one of the existing files (e.g., url_http handles http requests).

    Handling Multiple Url Types in a Single File

    It's perfectly valid for a file to handle mutlple types of urls. The F file actually handles ftp, http, and https urls. Take a look at the file to see how it's done.
    var/lib/sorcery/modules/url_handlers/url_bzr
    =head1 SYNOPSIS Url handler functions for downloading bzr urls =head1 DESCRIPTION This file contains functions for downloading and verifying bzr urls. This file uses the "bzr" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_cvs
    =head1 SYNOPSIS Url handler functions for grabbing cvs urls. =head1 DESCRIPTION This file contains functions for parsing cvs urls. =head1 CVS URL Format There is no standard (that I know of) for cvs urls so we use a source mage specific format: cvs://CVSROOT:MODULE_NAME The above url will download the latest version of the specified module (i.e., the HEAD revision). To specify a specific revision, the following format can be used: cvs://CVSROOT:MODULE_NAME:REVISION_TAG The CVSROOT portion of the url may include information such as type of cvs server, port number for the server, user name, password, cvs repository directory, etc. The CVSROOT syntax is defined by cvs and is as follows: :method:[[user][:password]@]hostname[:[port]]/path/to/repository For more details, see the CVS manual at http://www.cvshome.org/docs/manual/cvs.html =head1 EXAMPLES Suppose we want to download the latest version of the sorcery scripts from cvs. We'd use the following url: cvs://:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer:main If we want the 1.0pre7 release instead (i.e., those files tagged with 1_0pre7, we would use the following url: cvs://:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer:main:1_0pre7 Some cvs repositories require passwords. One such repository is the cvs repository for the ROOT package (an object-oriented data analysis framework, see L). The CVSROOT, without the password, would look like this: :pserver:cvs@root.cern.ch:/user/cvs The password for their cvs repository is I. Adding the password would make the CVSROOT look like this: :pserver:cvs:cvs@root.cern.ch:/user/cvs Thus, the full cvs url, including the password, would be: cvs://:pserver:cvs:cvs@root.cern.ch:/user/cvs:root =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_default
    Default implementations of url_handler api.
    var/lib/sorcery/modules/url_handlers/url_dir
    =head1 SYNOPSIS Url handler functions for grabbing directory urls. =head1 DESCRIPTION This type of url was added as a response to the following request: I'm an AbiWord developer, and I keep the latest source tree in my abi directory. If I could make the abi spell (not to be confused with the abispell) use my current CVS checked-out tree, that would be nice. This file contains functions for I (actually it just copies, tars, and compresses) directories which can be accessed through the local file system. Url's of this type are specified using the format dir:// where is the full path to a directory that will be tarred and compressed for use by sorcery in casting a spell. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_file
    This file contains functions for I (actually it just copies) files which can be accessed through the local file system. Url's of this type are specified using the format file:// where is the full path to the file.
    var/lib/sorcery/modules/url_handlers/url_git
    =head1 SYNOPSIS Url handler functions for downloading git urls =head1 DESCRIPTION This file contains functions for downloading and verifying git urls. This file uses the "git" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_git_http
    =head1 SYNOPSIS Url handler functions for downloading git urls =head1 DESCRIPTION This file contains functions for downloading and verifying git urls. This file uses the "git" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_git_local
    =head1 SYNOPSIS Url handler functions for downloading from local git urls =head1 DESCRIPTION This file contains functions for downloading and verifying local git urls. This file uses the "git" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_hg_http
    =head1 SYNOPSIS Url handler functions for downloading hg http urls =head1 DESCRIPTION This file contains functions for downloading and verifying hg http urls. This file uses the "hg" program. =head1 COPYRIGHT Copyright 2008 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_http
    =head1 SYNOPSIS Url handler functions for downloading http, https, and ftp urls =head1 DESCRIPTION This file contains functions for downloading and verifying http, https, and ftp urls. This file uses the "wget" program. =head1 COPYRIGHT Copyright 2002 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_rsync
    =head1 SYNOPSIS Url handler functions for grabbing rsync urls. =head1 DESCRIPTION This file contains functions for I files through rsync. In order for rsync urls to be downloaded, the I spell must have been cast. This script first determines if rsync has been installed before attempting to download a rsync url. =head1 RSYNC URL Format rsync://SERVER::MODULE_NAME The above url will download the latest version of the specified module. =head1 EXAMPLES Suppose we want to download the latest version of the sorcery stable grimoire via rsync. We'd use the following url: rsync://codex.sourcemage.org::stable =head1 IMPLEMENTATION NOTE Downloading is supported but rsync url verification is not currently supported. =head1 COPYRIGHT Copyright 2003 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_smgl_tla
    =back =head1 LICENSE This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    var/lib/sorcery/modules/url_handlers/url_svn
    =head1 SYNOPSIS Url handler functions for parsing subversion urls. =head1 SVN URL Format The source mage specific format is: svn://SVNURL:DIR_NAME svn://SVNURL:DIR_NAME:REVISION_TAG It is exactly the same as a standard svn:// url, with additional tokens at the end DIR_NAME and optional REVISITION_TAG The svn://SVNURL portion of the url will appear on the svn command line as the url. The DIR_NAME will be the tail element of the SOURCE_DIRECTORY. In order to maintain compatibility with the original svn url format, which uses http:// as the underlying protocol, a hint may be specified named "old_svn_compat". For more details, see the SVN manual at http://svnbook.red-bean.com/svnbook/ch03s04.html =head1 EXAMPLES Suppose we want to download the latest version of bmp-plugins from svn. We'd use the following url: svn://svn.pld-linux.org/svn/bmp-plugins/trunk:bmp-plugins-svn If we want the 4474 revision number we would use the following url: svn://svn.pld-linux.org/svn/bmp-plugins/trunk:bmp-plugins-svn:4474 svn repositories requiring passwords are not currently supported. =head1 COPYRIGHT Copyright 2004 by the Source Mage Team Copyright 2005 by the Source Mage Team =head1 FUNCTIONS =over 4
    var/lib/sorcery/modules/url_handlers/url_svn_http
    =head1 SYNOPSIS Url handler functions for parsing subversion over http urls. =head1 DESCRIPTION This file contains functions for parsing svn_http urls. =head1 SVN HTTP URL Format The sourcemage specific svn+ssh url is as follows: specific format was invented: svn_http://SVNURL:DIR_NAME The above url will download the latest version of the specified module (i.e., the HEAD revision). To specify a specific revision, the following format can be used: svn://SVNURL:DIR_NAME:REVISION_TAG The SVNURL portion of the url will appear as a normal http url sans http:// prefix. The DIR_NAME will be the tail element of the SOURCE_DIRECTORY. For more details, see the SVN manual at http://svnbook.red-bean.com/svnbook/ch03s04.html and url_svn. =head1 COPYRIGHT Copyright 2004 by the Source Mage Team Copyright 2005 by the Source Mage Team
    var/lib/sorcery/modules/url_handlers/url_svn_https
    =head1 SYNOPSIS Url handler functions for parsing subversion over https urls. =head1 DESCRIPTION This file contains functions for parsing svn_https urls. =head1 SVN HTTP URL Format The sourcemage specific svn+ssh url is as follows: specific format was invented: svn_https://SVNURL:DIR_NAME The above url will download the latest version of the specified module (i.e., the HEAD revision). To specify a specific revision, the following format can be used: svn://SVNURL:DIR_NAME:REVISION_TAG The SVNURL portion of the url will appear as a normal https url sans https:// prefix. The DIR_NAME will be the tail element of the SOURCE_DIRECTORY. For more details, see the SVN manual at https://svnbook.red-bean.com/svnbook/ch03s04.html and url_svn. =head1 COPYRIGHT Copyright 2004 by the Source Mage Team Copyright 2005 by the Source Mage Team
    var/lib/sorcery/modules/url_handlers/url_svn_ssh
    =head1 SYNOPSIS Url handler functions for parsing smgl specific subversion over ssh urls. =head1 SVN URL Format The sourcemage specific svn+ssh url is as follows: specific format was invented: svn_ssh://SVNURL:DIR_NAME The above url will download the latest version of the specified module (i.e., the HEAD revision). To specify a specific revision, the following format can be used: svn://SVNURL:DIR_NAME:REVISION_TAG The SVNURL portion of the url will appear as a normal svn+ssh url sans svn+ssh:// prefix. The DIR_NAME will be the tail element of the SOURCE_DIRECTORY. For more details, see the SVN manual at http://svnbook.red-bean.com/svnbook/ch03s04.html and url_svn. =head1 COPYRIGHT Copyright 2004 by the Source Mage Team Copyright 2005 by the Source Mage Team