Browse Source

remove oracle-barebone

master
parent
commit
aa521306c3
  1. 70
      oracle-barebone/oracle-barebone.pl
  2. 143
      oracle-barebone/oracle-barebone.spec
  3. 147
      oracle-barebone/oracle-barebone.txt

70
oracle-barebone/oracle-barebone.pl

@ -1,70 +0,0 @@
use IO;
# input specification
my ($version, $platform) = @ARGV;
my @list = (qw(
lib/*.a
lib/*.so*
lib/sysliblist
lib
lib32/*.a
lib32/*.so*
lib32/sysliblist
lib32
rdbms/
!rdbms/jlib/
!rdbms/admin/
!rdbms/install/
network
network/mesg/
network/admin/
network/lib/
network/lib32/
ocommon/
!ocommon/nls/lbuilder/
bin/sqlplus
bin/tnsping
bin
sqlplus/
oracore/zoneinfo/
oracore
));
# determine effective file list
my @files = ();
foreach my $file (@list) {
my $not = 0;
if ($file =~ m|^!(.+)$|) {
$not = 1;
$file = $1;
}
my @paths = ();
if ($file =~ m|.+/$|) {
foreach my $p (`find $file -depth -print`) {
$p =~ s|\r?\n$||s;
push(@paths, $p);
}
}
else {
push(@paths, glob($file));
}
if ($not) {
my @files2 = grep {
my $x = $_;
not grep(/^\Q$x\E$/, @paths);
} @files;
@files = @files2;
}
else {
push(@files, @paths);
}
}
# roll CPIO archives
my $io = new IO::File
"| cpio -oL 2>/dev/null" .
"| bzip2 -9 >oracle-barebone-$version.$platform.cpio.bz2";
$io->print(join("\n", @files)."\n");
$io->close();

143
oracle-barebone/oracle-barebone.spec

@ -1,143 +0,0 @@
##
## oracle-barebone.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_major 9.2.0
%define V_minor_lnx 4
%define V_minor_sol 1
# package information
Name: oracle-barebone
Summary: Oracle Barebone Distribution
URL: -
Vendor: The OpenPKG Project
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: Database
License: Commercial
Version: %{V_major}
Release: 20080101
# list of sources
Source0: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_lnx}.ix86-linux.cpio.bz2
Source1: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_sol}.sun4u-sunos5.8.cpio.bz2
Source2: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_sol}.sun4u-sunos5.9.cpio.bz2
Source3: oracle-barebone.txt
Source4: oracle-barebone.pl
%NoSource 0
%NoSource 1
%NoSource 2
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130
PreReq: OpenPKG, openpkg >= 20040130
AutoReq: no
AutoReqProv: no
%description
This is the Oracle Barebone distribution, containing the Oracle 9i
%{V_major}.X Client C API. It is a stripped down installation file
set of a standard Oracle 9i Client Run-Time installation.
%track
%prep
%setup -T -D -c
%build
%install
# create installation area
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone
# unpack barebone distribution
# (rpmlint workaround: %{SOURCE3} %{SOURCE4})
( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone
case "%{l_platform -t}" in
i?86*-linux* ) cpio="%{SOURCE0}" ;;
sun4*-sunos5.8* ) cpio="%{SOURCE1}" ;;
sun4*-sunos5.9* ) cpio="%{SOURCE2}" ;;
* ) echo "Platform \"%{l_platform -t}\" not supported" 1>&2; exit 1 ;;
esac
# unpack with vendor cpio(1)
%{l_bzip2} -d -c $cpio | cpio -idmu
) || exit $?
# fake unix.rgs file (some users like DBD::Oracle use it
# to figure out the Oracle version number
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/install
echo "rdbms %{version}" \
>$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/install/unix.rgs
# provide SQL*Plus environment
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/bin \
$RPM_BUILD_ROOT%{l_prefix}/etc/oracle-barebone
if [ ! -f $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/sqlnet.ora ]; then
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples/sqlnet.ora \
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/
fi
if [ ! -f $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/tnsnames.ora ]; then
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples/tnsnames.ora \
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/
fi
rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples
%{l_shtool} mkln -s \
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/*.ora \
$RPM_BUILD_ROOT%{l_prefix}/etc/oracle-barebone/
for bin in sqlplus tnsping; do
( echo "#!/bin/sh"
echo "ORACLE_HOME=\"%{l_prefix}/libexec/oracle-barebone\""
echo "export ORACLE_HOME"
echo "LD_LIBRARY_PATH=\"%{l_prefix}/libexec/oracle-barebone/lib:/usr/lib\""
echo "export LD_LIBRARY_PATH"
echo "exec %{l_prefix}/libexec/oracle-barebone/bin/$bin \${1+\"\$@\"}"
) >$bin
%{l_shtool} install -c -m 755 \
$bin $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
done
# FIXME: cs: fixup permissions caused by bug in
# %{SOURCE oracle-barebone.pl} (fixed in the same commit) this
# chmod(1) is just a quick hack to avoid re-rolling all Oracle
# stuff from vendor cpios. This hack can be removed next time
# when %{SOURCE oracle-barebone.pl} is run.
chmod 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/libexec/oracle-barebone/network/admin/sqlnet.ora' \
'%config %{l_prefix}/libexec/oracle-barebone/network/admin/tnsnames.ora'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT

147
oracle-barebone/oracle-barebone.txt

@ -1,147 +0,0 @@
This is the OpenPKG Oracle "Barebone" distribution, containing the
Oracle 9i 9.2.0.1 Client CLI and C API. It is a heavily stripped
down installation file set of a standard Oracle 9i Client Run-Time
installation.
The following step-by-step procedure was used to create the source RPM
oracle-barebone-9.2.0.1.src.rpm for use on the sparc64-solaris and
ix86-linux platforms:
1. Download (to your desktop) from http://www.oracle.com/ (or currently
directly on http://otn.oracle.com/software/products/oracle9i/) the
Oracle 9i 9.2.0.1 Distribution CPIO Archives:
desktop$ w3m http://otn.oracle.com/software/products/oracle9i/
553239173 May 10 2003 lnx_920_disk1.cpio.gz
588798999 May 10 2003 lnx_920_disk2.cpio.gz
442087410 May 10 2003 lnx_920_disk3.cpio.gz
502320826 May 10 2003 92010Sol_Disk1.cpio.gz
597226006 May 10 2003 92010Sol_Disk2.cpio.gz
379469467 May 10 2003 92010Sol_Disk3.cpio.gz
Be careful, as the names of the files to download and the structure
of the page change frequently.
Also be aware that the minor release of the product may be different
for all the platforms supported by Oracle.
2. On all target machines (for us a ix86-linux and a sparc64-solaris
server), create an "oracle" user and group plus an empty directory
/oracle which is owned by this user/group. Then copy the Oracle
CPIO archives into /oracle/src and unpack them into the subdirs
/oracle/src/Disk[123].
CAUTION:
Oracle eventually installs different binaries or uses different linker
directives for the different versions of the Solaris operating system.
So if you want to support Solaris 9 and 8 for example, you will have to
do the following steps for every version you need.
target$ mkdir /oracle
target$ mkdir /oracle/src
target$ cd /oracle/src
target$ scp desktop:~/<target-id>[123].cpio.gz .
target$ for i in 1 2 3; do \
gunzip -d -c <target-id>$i.cpio.gz | cpio -idvmu; done
target$ chown -R oracle:oracle /oracle
If gunzip starts complaining it is likely that Oracle again has
supplied files ending in .gz that are not zipped and can be treated
directly with cpio.
3. After making sure that you have a X11 run-time environment available
on both the target machine and your desktop, run the Oracle installer:
target$ DISPLAY=desktop:0
target$ export DISPLAY
target$ cd /oracle/src/Disk1
target$ sh runInstaller
Then follow the dialogs and use "/oracle/oraInventory", the name
"OracleHome" and the path "/oracle/OracleHome" when asked for the
inventory path and the Oracle home name and directory. Then request
the "Oracle 9i Client" product and use type "Run-Time" first. In
the installation overview window make sure the "Oracle Call Interfaces"
and "Oracle Programmer" parts are included. If not, go back and try
the "User defined" configuration.
If this doesn't work, choose to install Oracle Database Server, choose
"User Defined" and then deselect everything than the developer parts.
At the end you need all those Makefiles, Headerfiles and Libs in the
"*/demo" and "*/lib" directories. Especially if you want to link against
those Oracle parts (php, apache....).
Sorry that we can't be more specific here, but what and how to install
to get all necessary parts differs from platform to platform and from
version to version.
4. Optionally, copy a suitable version of "tnsnames.ora" or "sqlnet.ora"
to "/oracle/OracleHome/network/admin/".
5. After all this you have around 200-300MB under /oracle/OracleHome
now. Copy the companion oracle-barebone.pl file into
/oracle/OracleHome/ and run the command (replace the X with the
apropriate version number):
target$ cd /oracle/OracleHome
target$ scp build:<prefix>/RPM/SRC/oracle-barebone/oracle-barebone.pl .
# on Linux target machine only:
target$ perl oracle-barebone.pl 9.2.0.X ix86-linux
# on Solaris target machine only:
target$ perl oracle-barebone.pl 9.2.0.X sparc64-solaris9
or
target$ perl oracle-barebone.pl 9.2.0.X sparc64-solaris8
.
.
.
As a result you get CPIO archives like these ones:
24650873 Dec 18 20:43 oracle-barebone-9.2.0.X.ix86-linux.cpio.bz2
27713659 Dec 18 20:46 oracle-barebone-9.2.0.X.sparc64-solaris9.cpio.bz2
27713659 Dec 18 20:46 oracle-barebone-9.2.0.X.sparc64-solaris8.cpio.bz2
6. Copy the newly-created CPIO archive from all target hosts back to
your OpenPKG build host and build the "oracle-barebone" source RPM:
target$ scp *.cpio.bz2 build:<prefix>/RPM/SRC/oracle-barebone/
build$ cd <prefix>/RPM/SRC/oracle-barebone
Edit the oracle-barebone.spec file so that the version and file names
match your specific needs:
Change the minor Versions in the "Sources" directive to match the cpio
archive's names from the last step.
build$ rpm -bs oracle-barebone.spec
7. Now you can build and install the resulting "oracle-barebone" source
RPM into all target-compatible servers. Just notice that you will still
need to build and install the "oracle" OpenPKG package in order to
satisfy the dependencies of any package requiring "ORACLE".
HINTS:
- The "oracle-barebone" package is intended for mass deployment of
Oracle Clients with the help of OpenPKG with the goal of no longer
requiring X11 for installation and no longer requiring such a lot
of disk space. If you just want to install the Oracle client on
a single box where OpenPKG runs, this is not worth the efforts.
Then stick with the standard Oracle Client installation and use the
"oracle" glue package to locate it.
- In smaller environments the build and target hosts could be the
same machine, of course. Here just forget our above notion of
"build" host.
- In environments where you deploy the "oracle-barebone" package
always into OpenPKG instaces under the same filesystem
prefix, it could be reasonable (to avoid problems with
the linkage of libraries) that you create a symlink from
<prefix>/libexec/oracle-barebone to /oracle/OracleHome and then
use <prefix>/libexec/oracle-barebone instead of /oracle/OracleHome
in the Oracle installer. This way your library dependencies use
already the target paths and you do not have to make sure that the
applications you link against the libraries know about the paths.
Loading…
Cancel
Save