Info.pm 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. qw(DEB_VENDOR), # See deb-vendor(1).
  52. qw(DPKG_ORIGINS_DIR), # See Dpkg::Vendor(3).
  53. # See <https://reproducible-builds.org/specs/source-date-epoch>.
  54. qw(SOURCE_DATE_EPOCH),
  55. );
  56. sub get_build_env_whitelist {
  57. return @env_whitelist;
  58. }
  59. =back
  60. =head1 CHANGES
  61. =head2 Version 1.00 (dpkg 1.18.14)
  62. Mark the module as public.
  63. =cut
  64. 1;