dpkg 1.21.11
dpkg-split.h
Go to the documentation of this file.
1/*
2 * dpkg-split - splitting and joining of multipart *.deb archives
3 * dpkg-split.h - external definitions for this program
4 *
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2008-2012 Guillem Jover <guillem@debian.org>
7 *
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef DPKG_SPLIT_H
23#define DPKG_SPLIT_H
24
25#include <dpkg/ar.h>
26#include <dpkg/deb-version.h>
27
34
35struct partinfo {
37 const char *filename;
38 const char *package;
39 const char *version;
40 const char *arch;
41 const char *md5sum;
42 off_t orglength;
48 off_t headerlen;
49 off_t filesize;
50};
51
52struct partqueue {
54
58 struct partinfo info;
59};
60
61extern off_t opt_maxpartsize;
62extern const char *opt_depotdir;
63extern const char *opt_outputfile;
64extern int opt_npquiet;
65extern int opt_msdos;
66
67void read_fail(int rc, const char *filename, const char *what) DPKG_ATTR_NORET;
68void print_info(const struct partinfo *pi);
69struct partinfo *read_info(struct dpkg_ar *ar, struct partinfo *ir);
70
71void reassemble(struct partinfo **partlist, const char *outputfile);
72void mustgetpartinfo(const char *filename, struct partinfo *ri);
73void addtopartlist(struct partinfo**, struct partinfo*, struct partinfo *refi);
74
75#define SPLITVERSION "2.1"
76
77#define PARTSDIR "parts"
78
79#define PARTMAGIC "debian-split"
80#define HEADERALLOWANCE 1024
81
82#define SPLITPARTDEFMAX (450 * 1024)
83
84#endif /* DPKG_SPLIT_H */
action_func do_queue
Definition: dpkg-split.h:32
const char * opt_outputfile
Definition: main.c:111
int opt_msdos
Definition: main.c:113
action_func do_auto
Definition: dpkg-split.h:31
action_func do_discard
Definition: dpkg-split.h:33
action_func do_split
Definition: dpkg-split.h:28
void reassemble(struct partinfo **partlist, const char *outputfile)
Definition: join.c:39
void read_fail(int rc, const char *filename, const char *what) DPKG_ATTR_NORET
Definition: main.c:116
void mustgetpartinfo(const char *filename, struct partinfo *ri)
Definition: info.c:226
const char * opt_depotdir
Definition: main.c:110
int opt_npquiet
Definition: main.c:112
action_func do_join
Definition: dpkg-split.h:29
action_func do_info
Definition: dpkg-split.h:30
off_t opt_maxpartsize
Definition: main.c:109
void print_info(const struct partinfo *pi)
Definition: info.c:237
void addtopartlist(struct partinfo **, struct partinfo *, struct partinfo *refi)
Definition: join.c:77
struct partinfo * read_info(struct dpkg_ar *ar, struct partinfo *ir)
Read a deb-split part archive.
Definition: info.c:86
#define DPKG_ATTR_NORET
Definition: macros.h:55
int action_func(const char *const *argv)
Definition: options.h:36
Data structure representing a .deb format version.
Definition: deb-version.h:37
An archive (Unix ar) file.
Definition: ar.h:57
Definition: dpkg-split.h:35
off_t orglength
Definition: dpkg-split.h:42
struct deb_version fmtversion
Definition: dpkg-split.h:36
const char * version
Definition: dpkg-split.h:39
off_t filesize
Definition: dpkg-split.h:49
off_t headerlen
Size of header in part file.
Definition: dpkg-split.h:48
const char * arch
Definition: dpkg-split.h:40
const char * package
Definition: dpkg-split.h:38
off_t maxpartlen
Definition: dpkg-split.h:44
off_t thispartlen
Definition: dpkg-split.h:46
const char * filename
Definition: dpkg-split.h:37
int maxpartn
Definition: dpkg-split.h:43
int thispartn
Definition: dpkg-split.h:43
off_t thispartoffset
Definition: dpkg-split.h:45
const char * md5sum
Definition: dpkg-split.h:41
Definition: dpkg-split.h:52
struct partqueue * nextinqueue
Definition: dpkg-split.h:53
struct partinfo info
Only fields filename, md5sum, maxpartlen, thispartn, maxpartn are valid; the rest are NULL.
Definition: dpkg-split.h:58