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
|
dpkg_offline
============
dpkg_offline downloads a set of .deb packages needed to install all of the
given <packages-to-download>, with their dependencies satisfied, on an
installation done from <base-iso>.
It effectively obtains the set of packages that would be downloaded if
apt-get -dy <packages-to-download> were run on a system just installed from
<base-iso>.
It supports
- Ubuntu desktop, for releases 12.04 onwards, using either Live CD ISO or
armhf .img with vfat filesystems.
- Ubuntu server, for releases 12.10 onwards, using Live CD ISO or armhf
.img with vfat filesystems.
- Ubuntu server, for 12.04 and its point releases, in tar.gz format ONLY
(see below for description of this format)
It can download packages for any architecture as long as either an iso, img or
tar.gz image or "seed file" is available. Note that the specified image must
match the desired architecture, and will be auto-determined based on the image.
OPTIONS
=======
-d debug. Print extra debugging information.
-r additional-repo-file
Additional PPAs can be specified in a file that will be added to the
apt sources prior to installation. The special @@RELEASE@@ variable or
the YOUR_UBUNTU_VERSION_HERE string will be substituted by the image's
release name. Private PPAs are supported, using the encrypted password
syntax as provided by launchpad's PPA details page; they can be copied
verbatim from Launchpad PPA details pages thanks to the above-mentioned
variable substitution.
-e extras-file
Additional files to add to the offline tarball can be listed, one per
line, in the given text file. These are copied to the tarball prior to
generating the Packages.gz so this can include custom .debs or
additional helper scripts. Note that this is in addition to the
included-by-default add_offline_repository script. Also, note that this
can include URLs which will be fetched with curl.
-t final-tarball-name
Name for the final result tarball. If not given, it will be put in the
current directory with a reasonable default name.
-n No cleanup, to skip the final cleanup-on-success phase.
REQUIREMENTS
============
dpkg_offline needs the following ubuntu packages:
genisoimage
mtools
squashfs-tools
apt-utils
curl
TAR.GZ "IMAGES"
===============
dpkg_offline relies on a live image with a "preinitialized" apt environment.
This is present on most recent Ubuntu desktop releases, but was only introduced
for server with Ubuntu 12.10. In order to support Ubuntu 12.04 LTS, we need to
provide dpkg_offline with a suitable apt environment. This can be supplied as a
tar.gz file containing three things:
- Entire contents of etc and var, from a just-installed 12.04 server system.
- README.diskdefines from the disk image from which this server system was
installed. This is used to determine the architecture.
This environment can be built manually for any supported architecture as
follows:
- Install Ubuntu 12.04 server, on the task selection list select everything
except the last option.
- Once the system boots, edit /etc/apt/sources.list and comment out all lines
referring to the installation CD, either by hand or with this command:
sudo sed -i '/^deb cdrom:/s/^/#/' /etc/apt/sources.list
- Insert the installation CD or media (assume it gets mounted in /mnt)
- Create the "seed" tar.gz with:
sudo cp /mnt/README.diskdefines /
cd /
tar -czf 12.04-server-i386.tar.gz etc var README.diskdefines
The resulting tar.gz can be given to dpkg_offline.
Optionally, the old_dpkg_offline directory includes the old, kvm-based
dpkg_offline implementation with a suitable preseed to automatically generate
the tar.gz seed file, see this directory for more information.
|