ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/oracle.spec
(Generate patch)

Comparing COMP/CMSDIST/oracle.spec (file contents):
Revision 1.41 by muzaffar, Tue Mar 31 09:46:37 2009 UTC vs.
Revision 1.56 by diego, Mon Feb 1 13:24:59 2010 UTC

# Line 1 | Line 1
1 < ### RPM external oracle 10.2.0.3
1 > ### RPM external oracle 11.2.0.1.0a
2   ## INITENV SET ORACLE_HOME %i
3 + ## BUILDIF case `uname`:`uname -p` in Linux:i*86 ) true ;; Linux:x86_64 ) true ;;  Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
4  
5 < # TODO:  actually there is an instantclient for OSX now...  we could make it deployable
5 < Provides: libgcc_s.so.1()(64bit)
6 < Provides: libgcc_s.so.1(GCC_3.0)(64bit)
7 < %if "%(echo %cmsplatf | cut -b 1,2,3 )" == "osx"
8 < Source0: none
9 < %else
10 < Source0: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/basic-%cmsos.zip
11 < Source1: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/sdk-%cmsos.zip
12 < Source2: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/sqlplus-%cmsos.zip
13 < Source3: none
14 < Source4: none
15 < Source5: none
5 > Source0: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/oracle_lcg.tgz
6   Source9: oracle-license
7 < Source10: http://www.oracle.com/technology/tech/oci/occi/downloads/occi_gcc343_102020.tar.gz
18 < %if "%{cmsos}" == "slc4_ia32"
19 < Source3: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/basic-slc4_amd64.zip
20 < Source4: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/sdk-slc4_amd64.zip
21 < Source5: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/sqlplus-slc4_amd64.zip
22 < %endif
23 < %endif
7 > Requires: fakesystem
8  
9   ## INITENV +PATH SQLPATH %i/bin
10 < %prep
11 < case %cmsos in
28 <    osx* )
29 <    ;;
30 <    slc4_ia32 )
31 <      rm -rf instantclient_*
32 <      rm -rf libocci.so.10.1 libocci10.a
33 <      unzip -o -u %_sourcedir/basic-%cmsos.zip
34 <      unzip -o -u %_sourcedir/sdk-%cmsos.zip
35 <      unzip -o -u %_sourcedir/sqlplus-%cmsos.zip
36 <      rm -rf oracle64; mkdir oracle64
37 <      cd oracle64
38 <      unzip -o -u %_sourcedir/basic-slc4_amd64.zip
39 <      unzip -o -u %_sourcedir/sdk-slc4_amd64.zip
40 <      unzip -o -u %_sourcedir/sqlplus-slc4_amd64.zip
41 <      cd ..
42 <      ;;
43 <    * )
44 <        rm -rf instantclient_*
45 <        rm -rf libocci.so.10.1 libocci10.a
46 <        unzip -o -u %_sourcedir/basic-%cmsos.zip
47 <        unzip -o -u %_sourcedir/sdk-%cmsos.zip
48 <        unzip -o -u %_sourcedir/sqlplus-%cmsos.zip
49 <    ;;
50 < esac
51 <
52 < %if "%{realversion}" == "10.2.0.3"
53 < case %cmsos in
54 <    slc4_ia32 )
55 <        tar xzvf %_sourcedir/occi_gcc343_102020.tar.gz
56 <        cd oracle64
57 <        tar xzvf %_sourcedir/occi_gcc343_102020.tar.gz
58 <    ;;
59 < esac
60 < %endif
10 > %prep
11 > %setup -n %realversion
12  
13   %build
14 +
15   %install
16 < mkdir -p %i/bin %i/etc/profile.d %i/lib %i/admin %i/java %i/demo %i/include
16 > mkdir -p %i/bin %i/lib %i/doc %i/include
17   cp %_sourcedir/oracle-license %{i}/oracle-license
18 < cp -p instantclient*/lib* %i/lib
19 < cp -p instantclient*/sqlplus %i/bin
20 < cp -p instantclient*/glogin.sql %i/bin
21 < cp -p instantclient*/*.jar %i/java
22 < cp -p instantclient*/sdk/demo/* %i/demo
71 < cp -p instantclient*/sdk/include/* %i/include
72 < %if "%cmsplatf" == "slc4_ia32_gcc345"
73 < echo Copying libocci libraries for slc4_ia32_gcc345
74 < [ -f libocci.so.10.1 ] && mv libocci.so.10.1 %i/lib
75 < [ -f libocci10.a ] && mv libocci10.a %i/lib
76 < mkdir %i/oracle64
77 < mkdir -p %i/oracle64/bin %i/oracle64/lib %i/oracle64/admin %i/oracle64/java %i/oracle64/demo %i/oracle64/include
78 < cp -p oracle64/instantclient*/lib* %i/oracle64/lib
79 < cp -p oracle64/instantclient*/sqlplus %i/oracle64/bin
80 < cp -p oracle64/instantclient*/glogin.sql %i/oracle64/bin
81 < cp -p oracle64/instantclient*/*.jar %i/oracle64/java
82 < cp -p oracle64/instantclient*/sdk/demo/* %i/oracle64/demo
83 < cp -p oracle64/instantclient*/sdk/include/* %i/oracle64/include
84 < (cd %i/oracle64/lib && ln -s libclntsh.* $(echo libclntsh.* | sed 's/[0-9.]*$//'))
85 < (cd %i/oracle64/lib && ln -s libocci.* $(echo libocci.* | sed 's/[0-9.]*$//'))
86 < cat << \EOF_SLC4_64BIT_ENV_SCRIPT_SH >%i/etc/profile.d/init64.sh
87 < #!/bin/sh
88 < bostype=`uname`:`uname -p`
89 < case $bostype in
90 <  Linux:i*86 )
91 <    if ldd /usr/bin/gcc | grep -q /lib64/ ; then
92 <      bostype=Linux:x86_64
93 <    fi
94 <  ;;
95 < esac
96 < case $bostype in
97 <  Linux:x86_64 )
98 <    PATH="%i/oracle64/bin:$PATH"; export PATH
99 <    LD_LIBRARY_PATH="%i/oracle64/lib:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH
100 <    DYLD_FALLBACK_LIBRARY_PATH="%i/oracle64/lib:$DYLD_FALLBACK_LIBRARY_PATH"; export DYLD_FALLBACK_LIBRARY_PATH
101 <    SQLPATH="%i/oracle64/bin:$SQLPATH"; export SQLPATH
102 <  ;;
103 < esac
104 < EOF_SLC4_64BIT_ENV_SCRIPT_SH
105 < cat << \EOF_SLC4_64BIT_ENV_SCRIPT_CSH >%i/etc/profile.d/init64.csh
106 < #!/bin/csh
107 < set bostype=`uname`:`uname -p`
108 < switch ($bostype)
109 <  case Linux:i*86:
110 <    ldd /usr/bin/gcc | grep -q /lib64/
111 <    if  ("X$?" == "X0") set bostype=Linux:x86_64
112 <    breaksw
113 < endsw
114 < switch ($bostype)
115 <  case Linux:x86_64:
116 <    setenv PATH "%i/oracle64/bin:$PATH"
117 <    setenv LD_LIBRARY_PATH "%i/oracle64/lib:$LD_LIBRARY_PATH"
118 <    setenv DYLD_FALLBACK_LIBRARY_PATH "%i/oracle64/lib:$DYLD_FALLBACK_LIBRARY_PATH"
119 <    setenv SQLPATH "%i/oracle64/bin:$SQLPATH"
120 <    breaksw
121 < endsw
122 < EOF_SLC4_64BIT_ENV_SCRIPT_CSH
123 < %endif
124 < (cd %i/lib && ln -s libclntsh.* $(echo libclntsh.* | sed 's/[0-9.]*$//'))
125 < (cd %i/lib && ln -s libocci.* $(echo libocci.* | sed 's/[0-9.]*$//'))
126 < chmod -R g-w %i
127 < touch %i/etc/profile.d/init64.sh
128 < touch %i/etc/profile.d/init64.csh
18 > cp -r bin/* %i/bin/
19 > cp -r lib/* %i/lib/
20 > cp -r doc/* %i/doc/
21 > cp -r include/* %i/include/
22 >
23  
24   # SCRAM ToolBox toolfile
25   mkdir -p %i/etc/scram.d
26 < cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
27 < <doc type=BuildSystem::ToolDoc version=1.0>
28 < <Tool name=%n version=%v>
29 < <lib name=clntsh>
30 < <lib name=occi>
31 < <lib name=nnz10>
32 < <Client>
33 < <Environment name=ORACLE_BASE default="%i"></Environment>
34 < <Environment name=ORACLE_ADMINDIR></Environment>
35 < <Environment name=LIBDIR value="$ORACLE_BASE/lib"></Environment>
36 < <Environment name=BINDIR value="$ORACLE_BASE/bin"></Environment>
37 < <Environment name=INCLUDE value="$ORACLE_BASE/include"></Environment>
38 < </Client>
39 < <use name=sockets>
40 < <Runtime name=PATH value="$BINDIR" type=path>
41 < <Runtime name=NLS_LANG value="american_america.WE8ISO8859P9">
42 < <Runtime name=NLS_DATE_FORMAT value="DD-MON-FXYYYY">
43 < <Runtime name=ORA_NLS33 default="$ORACLE_BASE/ocommon/nls/admin/data">
44 < <Runtime name=ORACLE_HOME default="$ORACLE_BASE">
45 < <Runtime name=TNS_ADMIN default="$ORACLE_ADMINDIR">
46 < </Tool>
26 >
27 > cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
28 >  <tool name="oracle" version="%v">
29 >    <lib name="clntsh"/>
30 >    <lib name="nnz11"/>
31 >    <client>
32 >      <environment name="ORACLE_BASE" default="%i"/>
33 >      <environment name="ORACLE_ADMINDIR"/>
34 >      <environment name="LIBDIR" value="$ORACLE_BASE/lib"/>
35 >      <environment name="BINDIR" value="$ORACLE_BASE/bin"/>
36 >      <environment name="INCLUDE" value="$ORACLE_BASE/include"/>
37 >    </client>
38 >    <runtime name="PATH" value="$BINDIR" type="path"/>
39 >    <runtime name="TNS_ADMIN" default="$ORACLE_ADMINDIR"/>
40 >    <use name="sockets"/>
41 >  </tool>
42 > EOF_TOOLFILE
43 >
44 > cat << \EOF_TOOLFILE >%i/etc/scram.d/oracleocci.xml
45 >  <tool name="oracleocci" version="%v">
46 >    <lib name="occi"/>
47 >    <use name="oracle"/>
48 >  </tool>
49   EOF_TOOLFILE
50 +
51   %post
52 < echo ". $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init64.sh" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
53 < echo "source $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init64.csh" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh
54 < %{relocateConfig}etc/scram.d/%n
55 < %{relocateConfig}etc/profile.d/init64.sh
56 < %{relocateConfig}etc/profile.d/init64.csh
52 > %{relocateConfig}etc/scram.d/%n.xml
53 > %{relocateConfig}etc/scram.d/oracleocci.xml
54 >
55 > # Fix to the SELinux issue:
56 > # http://www.appistry.com/community/forums/content/cannot-restore-segment-prot-after-reloc-permission-denied
57 > # as suggested by Andrea Valassi while the new Oracle libs are not released
58 > # But be aware that it may not work under certain scenarios.
59 > chcon -t textrel_shlib_t $RPM_INSTALL_PREFIX/%pkgrel/lib/*
60 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines