Info.pm 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Copyright © 2016 Guillem Jover <guillem@debian.org>
  2. #
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. package Dpkg::Build::Info;
  16. use strict;
  17. use warnings;
  18. our $VERSION = '1.00';
  19. our @EXPORT_OK = qw(
  20. get_build_env_whitelist
  21. );
  22. use Exporter qw(import);
  23. =encoding utf8
  24. =head1 NAME
  25. Dpkg::Build::Info - handle build information
  26. =head1 DESCRIPTION
  27. The Dpkg::Build::Info module provides functions to handle the build
  28. information.
  29. =head1 FUNCTIONS
  30. =over 4
  31. =item @envvars = get_build_env_whitelist()
  32. Get an array with the whitelist of environment variables that can affect
  33. the build, but are still not privacy revealing.
  34. =cut
  35. my @env_whitelist = (
  36. # Toolchain.
  37. qw(CC CPP CXX OBJC OBJCXX PC FC M2C AS LD AR RANLIB MAKE AWK LEX YACC),
  38. # Toolchain flags.
  39. qw(CFLAGS CPPFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS GCJFLAGS FFLAGS
  40. LDFLAGS ARFLAGS MAKEFLAGS),
  41. # Dynamic linker, see ld(1).
  42. qw(LD_LIBRARY_PATH),
  43. # Locale, see locale(1).
  44. qw(LANG LC_ALL LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
  45. LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
  46. LC_IDENTIFICATION),
  47. # Build flags, see dpkg-buildpackage(1).
  48. qw(DEB_BUILD_OPTIONS DEB_BUILD_PROFILES),
  49. # DEB_flag_{SET,STRIP,APPEND,PREPEND} will be recorded after being merged
  50. # with system config and user config.
  51. # See deb-vendor(1).
  52. qw(DEB_VENDOR),
  53. # See dpkg(1).
  54. qw(DPKG_ROOT DPKG_ADMINDIR),
  55. # See dpkg-architecture(1).
  56. qw(DPKG_DATADIR),
  57. # See Dpkg::Vendor(3).
  58. qw(DPKG_ORIGINS_DIR),
  59. # See dpkg-gensymbols(1).
  60. qw(DPKG_GENSYMBOLS_CHECK_LEVEL),
  61. # See <https://reproducible-builds.org/specs/source-date-epoch>.
  62. qw(SOURCE_DATE_EPOCH),
  63. );
  64. sub get_build_env_whitelist {
  65. return @env_whitelist;
  66. }
  67. =back
  68. =head1 CHANGES
  69. =head2 Version 1.00 (dpkg 1.18.14)
  70. Mark the module as public.
  71. =cut
  72. 1;