-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
apt-offline.html
424 lines (352 loc) · 13.6 KB
/
apt-offline.html
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
Content-type: text/html; charset=UTF-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of apt-offline</TITLE>
</HEAD><BODY>
<H1>apt-offline</H1>
Section: USER COMMANDS (8)<BR>Updated: August 11, 2022<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
apt-offline - Offline APT Package manager
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>apt-offline</B>
[ARGUMENTS] [OPTIONS]
<P>
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
apt-offline brings
offline package management functionality to Debian based system. It can be
used to download packages and its dependencies to be installed later on (or
required to update) a disconnected machine. Packages can be downloaded from a
different connected machine.
<P>
<P>
It can also fetch bug reports for the packages that are downloaded.
<P>
Unless the -h/-v or --help/--version options are given, one of the
<B>get, set</B>
or
<B>install</B>
commands must be provided.
<P>
<A NAME="lbAE"> </A>
<H3>set FILENAME [-h] [--install-packages PKG...PKG_N] [--install-src-packages PKG...PKG_N] --src-build-dep [--release release_name] [--update] [--upgrade] [--upgrade-type upgrade]</H3>
<P>
<P>
<B>set</B>
generates a signature file with the data required to install on or update the
disconnected machine.
<P>
<B>FILENAME {apt-offline.sig}</B>
is the signature file generated on the machine. This file will contain all the
information necessary for apt.
<P>
<DL COMPACT>
<DT>--simulate<DD>
Developer only. Used for testing.
<P>
<DT><B>--install-packages [PKG...PKG_N]</B><DD>
Packages that need to be installed
<P>
<DT><B>--install-src-packages [PKG...PKG_N]</B><DD>
Source packages that need to be installed
<P>
<DT><B>--src-build-dep</B><DD>
Download Build Dependency packages for the source packages requested
<P>
<DT><B>--release release_name</B><DD>
Release target to install packages from
<P>
<DT><B>--apt-backend apt-get</B><DD>
APT backend to use. One of: apt, apt-get, python-apt
<P>
<DT><B>--generate-changelog</B><DD>
Generate changelog of the version to be downloaded
<P>
<DT><B>--update</B><DD>
Generate APT Database signature for an update. This is the equivalent of using
<B>apt-get update</B>
<P>
<DT><B>--upgrade</B><DD>
Generate APT Database signature for package upgrade. This is the equivalent of using
<B>apt-get upgrade</B>
<P>
<DT><B>--upgrade-type {upgrade_type}</B><DD>
Type of upgrade you would like to perform. Default is
<B>upgrade.</B>
Other valid types are
<B>dist-upgrade and dselect-upgrade</B>
<P>
</DL>
<A NAME="lbAF"> </A>
<H3>get FILENAME [-h] [--socket-timeout ] [-d / --download-dir] [-s / --cache-dir] [--no-checksum] [-t / --threads ] [--bundle] [--bug-reports] [--proxy-host] [--proxy-port] [--https-cert-file --https-key-file] [--http-basicauth] [--disable-cert-check]</H3>
<P>
<P>
<B>get</B>
downloads APT data as per a signature file.
<P>
<B>FILENAME {apt-offline.sig}</B>
is the signature file required for details about data to be downloaded. This
file should have been generated by the above
<B>set</B>
command.
<P>
<DL COMPACT>
<DT><B>-d, --download-dir DIR_NAME</B><DD>
Download data to the specified DIR_NAME folder. If no folder name is specified, data is downloaded to a folder in the TEMPDIR path in the format
<B>apt-offline-download-$PID</B>
<P>
<DT><B>-s, --cache-dir DIR_NAME</B><DD>
Look for data in the cache before downloading it from the internet. If you are on a Debian box, you would want to specify
<I>/var/cache/apt/archives</I>
here. If the data is not available in the cache, the downloaded data is also copied to the cache.
<P>
<DT><B>--no-checksum</B><DD>
Enabling this option will bypass the checksum verification of each downloaded file thus losing integrity of the package. Usage of this option is highly discouraged
<P>
<DT><B>-t, --threads NUM_OF_THREADS</B><DD>
Number of threads to spawn for downloads. Default is 1. Using too many threads can overload the servers, hence it is advisable to keep the number low
<P>
<DT><B>--bundle FILENAME</B><DD>
Create an archive file FILENAME. The file is archived in zip format
<P>
<DT><B>--bug-reports</B><DD>
Download bug reports for packages that are being downloaded. Currently only
the Debian BTS is supported.
<P>
<DT><B>--proxy-host</B><DD>
Specify the Proxy Host to be used.
<P>
<DT><B>--proxy-port</B><DD>
Specify the Proxy port number to be used.
<P>
<DT><B>--https-cert-file FILENAME</B><DD>
The Certificate-file to use if https-client-authentication is required on one or multiple hosts.
<P>
<DT><B>--https-key-file FILENAME</B><DD>
The Certificate-key-file to use if https-client-authentication is required on one or multiple hosts.
<P>
<DT><B>--disable-cert-check</B><DD>
Disable the check of https certificates on servers
<P>
<DT><B>--http-basicauth URL</B><DD>
A username/password encoded in the URL. Note Passwords with special characters should be percent encoded as per RFC-3986 section 2.1
<P>
</DL>
<A NAME="lbAG"> </A>
<H3>install FILE/FOLDER [-h] [--skip-bug-reports ] [--install-src-path PATH] [--allow-unauthenticated]</H3>
<P>
<P>
<B>install</B>
installs APT data to the APT package database and updates it.
<P>
<B>FILE {archive_bundle_file}</B>
Install data from the archive (bundle) file.
<P>
<B>FOLDER {/folder/path}</B>
Install data from the folder path.
<P>
Either FILE or FOLDER argument can be provided to the
<B>install</B>
command.
<P>
<DL COMPACT>
<DT>--simulate<DD>
Developer only. Used for testing.
<P>
<DT><B>--skip-bug-reports</B><DD>
Skip listing of downloaded bug reports, if any.
<P>
<DT><B>--skip-changelog</B><DD>
Skip display of changelog, if any.
<P>
<DT><B>--allow-unauthenticated</B><DD>
Don't verify GPG signatures for the data to be installed to APT. Usage of this option is highly discouraged.
<P>
<DT><B>--strict-deb-check</B><DD>
With this option enabled, apt-offline delegate's .deb package checksum validation to apt. While the .debs are
already available, they are stored in the temporary apt cache, where apt validates its checksum, before considering
it for further processing.
Note: This does have the caveat that apt may need network availability even though it doesn't download anything over the network. But it does invoke the download routines and realizes that the payload is already available. It then further proceeds with checksum validation
<P>
The default behavior is to
<B>not</B>
do strict checksum validation for .deb files. Instead, apt-offline copies the .deb files to apt's download location. apt still does size validation of the available .deb files and discards them in case there is a mismatch.
<P>
<DT><B>--install-src-path PATH</B><DD>
Path to filesystem where we want the source packages to be installed to. Default will be a folder in your TEMPDIR.
<P>
</DL>
<A NAME="lbAH"> </A>
<H2>GLOBAL OPTIONS</H2>
<DL COMPACT>
<DT>-h, --help<DD>
Show help message
<P>
<DT>--verbose<DD>
Run in verbose mode
<P>
<DT>-v, --version<DD>
Display the version of the program
<P>
<P>
</DL>
<A NAME="lbAI"> </A>
<H2>EXAMPLES</H2>
<DL COMPACT>
<DT><B>NOTE: argument/option handling</B>
<DD>
apt-offline relies on argparse for argument/option parsing. To explicitly instruct apt-offline about an argument, you can pass it with the -- delimiter.
<P>
<B>Ex. apt-offline set --update --upgrade --install-packages wm2 -- foo.sig</B>
<P>
By specifying the
<B>--</B>
delimiter, we instruct apt-offline that foo.sig is an argument to the
<B>apt-offline</B>
command and not to the
<B>--install-packages</B>
option.
<P>
Otherwise, you could also use it positionally next to the set command
<P>
<B>Ex. apt-offline set foo.sig --update --upgrade --install-packages wm2</B>
<P>
<DT><B>apt-offline set FILENAME</B>
<DD>
This command will generate a signature file FILENAME for APT Package Database.
To generate only the signature for updates, use the --update option. To
generate only the signature for package upgrades, use the --upgrade option.
<P>
<DT><B>apt-offline get FILENAME</B>
<DD>
This command will fetch the data required for APT Package Database as per the
signature file FILENAME generated by
<B>apt-offline get.</B>
To download bug reports also use the --bug-reports option. Currently supported bug tracker is Debian BTS only.
By default, if neither of -d or --bundle options are specified, apt-offline downloads data into a folder inside the TEMPDIR environment folder in the format apt-offline-downloads-PID, where PID is the PID of the running apt-offline process. Example on a Linux machine would be something like: /tmp/apt-offline-downloads-23242/
<P>
<DT><B>apt-offline install FILE|FOLDER</B>
<DD>
This command will sync the data downloaded by
<B>apt-offline get</B>
to the APT Package Database and update it.
Depending on where the data was downloaded to or packed into, either the
absolute FOLDER path or the archive FILE path can be specified.
<P>
<B>NOTE1:</B>
On a freshly installed box, that was installed without the network, the package database is null. In that case, you first need to run
<B>apt-offline</B>
with just the
<B>--update</B>
option to ensure you have a meaningful package database
<P>
<B>Example: apt-offline set set.uris --update</B>
<P>
<B>NOTE2:</B>
On a fresh setup installed through CD/DVD, the default APT setting lists only the install media URLs. In such case, you need to add the default APT network repositories to the list. For example, for a fresh (DVD) installed Debian box, add the relevant repository to
<P>
<I>/etc/apt/sources.list.d/apt-offline.list or /etc/apt/sources.list</I>
<P>
deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> stable main contrib
<P>
<B>(For Debian Stable)</B>
<P>
deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> unstable main contrib
<P>
<B>(For Debian Unstable/Sid)</B>
<P>
deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> stretch main contrib
<P>
<B>(For Debian Stretch)</B>
<P>
deb <A HREF="http://security.debian.org">http://security.debian.org</A> stable/updates main contrib
<P>
<B>(Security Updates for Debian Stable)</B>
<P>
deb <A HREF="http://security.debian.org">http://security.debian.org</A> testing-security/updates main contrib
<P>
<B>(Security Updates for Debian Testing)</B>
<P>
<DT>Sequence 1: The following set of commands, when run in sequence, will update a disconnected machine.<DD>
<P>
<B>apt-offline set update.sig --update</B>
<P>
(Generate the required data needed to update the APT database. Should be run on the disconnected machine)
<P>
<B>apt-offline get update.sig --bundle update.zip</B>
<P>
(Download the required data needed to update the APT database. Should be run on a machine with internet connectivity)
<P>
<B>apt-offline install update.zip</B>
<P>
(Installs the data needed to update the APT database. Should be run on the disconnected machine)
<P>
<DT>Sequence 2: With successful completion of Sequence 1, the APT database on the disconnected machine will be up-to-date. Now, the following set of commands, when run in sequence, will upgrade a disconnected machine.<DD>
<P>
<B>apt-offline set upgrade.sig --upgrade</B>
<P>
(Generate the required data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
<P>
<B>apt-offline get upgrade.sig --bundle upgrade.zip</B>
<P>
(Download the required data needed to upgrade the upgradable packages. Should be run on a machine with internet connectivity)
<P>
<B>apt-offline install upgrade.zip</B>
<P>
(Installs the data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
<P>
<DT>After successful completion of<DD>
<B>Sequence 1</B>
and
<B>Sequence 2</B>
in order, further running
<B>apt-get upgrade</B>
will result in 0 bytes of additional download.
<P>
</DL>
<A NAME="lbAJ"> </A>
<H2>AUTHOR</H2>
<B>apt-offline is written by Ritesh Raj Sarraf (<A HREF="mailto:[email protected]">[email protected]</A>)</B>
<P>
If you wish to report a bug in apt-offline, please see
<B><A HREF="https://github.com/rickysarraf/apt-offline">https://github.com/rickysarraf/apt-offline</A></B>
or else, send an email to me at
<B><A HREF="mailto:[email protected]">[email protected]</A></B>
<P>
<A NAME="lbAK"> </A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?8+apt-get">apt-get</A>(8),
<A HREF="/cgi-bin/man/man2html?8+apt-cache">apt-cache</A>(8),
<A HREF="/cgi-bin/man/man2html?8+dpkg">dpkg</A>(8),
<A HREF="/cgi-bin/man/man2html?8+aptitude">aptitude</A>(8),
<P>
<A NAME="lbAL"> </A>
<H2>DEDICATION</H2>
This software is dedicated to the memory of my father Santosh Kumar Sarraf. We miss you a lot.
<P>
<HR>
<A NAME="index"> </A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT><A HREF="#lbAE">set FILENAME [-h] [--install-packages PKG...PKG_N] [--install-src-packages PKG...PKG_N] --src-build-dep [--release release_name] [--update] [--upgrade] [--upgrade-type upgrade]</A><DD>
<DT><A HREF="#lbAF">get FILENAME [-h] [--socket-timeout ] [-d / --download-dir] [-s / --cache-dir] [--no-checksum] [-t / --threads ] [--bundle] [--bug-reports] [--proxy-host] [--proxy-port] [--https-cert-file --https-key-file] [--http-basicauth] [--disable-cert-check]</A><DD>
<DT><A HREF="#lbAG">install FILE/FOLDER [-h] [--skip-bug-reports ] [--install-src-path PATH] [--allow-unauthenticated]</A><DD>
</DL>
<DT><A HREF="#lbAH">GLOBAL OPTIONS</A><DD>
<DT><A HREF="#lbAI">EXAMPLES</A><DD>
<DT><A HREF="#lbAJ">AUTHOR</A><DD>
<DT><A HREF="#lbAK">SEE ALSO</A><DD>
<DT><A HREF="#lbAL">DEDICATION</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 15:17:48 GMT, August 11, 2022
</BODY>
</HTML>