Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229897 - rubygems ebuilds dont use find correctly
Summary: rubygems ebuilds dont use find correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-28 12:47 UTC by Henning Schild
Modified: 2008-06-29 06:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Schild 2008-06-28 12:47:51 UTC
Rubygems ebuilds use find without path and they also use xargs instead of -exec.

The incorrect use of find makes it fail i.e. on GentooFreeBSD but still this bug is not only related to BSD or ALT its a general problem that simply does not show up on linux.



See this manual at the end:
http://devmanual.gentoo.org/tools-reference/find/index.html

All the ebuilds should be patched like that:
-       find -name '.*' -type f -print0|xargs -0 rm
+       find "${S}" -name '.*' -type f -exec rm '{}' \;

Reproducible: Always

Steps to Reproduce:
1. emerge rubygems on gfbsd or on s system with no GNU-find

Actual Results:  
> ...
>  * Applying rubygems-1.2.0-setup.patch ...                                                    > [ ok ]
> find: illegal option -- n
> find: illegal option -- a
> find: illegal option -- m
> find: illegal option -- e
> find: .*: No such file or directory
> >>> Source unpacked.
> ...

These messages appear somewhere in the log but the merge does not fail.

Expected Results:  
Find should locate the files and they should be removed.



I checked for 1.2.0 the qlist output for the patched version and the original was the same. So there where no files found/deleted in version 1.2.0, maybe the statement is superfluous anyway.
Comment 1 Henning Schild 2008-06-28 13:20:44 UTC
I grepped through the tree for "find -" and this mistake seems pretty common. There are some hits on packages that are linux-only like sys-kernel/linux-headers or media-gfx/bootsplash-themes.

But there are also a lot of hits on packages that might be of interest for other OSs where find without path may not work. i.e:
dev-util/netbeans
dev/libs/openssl
dev-java/jexcelapi

These are only examples, actually there are quite some packages having that bug. For a complete list i suggest you to grep for yourself.

This is kind of a meta-bug and i dont know how to handle that so i reported it along with this one.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-28 14:09:41 UTC
"-name '.*'" should be superfluous.
Comment 3 Henning Schild 2008-06-28 19:09:31 UTC
No. That would match "*" instead of ".*". But as i said the whole thing seems to be superfluous, at least for 1.2.0.
Comment 4 Hans de Graaff gentoo-dev Security 2008-06-29 06:57:41 UTC
I wonder which version of rubygems shipped with these dot-files, since I could not find any... I've removed the find from all stable and new versions, the other versions will be removed shortly anyway.

Thanks for reporting!