aboutsummaryrefslogtreecommitdiff
path: root/trunk/doc/README.simplaret
blob: 9ddab938dda4d5c19ed0c50c9de4c9f3a9138a2d (plain)
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
simplaret: simplepkg retrieval tool
-----------------------------------

Simplaret is a simplepkg tool used to download packages from local and remote repositories.
With simplaret, one can grab packages for all archictectures and versions of slackware-like
distributions that follows the mirror guidelines, allowing an easy management all
jails and slackware installations in a machine, no matter wich arquiteture or version
each one has.

It was inspired in swaret behavior but don't tries to get its complexity level, but
execute package download in a different way, where the local repository is organized
by archictecture and version. It can also search for packages. It runs on top of pkgtool
and is totally non-instrusive and can search, add, remove and upgrade packages.

Documentation
-------------

The always updated english documentation is hosted at http://slack.sarava.org/simplaret-en

Downloading and installing
--------------------------

Simplaret comes with simplepkg, wich installation and configuration is detailed at
http://slack.sarava.org/simplepkg. Simplaret uses /etc/simplepkg/simplepkg.conf for its definitions
and /etc/simplepkg/repos.conf for repository information. The default configuration should work
for almost everyone.

Using simplaret
---------------

Simplaret stores its data in system wide folders. Then, some funcionality will just be available
if its run with root user capabilities. The first thing you need to do with simplaret is to fetch
repository metadata, using

  simplaret --update

or simply 

  simplaret update

as simplepkg supports both command line behaviour (--update or just update). After that, you can
search for packages using commands like

  simplaret search ekiga

The result should be something like

  REPOS repository sarava, arch: i386, version: 11.0: ekiga-2.0.5-i586-1rd.tgz

As we'll see afterwards, "REPOS" means the repository type, "sarava" is the repository name,
"arch" is the package architecture (i386 in this case) and "version" is the repository version
(11.0 in this case).

To install this package, just type

  simplaret install ekiga

By default, if simplaret finds in the repository a slack-required file for this package (i.e, the
file ekiga.slack-required in the same folder of the binary package) then it will try to install
all unmet dependencies. This default behaviour can be disabled through config file parameters.

If you just want to download the package, type

  simplaret get ekiga

In the case of simplaret finds more than one package with the same name, it will get in the order
that the "search" option shows them. The search precedence can also be defined by config file
parameters. For instance, the command

  simplaret search kernel-generic

can return something like

  ROOT repository sarava, arch: i386, version: 11.0: kernel-generic-2.6.17.13-i486-1.tgz
  ROOT repository sarava, arch: i386, version: 11.0: kernel-generic-2.6.18-i486-1.tgz

So the command

  simplaret install kernel-generic

will attempt to install the package "kernel-generic-2.6.17.13-i486-1.tgz" and not the file
"kernel-generic-2.6.18-i486-1.tgz". If you want to force simplaret to get and specific package,
use its complete file name:

  simplaret install kernel-generic-2.6.18-i486-1.tgz

If a package is already installed in the system, the --install option will try to upgrade it
if the version or build number between the installed package and the one in the repository
are different. So the command

  simplaret install simplepkg

updates simplepkg in the case there's a new version. To remove a package, type

  simplaret remove nome-do-pacote

That's just an alias for the standard removepkg command.

Simplaret stores downloaded packages in a system folder that defaults to /var/simplaret.
As you get more and more packages, simplaret will consume more space ir your disk. To
erase your local repository folder, use the command

  simplaret purge

This will erase just the packages from the current arch and version. Details about how to
erase the repository for different arch and version are in another session.

You can also force simplaret to erase just old packages. The following command erases just
packages older than six weeks or more:

  simplaret purge -w 3

Downloading patches and upgrading the system
--------------------------------------------

Simplaret hasn't just about package installing and removal, it has two more important
features: patches retrieval and application. Assuming that the patches repository of
your slackware flavour is correctly configured (what should work with almost everyone
with the default configuration), you can fetch the available patches using the command

  simplaret get-patches

If you don't just donwload but also apply those patches, use

  simplaret upgrade

Working with more than one architecture and version
---------------------------------------------------

