dpkg (1.18.25) stretch; urgency=medium
[dpkg] / dpkg-deb / dpkg-deb.h
CommitLineData
1479465f
GJ
1/*
2 * dpkg-deb - construction and deconstruction of *.deb archives
3 * dpkg-deb.h - external definitions for this program
4 *
5 * Copyright © 1994,1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2006-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_DEB_H
23#define DPKG_DEB_H
24
25#include <dpkg/deb-version.h>
26
27action_func do_build;
28action_func do_contents;
29action_func do_control;
30action_func do_showinfo;
31action_func do_info;
32action_func do_field;
33action_func do_extract;
34action_func do_vextract;
35action_func do_raw_extract;
36action_func do_ctrltarfile;
37action_func do_fsystarfile;
38
39extern int opt_verbose;
40extern int opt_uniform_compression;
41extern int debugflag, nocheckflag;
42
43extern struct deb_version deb_format;
44
45enum dpkg_tar_options {
46 /** Output the tar file directly, without any processing. */
47 DPKG_TAR_PASSTHROUGH = 0,
48 /** List tar files. */
49 DPKG_TAR_LIST = DPKG_BIT(0),
50 /** Extract tar files. */
51 DPKG_TAR_EXTRACT = DPKG_BIT(1),
52 /** Preserve tar permissions on extract. */
53 DPKG_TAR_PERMS = DPKG_BIT(2),
54 /** Do not set tar mtime on extract. */
55 DPKG_TAR_NOMTIME = DPKG_BIT(3),
56 /** Guarantee extraction into a new directory, abort if it exists. */
57 DPKG_TAR_CREATE_DIR = DPKG_BIT(4),
58};
59
60void extracthalf(const char *debar, const char *dir,
61 enum dpkg_tar_options taroption, int admininfo);
62
63extern const char *showformat;
64extern struct compress_params compress_params;
65
66#define ARCHIVEVERSION "2.0"
67
68#define BUILDCONTROLDIR "DEBIAN"
69#define EXTRACTCONTROLDIR BUILDCONTROLDIR
70
71#define OLDARCHIVEVERSION "0.939000"
72
73#define OLDDEBDIR "DEBIAN"
74#define OLDOLDDEBDIR ".DEBIAN"
75
76#define DEBMAGIC "debian-binary"
77#define ADMINMEMBER "control.tar"
78#define DATAMEMBER "data.tar"
79
80#ifdef PATH_MAX
81# define INTERPRETER_MAX PATH_MAX
82#else
83# define INTERPRETER_MAX 1024
84#endif
85
86#endif /* DPKG_DEB_H */