This file is indexed.

/usr/lib/ruby/vendor_ruby/chef_compat/monkeypatches/chef/log.rb is in ruby-compat-resource 12.10.5-1.

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
require 'chef/log'

module ChefCompat
  module Monkeypatches
    module Log
      def caller_location
        # Pick the first caller that is *not* part of the Chef gem, that's the
        # thing the user wrote.
        @compat_resource_filter_paths ||=
          Gem.loaded_specs['chef'].require_paths.map { |p| File.join(Gem.loaded_specs['chef'].full_gem_path, p) } +
          Gem.loaded_specs['compat_resource'].require_paths.map { |p| File.join(Gem.loaded_specs['compat_resource'].full_gem_path, p) }

        caller.select { |c| !@compat_resource_filter_paths.any? { |path| c.start_with?(path) } }.first
      end
    end
  end
end

class<<::Chef::Log
  prepend ChefCompat::Monkeypatches::Log
end

class Chef
  class Log
    unless method_defined?(:deprecation)
      module ChefCompatDeprecation
        def deprecation(message, location=nil)
          Chef.log_deprecation(message, location)
        end
      end
      extend ChefCompatDeprecation
    end
  end
end