From e2f97648723ca5b25dd6b0883594a2d55518ad8c428a25d6dc91253fcd26418f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 20 Feb 2025 11:14:23 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main orarun revision 9dd2d59555ef7b467ad64ef89cb9d033 --- .gitattributes | 23 ++ bsc1217288-fix-checking-of-ORACLE_HOME.patch | 13 + bsc1219103-fix-checking-running-agent.patch | 15 + orarun.changes | 400 +++++++++++++++++++ orarun.spec | 189 +++++++++ orarun.tar.bz2 | 3 + ready | 0 7 files changed, 643 insertions(+) create mode 100644 .gitattributes create mode 100644 bsc1217288-fix-checking-of-ORACLE_HOME.patch create mode 100644 bsc1219103-fix-checking-running-agent.patch create mode 100644 orarun.changes create mode 100644 orarun.spec create mode 100644 orarun.tar.bz2 create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/bsc1217288-fix-checking-of-ORACLE_HOME.patch b/bsc1217288-fix-checking-of-ORACLE_HOME.patch new file mode 100644 index 0000000..a6b6e09 --- /dev/null +++ b/bsc1217288-fix-checking-of-ORACLE_HOME.patch @@ -0,0 +1,13 @@ +Index: orarun-2.1/common.sh +=================================================================== +--- orarun-2.1.orig/common.sh ++++ orarun-2.1/common.sh +@@ -72,7 +72,7 @@ ora_environment() + + # Set Intelligent Agent Start/Stop + AGENT_VERSION="unknown" +- if [ ! -z "$ORACLE_HOME" -a ! -d "$ORACLE_HOME" ]; then ++ if [ ! -z "$ORACLE_HOME" -a -d "$ORACLE_HOME" ]; then + if test -x "$AGENT_HOME/bin/emctl"; then + # If Oracle Grid Control Agent is installed + AGENT_VERSION="10gA" diff --git a/bsc1219103-fix-checking-running-agent.patch b/bsc1219103-fix-checking-running-agent.patch new file mode 100644 index 0000000..a89659e --- /dev/null +++ b/bsc1219103-fix-checking-running-agent.patch @@ -0,0 +1,15 @@ +--- a/oracle ++++ b/oracle +@@ -414,7 +414,11 @@ + test -x $AGENT_PROG && $CHECKPROC $AGENT_PROG && echo -n "Shutting down Agent: " && ($AGENT_STOP > /dev/null; rc_status -v -r) + ;; + 10gA) +- test -x $AGENT_PROG && $CHECKPROC $AGENT_PROG && echo -n "Shutting down Agent: " && ($AGENT_STOP > /dev/null; rc_status -v -r) ++ if [[ "$AGENT_PROG" == *emctl ]]; then ++ test -x $AGENT_PROG && ($AGENT_PROG status agent > /dev/null) && echo -n "Shutting down Agent: " && ($AGENT_STOP > /dev/null; rc_status -v -r) ++ else ++ test -x $AGENT_PROG && $CHECKPROC $AGENT_PROG && echo -n "Shutting down Agent: " && ($AGENT_STOP > /dev/null; rc_status -v -r) ++ fi + ;; + 9i) + test -x $AGENT_PROG && $CHECKPROC $AGENT_PROG && echo -n "Shutting down Agent: " && ($AGENT_STOP > /dev/null; rc_status -v -r) diff --git a/orarun.changes b/orarun.changes new file mode 100644 index 0000000..a7726c5 --- /dev/null +++ b/orarun.changes @@ -0,0 +1,400 @@ +------------------------------------------------------------------- +Mon Mar 25 16:28:26 UTC 2024 - Thomas Abraham + +- bsc#1219103 - Fix checking for running agent during shutdown + * bsc1219103-fix-checking-running-agent.patch + +------------------------------------------------------------------- +Wed Jan 24 20:02:00 UTC 2024 - Brahmajit Das + +- bsc#1217288 - Fixed common.sh checks if $ORACLE_HOME is NOT a directory + instead of if it is + * bsc1217288-fix-checking-of-ORACLE_HOME.patch + +------------------------------------------------------------------- +Tue Oct 31 14:02:04 UTC 2023 - Thomas Abraham + +- bsc#1216566 - Fixed 'grep: oracle: No such file or directory' error during oracle + user login with csh/tcsh (/etc/profile.d/oracle.csh) + +------------------------------------------------------------------- +Fri Oct 8 19:06:57 CEST 2021 - aksingh@suse.com + +- bsc#1191350 - Fixed warning messages, changed $ORACLE_HOME to $ORACLE_BASE/product/21c in oracle.sh + - Changed spec file to require compat-libpthread-noshared for x86_64 only + +------------------------------------------------------------------- +Tue Jan 26 21:44:01 CET 2021 - aksingh@suse.com + +- bsc#1178526 : Add compat-libpthread-nonshared to required packages + +------------------------------------------------------------------- +Thu Jul 9 19:01:30 CEST 2020 - aksingh@suse.com + +- bsc#1173395 : Added Requires: libcap-ng-utils, nfs-kernel-server + +------------------------------------------------------------------- +Thu Jul 2 22:45:33 CEST 2020 - aksingh@suse.com + +- bsc#1173395 : Added LimitNOFILE=65536 to oracle.service to set Max number of files per process + +------------------------------------------------------------------- +Wed Aug 28 22:37:27 CEST 2019 - aksingh@suse.com + +- bsc#1140628 : Added LimitMEMLOCK=infinity for SGA to use HugePages + +------------------------------------------------------------------- +Mon May 14 20:37:41 CEST 2018 - aksingh@suse.com + +- bsc#1091397 : Commented out psmisc, sbin/fuser & /usr/bin/fuser from spec file. + +------------------------------------------------------------------- +Wed Mar 7 16:48:57 CET 2018 - aksingh@suse.com + +- bsc#1083262 : Removed "PreReq: %insserv_prereq" + +------------------------------------------------------------------- +Wed Jan 31 18:33:27 CET 2018 - ro@suse.de + +- use fillupdir macro + +------------------------------------------------------------------- +Wed Dec 20 18:01:35 CET 2017 - aksingh@suse.com + +- bsc#1073552 : add directory /opt/oraInventory +- Added Requires: libXtst6, libcap-progs + +------------------------------------------------------------------- +Wed Sep 13 20:47:01 CEST 2017 - aksingh@suse.com + +- moved /etc/security/limits.com update code from spec file to oracle-setup +- changed group/user creation section in spec file to use getent + +------------------------------------------------------------------- +Tue Aug 29 07:45:53 CEST 2017 - aksingh@suse.com + +- bsc#1052634 : systemd implementation (version 2.1) +- Added "stack" to limits.conf, Adjusted WMEM_MEM +- Added systemd patches from Mkounty@suse.com (bsc#1052634, bsc#950354) + * 0001-extract-common-add-service-files.patch + * 0002-Remove-su-s.patch + * 0003-Killmode-and-robust-version-detection.patch + * 0004-stop-timeout.patch + * 0005-prune-dependencies.patch + +------------------------------------------------------------------- +Wed Sep 3 01:41:37 CEST 2014 - ro@suse.de + +- sanitize release line in specfile + +------------------------------------------------------------------- +Mon Aug 11 20:18:22 CEST 2014 - aksingh@suse.com + +- bnc#891312 - change ksh to mksh + +------------------------------------------------------------------- +Sun Aug 3 06:51:28 CEST 2014 - aksingh@suse.com + +- bnc#890105 - Comment ORA_CRS_HOME & ORA_ASM_HOME in oracle.[c]sh + +------------------------------------------------------------------- +Mon Jan 27 17:19:41 CET 2014 - aksingh@suse.com + +- SLE12 Initial version 2.0 (FATE #316210) +- bnc#597757 - limits.conf + +------------------------------------------------------------------- +Wed Dec 2 07:03:35 CET 2009 - aksingh@novell.com + +- bnc#444333 - sysctl check to overwrite kernel parameters from sysctl.conf. + +------------------------------------------------------------------- +Tue Oct 27 19:05:00 CET 2009 - aksingh@novell.com + +- bnc#550141 - SLES11 Kernel Parameters adjustment for Oracle database 11gR2. + +------------------------------------------------------------------- +Wed Nov 12 21:58:07 CET 2008 - aksingh@novell.com + +- bnc#444299 - SLES11/Oracle 11g related changes + +------------------------------------------------------------------- +Wed Oct 15 12:16:11 CEST 2008 - ro@suse.de + +- added exclusivearch + +------------------------------------------------------------------- +Fri Sep 12 02:37:36 CEST 2008 - aksingh@novell.com + +- Fixed LSB Errors (Should Start, SHould Stop) + +------------------------------------------------------------------- +Sun Sep 9 22:27:35 CEST 2007 - aksingh@novell.com + +- Bug 299254 - updated oracle.csh and README. + +------------------------------------------------------------------- +Tue Jul 17 19:09:33 CEST 2007 - aksingh@novell.com + +- Bug #291441 - Remove oracle user from group "disk" + +------------------------------------------------------------------- +Sun May 27 08:49:45 CEST 2007 - aksingh@novell.com + +- Bug #277737 - Added GPL_v2 file. + +------------------------------------------------------------------- +Fri Mar 30 01:27:09 CEST 2007 - ro@suse.de + +- added psmisc to buildreq (for fuser in postinstall) + +------------------------------------------------------------------- +Mon Feb 26 21:46:59 CET 2007 - aksingh@novell.com + +- Fixed bz#249007 - Correct error message If Oracle is not installed. + +------------------------------------------------------------------- +Sat Feb 3 22:52:23 CET 2007 - aksingh@novell.com + +- Fixed RAC status report messages + +------------------------------------------------------------------- +Tue Jan 30 22:58:38 CET 2007 - aksingh@novell.com + +- Added code for RAC, renamed OCFS to OCFS2 + +------------------------------------------------------------------- +Sun Jan 28 07:44:17 CET 2007 - aksingh@novell.com + +- Added ORA_CRS_HOME to oracle.[c]sh + +------------------------------------------------------------------- +Fri Jan 26 01:24:48 CET 2007 - aksingh@novell.com + +- Bug #214774 and Cleanup for RAC + +------------------------------------------------------------------- +Mon Sep 25 19:19:35 CEST 2006 - aksingh@novell.com + +- Bug#193522 - Fixed carriage returns in oracle script and updated README. + +------------------------------------------------------------------- +Mon Sep 25 18:31:09 CEST 2006 - aksingh@novell.com + +- Removed symbolic link /usr/bin/sh from spec file as it is part of bash now. + +------------------------------------------------------------------- +Thu Feb 23 22:02:24 CET 2006 - aksingh@novell.com + +- Added gcc to spec file and fixed AGENT startup issue. + +------------------------------------------------------------------- +Sat Feb 18 20:29:50 CET 2006 - aksingh@novell.com + +- Cosmetic status reporting changes to /etc/init.d/oracle + +------------------------------------------------------------------- +Fri Feb 17 03:16:06 CET 2006 - aksingh@novell.com + +- Fixed stop section and added comment to NR_HUGE_PAGES + +------------------------------------------------------------------- +Fri Feb 10 20:39:56 CET 2006 - aksingh@novell.com + +- Removed old raw device entries from spec, cleaned oracle.[c]sh +- Fixed ORACLE_DB_APACHE_USE_SSL entry in init.d/oracle + +------------------------------------------------------------------- +Wed Feb 8 09:35:31 CET 2006 - aksingh@novell.com + +- Added iSQLPLUS support + +------------------------------------------------------------------- +Tue Feb 7 21:46:32 CET 2006 - aksingh@novell.com + +- ADDED AGENT_HOME, START_ORACLE_AS_CONSOLE, START_ORACLE_AS_ALL, + NR_HUGE_PAGES, and SHM_GROUP. Removed unsed SHM_USE_BIGPAGES. +- Fixed many rcoracle start/stop/status warnings +- Updated spec file for limits.conf/login and /etc/oratab sym link + +------------------------------------------------------------------- +Sat Jan 28 07:05:17 CET 2006 - aksingh@novell.com + +- Removed LD_ASSUME_KERNEL from oracle.[c]sh + +------------------------------------------------------------------- +Wed Jan 25 21:44:37 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Sat Dec 17 20:53:54 CET 2005 - aksingh@novell.com + +- Adjusted spec file (remove pdksh) + +------------------------------------------------------------------- +Sun Dec 11 06:53:06 CET 2005 - aksingh@novell.com + +- Cleanup of oracle.[c]sh - Set new ORACLE_SID and ORACLE_HOME + Removed leftover STAR_ORACLE_DB_CMANAGER from previous change. + +------------------------------------------------------------------- +Mon Dec 5 21:37:32 CET 2005 - aksingh@novell.com + +- Bug 137010 - Added START_ORACLE_DB_EMANAGER (10g feature) + +------------------------------------------------------------------- +Mon Dec 5 19:50:56 CET 2005 - aksingh@novell.com + +- Bumped version to 1.9 for SLES10 + +------------------------------------------------------------------- +Thu Sep 29 00:34:41 CEST 2005 - dmueller@suse.de + + - add norootforbuild + +------------------------------------------------------------------- +Sat Jun 4 19:30:01 CEST 2005 - aksingh@novell.com + +- Bug 84038: Cleanup and added same to oracle.csh + +------------------------------------------------------------------- +Mon May 23 22:39:03 CEST 2005 - aksingh@oracle.com + +- Bug 84038 : Added check for EM64T/AMD64 in oracle.sh + +------------------------------------------------------------------- +Sat Apr 2 08:27:17 CEST 2005 - aksingh@novell.com + +- Bug #75689 - Added ORA_NLS10 support in oracle.[c]sh +- Removed LD_ASSUME_KERNEL=2.2.5 from oracle +- Updated README + + +------------------------------------------------------------------- +Thu Feb 3 03:39:10 CET 2005 - aksingh@novell.com + +- Changed LD_ASSUME_KERNEL to 2.4.21 in oracle.[c]sh. + +------------------------------------------------------------------- +Tue Feb 1 05:44:27 CET 2005 - aksingh@novell.com + +- Removed "usermod -G disk oracle" from post install. [Bug #50232] + +------------------------------------------------------------------- +Sat Jan 22 03:33:06 CET 2005 - aksingh@novell.com + +- Bug #45718 +- Added export LD_PRELOAD=/usr/lib/libInternalSymbols.so to oracle.sh +- Added setenv LD_PRELOAD /usr/lib/libInternalSymbols.so to oracle.csh + +------------------------------------------------------------------- +Wed Oct 13 16:28:20 CEST 2004 - ro@suse.de + +- updated requires + +------------------------------------------------------------------- +Fri Jun 25 11:05:24 CEST 2004 - kukuk@suse.de + +- Add libInternalSymbols [Bug #39691] + +------------------------------------------------------------------- +Mon May 17 15:32:31 CEST 2004 - kukuk@suse.de + +- Adjust requires for SLES9 + +------------------------------------------------------------------- +Mon Nov 24 08:35:26 CET 2003 - kukuk@suse.de + +- Fix useradd/groupadd call (and don't use undocumented options) + +------------------------------------------------------------------- +Sat Jul 5 16:56:21 CEST 2003 - mha@suse.de + +- Bugfix: ">&" not possible within ".." in the /etc/init.d/oracle + script - fixed. +- Removed the two libXm.* links - instead we now provide the old + openmotif 2.1.30 package for UL at + ftp://ftp.suse.com/pub/suse/i386/supplementary/commercial/Oracle/sles-8/ + since Oracle iAS (component Forms&Reports) really needs that + particular version. +- We now start the listener BEFORE the database. +- Changed /etc/profile.d/oracle.[c]sh to be parsed if the user is + "oracle" ONLY. +- Added code to /etc/profile.d/oracle.csh to be able to source + /etc/sysconfig/oracle, which is bourne shell syntax. Not used + yet in this orarun release. +- Added configurable network kernel parameters wmem_default/max + and rmem_default/max, and preconfigured it for Oracle RAC + according to Oracle recommendations, for best performance. +- Changed /etc/sysconfig/oracle to be easier to use with the YaST2 + sysconfig editor module by adding meta information used by that + module. Editing the Oracle related values with that module is + now *much* easier and all values are under one common path. +- Added to pre-install script a command to add user "oracle" to + group "disk". That's because this script also re-creates directory + /dev/raw/ with *all* possible raw devices, and it gives them to + root:disk, with read/write rights for both user root and group + disk. This way user oracle has write access to the raw devices + but is not the owner. + +------------------------------------------------------------------- +Thu Apr 3 11:46:18 CEST 2003 - kukuk@suse.de + +- Set LD_ASSUME_KERNEL=2.2.5 if /lib/i686 exists + This is needed for Oracle to pick the correct glibc version + when starting - the one in /lib/i686 has been compiled WITHOUT + floating stack support - Oracle supports many simultaneous + users less if it starts using the default glibc WITH floating + stack support (other than that, no issues, only scalability). + The dual-glibc strategy is introduced in United Linux (SLES-8) + Service Pack 2. + +------------------------------------------------------------------- +Wed Feb 26 07:00:12 CET 2003 - mha@suse.de + +- Removed from postinstall script code that added limits for + user oracle to /etc/security/limits.conf since it interferred + with the ability to login remotely, e.g. via ssh + +------------------------------------------------------------------- +Thu Feb 20 08:02:07 CET 2003 - mha@suse.de + +- Added creation of file /etc/rac_on when oracm is started, an + Oracle hack used by $ORACLE_HOME/bin/dbca +- added "restart" to /etc/rc.d/oracle +- added a status to "status" + +------------------------------------------------------------------- +Sat Feb 15 07:25:33 CET 2003 - mha@suse.de + +- Fixed error in orarun 1.7: This version did not create + /etc/sysconfig/oracle +- Added "raw" to start prerequisites of the oracle SysV startup + script, so that the raw device mappings exist *before* + any Oracle services start which may use raw devices! + +------------------------------------------------------------------- +Wed Feb 12 05:42:49 CET 2003 - mha@suse.de + +- Fixed lots of errors in the startup and shutdown sections +- Added a very basic status section + +------------------------------------------------------------------- +Fri Jan 31 19:48:51 CET 2003 - mha@suse.de + +- Updated sysV startup script to support RAC (ocfs and oracm) +- Include some symlinks because e.g. Oracle Collab. Suite + expects some things in the wrong (non-Linux) places + +------------------------------------------------------------------- +Thu Dec 19 18:07:33 CET 2002 - mha@suse.de + +- Provide a much updated oracle sysV startup script +- Changed the specfile to use suse macro for the fillup and insserv + +------------------------------------------------------------------- +Thu Dec 18 20:19:47 CET 2002 - mha@suse.de + +- Checked package into autobuild + diff --git a/orarun.spec b/orarun.spec new file mode 100644 index 0000000..166a1ad --- /dev/null +++ b/orarun.spec @@ -0,0 +1,189 @@ +# +# spec file for package orarun +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: orarun +#BuildRequires: psmisc +BuildRequires: pwdutils +BuildRequires: systemd-rpm-macros +Version: 2.1 +Release: 0 +Url: http://www.suse.com/oracle/ +Summary: An Environment for Running Oracle Products +License: GPL-2.0+ +Group: Productivity/Databases/Tools +Source: orarun.tar.bz2 +Patch0: bsc1217288-fix-checking-of-ORACLE_HOME.patch +Patch1: bsc1219103-fix-checking-running-agent.patch +#Source1: libInternalSymbols.tar.bz2 +Requires: binutils +Requires: gcc +Requires: gcc-c++ +Requires: glibc-devel +%ifarch %ix86 x86_64 +Requires: compat-libpthread-nonshared +%endif +Requires: glibc-locale +Requires: libaio +Requires: libaio-devel +#Requires: libstdc++-devel +Requires: make +Requires: mksh +Requires: sysstat +Requires: systemd +Requires: xorg-x11-libs +Requires: libXtst6 +Requires: libcap-progs +Requires: libcap-ng-utils +Requires: nfs-kernel-server +PreReq: /usr/sbin/groupadd /usr/sbin/useradd %fillup_prereq /bin/mkdir /bin/cat +#PreReq: /usr/sbin/groupadd /usr/sbin/useradd %insserv_prereq %fillup_prereq /bin/mkdir /bin/cat +#Obsoletes: orarun8i orarun9i +BuildRoot: %{_tmppath}/%{name}-%{version}-build +ExclusiveArch: %ix86 ia64 s390 s390x x86_64 + +%if ! %{defined _fillupdir} + %define _fillupdir /var/adm/fillup-templates +%endif + +%description +This package creates the user and the groups for Oracle, sets the +Oracle environment variables, sets kernel parameters to values +recommended by Oracle, and provides for automated start and stop of +Oracle components at system start and stop time. It also includes +dependencies for other software packages needed to install and use +Oracle, so that when you select this package the other packages are +included automatically (when you install via YaST2) or that you are at +least reminded to install them (when installing via the rpm command). +This package is not required for running Oracle but it simplifies +things significantly. + +You can edit all settings via YaST2. + +http://www.suse.com/oracle/ + + + +Authors: +-------- + aksingh + +%prep +%setup -b 0 +%patch0 -p1 +%patch1 -p1 + +%build + +%install +install -d -m 755 ${RPM_BUILD_ROOT}{/usr/share/doc/packages,/etc/init.d,/etc/profile.d,/usr/sbin,%{_fillupdir},/sbin,/usr/bin,/usr/lib} +#install -m 744 oracle ${RPM_BUILD_ROOT}/etc/init.d/oracle +install -d -m 0755 ${RPM_BUILD_ROOT}/opt/oracle +install -d -m 0755 ${RPM_BUILD_ROOT}/opt/oraInventory +#install -d -m 0755 ${RPM_BUILD_ROOT}/var/opt/oracle +# systemd +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/orarun +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system +install -m 755 oracle ${RPM_BUILD_ROOT}/usr/lib/orarun/oracle +install -m 444 oracle.service ${RPM_BUILD_ROOT}%{_unitdir}/oracle.service +install -m 755 oracle-setup ${RPM_BUILD_ROOT}/usr/lib/orarun/oracle-setup +install -m 444 oracle-setup.service ${RPM_BUILD_ROOT}%{_unitdir}/oracle-setup.service +install -m 644 common.sh ${RPM_BUILD_ROOT}/usr/lib/orarun/common.sh +install -m 644 oracle.sh ${RPM_BUILD_ROOT}/etc/profile.d/oracle.sh +install -m 644 oracle.csh ${RPM_BUILD_ROOT}/etc/profile.d/oracle.csh +#ln -sf ../../etc/init.d/oracle ${RPM_BUILD_ROOT}/usr/sbin/rcoracle +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcoracle +install -m 644 sysconfig.oracle ${RPM_BUILD_ROOT}%{_fillupdir}/sysconfig.oracle +#ln -sf ../../bin/sh ${RPM_BUILD_ROOT}/usr/bin/sh +#ln -sf ../bin/fuser ${RPM_BUILD_ROOT}/sbin/fuser +#ln -sf ../../bin/fuser ${RPM_BUILD_ROOT}/usr/bin/fuser + +%pre +# not needed +#if [ ! -d /etc/sysconfig/ ] ; then +# echo "No directory /etc/sysconfig/ - this package is for SuSE Linux 8.0 and higher" +# echo "and for United Linux 1.0 and higher ONLY." +# exit 1 +#fi + +#Oracle Install requirement +# If not created already, Create User : oracle and group: oinstall, dba +#grep -qs ^oinstall: /etc/group || /usr/sbin/groupadd -r oinstall +#grep -qs ^dba: /etc/group || /usr/sbin/groupadd -r dba +#grep -qs ^oracle: /etc/passwd || /usr/sbin/useradd -r -c "Oracle user" -g oinstall -G dba -d /opt/oracle oracle + +getent group oinstall >/dev/null || /usr/sbin/groupadd -r oinstall +getent group dba >/dev/null || /usr/sbin/groupadd -r dba +getent passwd oracle >/dev/null || /usr/sbin/useradd -r -c "Oracle user" -g oinstall -G dba -d /opt/oracle oracle + +#test -d /opt/oracle || install -m 755 -o oracle -g oinstall -d /opt/oracle +#test -d /var/opt/oracle || install -m 750 -o oracle -g oinstall -d /var/opt/oracle + +%{service_add_pre oracle.service oracle-setup.service} + +exit 0 + +%post +#/sbin/insserv raw >& /dev/null +#/sbin/chkconfig boot.sysctl on >& /dev/null +# +# Moved this to oracle-setup +# Update limits.conf only when no existing oracle parameters (bnc#597757) +#if [ $(grep -c oracle /etc/security/limits.conf) = "0" ] ; then +# mv /etc/security/limits.conf /etc/security/limits.conf.save + +# Added stack option +# sed -e "s/# End of file/## added by orarun ##\noracle\tsoft\tnproc\t2047\noracle\thard\tnproc\t16384\noracle\tsoft\tnofile\t1024\noracle\thard\tnofile\t65536\noracle\tsoft\tstack\t10240\noracle\thard\tstack\t32768\n# End of file/" /etc/security/limits.conf.save > /etc/security/limits.conf +#fi + +grep -qs "^session.*required.*pam_limits.so" /etc/pam.d/login || (cp /etc/pam.d/login /etc/pam.d/login.save && echo "session required pam_limits.so # added by orarun" >> /etc/pam.d/login) +# +%{service_add_post oracle.service oracle-setup.service} +test -f /etc/sysconfig/oracle || cp %{_fillupdir}/sysconfig.oracle /etc/sysconfig/oracle + +# This is handled via systemd-presets-branding-SLE +#/usr/bin/systemctl enable oracle.service || echo "Call systemctl enable oracle to enable the service" + +exit 0 + +%preun +%{service_del_preun oracle.service oracle-setup.service} + +%postun +%{service_del_postun oracle.service oracle-setup.service} + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%doc README +%doc GPL_v2 +%attr(0644,root,root) %config(noreplace) /etc/profile.d/oracle.sh +%attr(0644,root,root) %config(noreplace) /etc/profile.d/oracle.csh +#%attr(0744,root,root) %config /etc/init.d/oracle +%dir %attr(755, oracle, oinstall) /opt/oracle +%dir %attr(755, oracle, oinstall) /opt/oraInventory +#%dir %attr(755, oracle, oinstall) /var/opt/oracle +/usr/sbin/rcoracle +/usr/lib/orarun +%{_unitdir}/*.service +#/sbin/fuser +#/usr/bin/fuser +%{_fillupdir}/sysconfig.oracle + +%changelog diff --git a/orarun.tar.bz2 b/orarun.tar.bz2 new file mode 100644 index 0000000..5eb86a3 --- /dev/null +++ b/orarun.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15400177c309ca0ee8463519d6fa3cf9334d656d7becaacf74ff8d7e4a38c388 +size 21199 diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4