This file is indexed.

/usr/share/boost-build/src/tools/bzip2.jam is in libboost1.65-tools-dev 1.65.1+dfsg-0ubuntu5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# Copyright (c) 2010 Vladimir Prus.
# Copyright (c) 2013 Steven Watanabe
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)

# Supports the bzip library
#
# After 'using bzip2', the following targets are available:
#
# /bzip2//bzip2 -- The bzip library

import project ;
import ac ;
import errors ;
import "class" : new ;
import targets ; 
import path ;
import modules ;
import errors ;
import indirect ;
import make ;
import os ;
import print ;
import property ;
import property-set ;

header = bzlib.h ;
names = bz2 ;

sources = blocksort.c bzlib.c compress.c crctable.c
          decompress.c huffman.c randtable.c ;

library-id = 0 ;

if --debug-configuration in [ modules.peek : ARGV ]
{
    .debug =  true ;
}

# Initializes the bzip library.
#
# bzip can be configured either to use pre-existing binaries
# or to build the library from source.
#
# Options for configuring a prebuilt bzip::
#
#   <search>
#       The directory containing the bzip binaries.
#   <name>
#       Overrides the default library name.
#   <include>
#       The directory containing the bzip headers.
#
# If none of these options is specified, then the environmental
# variables BZIP2_LIBRARY_PATH, BZIP2_NAME, and BZIP2_INCLUDE will
# be used instead.
#
# Options for building bzip from source::
#
#   <source>
#       The bzip source directory.  Defaults to the environmental variable
#       BZIP2_SOURCE.
#   <tag>
#       A rule which computes the actual name of the compiled
#       libraries based on the build properties.  Ignored
#       when using precompiled binaries.
#   <build-name>
#       The base name to use for the compiled library.  Ignored
#       when using precompiled binaries.
#
# Examples::
#
#   # Find bzip in the default system location
#   using bzip2 ;
#   # Build bzip from source
#   using bzip2 : 1.0.6 : <source>/home/sergey/src/bzip2-1.0.6 ;
#   # Find bzip in /usr/local
#   using bzip2 : 1.0.6
#     : <include>/usr/local/include <search>/usr/local/lib ;
#   # Build bzip from source for msvc and find
#   # prebuilt binaries for gcc.
#   using bzip2 : 1.0.6 : <source>C:/Devel/src/bzip2-1.0.6 : <toolset>msvc ;
#   using bzip2 : 1.0.6 : : <toolset>gcc ;
#
rule init (
    version ?
    # The bzip version (currently ignored)

    : options *
    # A list of the options to use

    : requirements *
    # The requirements for the bzip target

    : is-default ?
    # Default configurations are only used when bzip
    # has not yet been configured.
    )
{
    local caller = [ project.current ] ;

    if ! $(.initialized)
    {
        .initialized = true ;

        project.initialize $(__name__) ;
        .project = [ project.current ] ;
        project bzip2 ;
    }

    local library-path = [ property.select <search> : $(options) ] ;
    library-path = $(library-path:G=) ;
    local include-path = [ property.select <include> : $(options) ] ;
    include-path = $(include-path:G=) ;
    local source-path = [ property.select <source> : $(options) ] ;
    source-path = $(source-path:G=) ;
    local library-name = [ property.select <name> : $(options) ] ;
    library-name = $(library-name:G=) ;
    local tag = [ property.select <tag> : $(options) ] ;
    tag = $(tag:G=) ;
    local build-name = [ property.select <build-name> : $(options) ] ;
    build-name = $(build-name:G=) ;

    condition = [ property-set.create $(requirements) ] ;
    condition = [ property-set.create [ $(condition).base ] ] ;

    local no-build-from-source ;
    # Ignore environmental BZIP2_SOURCE if this initialization
    # requested to search for a specific pre-built library.
    if $(library-path) || $(include-path) || $(library-name)
    {
        if $(source-path) || $(tag) || $(build-name)
        {
            errors.user-error "incompatible options for bzip2:"
                [ property.select <search> <include> <name> : $(options) ] "and"
                [ property.select <source> <tag> <build-name> : $(options) ] ;
        }
    }
    else
    {
        source-path ?= [ modules.peek : BZIP2_SOURCE ] ;
    }

    if $(.configured.$(condition))
    {
        if $(is-default)
        {
            if $(.debug)
            {
                ECHO "notice: [bzip2] bzip is already configured" ;
            }
        }
        else
        {
            errors.user-error "bzip is already configured" ;
        }
        return ;
    }
    else if $(source-path)
    {
        build-name ?= bz2 ;
        library-id = [ CALC $(library-id) + 1 ] ;
        tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
        if $(tag) && ! [ MATCH ^([^%]*)%([^%]+)$ : $(tag) ]
        {
            tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
        }
        sources = [ path.glob $(source-path) : $(sources) ] ;
        def-file = [ path.glob $(source-path) : libbz2.def ] ;
        if $(.debug)
        {
            ECHO "notice: [bzip2] Building bzip from source as $(build-name)" ;
            if $(condition)
            {
                ECHO "notice: [bzip2] Condition" [ $(condition).raw ] ;
            }
            if $(sources)
            {
                ECHO "notice: [bzip2] found bzip source in $(source-path)" ;
            }
            else
            {
                ECHO "warning: [bzip2] could not find bzip source in $(source-path)" ;
            }
        }
        local target ;
        if $(sources)
        {
            if ! $(.def-file-target)
            {
                .def-file-target = [ targets.create-metatarget make-target-class
                  : $(.project) : libbz2.def : $(def-file)
                  : <action>@bzip2.make-bz2-def-file ]
                  ;
            }
            target = [ targets.create-typed-target LIB : $(.project)
              : $(build-name).$(library-id)
              : $(sources)
              : $(requirements)
                <tag>@$(tag)
                <include>$(source-path)
                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
                <link>shared:<def-file>libbz2.def
              :
              : <include>$(source-path) ] ;
        }

        local mt = [ new ac-library bzip2 : $(.project) : $(condition) ] ;
        $(mt).set-header $(header) ;
        $(mt).set-default-names $(names) ;
        if $(target)
        {
            $(mt).set-target $(target) ;
        }
        targets.main-target-alternative $(mt) ;
    }
    else
    {
        if $(.debug)
        {
            ECHO "notice: [bzip2] Using pre-installed library" ;
            if $(condition)
            {
                ECHO "notice: [bzip2] Condition" [ $(condition).raw ] ;
            }
        }

        local mt = [ new ac-library bzip2 : $(.project) : $(condition) :
            $(include-path) : $(library-path) : $(library-name) ] ;
        $(mt).set-header $(header) ;
        $(mt).set-default-names $(names) ;
        targets.main-target-alternative $(mt) ;
    }
    .configured.$(condition) = true ;
}

if [ os.name ] = NT
{
    local rule read-file ( file )
    {
        return [ SPLIT_BY_CHARACTERS [ SHELL "type \"$(file:G=)\" 2>nul" ] : "\n" ] ;
    }
}
else if [ os.name ] = VMS
{
    local rule read-file ( file )
    {
        return [ SPLIT_BY_CHARACTERS [ SHELL "PIPE TYPE $(file:W) 2>NL:" ] : "\n" ] ;
    }
}
else
{
    local rule read-file ( file )
    {
        return [ SPLIT_BY_CHARACTERS [ SHELL "cat \"$(file:G=)\" 2>/dev/null" ]  : "\n" ] ;
    }
}

rule make-bz2-def-file ( target : source : properties * )
{
    print.output $(target) ;
    for local line in [ read-file $(source) ]
    {
        if ! [ MATCH "(LIBRARY[ \t]+LIBBZ2)" : $(line) ]
        {
            print.text $(line) : yes ;
        }
    }
}