Dpkg/BuildInfo.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
get_build_env_allowed
1.0
CRAP 1.0
« Dpkg/BuildEnv.pm ↑ Summary Dpkg/Control/Hash.pm »
1 # Copyright © 2016-2022 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  
16 =encoding utf8
17  
18 =head1 NAME
19  
20 Dpkg::BuildInfo - handle build information
21  
22 =head1 DESCRIPTION
23  
24 The Dpkg::BuildInfo module provides functions to handle the build
25 information.
26  
27 =cut
28  
29 package Dpkg::BuildInfo 1.00;
30  
31 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 1 our @EXPORT_OK = qw(
34 get_build_env_allowed
35 );
36  
37 1 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 =head1 FUNCTIONS
40  
41 =over 4
42  
43 =item @envvars = get_build_env_allowed()
44  
45 Get an array with the allowed list of environment variables that can affect
46 the build, but are still not privacy revealing.
47  
48 =cut
49  
50 1 my @env_allowed = (
51 # Tool behavior.
52 qw(
53 POSIXLY_CORRECT
54 GETCONF_DIR
55 ),
56 # Resolver, see resolv.conf(5), host.conf(5).
57 qw(
58 RESOLV_HOST_CONF
59 RESOLV_MULTI
60 RESOLV_REORDER
61 RES_OPTIONS
62 ),
63 # Toolchain.
64 qw(
65 CC
66 CPP
67 CXX
68 OBJC
69 OBJCXX
70 PC
71 FC
72 M2C
73 AS
74 LD
75 AR
76 RANLIB
77 MAKE
78 AWK
79 LEX
80 YACC
81 ),
82 # Toolchain flags.
83 qw(
84 ASFLAGS
85 ASFLAGS_FOR_BUILD
86 CFLAGS
87 CFLAGS_FOR_BUILD
88 CPPFLAGS
89 CPPFLAGS_FOR_BUILD
90 CXXFLAGS
91 CXXFLAGS_FOR_BUILD
92 OBJCFLAGS
93 OBJCFLAGS_FOR_BUILD
94 OBJCXXFLAGS
95 OBJCXXFLAGS_FOR_BUILD
96 DFLAGS
97 DFLAGS_FOR_BUILD
98 FFLAGS
99 FFLAGS_FOR_BUILD
100 LDFLAGS
101 LDFLAGS_FOR_BUILD
102 ARFLAGS
103 LFLAGS
104 YFLAGS
105 MAKEFLAGS
106 GNUMAKEFLAGS
107 ),
108 # Dynamic linker, see ld(1).
109 qw(
110 LD_ASSUME_KERNEL
111 LD_AUDIT
112 LD_BIND_NOT
113 LD_BIND_NOW
114 LD_DYNAMIC_WEAK
115 LD_LIBRARY_PATH
116 LD_ORIGIN_PATH
117 LD_PREFER_MAP_32BIT_EXEC
118 LD_PRELOAD
119 ),
120 # Timezone, see tzset(3).
121 qw(
122 TZ
123 TZDIR
124 ),
125 # Dates, see getdate(3).
126 qw(
127 DATEMSK
128 ),
129 # Locale, see locale(1), locale(7).
130 qw(
131 LANG
132 LANGUAGE
133 LC_ALL
134 LC_CTYPE
135 LC_NUMERIC
136 LC_TIME
137 LC_COLLATE
138 LC_MONETARY
139 LC_MESSAGES
140 LC_PAPER
141 LC_NAME
142 LC_ADDRESS
143 LC_TELEPHONE
144 LC_MEASUREMENT
145 LC_IDENTIFICATION
146 ),
147 # Locale paths, see locale(7), catopen(3), iconv(1).
148 qw(
149 LOCPATH
150 I18NPATH
151 NLSPATH
152 GCONV_PATH
153 ),
154 # Build flags, see dpkg-buildpackage(1).
155 qw(
156 DEB_BUILD_OPTIONS
157 DEB_BUILD_PROFILES
158 ),
159 # DEB_flag_{SET,STRIP,APPEND,PREPEND} will be recorded after being merged
160 # with system config and user config.
161 # See deb-vendor(1).
162 qw(
163 DEB_VENDOR
164 ),
165 # See dpkg(1).
166 qw(
167 DPKG_ROOT
168 DPKG_ADMINDIR
169 ),
170 # See dpkg-architecture(1).
171 qw(
172 DPKG_DATADIR
173 ),
174 # See Dpkg::Vendor(3).
175 qw(
176 DPKG_ORIGINS_DIR
177 ),
178 # See dpkg-deb(1).
179 qw(
180 DPKG_DEB_COMPRESSOR_TYPE
181 DPKG_DEB_COMPRESSOR_LEVEL
182 ),
183 # See dpkg-gensymbols(1).
184 qw(
185 DPKG_GENSYMBOLS_CHECK_LEVEL
186 ),
187 # See <https://reproducible-builds.org/specs/source-date-epoch/>.
188 qw(
189 SOURCE_DATE_EPOCH
190 ),
191 );
192  
193 1 ▶sub get_build_env_allowed {
Subroutine get_build_env_allowed: called CC=1 SCAR=0.0
Pod documented
194 1 return @env_allowed;
195 }
196  
197 =back
198  
199 =head1 CHANGES
200  
201 =head2 Version 1.00 (dpkg 1.21.14)
202  
203 Mark the module as public.
204  
205 =cut
206  
207 1 1;
« Dpkg/BuildEnv.pm ↑ Summary Dpkg/Control/Hash.pm »