summaryrefslogtreecommitdiffstats
path: root/misc/slackbook/html/package-management.html
blob: e6ddc32b9a800996c8dc2808d8700b12f7aada43 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>Slackware Package Management</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
<link rel="PREVIOUS" title="Saving Files" href="emacs-saving-files.html" />
<link rel="NEXT" title="Package Utilities"
href="package-management-package-utilities.html" />
<link rel="STYLESHEET" type="text/css" href="docbook.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
alink="#0000FF">
<div class="NAVHEADER">
<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<th colspan="3" align="center">Slackware Linux Essentials</th>
</tr>

<tr>
<td width="10%" align="left" valign="bottom"><a href="emacs-saving-files.html"
accesskey="P">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a
href="package-management-package-utilities.html" accesskey="N">Next</a></td>
</tr>
</table>

<hr align="LEFT" width="100%" />
</div>

<div class="CHAPTER">
<h1><a id="PACKAGE-MANAGEMENT" name="PACKAGE-MANAGEMENT"></a>Chapter 18 Slackware Package
Management</h1>

<div class="TOC">
<dl>
<dt><b>Table of Contents</b></dt>

<dt>18.1 <a href="package-management.html#PACKAGE-MANAGEMENT-OVERVIEW">Overview of
Package Format</a></dt>

<dt>18.2 <a href="package-management-package-utilities.html">Package Utilities</a></dt>

<dt>18.3 <a href="package-management-making-packages.html">Making Packages</a></dt>

<dt>18.4 <a href="package-management-making-tags-and-tagfiles.html">Making Tags and
Tagfiles (for setup)</a></dt>
</dl>
</div>

<p>A software package is a bundle of related programs that are ready for you to install.
When you download a source code archive, you have to configure, compile, and install it
by hand. With a software package, this has already been done for you. All that you have
to do is install the package. Another handy feature of using software packages is that it
is very easy to remove and upgrade them, if you so desire. Slackware comes with programs
for all your package management needs. You can install, remove, upgrade, make, and
examine packages very easily.</p>

<p>There's a myth that's been going around ever since RedHat debuted RedHat Package
Manager, that Slackware has no package management tool. This simply couldn't be further
from the truth. Slackware has always included a package manager, even before RedHat
existed. While not as full-featured or as ubiquitous as rpm (or for that matter deb), <tt
class="COMMAND">pkgtool</tt> and its associated programs are every bit as good at
installing packages as rpm. The truth about <tt class="COMMAND">pkgtool</tt> is not that
it doesn't exist, but that it doesn't do any dependency checking.</p>

<p>Apparently many people in the Linux community think that a packager manager must by
definition include dependency checking. Well, that simply isn't the case, as Slackware
most certainly does not. This is not to say that Slackware packages don't have
dependencies, but rather that its package manager doesn't check for them. Dependency
management is left up to the sysadmin, and that's the way we like it.</p>

<div class="SECT1">
<h1 class="SECT1"><a id="PACKAGE-MANAGEMENT-OVERVIEW"
name="PACKAGE-MANAGEMENT-OVERVIEW">18.1 Overview of Package Format</a></h1>

<p>Before learning the utilities, you should become familiar with the format of a
Slackware package. In Slackware, a package is simply a tar archive file that has been
compressed with <tt class="COMMAND">gzip</tt>. Packages are built to be extracted in the
root directory.</p>

<p>Here is a fictitious program and its example package:</p>

<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre class="SCREEN">
./
usr/
usr/bin/
usr/bin/makehejaz
usr/doc/
usr/doc/makehejaz-1.0/
usr/doc/makehejaz-1.0/COPYING
usr/doc/makehejaz-1.0/README
usr/man/
usr/man/man1
usr/man/man1/makehejaz.1.gz
install/
install/doinst.sh
</pre>
</td>
</tr>
</table>

<p>The package system will extract this file in the root directory to install it. An
entry in the package database will be created that contains the contents of this package
so that it can be upgraded or removed later.</p>

<p>Notice the <tt class="FILENAME">install/</tt> subdirectory. This is a special
directory that can contain a postinstallation script called <tt
class="FILENAME">doinst.sh</tt>. If the package system finds this file, it will execute
it after installing the package.</p>

<p>Other scripts can be embedded in the package, but those are discussed more in detail
in <a href="package-management-making-packages.html#PACKAGE-MANAGEMENT-MAKEPKG">Section
18.3.2</a> below.</p>
</div>
</div>

<div class="NAVFOOTER">
<hr align="LEFT" width="100%" />
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="emacs-saving-files.html"
accesskey="P">Prev</a></td>
<td width="34%" align="center" valign="top"><a href="index.html"
accesskey="H">Home</a></td>
<td width="33%" align="right" valign="top"><a
href="package-management-package-utilities.html" accesskey="N">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">Saving Files</td>
<td width="34%" align="center" valign="top">&nbsp;</td>
<td width="33%" align="right" valign="top">Package Utilities</td>
</tr>
</table>
</div>
</body>
</html>