Until now we just looked what is the requirement for all package management system: package
retrieval, installation, search, upgrade and dependency resolution. What makes simplaret
different from another tools is the ability to deal with different architectures and versions
and slackware installations.

The features descibed in this section will just make sense after you read the next section, when
we'll talk about multiple slackware installations and jails in the same computer.

Suppose you're running Slackware (arch i386) bit wants to update the package list from Slamd64
version 11.0 (arch x86_64). To do that, just type

  ARCH=x86_64 VERSION=11.0 simplaret update

This command grabs the Slamd64 package list without confliting in any way with the standard and
already downloaded i386 Slackware package list. This doesn't happens because simplaret stores
metadata from different archs and versions at different folders.

Its optional to pass ARCH and VERSION environment variables to simplaret. If one or none of them
was specified, simplaret uses the standar system value, obtained from the file /etc/slackware-version,
or uses config parameters to do that.

As an example, to search for a package in the arch powerpc (Slackintosh) version 11.0, just type

  ARCH=powerpc VERSION=11.0 simplaret search package-name

All command previously mentioned can work that way, except those that install or remove packages as
its dangerous to mix packages from different archs and versions in the same system.

Working with multiple installations
-----------------------------------

The previously section mentions a feature that just makes sense in systems where there's more than
one slackware-like installation using different archs and versions.

Say you have a x86_64 machine with three installed systems:

  - Slamd64 11.0 at the root folder
  - Slackware 11.0 at /mnt/slackware-1
  - Slackware 10.2 at /mnt/slackware-2

In the case of package install or patch retrieval and application, simplaret supports the environment
variable ROOT to specify which folder simplaret should look for a system.

Then, to install a package at /mnt/slackware-1, just type

  ARCH=i386 VERSION=11.0 simplaret update
  ROOT=/mnt/slackware-1 simplaret install package-name

The first command just updates the package list and the second makes simplepkg install the package with
using /mnt/slackware-1 arch and version. If you want to do the same at /mnt/slackware-2, use the analogous
command

  ARCH=i386 VERSION=10.2 simplaret update
  ROOT=/mnt/slackware-2 simplaret install package-name

There's also a feature to make patch retrieval and application with just one command, using the file
/etc/simplepkg/jailist. This file is used by simplepkg's mkjail script to store ...

Existe ainda uma facilidade para que a obten��o e aplica��o de atualiza��es seja feita de forma �nica,
atrav�s do arquivo /etc/simplepkg/jailist. Esse arquivo serve, al�m de outros prop�sitos descritos na
documenta��o do simplepkg, para que o simplaret saiba de antem�o quais s�o as instala��es de sistema
do tipo Slackware presentes numa m�quina, al�m da instala��o principal na ra�z do sistema.

Considerando que a m�quina possua as tr�s instala��es citadas no in�cio deste t�pico, a atualiza��o
autom�tica das mesmas pode ser feita quando o arquivo /etc/simplepkg/jailist contiver as seguintes
linhas (sem espa�os no in�cio de cada uma):

  /mnt/slackware-1
  /mnt/slackware-2

O sistema principal, contido na ra�z do sistema, n�o precisa estar listado nesse arquivo. Se todas
as suas instala��es de sistema do tipo Slackware estiverem constando corretamente no /etc/simplepkg/jailist,
o seguinte comando baixar� as atualiza��es dispon�veis para todas elas, incluindo o sistema contido na ra�z:

  simplaret get-patches

Analogamente, o seguinte comando baixar� e/ou aplicar� todas as atualiza��es dispon�veis em todas as
instala��es, incluindo o sistema contido na ra�z:

  simplaret upgrade

Desse modo, o gerenciamento de pacotes numa m�quina que contenha mais de uma instala��o do tipo Slackware
fica unificada e consequentemente simplificada.

[...]

But why use that?
-----------------

You may ask why someone wishes to use such tool.

Simplaret was written with a *x86 environment in mind, where lots of jails with different archs
and versions are installed. Suppose a x86_64 with the following chroots installed:

  - slamd64 10.2
  - slackware 10.2
  - slackware 10.1 with additional i686 packages
  - uSlack (i386 uClibc) 

Keep all this stuff update manually is really a headache. Simplaret just tries to make it trivial.