![]() |
|
|
| Home| Linux| Programming| Digital HiNote| Motorcycle | ||
Slackware Package System1. Nature of Slackware PackagesSlackware packages are a nicely arranged setting of source files and 3 install scripts. These scripts are executed by installpkg and pkgtool. While simplistic, it gets the job done, rarely fails and is simple to operate, maintain and extend. This document is my sum knowledge of the workings of this system by examining code. Feel free to contact me with updates, changes and proposals.
1.1 MakePkgUnderstanding how packages are constructed is a key element. A tool called makepkg is provided by the base Slackware installation. When run like so:
All the files and directories under /usr/local/mysql will be tarred and gzipped into a file named 'mysql.tgz'. Symbolic links are turned into code and appended to the doinst.sh script that is executed after unpacking. 1.2 ScriptsIn order for the install scripts to work, they need to be added into the directory structure of the package. All scripts should be written for the ash shell.1.2.1 Install scriptThe install script is executed after all the files are extracted, by setup, pkgtool or installpkg. This file located in ./install and named 'doinst.sh'.1.2.2 Config scriptA configuration script is run by setup after installing all packages (netconfig being one). They can also be run from pkgtool. This file is located in ./var/log/setup and the filename should be setup.1.2.3 Only Once scriptA script that is run one time only by setup. This file is located ./var/log/setup and is named setup.onlyonce.1.3 Install LogThe installpkg script logs various bits of information to a file, usually in /var/log/packages. The log name is the package name without the .tgz extension.1.3.1 Log ContentsPACKAGE NAME: -> comes from the package name, minus the .tgz extension
2. Issues regarding Dependancy Checking2.1 This section deals with Proposed NEW Items to Slackware Packaging2.2 Version NumbersVersioning of packages is in all respects the easiest item to add to Slackware packaging. I propose adding 2 text files to the system. One a data file and the other a system script, callable from setup or the other package utils. Having a strict filename format with the version number as part of the filename would also work.2.3 Dependancy CheckingWith a mechanism in place to add version numbers the second phase becomes much more complicated.
The issues are:
2.4 Proposed Solution:The proposed solution involves 2 files. First, a package information file I call a deps file. Each package should contain a file called deps.id. Probably in the ./install dir. The deps.id file will contain the package version number, and a line for each dependancy. Like so:
deps.id
VERSION: 1.1.2
DEP: amp > 0.7.6 -a /usr/src/amp.tgz
DEP: gtk++ = 1.1.1 ftp://ftp.gtk.org/latest/gtklib.tar.gz \
-b custom-build-script?
The DEP pattern is:
packagename operator version number options location
operators are: >, <, >=, <=, =
options are: -a auto install deps
-b custom build script, a script for \
./configure, make, make install, etc.
This info would be pumped into the log files. The Second is a 'verchk' script that can read the dep.id and log files and proceed with version checking before extracting all the files. 3.0 Tools3.1 New ToolsComments, constructs, code, ideas: email to Joe Robertson at the link below. Flames, negative waves: /dev/null |
||
|
NetRunner card images Copyright Wizards of the Coast. |
jmrobert5@mchsi.com ssrobert5@mchsi.com Last modified: Sun Mar 10 21:29:04 CST 2002 |
|