dpkg-deb.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. #ifndef DPKG_DEB_H
  22. #define DPKG_DEB_H
  23. #include <dpkg/deb-version.h>
  24. action_func do_build;
  25. action_func do_contents;
  26. action_func do_control;
  27. action_func do_showinfo;
  28. action_func do_info;
  29. action_func do_field;
  30. action_func do_extract;
  31. action_func do_vextract;
  32. action_func do_raw_extract;
  33. action_func do_ctrltarfile;
  34. action_func do_fsystarfile;
  35. extern int opt_verbose;
  36. extern int opt_uniform_compression;
  37. extern int debugflag, nocheckflag;
  38. extern struct deb_version deb_format;
  39. enum dpkg_tar_options {
  40. /** Output the tar file directly, without any processing. */
  41. DPKG_TAR_PASSTHROUGH = 0,
  42. /** List tar files. */
  43. DPKG_TAR_LIST = DPKG_BIT(0),
  44. /** Extract tar files. */
  45. DPKG_TAR_EXTRACT = DPKG_BIT(1),
  46. /** Preserve tar permissions on extract. */
  47. DPKG_TAR_PERMS = DPKG_BIT(2),
  48. /** Do not set tar mtime on extract. */
  49. DPKG_TAR_NOMTIME = DPKG_BIT(3),
  50. };
  51. void extracthalf(const char *debar, const char *dir,
  52. enum dpkg_tar_options taroption, int admininfo);
  53. extern const char *showformat;
  54. extern struct compress_params compress_params;
  55. #define ARCHIVEVERSION "2.0"
  56. #define BUILDCONTROLDIR "DEBIAN"
  57. #define EXTRACTCONTROLDIR BUILDCONTROLDIR
  58. #define OLDARCHIVEVERSION "0.939000"
  59. #define OLDDEBDIR "DEBIAN"
  60. #define OLDOLDDEBDIR ".DEBIAN"
  61. #define DEBMAGIC "debian-binary"
  62. #define ADMINMEMBER "control.tar"
  63. #define DATAMEMBER "data.tar"
  64. #ifdef PATH_MAX
  65. # define INTERPRETER_MAX PATH_MAX
  66. #else
  67. # define INTERPRETER_MAX 1024
  68. #endif
  69. #endif /* DPKG_DEB_H */