Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2908 - libdvdcss-1.1.1 creates bogus links in /
Summary: libdvdcss-1.1.1 creates bogus links in /
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-22 04:41 UTC by Andreas Simon
Modified: 2002-05-24 04:09 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 Andreas Simon 2002-05-22 04:41:55 UTC
Overview Description: 
media-libs/libdvdcss-1.1.1 installs bogus links into / 
 
Steps to Reproduce: 
emerge libdvdcss 
 
Actual Results: 
Two bogus pointers in /: 
 
# ll /libdvd* 
lrwxrwxrwx    1 root     root           23 05-21 15:16 /libdvdcss.so.0 -> 
/usr/lib/libdvdcss.so.0 
lrwxrwxrwx    1 root     root           23 05-21 15:16 /libdvdcss.so.1 -> 
/usr/lib/libdvdcss.so.1 
 
They both point to non-existent files. 
 
Expected Results: 
The ebuild should 
(1) not install anything into / 
(2) not install links to non-existent files. 
 
Additional Information: 
Cause of the error are evidently the dosym-commandos in the '0.0.3.* and 1.0.0 
compat' section of the ebuild. I don't have any older version of libdvdcss 
installed. 
 
Cheers
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-22 14:42:40 UTC
Hi, this is after a fresh merge:

>>> Regenerating /etc/ld.so.cache...
>>> media-libs/libdvdcss-1.1.1 merged.
>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * Regenerating GNU info directory index...
 * Processed 74 info files.

nosferatu init.d # ls /usr/lib/libdvdcss.* -l
-rw-r--r--    1 root     root        28072 May 22 21:38 /usr/lib/libdvdcss.a
-rwxr-xr-x    1 root     root          714 May 22 21:38 /usr/lib/libdvdcss.la
lrwxrwxrwx    1 root     root           18 May 22 21:38 /usr/lib/libdvdcss.so ->
libdvdcss.so.2.0.1
lrwxrwxrwx    1 root     root           18 May 22 21:38 /usr/lib/libdvdcss.so.0
-> libdvdcss.so.2.0.1
lrwxrwxrwx    1 root     root           18 May 22 21:38 /usr/lib/libdvdcss.so.1
-> libdvdcss.so.2.0.1
lrwxrwxrwx    1 root     root           18 May 22 21:38 /usr/lib/libdvdcss.so.2
-> libdvdcss.so.2.0.1
-rwxr-xr-x    1 root     root        29124 May 22 21:38 /usr/lib/libdvdcss.so.2.0.1
nosferatu init.d # 


So, it seems fine this side.  Anyhow, try -r1 and let me know.
Comment 2 Andreas Simon 2002-05-22 15:24:47 UTC
Okay, I just updated to libdvdcss-1.1.1-r1. Still the same thing. 
Here are the last lines of the output of 'emerge libdvdcss' 
 
>>> Merging media-libs/libdvdcss-1.1.1-r1 to / 
--- /usr/ 
--- /usr/lib/ 
>>> /usr/lib/libdvdcss.a 
>>> /usr/lib/libdvdcss.so.2.0.1 
>>> /usr/lib/libdvdcss.la 
--- /usr/share/ 
--- /usr/share/doc/ 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/ 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/README.gz 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/INSTALL.gz 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/COPYING.gz 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/AUTHORS.gz 
>>> /usr/share/doc/libdvdcss-1.1.1-r1/ChangeLog.gz 
--- /usr/include/ 
--- /usr/include/dvdcss/ 
>>> /usr/include/dvdcss/dvdcss.h 
>>> /usr/lib/libdvdcss.so.2 -> libdvdcss.so.2.0.1 
>>> /usr/lib/libdvdcss.so -> libdvdcss.so.2.0.1 
>>> /libdvdcss.so.0 -> /usr/lib/libdvdcss.so.0 
>>> /libdvdcss.so.1 -> /usr/lib/libdvdcss.so.1 
 
>>> Regenerating /etc/ld.so.cache... 
>>> media-libs/libdvdcss-1.1.1-r1 merged. 
 
>>> Recording media-libs/libdvdcss in "world" favorites file... 
 
 
 * Regenerating GNU info directory index... 
 * Processed 87 info files. 
 
See the these to lines: 
>>> /libdvdcss.so.0 -> /usr/lib/libdvdcss.so.0 
>>> /libdvdcss.so.1 -> /usr/lib/libdvdcss.so.1 
 
