8 makedeltarpm [-V version] [-s seqfile] oldrpm newrpm deltarpm
10 Extracts the usable files (i.e. no config files) from oldrpm and
11 diffs them against newrpm.
14 -V: create a specific version, default is V3
15 -s: write sequence info into file (usefull for creating
18 applydeltarpm [-v] [-p] [-c] [-C] [-r oldrpm] deltarpm newrpm
19 applydeltarpm -i deltarpm
20 applydeltarpm [-c] -s seq
22 Reconstruct newrpm from the delta rpm. May run in filesystem mode
26 -v: verbose mode, print statistics
27 -p: print percent completed (use -p -p for parsable output)
28 -c: just check if the rpm can be reconstructed
29 -C: fast check, don't verify md5 sums of the used files
30 -r: reconstruct from the specified rpm, not from filesystem
32 -s: check if rpm can be reconstructed based on sequence info
34 combinedeltarpm deltarpm1 deltarpm2... newdeltarpm
36 Combine multiple deltarpms to a new one
40 delta.c is distributed under a 2-clause BSD license, see the
41 head of the file for details.
42 All other files are distributed under BSD license, see LICENSE.BSD.
46 Many thanks to Carl-Daniel Hailfinger who started the deltarpm
47 project with his ideas and discussions.
49 D) Size limitations and compilation options
51 Deltarpms are (as all rpms) limited to 2GB size. The rpm archive
52 is compressed, though, and thus can exceed this limit.
53 There are two compile options that allow deltarpms to deal
54 with rpms whose archive exceeds 4GB:
57 Allows applydeltarpm to deal with deltarpms that where created
58 for rpms that have an archive bigger that 4GB. Applying such
59 a deltarpm works on a 32bit architecture.
62 Changes the diff algorithm to use size_t instead of unsigned int.
63 This allows the creation of deltarpms for oversized rpms. You
64 need a 64bit architecture for this to work (and DELTARPM_64BIT
65 must also be defined).
66 Defining BSDIFF_SIZET changes the memory requirements needed
67 for creating the deltarpm. If your uncompressed archive size
68 is N GB, you need about 3*N GB if BSDIFF_SIZET is not defined,
71 E) delta.rpm file format
79 x bytes rpm signature header
82 (the is an exact copy of the header of new.rpm, the
83 only difference is that the PAYLOADFORMAT is patched
87 [[ the rest of the deltarpm may be compressed, like a
91 4 bytes id: "DLT1" (V2: "DLT2", V3: "DLT3")
93 4 bytes source nevr length
94 x bytes source nevr (name-epoch:version-release)
96 4 bytes seqlength (always 16 if header included in diff)
97 x bytes sequence, containing
99 x bytes compressed seqence
100 (the sequence defines which files get included from the rpm
101 filelist in which order)
104 16 bytes fullmd5, md5sum of the complete rpm
105 V2: 4 bytes fullsize, size of the complete rpm
106 V2: 4 bytes compression type
107 V2: 4 bytes compression parameter block len
108 V2: x bytes compression parameter block
111 V3: target header len, zero if header not included in diff
113 V3: 4 bytes number of adjust elements (offadjn)
114 V3: 2 * offadjn * 4 bytes adjust elements
118 x bytes lead (lead/signatures of the new rpm)
120 4 bytes payloadformatoffset
121 (used to change the format back to "cpio")
123 4 bytes number of copies from internal data (inn)
124 4 bytes number of copies from external data (outn)
125 inn * 4 bytes number of external copies to do before internal copy
126 inn * 4 bytes length of internal copy
127 outn * 4 bytes offset adjustment of external copy
128 outn * 4 bytes length of external copy
130 V3: 4 bytes length of external data MSB
131 4 bytes length of external data
133 4 bytes length of add data
134 x bytes add data, bzip2 or gzip compressed
136 V3: 4 bytes length of internal data MSB
137 4 bytes length of internal data
138 x bytes internal data
143 4 bytes magic: "drpm"
144 4 bytes id: (V3: "DLT3")
145 4 bytes target nevr length
146 x bytes target nevr (name-epoch:version-release)
147 4 bytes length of add data
148 x bytes add data, bzip2 or gzip compressed
150 [[ rest of the deltarpm compressed, same format as a
151 standard deltarpm starting with the id, add data
153 the sequence will always be 16 bytes, the md5 sum of
154 the header and the compressed payload (i.e. exactly
155 the md5sum rpm stores in the signature header).
156 the target-header len will be non-zero as the header
157 is included in the diff. ]]
159 "rpm-only no diff" deltarpms are like rpm-only deltarpms, but the target
160 compression is "uncompressed" and there are no delta instructions,
161 i.e. inn and outn are both zero.