dpkg-deb.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 <ian@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_fsystarfile;
  34. extern int opt_verbose;
  35. extern int opt_uniform_compression;
  36. extern int debugflag, nocheckflag;
  37. extern struct deb_version deb_format;
  38. enum dpkg_tar_options {
  39. /** Output the tar file directly, without any processing. */
  40. DPKG_TAR_PASSTHROUGH = 0,
  41. /** List tar files. */
  42. DPKG_TAR_LIST = DPKG_BIT(0),
  43. /** Extract tar files. */
  44. DPKG_TAR_EXTRACT = DPKG_BIT(1),
  45. /** Preserve tar permissions on extract. */
  46. DPKG_TAR_PERMS = DPKG_BIT(2),
  47. /** Do not set tar mtime on extract. */
  48. DPKG_TAR_NOMTIME = DPKG_BIT(3),
  49. };
  50. void extracthalf(const char *debar, const char *dir,
  51. enum dpkg_tar_options taroption, int admininfo);
  52. extern const char *showformat;
  53. extern struct compress_params compress_params;
  54. #define ARCHIVEVERSION "2.0"
  55. #define BUILDCONTROLDIR "DEBIAN"
  56. #define EXTRACTCONTROLDIR BUILDCONTROLDIR
  57. #define OLDARCHIVEVERSION "0.939000"
  58. #define OLDDEBDIR "DEBIAN"
  59. #define OLDOLDDEBDIR ".DEBIAN"
  60. #define DEBMAGIC "debian-binary"
  61. #define ADMINMEMBER "control.tar"
  62. #define DATAMEMBER "data.tar"
  63. #define MAXFILENAME 2048
  64. #ifdef PATH_MAX
  65. # define INTERPRETER_MAX PATH_MAX
  66. #else
  67. # define INTERPRETER_MAX 1024
  68. #endif
  69. #endif /* DPKG_DEB_H */