dpkg (1.18.25) stretch; urgency=medium
[dpkg] / scripts / Dpkg / Build / Info.pm
CommitLineData
1479465f
GJ
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
16package Dpkg::Build::Info;
17
18use strict;
19use warnings;
20
21our $VERSION = '1.00';
22our @EXPORT_OK = qw(
23 get_build_env_whitelist
24);
25
26use Exporter qw(import);
27
28=encoding utf8
29
30=head1 NAME
31
32Dpkg::Build::Info - handle build information
33
34=head1 DESCRIPTION
35
36The Dpkg::Build::Info module provides functions to handle the build
37information.
38
39=head1 FUNCTIONS
40
41=over 4
42
43=item @envvars = get_build_env_whitelist()
44
45Get an array with the whitelist of environment variables that can affect
46the build, but are still not privacy revealing.
47
48=cut
49
50my @env_whitelist = (
51 # Toolchain.
52 qw(CC CPP CXX OBJC OBJCXX PC FC M2C AS LD AR RANLIB MAKE AWK LEX YACC),
53 # Toolchain flags.
54 qw(CFLAGS CPPFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS GCJFLAGS FFLAGS
55 LDFLAGS ARFLAGS MAKEFLAGS),
56 # Dynamic linker, see ld(1).
57 qw(LD_LIBRARY_PATH),
58 # Locale, see locale(1).
59 qw(LANG LC_ALL LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
60 LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
61 LC_IDENTIFICATION),
62 # Build flags, see dpkg-buildpackage(1).
63 qw(DEB_BUILD_OPTIONS DEB_BUILD_PROFILES),
64 # DEB_flag_{SET,STRIP,APPEND,PREPEND} will be recorded after being merged
65 # with system config and user config.
66 # See deb-vendor(1).
67 qw(DEB_VENDOR),
68 # See dpkg(1).
69 qw(DPKG_ROOT DPKG_ADMINDIR),
70 # See dpkg-architecture(1).
71 qw(DPKG_DATADIR),
72 # See Dpkg::Vendor(3).
73 qw(DPKG_ORIGINS_DIR),
74 # See dpkg-gensymbols(1).
75 qw(DPKG_GENSYMBOLS_CHECK_LEVEL),
76 # See <https://reproducible-builds.org/specs/source-date-epoch>.
77 qw(SOURCE_DATE_EPOCH),
78);
79
80sub get_build_env_whitelist {
81 return @env_whitelist;
82}
83
84=back
85
86=head1 CHANGES
87
88=head2 Version 1.00 (dpkg 1.18.14)
89
90Mark the module as public.
91
92=cut
93
941;