Debian Codegraph @

apt-offline.html

raw
1 Content-type: text/html; charset=UTF-8
2
3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <HTML><HEAD><TITLE>Man page of apt-offline</TITLE>
5 </HEAD><BODY>
6 <H1>apt-offline</H1>
7 Section: USER COMMANDS (8)<BR>Updated: February 08, 2025<BR><A HREF="#index">Index</A>
8 <A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
9
10 <A NAME="lbAB">&nbsp;</A>
11 <H2>NAME</H2>
12
13 apt-offline - Offline APT Package manager
14 <A NAME="lbAC">&nbsp;</A>
15 <H2>SYNOPSIS</H2>
16
17 <B>apt-offline</B>
18
19 [ARGUMENTS] [OPTIONS]
20 <P>
21 <A NAME="lbAD">&nbsp;</A>
22 <H2>DESCRIPTION</H2>
23
24 apt-offline brings
25 offline package management functionality to Debian based system. It can be
26 used to download packages and its dependencies to be installed later on (or
27 required to update) a disconnected machine. Packages can be downloaded from a
28 different connected machine.
29 <P>
30 <P>
31
32 It can also fetch bug reports for the packages that are downloaded.
33 <P>
34
35 Unless the -h/-v or --help/--version options are given, one of the
36 <B>get, set</B>
37
38 or
39 <B>install</B>
40
41 commands must be provided.
42 <P>
43 <A NAME="lbAE">&nbsp;</A>
44 <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>
45
46 <P>
47 <P>
48
49 <B>set</B>
50
51 generates a signature file with the data required to install on or update the
52 disconnected machine.
53 <P>
54 <B>FILENAME {apt-offline.sig}</B>
55
56 is the signature file generated on the machine. This file will contain all the
57 information necessary for apt.
58 <P>
59 <DL COMPACT>
60 <DT>--simulate<DD>
61 Developer only. Used for testing.
62 <P>
63 <DT><B>--install-packages [PKG...PKG_N]</B><DD>
64 Packages that need to be installed
65 <P>
66 <DT><B>--install-src-packages [PKG...PKG_N]</B><DD>
67 Source packages that need to be installed
68 <P>
69 <DT><B>--src-build-dep</B><DD>
70 Download Build Dependency packages for the source packages requested
71 <P>
72 <DT><B>--release release_name</B><DD>
73 Release target to install packages from
74 <P>
75 <DT><B>--apt-backend apt-get</B><DD>
76 APT backend to use. One of: apt, apt-get, python-apt
77 <P>
78 <DT><B>--generate-changelog</B><DD>
79 Generate changelog of the version to be downloaded
80 <P>
81 <DT><B>--update</B><DD>
82 Generate APT Database signature for an update. This is the equivalent of using
83 <B>apt-get update</B>
84
85 <P>
86 <DT><B>--upgrade</B><DD>
87 Generate APT Database signature for package upgrade. This is the equivalent of using
88 <B>apt-get upgrade</B>
89
90 <P>
91 <DT><B>--upgrade-type {upgrade_type}</B><DD>
92 Type of upgrade you would like to perform. Default is
93 <B>upgrade.</B>
94
95 Other valid types are
96 <B>dist-upgrade and dselect-upgrade</B>
97
98 <P>
99 </DL>
100 <A NAME="lbAF">&nbsp;</A>
101 <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>
102
103 <P>
104 <P>
105
106 <B>get</B>
107
108 downloads APT data as per a signature file.
109 <P>
110 <B>FILENAME {apt-offline.sig}</B>
111
112 is the signature file required for details about data to be downloaded. This
113 file should have been generated by the above
114 <B>set</B>
115
116 command.
117 <P>
118 <DL COMPACT>
119 <DT><B>-d, --download-dir DIR_NAME</B><DD>
120 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
121 <B>apt-offline-download-$PID</B>
122
123 <P>
124 <DT><B>-s, --cache-dir DIR_NAME</B><DD>
125 Look for data in the cache before downloading it from the internet. If you are on a Debian box, you would want to specify
126 <I>/var/cache/apt/archives</I>
127
128 here. If the data is not available in the cache, the downloaded data is also copied to the cache.
129 <P>
130 <DT><B>--no-checksum</B><DD>
131 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
132 <P>
133 <DT><B>-t, --threads NUM_OF_THREADS</B><DD>
134 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
135 <P>
136 <DT><B>--bundle FILENAME</B><DD>
137 Create an archive file FILENAME. The file is archived in zip format
138 <P>
139 <DT><B>--bug-reports</B><DD>
140 Download bug reports for packages that are being downloaded. Currently only
141 the Debian BTS is supported.
142 <P>
143 <DT><B>--proxy-host</B><DD>
144 Specify the Proxy Host to be used.
145 <P>
146 <DT><B>--proxy-port</B><DD>
147 Specify the Proxy port number to be used.
148 <P>
149 <DT><B>--https-cert-file FILENAME</B><DD>
150 The Certificate-file to use if https-client-authentication is required on one or multiple hosts.
151 <P>
152 <DT><B>--https-key-file FILENAME</B><DD>
153 The Certificate-key-file to use if https-client-authentication is required on one or multiple hosts.
154 <P>
155 <DT><B>--disable-cert-check</B><DD>
156 Disable the check of https certificates on servers
157 <P>
158 <DT><B>--http-basicauth URL</B><DD>
159 A username/password encoded in the URL. Note Passwords with special characters should be percent encoded as per RFC-3986 section 2.1
160 <P>
161 </DL>
162 <A NAME="lbAG">&nbsp;</A>
163 <H3>install FILE/FOLDER [-h] [--skip-bug-reports ] [--install-src-path PATH] [--allow-unauthenticated]</H3>
164
165 <P>
166 <P>
167
168 <B>install</B>
169
170 installs APT data to the APT package database and updates it.
171 <P>
172 <B>FILE {archive_bundle_file}</B>
173
174 Install data from the archive (bundle) file.
175 <P>
176 <B>FOLDER {/folder/path}</B>
177
178 Install data from the folder path.
179 <P>
180 Either FILE or FOLDER argument can be provided to the
181 <B>install</B>
182
183 command.
184 <P>
185 <DL COMPACT>
186 <DT>--simulate<DD>
187 Developer only. Used for testing.
188 <P>
189 <DT><B>--skip-bug-reports</B><DD>
190 Skip listing of downloaded bug reports, if any.
191 <P>
192 <DT><B>--skip-changelog</B><DD>
193 Skip display of changelog, if any.
194 <P>
195 <DT><B>--allow-unauthenticated</B><DD>
196 Don't verify GPG signatures for the data to be installed to APT. Usage of this option is highly discouraged.
197 <P>
198 <DT><B>--strict-deb-check</B><DD>
199 With this option enabled, apt-offline delegate's .deb package checksum validation to apt. While the .debs are
200 already available, they are stored in the temporary apt cache, where apt validates its checksum, before considering
201 it for further processing.
202 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
203 <P>
204 The default behavior is to
205 <B>not</B>
206
207 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.
208 <P>
209 <DT><B>--install-src-path PATH</B><DD>
210 Path to filesystem where we want the source packages to be installed to. Default will be a folder in your TEMPDIR.
211 <P>
212 </DL>
213 <A NAME="lbAH">&nbsp;</A>
214 <H2>GLOBAL OPTIONS</H2>
215
216 <DL COMPACT>
217 <DT>-h, --help<DD>
218 Show help message
219 <P>
220 <DT>--verbose<DD>
221 Run in verbose mode
222 <P>
223 <DT>-v, --version<DD>
224 Display the version of the program
225 <P>
226 <P>
227 </DL>
228 <A NAME="lbAI">&nbsp;</A>
229 <H2>EXAMPLES</H2>
230
231 <DL COMPACT>
232 <DT><B>NOTE: argument/option handling</B>
233
234 <DD>
235 apt-offline relies on argparse for argument/option parsing. To explicitly instruct apt-offline about an argument, you can pass it with the -- delimiter.
236 <P>
237 <B>Ex. apt-offline set --update --upgrade --install-packages wm2 -- foo.sig</B>
238
239 <P>
240 By specifying the
241 <B>--</B>
242
243 delimiter, we instruct apt-offline that foo.sig is an argument to the
244 <B>apt-offline</B>
245
246 command and not to the
247 <B>--install-packages</B>
248
249 option.
250 <P>
251 Otherwise, you could also use it positionally next to the set command
252 <P>
253 <B>Ex. apt-offline set foo.sig --update --upgrade --install-packages wm2</B>
254
255 <P>
256 <DT><B>apt-offline set FILENAME</B>
257
258 <DD>
259 This command will generate a signature file FILENAME for APT Package Database.
260 To generate only the signature for updates, use the --update option. To
261 generate only the signature for package upgrades, use the --upgrade option.
262 <P>
263 <DT><B>apt-offline get FILENAME</B>
264
265 <DD>
266 This command will fetch the data required for APT Package Database as per the
267 signature file FILENAME generated by
268 <B>apt-offline get.</B>
269
270 To download bug reports also use the --bug-reports option. Currently supported bug tracker is Debian BTS only.
271 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/
272 <P>
273 <DT><B>apt-offline install FILE|FOLDER</B>
274
275 <DD>
276 This command will sync the data downloaded by
277 <B>apt-offline get</B>
278
279 to the APT Package Database and update it.
280 Depending on where the data was downloaded to or packed into, either the
281 absolute FOLDER path or the archive FILE path can be specified.
282 <P>
283 <B>NOTE1:</B>
284
285 On a freshly installed box, that was installed without the network, the package database is null. In that case, you first need to run
286 <B>apt-offline</B>
287
288 with just the
289 <B>--update</B>
290
291 option to ensure you have a meaningful package database
292 <P>
293 <B>Example: apt-offline set set.uris --update</B>
294
295 <P>
296 <B>NOTE2:</B>
297
298 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
299 <P>
300 <I>/etc/apt/sources.list.d/apt-offline.list or /etc/apt/sources.list</I>
301
302 <P>
303 deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> stable main contrib
304 <P>
305 <B>(For Debian Stable)</B>
306
307 <P>
308 deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> unstable main contrib
309 <P>
310 <B>(For Debian Unstable/Sid)</B>
311
312 <P>
313 deb <A HREF="https://deb.debian.org/debian">https://deb.debian.org/debian</A> stretch main contrib
314 <P>
315 <B>(For Debian Stretch)</B>
316
317 <P>
318 deb <A HREF="http://security.debian.org">http://security.debian.org</A> stable/updates main contrib
319 <P>
320 <B>(Security Updates for Debian Stable)</B>
321
322 <P>
323 deb <A HREF="http://security.debian.org">http://security.debian.org</A> testing-security/updates main contrib
324 <P>
325 <B>(Security Updates for Debian Testing)</B>
326
327 <P>
328 <DT>Sequence 1: The following set of commands, when run in sequence, will update a disconnected machine.<DD>
329 <P>
330 <B>apt-offline set update.sig --update</B>
331
332 <P>
333 (Generate the required data needed to update the APT database. Should be run on the disconnected machine)
334 <P>
335 <B>apt-offline get update.sig --bundle update.zip</B>
336
337 <P>
338 (Download the required data needed to update the APT database. Should be run on a machine with internet connectivity)
339 <P>
340 <B>apt-offline install update.zip</B>
341
342 <P>
343 (Installs the data needed to update the APT database. Should be run on the disconnected machine)
344 <P>
345 <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>
346 <P>
347 <B>apt-offline set upgrade.sig --upgrade</B>
348
349 <P>
350 (Generate the required data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
351 <P>
352 <B>apt-offline get upgrade.sig --bundle upgrade.zip</B>
353
354 <P>
355 (Download the required data needed to upgrade the upgradable packages. Should be run on a machine with internet connectivity)
356 <P>
357 <B>apt-offline install upgrade.zip</B>
358
359 <P>
360 (Installs the data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
361 <P>
362 <DT>After successful completion of<DD>
363 <B>Sequence 1</B>
364
365 and
366 <B>Sequence 2</B>
367
368 in order, further running
369 <B>apt-get upgrade</B>
370
371 will result in 0 bytes of additional download.
372 <P>
373 </DL>
374 <A NAME="lbAJ">&nbsp;</A>
375 <H2>AUTHOR</H2>
376
377 <B>apt-offline is written by Ritesh Raj Sarraf (<A HREF="mailto:[email protected]">[email protected]</A>)</B>
378
379 <P>
380 If you wish to report a bug in apt-offline, please see
381 <B><A HREF="https://github.com/rickysarraf/apt-offline">https://github.com/rickysarraf/apt-offline</A></B>
382
383 or else, send an email to me at
384 <B><A HREF="mailto:[email protected]">[email protected]</A></B>
385
386 <P>
387 <A NAME="lbAK">&nbsp;</A>
388 <H2>SEE ALSO</H2>
389
390 <A HREF="/cgi-bin/man/man2html?8+apt-get">apt-get</A>(8),
391 <A HREF="/cgi-bin/man/man2html?8+apt-cache">apt-cache</A>(8),
392 <A HREF="/cgi-bin/man/man2html?8+dpkg">dpkg</A>(8),
393 <A HREF="/cgi-bin/man/man2html?8+aptitude">aptitude</A>(8),
394 <P>
395 <A NAME="lbAL">&nbsp;</A>
396 <H2>DEDICATION</H2>
397
398 This software is dedicated to the memory of my father Santosh Kumar Sarraf. We miss you a lot.
399 <P>
400
401 <HR>
402 <A NAME="index">&nbsp;</A><H2>Index</H2>
403 <DL>
404 <DT><A HREF="#lbAB">NAME</A><DD>
405 <DT><A HREF="#lbAC">SYNOPSIS</A><DD>
406 <DT><A HREF="#lbAD">DESCRIPTION</A><DD>
407 <DL>
408 <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>
409 <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>
410 <DT><A HREF="#lbAG">install FILE/FOLDER [-h] [--skip-bug-reports ] [--install-src-path PATH] [--allow-unauthenticated]</A><DD>
411 </DL>
412 <DT><A HREF="#lbAH">GLOBAL OPTIONS</A><DD>
413 <DT><A HREF="#lbAI">EXAMPLES</A><DD>
414 <DT><A HREF="#lbAJ">AUTHOR</A><DD>
415 <DT><A HREF="#lbAK">SEE ALSO</A><DD>
416 <DT><A HREF="#lbAL">DEDICATION</A><DD>
417 </DL>
418 <HR>
419 This document was created by
420 <A HREF="/cgi-bin/man/man2html">man2html</A>,
421 using the manual pages.<BR>
422 Time: 14:49:28 GMT, February 08, 2025
423 </BODY>
424 </HTML>