2 * dpkg-deb - construction and deconstruction of *.deb archives
3 * dpkg-deb.h - external definitions for this program
5 * Copyright © 1994,1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
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.
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.
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/>.
25 #include <dpkg/deb-version.h>
28 action_func do_contents
;
29 action_func do_control
;
30 action_func do_showinfo
;
33 action_func do_extract
;
34 action_func do_vextract
;
35 action_func do_raw_extract
;
36 action_func do_ctrltarfile
;
37 action_func do_fsystarfile
;
39 extern int opt_verbose
;
40 extern int opt_root_owner_group
;
41 extern int opt_uniform_compression
;
44 extern const char *opt_showformat
;
46 extern struct deb_version deb_format
;
48 enum DPKG_ATTR_ENUM_FLAGS dpkg_tar_options
{
49 /** Output the tar file directly, without any processing. */
50 DPKG_TAR_PASSTHROUGH
= 0,
51 /** List tar files. */
52 DPKG_TAR_LIST
= DPKG_BIT(0),
53 /** Extract tar files. */
54 DPKG_TAR_EXTRACT
= DPKG_BIT(1),
55 /** Preserve tar permissions on extract. */
56 DPKG_TAR_PERMS
= DPKG_BIT(2),
57 /** Do not set tar mtime on extract. */
58 DPKG_TAR_NOMTIME
= DPKG_BIT(3),
59 /** Guarantee extraction into a new directory, abort if it exists. */
60 DPKG_TAR_CREATE_DIR
= DPKG_BIT(4),
63 void extracthalf(const char *debar
, const char *dir
,
64 enum dpkg_tar_options taroption
, int admininfo
);
66 extern struct compress_params compress_params_deb0
;
67 extern struct compress_params compress_params
;
69 #define ARCHIVEVERSION "2.0"
71 #define BUILDCONTROLDIR "DEBIAN"
72 #define EXTRACTCONTROLDIR BUILDCONTROLDIR
74 #define OLDARCHIVEVERSION "0.939000"
76 #define OLDDEBDIR "DEBIAN"
77 #define OLDOLDDEBDIR ".DEBIAN"
79 #define DEBMAGIC "debian-binary"
80 #define ADMINMEMBER "control.tar"
81 #define DATAMEMBER "data.tar"
84 # define INTERPRETER_MAX PATH_MAX
86 # define INTERPRETER_MAX 1024
89 #endif /* DPKG_DEB_H */