Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99833 - clusterssh ebuild installs 2 copies of the same file instead of linking
Summary: clusterssh ebuild installs 2 copies of the same file instead of linking
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-21 13:36 UTC by Kevin Korb
Modified: 2010-09-10 19:00 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 Kevin Korb 2005-07-21 13:36:58 UTC
The cssh and crsh executables (they are perl scripts not binaries) are identical
files so they should be installed as links instead of independant files.  Or as
an alternative the crssh file could be left out as rsh is an insecure program
and shouldn't be used on a modern system anyways.

Reproducible: Always
Steps to Reproduce:
1.emerge clusterssh
2.compare /usr/bin/cssh and /usr/bin/crsh
3.

Actual Results:  
# ls -l /usr/bin/c[sr]sh
-rwxr-xr-x  1 root root 46466 Jul 21 16:24 /usr/bin/crsh*
-rwxr-xr-x  1 root root 46466 Jul 21 16:24 /usr/bin/cssh*
# md5sum /usr/bin/c[sr]sh
64314051cc3a6ca779cb87439c952111  /usr/bin/crsh
64314051cc3a6ca779cb87439c952111  /usr/bin/cssh
# equery b /usr/bin/cssh /usr/bin/crsh
[ Searching for file(s) /usr/bin/cssh,/usr/bin/crsh in *... ]
x11-terms/clusterssh-2.17 (/usr/bin/crsh)
x11-terms/clusterssh-2.17 (/usr/bin/cssh)

Expected Results:  
I would expect that crsh would be a symlink to cssh, they would both be links to
the same inode, or crsh would simply be left out.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-21 15:17:19 UTC
This is fixed in 2.20, which I just marked stable for x86. In the future, you
may like to test the ~arch packages before filing a bug.
Comment 2 Kevin Korb 2005-07-22 07:06:12 UTC
I waited until I had synced the unmasked ebuild for 2.20 just to make sure I was
right on this but the problem is still there:
# ls -l cssh crsh 
-rwxr-xr-x  1 root root 50317 Jul 22 09:59 crsh*
-rwxr-xr-x  1 root root 50317 Jul 22 09:59 cssh*
# equery b /usr/bin/crsh /usr/bin/cssh
[ Searching for file(s) /usr/bin/crsh,/usr/bin/cssh in *... ]
x11-terms/clusterssh-2.20 (/usr/bin/crsh)
x11-terms/clusterssh-2.20 (/usr/bin/cssh)
# md5sum cssh crsh
db0a06cf134c27e3aec4ef3d3857697a  cssh
db0a06cf134c27e3aec4ef3d3857697a  crsh

The install portion of the ebuild file has not changed at all:
# diff clusterssh-2.17.ebuild clusterssh-2.20.ebuild 
3c3
< # $Header:
/var/cvsroot/gentoo-x86/x11-terms/clusterssh/clusterssh-2.17.ebuild,v 1.3
2005/06/17 20:48:23 hansmi Exp $
---
> # $Header:
/var/cvsroot/gentoo-x86/x11-terms/clusterssh/clusterssh-2.20.ebuild,v 1.2
2005/07/21 22:16:47 spyderous Exp $
11c11
< KEYWORDS="ppc x86"
---
> KEYWORDS="~ppc x86"
19c19
<       cd ${WORKDIR}
---
>       cd ${WORKDIR}/clusterssh_${PV}

In the future don't assume I haven't done my homework before submitting a bug. 
I didn't try installing the masked versions but I did look at the ebuild files.
 I even noticed that 3.17.1 which is still masked wouldn't have this problem as
it doesn't install crsh at all.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-22 11:01:47 UTC
Looks like it's me who assumed -- in the tarball it's symlinked, but somehow
that gets turned into two copies after installation.

Although, have you noticed 3.17? It doesn't install crsh at all. I'd prefer to
just close this with 'latest version works' instead of trying to figure out
whether dobin or 'install' follows symlinks rather than installing them, if
that's ok with you.
Comment 4 Kevin Korb 2005-07-22 12:21:55 UTC
It doesn't really bother me as I simply deleted the crsh file after doing the
install however I would say that the proper solution is to either use dosym to
get a symlink for crsh or simply leave it out like 3.17.1 does. 

Generating a man page from the perldoc would also be a nice feature until 3.17.1
is ready.
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-22 12:41:56 UTC
I'll happily accept a patch to do both of those.
Comment 6 Kevin Korb 2005-07-22 13:02:25 UTC
OK, Here you go...
19a20
>       perldoc -onroff -T ./cssh > cssh.1
21c22,24
<       dobin {cchp,crsh,cssh}
---
>       doman cssh.1
>       dobin {cchp,cssh}
>       dosym /usr/bin/cssh /usr/bin/crsh

Or you can just leave out the dosym line if you don't want to have crsh installed.
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-22 13:37:07 UTC
In the future, you might like to provide unified diffs (diff -u). Most people
prefer them to those ugly ones. =)
Comment 8 Kevin Korb 2005-07-22 13:42:35 UTC
OK, Here you go:
--- /usr/portage/x11-terms/clusterssh/clusterssh-2.20.ebuild    2005-07-21
18:36:00.000000000 -0400
+++ /usr/portage/local/x11-terms/clusterssh/clusterssh-2.20.ebuild     
2005-07-22 15:59:25.000000000 -0400
@@ -17,7 +17,10 @@
 
 src_install() {
        cd ${WORKDIR}/clusterssh_${PV}
+       perldoc -onroff -T ./cssh > cssh.1
        dodoc LICENSE
-       dobin {cchp,crsh,cssh}
+       doman cssh.1
+       dobin {cchp,cssh}
+       dosym /usr/bin/cssh /usr/bin/crsh
 }
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-22 19:53:42 UTC
Done, thanks!