This package should not install something into / (root). 
And also note that those two links in / point into 
nothing. 
 
As I said the dosyms in the ebuild are wrong. 
I tracked it down to the following: 
$(ls -l ${D}/usr/lib/libdvdcss.so | /usr/bin/gawk '{print $11}') 
expands to "" (empty string). What follows is the 
dosym function gets called with only one argument. 
Instead of printing an error and exit, this function 
seems to create the two links in / as above. 
 
I can even prove my claim. I've done an 
'ebuild libdvdcss-1.1.1-r1.ebuild install'. Here is what 
I get: 
 
*** many lines deleted *** 
make[1]: Leaving directory 
`/var/tmp/portage/libdvdcss-1.1.1-r1/work/libdvdcss-1.1.1' 
/usr/lib/portage/bin/dosym: two arguments needed 
/usr/lib/portage/bin/dosym: return: can only `return' from a function or 
sourced script 
/usr/lib/portage/bin/dosym: two arguments needed 
/usr/lib/portage/bin/dosym: return: can only `return' from a function or 
sourced script 
/usr/lib/portage/bin/dodoc: TODO does not exist. 
strip: 
/var/tmp/portage/libdvdcss-1.1.1-r1/image/usr/lib/libdvdcss.so.2.0.1 
>>> Completed installing into /var/tmp/portage/libdvdcss-1.1.1-r1/image/ 
 
obsidian libdvdcss # 
 
Note the dosym warnings. Dosym should also be fixed, 
when called with only one argument is should print 
an error and exit and not create some bogus links. 
Otherwise this error will recur in some other ebuild. 
 
Have a nice day. 
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-22 17:40:43 UTC
OK, since you are so sure of your "claim", explain why I get on all my
three boxes (including other people):

---------------------snip--------------------------------
>>> /usr/lib/libdvdcss.so.2 -> libdvdcss.so.2.0.1
>>> /usr/lib/libdvdcss.so -> libdvdcss.so.2.0.1
>>> /usr/lib/libdvdcss.so.0 -> libdvdcss.so.2.0.1
>>> /usr/lib/libdvdcss.so.1 -> libdvdcss.so.2.0.1
---------------------snip--------------------------------

Now, if we can stop the tad of "I am right" or whatever (me included), it
would be nice to sort this out.

If I do:

nosferatu autoconf-2.53a # ls -l /usr/lib/libdvdcss.so  
lrwxrwxrwx    1 root     root           18 May 23 00:33 /usr/lib/libdvdcss.so ->
libdvdcss.so.2.0.1
nosferatu autoconf-2.53a # 

Then the name of the the file the symlink (if indeed one) points to, is in
the eleventh field.  Thus we can come to the conclusion:

1) ${D}/usr/lib/libdvdcss.so is not a symlink, or do not exist on your system.
2) Your ls do not output the same as mine (cant think why though)

Feedback would be appreciated, thanks


Comment 4 Andreas Simon 2002-05-22 20:38:55 UTC
Ahh, here we have it :) 
 
My output with ls: 
andreas@obsidian / $ ls -l /usr/lib/libdvdcss.so 
lrwxrwxrwx    1 root     root           18 05-23 02:49 /usr/lib/libdvdcss.so 
-> libdvdcss.so.2.0.1* 
 
So the symlink is the 10th field, not the 11th on my machine 
(Yes, I know, it's strange). Thus the ebuild does make assumptions 
on the (locale dependent) output of ls which are not valid for all 
machines/settings. 
 
Btw, I have LC_ALL=en_IE@euro. Why ls doesn't print the date 
like in your output is beyond me. I did'nt notice this until 
now. It seems Redhat and Mandrake both patches their locales, 
because I get 'normal' ls-output on those machines. 
 
So a fix for this is to set LC_ALL='C'in the ebuild right 
before the dosyms. This also works when someone plays with 
his LC_TIME or other locale variables. 
I tested this and it works fine. 
 
Thanks. 
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-23 16:29:24 UTC
Good stuff.  I added a bit more sanity checks, with the tempory locale change,
and would appreciate an ok from your side, thanks :)
Comment 6 Andreas Simon 2002-05-24 04:09:59 UTC
With libdvdcss-1.1.1-r2 the bug is fixed. Thanks.