Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 558134

Summary: =dev-ruby/rack-1.6.2 USE=doc - src_compile(): Permission denied - doc/rdoc.css
Product: Gentoo Linux Reporter: Jeroen Roovers (RETIRED) <jer>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dev-ruby:rack-1.6.2:20150819-061336.log

Description Jeroen Roovers (RETIRED) gentoo-dev 2015-08-19 06:18:19 UTC
Created attachment 409408 [details]
dev-ruby:rack-1.6.2:20150819-061336.log

/var/tmp/portage/dev-ruby/rack-1.6.2/work # ls all/rack-1.6.2/doc/ -l
total 116
-rw-r--r-- 1 portage portage  2583 Aug 19 08:14 ChangeLog.html
-rw-r--r-- 1 portage portage   200 Aug 19 08:14 created.rid
drwxr-xr-x 2 portage portage  4096 Aug 19 08:14 fonts
-rw-r--r-- 3 root    root     6370 Aug 16 17:43 fonts.css
drwxr-xr-x 2 portage portage  4096 Aug 19 08:14 images
-rw-r--r-- 1 portage portage 17557 Aug 19 08:14 index.html
drwxr-xr-x 2 portage portage  4096 Aug 19 08:14 js
-rw-r--r-- 1 portage portage  6323 Aug 19 08:14 KNOWN-ISSUES.html
-rw-r--r-- 3 root    root     9137 Aug 16 17:43 rdoc.css
-rw-r--r-- 1 portage portage 19122 Aug 19 08:14 README_rdoc.html
-rw-r--r-- 1 portage portage 19903 Aug 19 08:14 SPEC.html
-rw-r--r-- 1 portage portage  4866 Aug 19 08:14 table_of_contents.html
Comment 1 Hans de Graaff gentoo-dev Security 2015-08-19 18:50:38 UTC
I can't reproduce this nor can I explain how these two css files would have different ownership, especially since you are using FEATURES="userpriv".

It's suspicious that the timestamps on these files are a few days older than all the other files. Remnants of an older attempt, perhaps?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-08-21 04:43:31 UTC
(In reply to Hans de Graaff from comment #1)
> I can't reproduce this nor can I explain how these two css files would have
> different ownership, especially since you are using FEATURES="userpriv".
> 
> It's suspicious that the timestamps on these files are a few days older than
> all the other files. Remnants of an older attempt, perhaps?

That's what gets unpacked during a normal emerge run.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-08-21 04:47:44 UTC
Or more specifically, the doc/ subdirectory is created and populated from contrib/ during src_compile().
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2015-08-21 04:54:08 UTC
rake copies files from the live system installed by rdoc over to the work directory.

# ls -l `locate fonts.css` |grep 17:43
-rw-r--r-- 1 root root 6370 Aug 16 17:43 /usr/lib/ruby/gems/1.9.1/gems/rdoc-4.1.2/lib/rdoc/generator/template/darkfish/fonts.css
-rw-r--r-- 1 root root 6370 Aug 16 17:43 /usr/lib/ruby/gems/2.0.0/gems/rdoc-4.1.2/lib/rdoc/generator/template/darkfish/fonts.css
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2015-08-21 04:54:25 UTC
Or maybe rdoc and not rake.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2015-08-21 05:12:17 UTC
/usr/lib/ruby/gems/2.1.0/gems/rdoc-4.1.2/lib/rdoc/generator/darkfish.rb:223 has

      FileUtils.cp stylesheet, '.', options

but I don't readily see it enable preserve/-p in options by default.
Comment 7 Hans de Graaff gentoo-dev Security 2015-08-23 08:31:03 UTC
(In reply to Jeroen Roovers from comment #6)
> /usr/lib/ruby/gems/2.1.0/gems/rdoc-4.1.2/lib/rdoc/generator/darkfish.rb:223
> has
> 
>       FileUtils.cp stylesheet, '.', options
> 
> but I don't readily see it enable preserve/-p in options by default.

The options are local to that method so preserve should not be set.

Even with preserve set it is strange that the files can be copied as root:root at one point, but not overwritten as root later in the same emerge action.

I've tried to reproduce this some more but it seems to work correctly for me in all cases that I've tried.

Does hppa have issues with copying hardlinks? (since that is how we populate the ruby target directories)
Comment 8 Hans de Graaff gentoo-dev Security 2024-02-02 07:01:07 UTC
Rack 1.6 has been removed some time ago.