[BioBrew Users] Bad path manipulation in mrbayes rpm

Humberto Ortiz Zuazaga humberto at hpcf.upr.edu
Mon Mar 28 20:03:26 EST 2005


The mrbayes rpm in BioBrew 3.3 has a bug. It creates two files
/etc/profile.d/mrbayes.sh and /etc/profile.d/mrbayes.csh which are
broken.

The mrbayes.csh file completely mangles the path for csh users, and
since the default shell for Sun Grid Engine jobs is csh, it also wreks
all but the simplest of SGE jobs.

Attached is a patch prepared by Carlos Rodriguez here at the HPCf that
should produce working mrbayes.csh and mrbayes.sh.

-- 
Humberto Ortiz Zuazaga
Programmer-Archaeologist
High Performance Computing facility
University of Puerto Rico
http://www.hpcf.upr.edu/~humberto/

P.S. is it kosher to produce installed files in a spec file like that?
Shoudn't the files be in a source or patch section instead?

--- mrbayes.spec~	2005-03-28 16:14:54.000000000 -0400
+++ mrbayes.spec	2005-03-28 16:19:41.000000000 -0400
@@ -32,12 +32,12 @@
 
 cat >$RPM_BUILD_ROOT/etc/profile.d/mrbayes.sh << 'EOF'
 #!/bin/sh
-export PATH=$RPM_BUILD_ROOT/opt/BioBrew/%{name}/%{version}/bin:$PATH
+export PATH=/opt/BioBrew/%{name}/%{version}/bin:$PATH
 EOF
  
 cat >$RPM_BUILD_ROOT/etc/profile.d/mrbayes.csh << 'EOF'
 #!/bin/csh 
-setenv PATH '$RPM_BUILD_ROOT/opt/BioBrew/%{name}/%{version}/bin $PATH'
+set path=($path /opt/BioBrew/%{name}/%{version}/bin)
 EOF
 
 



More information about the BioBrew-Users mailing list