[From nobody Tue Jul  7 14:51:08 2026
Received: (at submit) by bugs.debian.org; 16 Sep 2014 06:38:48 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
 (2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-13.3 required=4.0 tests=BAYES_00,
 DKIM_ADSP_CUSTOM_MED,FOURLA,FREEMAIL_FROM,HAS_PACKAGE,NML_ADSP_CUSTOM_MED,
 SPF_SOFTFAIL,XMAILER_REPORTBUG,X_DEBBUGS_CC autolearn=ham
 version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 186; hammy, 151; neutral, 370; spammy,
 0. spammytokens: hammytokens:0.000-+--H*x:6.4.4,
 0.000-+--H*UA:6.4.4, 
 0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug
Return-path: &lt;hramrach@gmail.com&gt;
Received: from mail.centronet.cz ([217.195.160.3])
 by buxtehude.debian.org with esmtp (Exim 4.80)
 (envelope-from &lt;hramrach@gmail.com&gt;) id 1XTmPY-00038f-5d
 for submit@bugs.debian.org; Tue, 16 Sep 2014 06:38:48 +0000
Received: from localhost (mail [127.0.0.1])
 by mail.centronet.cz (Postfix) with ESMTP id 62BF7324DE6
 for &lt;submit@bugs.debian.org&gt;; Tue, 16 Sep 2014 08:05:30 +0200 (CEST)
X-Virus-Scanned: amavisd-new at centronet.cz
Received: from mail.centronet.cz ([127.0.0.1])
 by localhost (mail.centronet.cz [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 5RI7xEdu1P9W for &lt;submit@bugs.debian.org&gt;;
 Tue, 16 Sep 2014 08:05:29 +0200 (CEST)
Received: from [127.0.1.1] (2-166-195-217.cust.centrio.cz [217.195.166.2])
 by mail.centronet.cz (Postfix) with ESMTP id 01599324DDF
 for &lt;submit@bugs.debian.org&gt;; Tue, 16 Sep 2014 08:05:28 +0200 (CEST)
Content-Type: multipart/mixed; boundary=&quot;===============2245266184542281348==&quot;
MIME-Version: 1.0
From: Michal Suchanek &lt;hramrach@gmail.com&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: rake: runs programs from /usr/local
Message-ID: &lt;20140916060528.21192.16727.reportbug@iscsi&gt;
X-Mailer: reportbug 6.4.4
Date: Tue, 16 Sep 2014 08:05:28 +0200
X-Debbugs-Cc: hramrach@gmail.com
Delivered-To: submit@bugs.debian.org

This is a multi-part MIME message sent by reportbug.


--===============2245266184542281348==
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: rake
Version: 0.9.2.2-4
Severity: normal

Hello,

I tried building a new version of ruby extension because the one in
debian is broken.

The extension is found here: https://github.com/larskanis/opengl.git

AFAICT it has no reference to local:

~/opengl $ git grep local
examples/RedBook/dof.rb:  local_view = [ 0.0 ]
examples/RedBook/dof.rb:  glLightModel(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view)
examples/RedBook/fog.rb:  local_view = [0.0]
examples/RedBook/fog.rb:  glLightModel(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view)
examples/RedBook/material.rb:  local_view = [ 0.0 ]
examples/RedBook/material.rb:  glLightModel(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view)
examples/RedBook/teapots.rb:  local_view = [0.0]
examples/RedBook/teapots.rb:  glLightModel(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view)
examples/misc/plane.rb:# *  This program demonstrates the use of local versus
examples/misc/plane.rb:    local_light = [ 1.0, 1.0, 1.0, 1.0 ];
examples/misc/plane.rb:    Gl.glLight(Gl::GL_LIGHT0, Gl::GL_POSITION, local_light);

but rake tries to run /usr/local/bin/rdoc1.9.1

AFAICT it only includes files from Debian installed locations and is not
contaminated by some code I would have laying around (including Q175 to
print loaded files):
~/opengl $ ruby1.9.1 -I ~/camp -rq175 /usr/bin/rake newb
/home/hramrach/camp/q175.rb:58: Use RbConfig instead of obsolete and
deprecated Config.
require: rake/version =&gt; /usr/lib/ruby/vendor_ruby/rake/version.rb
require: fileutils =&gt; /usr/lib/ruby/1.9.1/fileutils.rb
require: singleton =&gt; /usr/lib/ruby/1.9.1/singleton.rb
require: monitor =&gt; /usr/lib/ruby/1.9.1/monitor.rb
require: optparse =&gt; /usr/lib/ruby/1.9.1/optparse.rb
require: ostruct =&gt; /usr/lib/ruby/1.9.1/ostruct.rb
require: rake/ext/core =&gt; /usr/lib/ruby/vendor_ruby/rake/ext/core.rb
require: rake/invocation_exception_mixin =&gt; /usr/lib/ruby/vendor_ruby/rake/invocation_exception_mixin.rb
require: rake/task =&gt; /usr/lib/ruby/vendor_ruby/rake/task.rb
require: rake/early_time =&gt; /usr/lib/ruby/vendor_ruby/rake/early_time.rb
require: rake/file_task =&gt; /usr/lib/ruby/vendor_ruby/rake/file_task.rb
require: rake/file_creation_task =&gt; /usr/lib/ruby/vendor_ruby/rake/file_creation_task.rb
require: shellwords =&gt; /usr/lib/ruby/1.9.1/shellwords.rb
require: rake/task_manager =&gt; /usr/lib/ruby/vendor_ruby/rake/task_manager.rb
require: rake/alt_system =&gt; /usr/lib/ruby/vendor_ruby/rake/alt_system.rb
require: rake/win32 =&gt; /usr/lib/ruby/vendor_ruby/rake/win32.rb
require: rake/application =&gt; /usr/lib/ruby/vendor_ruby/rake/application.rb
require: rake/ext/module =&gt; /usr/lib/ruby/vendor_ruby/rake/ext/module.rb
require: rake/ext/string =&gt; /usr/lib/ruby/vendor_ruby/rake/ext/string.rb
require: rake/ext/time =&gt; /usr/lib/ruby/vendor_ruby/rake/ext/time.rb
require: rake/task_argument_error =&gt; /usr/lib/ruby/vendor_ruby/rake/task_argument_error.rb
require: rake/rule_recursion_overflow_error =&gt; /usr/lib/ruby/vendor_ruby/rake/rule_recursion_overflow_error.rb
require: rake/rake_module =&gt; /usr/lib/ruby/vendor_ruby/rake/rake_module.rb
require: rake/pseudo_status =&gt; /usr/lib/ruby/vendor_ruby/rake/pseudo_status.rb
require: rake/task_arguments =&gt; /usr/lib/ruby/vendor_ruby/rake/task_arguments.rb
require: rake/invocation_chain =&gt; /usr/lib/ruby/vendor_ruby/rake/invocation_chain.rb
require: rake/multi_task =&gt; /usr/lib/ruby/vendor_ruby/rake/multi_task.rb
require: rake/file_utils =&gt; /usr/lib/ruby/vendor_ruby/rake/file_utils.rb
require: rake/file_utils_ext =&gt; /usr/lib/ruby/vendor_ruby/rake/file_utils_ext.rb
require: rake/dsl_definition =&gt; /usr/lib/ruby/vendor_ruby/rake/dsl_definition.rb
require: rake/cloneable =&gt; /usr/lib/ruby/vendor_ruby/rake/cloneable.rb
require: rake/pathmap =&gt; /usr/lib/ruby/vendor_ruby/rake/pathmap.rb
require: rake/file_list =&gt; /usr/lib/ruby/vendor_ruby/rake/file_list.rb
require: rake/default_loader =&gt; /usr/lib/ruby/vendor_ruby/rake/default_loader.rb
require: rake/name_space =&gt; /usr/lib/ruby/vendor_ruby/rake/name_space.rb
require: rake =&gt; /usr/lib/ruby/vendor_ruby/rake.rb
require: rake/tasklib =&gt; /usr/lib/ruby/vendor_ruby/rake/tasklib.rb
require: rake/testtask =&gt; /usr/lib/ruby/vendor_ruby/rake/testtask.rb
require: psych =&gt; /usr/lib/ruby/1.9.1/psych.rb
require: yaml =&gt; /usr/lib/ruby/1.9.1/yaml.rb
require: hoe/rake =&gt; /usr/lib/ruby/vendor_ruby/hoe/rake.rb
require: hoe =&gt; /usr/lib/ruby/vendor_ruby/hoe.rb
require: rake/clean =&gt; /usr/lib/ruby/vendor_ruby/rake/clean.rb
require: pathname =&gt; /usr/lib/ruby/1.9.1/pathname.rb
require: rake/baseextensiontask =&gt; /usr/lib/ruby/vendor_ruby/rake/baseextensiontask.rb
require: rubygems/package_task =&gt; /usr/lib/ruby/1.9.1/rubygems/package_task.rb
require: rake/extensiontask =&gt; /usr/lib/ruby/vendor_ruby/rake/extensiontask.rb
require: /usr/lib/ruby/vendor_ruby/hoe/clean.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/clean.rb
require: rubygems/remote_fetcher =&gt; /usr/lib/ruby/1.9.1/rubygems/remote_fetcher.rb
require: /usr/lib/ruby/vendor_ruby/hoe/deps.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/deps.rb
require: /usr/lib/ruby/vendor_ruby/hoe/debug.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/debug.rb
require: /usr/lib/ruby/vendor_ruby/hoe/test.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/test.rb
require: /usr/lib/ruby/vendor_ruby/hoe/flay.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/flay.rb
require: /usr/lib/ruby/vendor_ruby/hoe/package.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/package.rb
require: /usr/lib/ruby/vendor_ruby/hoe/gemcutter.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/gemcutter.rb
require: /usr/lib/ruby/vendor_ruby/hoe/flog.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/flog.rb
require: /usr/lib/ruby/vendor_ruby/hoe/newb.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/newb.rb
require: /usr/lib/ruby/vendor_ruby/hoe/publish.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/publish.rb
require: /usr/lib/ruby/vendor_ruby/hoe/signing.rb =&gt; /usr/lib/ruby/vendor_ruby/hoe/signing.rb
require: time =&gt; /usr/lib/ruby/1.9.1/time.rb
load: /home/hramrach/opengl/Rakefile =&gt; /home/hramrach/opengl/Rakefile
sudo gem1.9.1 install rake-compiler --version ~&gt; 0.7 --no-rdoc --no-ri
sudo gem1.9.1 install rdoc --version ~&gt; 3.10 --no-rdoc --no-ri
sudo gem1.9.1 install glu --version ~&gt; 8.1 --no-rdoc --no-ri
sudo gem1.9.1 install glut --version ~&gt; 8.1 --no-rdoc --no-ri
rm -rf doc
/usr/local/bin/rdoc1.9.1 --title opengl-0.9.0 Documentation -o doc
--main README.rdoc lib History.rdoc Manifest.txt README.rdoc
examples/OrangeBook/3Dlabs-License.txt README.rdoc History.rdoc
rake aborted!
Command failed with status (127): [/usr/local/bin/rdoc1.9.1 --title
opengl-0....]

Tasks: TOP =&gt; newb =&gt; docs
(See full trace by running task with --trace)


How did it figure out to run the non-existent /usr/local/bin/rdoc1.9.1?

Thanks

Michal


-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (990, 'stable'), (171, 'unstable'), (151, 'experimental'), (121, 'precise-updates'), (121, 'precise-security'), (121, 'precise'), (101, 'stable'), (101, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rake depends on:
ii  ruby                          1:1.9.3
ii  ruby1.8 [ruby-interpreter]    1.8.7.358-7.1+deb7u1
ii  ruby1.9.1 [ruby-interpreter]  1.9.3.194-8.1+deb7u2
ii  ruby2.1 [ruby-interpreter]    2.1.2-4

Versions of packages rake recommends:
ii  zip  3.0-6

rake suggests no packages.

-- no debconf information

--===============2245266184542281348==
Content-Type: text/x-ruby; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=&quot;q175.rb&quot;

unless Kernel.constants.include? &quot;Q175&quot;

require 'rbconfig'

module Kernel

  module Q175

    def self.get_exts
      exts = [&quot;rb&quot;, Config::CONFIG[&quot;DLEXT&quot;], Config::CONFIG[&quot;DLEXT2&quot;]]
      exts.pop unless exts[-1].length &gt; 0
      exts
    end

    def self.dir_separator? num
      num == File::SEPARATOR[0] ||
        ( File::ALT_SEPARATOR &amp;&amp; num == File::ALT_SEPARATOR[0])
    end

    def self.dot? num
      num == &quot;.&quot;[0]
    end

    def self.path_absolute? path
      (dir_separator? path[0]) || 
        ( (dot? path[0]) &amp;&amp; (dir_separator? path[1]) )
    end

    def self.scan_single file
      if path_absolute? file
        return file if File.exists? file
      else
        $:.each{|path| abs = path + File::Separator + file ; return abs if File.exists? abs}
      end
      nil
    end

    def self.scan file
      exts = get_exts
      if exts.map{|e| Regexp.new &quot;\\.#{e}\\Z&quot;}.inject(false){|v,re| v || (file =~ re)} 
        files = [file]
      else
        files = exts.map{|e| &quot;#{file}.#{e}&quot;}
      end
      files.each{|f| 
        s = scan_single f
        return s if s
      }
      nil
    end

    def self.stdlib?
      Kernel::caller(2)[0] =~ Q175::Stdlib
    end

    Load = Kernel.instance_method :load
    Require = Kernel.instance_method :require
    Stdlib = Regexp.new &quot;^#{Config::CONFIG['rubylibdir']}&quot;

  end

  undef_method :load
  def load file, wrap=false
    loc = Q175::scan_single file
    res = Q175::Load.bind(self).call file, wrap
    STDERR.puts &quot;load: #{file} =&gt; #{loc}&quot; if res &amp;&amp; loc &amp;&amp; ! Q175::stdlib?
    res
  end

  undef_method :require
  def require file
    loc = Q175::scan file
    res = Q175::Require.bind(self).call file
    STDERR.puts &quot;require: #{file} =&gt; #{loc}&quot; if res &amp;&amp; loc &amp;&amp; ! Q175::stdlib?
    res
  end

end

end

if $0 == __FILE__
  ARGV.each{|name| puts &quot;require: #{name} =&gt; #{Kernel::Q175::scan name}&quot; }
end

--===============2245266184542281348==--
]