man: Add dpkg-build-api behavior for Rules-Requires-Root field defaults
[dpkg.git] / scripts / Dpkg / BuildInfo.pm
blob0792659bf4bddd21fc320071d7803bc06320da0c
1 # Copyright © 2016-2022 Guillem Jover <guillem@debian.org>
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.
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.
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/>.
16 =encoding utf8
18 =head1 NAME
20 Dpkg::BuildInfo - handle build information
22 =head1 DESCRIPTION
24 The Dpkg::BuildInfo module provides functions to handle the build
25 information.
27 =cut
29 package Dpkg::BuildInfo 1.00;
31 use strict;
32 use warnings;
34 our @EXPORT_OK = qw(
35 get_build_env_allowed
38 use Exporter qw(import);
40 =head1 FUNCTIONS
42 =over 4
44 =item @envvars = get_build_env_allowed()
46 Get an array with the allowed list of environment variables that can affect
47 the build, but are still not privacy revealing.
49 =cut
51 my @env_allowed = (
52 # Toolchain.
53 qw(
55 CPP
56 CXX
57 OBJC
58 OBJCXX
61 M2C
65 RANLIB
66 MAKE
67 AWK
68 LEX
69 YACC
71 # Toolchain flags.
72 qw(
73 ASFLAGS
74 ASFLAGS_FOR_BUILD
75 CFLAGS
76 CFLAGS_FOR_BUILD
77 CPPFLAGS
78 CPPFLAGS_FOR_BUILD
79 CXXFLAGS
80 CXXFLAGS_FOR_BUILD
81 OBJCFLAGS
82 OBJCFLAGS_FOR_BUILD
83 OBJCXXFLAGS
84 OBJCXXFLAGS_FOR_BUILD
85 DFLAGS
86 DFLAGS_FOR_BUILD
87 FFLAGS
88 FFLAGS_FOR_BUILD
89 LDFLAGS
90 LDFLAGS_FOR_BUILD
91 ARFLAGS
92 MAKEFLAGS
94 # Dynamic linker, see ld(1).
95 qw(
96 LD_LIBRARY_PATH
98 # Locale, see locale(1).
99 qw(
100 LANG
101 LC_ALL
102 LC_CTYPE
103 LC_NUMERIC
104 LC_TIME
105 LC_COLLATE
106 LC_MONETARY
107 LC_MESSAGES
108 LC_PAPER
109 LC_NAME
110 LC_ADDRESS
111 LC_TELEPHONE
112 LC_MEASUREMENT
113 LC_IDENTIFICATION
115 # Build flags, see dpkg-buildpackage(1).
117 DEB_BUILD_OPTIONS
118 DEB_BUILD_PROFILES
120 # DEB_flag_{SET,STRIP,APPEND,PREPEND} will be recorded after being merged
121 # with system config and user config.
122 # See deb-vendor(1).
124 DEB_VENDOR
126 # See dpkg(1).
128 DPKG_ROOT
129 DPKG_ADMINDIR
131 # See dpkg-architecture(1).
133 DPKG_DATADIR
135 # See Dpkg::Vendor(3).
137 DPKG_ORIGINS_DIR
139 # See dpkg-gensymbols(1).
141 DPKG_GENSYMBOLS_CHECK_LEVEL
143 # See <https://reproducible-builds.org/specs/source-date-epoch>.
145 SOURCE_DATE_EPOCH
149 sub get_build_env_allowed {
150 return @env_allowed;
153 =back
155 =head1 CHANGES
157 =head2 Version 1.00 (dpkg 1.21.14)
159 Mark the module as public.
161 =cut