|
Introduction
vpackager is a tool with a graphical user interface for the building and maintenance of Vector Linux's .tgz/.tlz software packages. It facilitates the creation of packages by automating the compiling, documenting, compression and tarballing steps involved in the creation of a package. What is vpackager?Free software is usually distributed as source code. For a computer to use the software the source code must be converted to computer code. This process is known as compiling. Because compilation can be time consuming and usually requires at least intermediate computer skills, many developers prepare packages that are already compiled, so that the casual user need not worry about compiling from source code. The most frequent package formats in current GNU/Linux distributions are .tgz/,tlz, .rpm and .deb. Vector Linux follows the package format and management of Slackware GNU/Linux standards. Users who prefer to make their own packages or participate by contributing packages to the VectorLinux Community and help with package maintenance efforts may wish to learn to use this "vpackager" package management tool.
vpackager is a tool developed with easier package creation and management needs in mind. Package AnatomyEach software package is a compressed library file with a specific name and extension that describes the format of file. While Slackware packages do have .tgz format (tar gzipped archive) Vector Linux packages now use a .tlz format - meaning that in Vector Linux we use the lzh compression algorithm for compression (this method results in more efficient compression). Due to the fact that Vector Linux also accepts the Slackware packages it is prudent to learn more about .tgz packages too. Vector Linux packages are archives containing:
Vector Linux packages are monolithic (all-in-one) packages because it is easier to maintain them when they are packed in that way. Vector Linux packages may be single applications or they may contain a bundle of utilities. Packaging naming schemePackage names are either the name of a single program or a collection of utilities. The package name is defined as follows: packagename-version-architecture-buildnumber.tlz For example the package name for a single application may be: gaim-2.0.0beta6-i586-2vl58.tlz A package name that contain a set of tools/utilities may be: dvd+rw-tools-7.0-i586-2vl58.tlz Please note the structure of the naming scheme consists of: name_field-version_field-architecture_field-build_field.tlz Package version numbersVersion numbers for single programs are kept the same as the version number for the released software i.e. gaim-2.0.0beta6-i586-2vl58.tlz . By doing this the user and package maintainer knows what is exactly included and can then refer to documentation, information, guidelines and descriptions from the developer's repository or website. Where the package is a set of tools or utilities the version number usually relates to the most major piece of software contained within the package, e.g.: dvd+rw-tools-7.0-i586-2vl58.tlz Package architecturesPackages are often prepared for specific CPU processor architectures because different processors have their own methods of processing data. For example, some distributions of Linux have packages for PowerPC (ppc), Sparc, Alpha and others. In Vector Linux packages are prepared only for i386, i486 and i586 processors (Intel and AMD) or sometimes packages that are architecture independent. For example, it is obvious that the package gaim-2.0.0beta6-i586-2vl58.tlz is prepared for i586 processors and that it cannot be used on PowerPC, Alpha or Sparc machines. Some packages (e.g. configuration and localization files) are not architecture dependent since they provide information that is not a program that will be executed by the processor. For example, if the user wants to install in his/her KDE environment i18n localization files for the Serbian language in Latin, then the package: kde-i18n-sr@Latin-3.5.6.-noarch-1vl58.tlz may be installed. The part of the name noarch informs us that package is not architecture dependent. Build numbersBuild numbers are on the rightmost section of the file name, immediately before the .tlz extension. The build number supplements the major version number. For example: kde-i18n-sr@Latin-3.5.6.-noarch-1vl58.tlz this package is 1vl58, signifying that it is build number 1 for Vector Linux 5.8. Furthermore: dvd+rw-tools-7.0-i586-2vl58.tlz signifies this package is build number 2 for Vector Linux 5.8. The build numbers should be changed only if there are some later changes prepared by package maintainer. Install LocationsInstall locations define where the packages files should be installed. Usually, packages have their own binary files, configuration file(s), man pages and various logs, pids, etc.
Permissions and OwnershipsIt is very important to set permissions correctly so that installation of packages will not undermine the system security. Certain areas in the file system have special group access rights that should be respected. Executables should be 0755(-rwxr-xr-x). This is a general rule, but in certain scenarios you may ask system administrator to change permissions accordingly. For example, files that must be read should use 0644 (-rw-r--r--). If you have difficulties with starting the program check whether your folders have proper permissions and ownership policies implemented. Slack-DescThe Vector Linux package system uses slack-desc files to provide information about the package, its author(s), licensing and dependencies. The slack-desc file has a simple but very precisely defined format and if this format is not respected the package tools will not show information about the package correctly. But vpackager solved that problem by providing users with a correct form to be filled in - thus reducing formatting mistakes in the slack-desc files. If the user wants to build package from source code vpackager will pick up the name of the package from the source and use that name for the application name in slack-desc file. The user is then allowed 5 lines of text at 70 characters each for a brief description about the package, its dependencies, etc.
Building the PackageThe package building process is one of the most exciting activities in the development of Vector Linux. The goal of vpackager is to enable the users to build packages in a user-friendly way. However, vpackager is a tool that helps to make the package building process straightforward, but the success of the package building process depends on the source code itself and the presence of its dependencies and their versions on the system on which the package is being built. Thus, in some cases user may need to intervene and correct something in the package itself or on the system used for the package building. Indeed, this may sometimes take some additional work and require additional skills and knowledge. It is very wise to read the INSTALL and README files in the source code's directory before attempting to package the code. At the very least, it is good to understand the process of package building as illustrated by the image below.
When the user is ready to start the build process it is enough to return to the main graphical interface of vpackager and click the button Start and start the build process. After pressing the Start button the user is prompted with window that shows the process of the source configuration, compilation and each stage of the build process.
For debugging purposes it is possible to save the output and look for possible reasons for errors. |
Sign in to add a comment