Description of problem: Installer shows invalid option while invoking restorecon ** Database: Installation complete. ** Database: Setting up database connection. ** Database: Testing database connection. ** Database: Populating database. *** Progress: ################################################################## * Setting up users and groups. ** GPG: Initializing GPG and importing key. ** GPG: Creating /root/.gnupg directory * Performing initial configuration. /sbin/restorecon: invalid option -- r usage: /sbin/restorecon [-Rnv] [-e excludedir ] [-o filename ] [-f filename | pathname... ] /sbin/restorecon: invalid option -- r usage: /sbin/restorecon [-Rnv] [-e excludedir ] [-o filename ] [-f filename | pathname... ] * Activating RHN Satellite. ** Loading RHN Satellite Certificate. ** Verifying certificate locally. ** Activating RHN Satellite.
What version of 5.3.0 is this? Can you confirm that this is on RHEL 4 while you do not see the error on RHEL 5?
this is on latest 530 iso Satellite-5.3.0-RHEL4-re20081223.1-i386-embedded-oracle.iso yep I don't see it on RHEL-5 version of iso, only RHEL-4
+ mkdir -p /rhnsat/data /rhnsat/admin + chown -R oracle:dba /rhnsat + restorecon -r /rhnsat restorecon: invalid option -- r usage: restorecon [-Rnv] [-e excludedir ] [-o filename ] [-f filename | pathname... ] ISO: Satellite-5.3.0-RHEL4-re20090130.1-i386-embedded-oracle.iso
/opt/apps/oracle/admin/10.2.0/create-db.sh is the problem: grep restorecon create-db.sh /sbin/restorecon -rvi $DataDB $AdminDB Notice the -r. On RHEL4: # restorecon --help restorecon: invalid option -- - usage: restorecon [-Rnv] [-e excludedir ] [-o filename ] [-f filename | pathname... ] Does not have a -r option. Which the man page defines as recursive: -R change files and directories file labels recursively BUT on RHEL5, restorecon has both -R and -r mapped to do the same thing: -R -r change files and directories file labels recursively
Proposed fix is to fix create-db.sh to use -R instead of -r which will take care of both EL5 and EL4. Alternatively, make the script more complicated to see if it should run restorecon at all on el4. I'm ok with just changing the options.
The plan is not to run restorecon (and setsebool, and friends) on RHEL 4 at all, since we won't be providing the policy there anyway. Of course, similar thing on RHEL 5 with SELinux disabled (if we are going to allow that combination at all). I just need to find a good method of figuring out the "there is no policy provided" since I do not want to hardcode the "RHEL 4" condition.
Fixed in revision 180987 in svn. Though we still have a larger issue as per comment #6.
/var/log/rhn/install_db.log + set -e + ORAENV_ASK=NO + ORACLE_SID=embedded + export ORAENV_ASK ORACLE_SID + . oraenv ++ case ${ORACLE_TRACE:-""} in ++ N= ++ C= ++ echo '\c' ++ grep c ++ N=-n ++ '[' /usr/lib/oracle/10.2.0.4/client = 0 ']' ++ OLDHOME=/usr/lib/oracle/10.2.0.4/client ++ case ${ORAENV_ASK:-""} in ++ NEWSID=embedded ++ export ORACLE_SID +++ dbhome embedded ++ ORAHOME=/opt/apps/oracle/web/product/10.2.0/db_1 ++ case $? in ++ ORACLE_HOME=/opt/apps/oracle/web/product/10.2.0/db_1 ++ export ORACLE_HOME ++ case "$LD_LIBRARY_PATH" in ++ LD_LIBRARY_PATH=/opt/apps/oracle/web/product/10.2.0/db_1/lib ++ export LD_LIBRARY_PATH ++ case "$OLDHOME" in ++ case "$PATH" in +++ echo /usr/lib/oracle/10.2.0.4/client/bin:/usr/lib/oracle/10.2.0.4/client/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin +++ sed 's;/usr/lib/oracle/10.2.0.4/client/bin;/opt/apps/oracle/web/product/10.2.0/db_1/bin;g' ++ PATH=/opt/apps/oracle/web/product/10.2.0/db_1/bin:/opt/apps/oracle/web/product/10.2.0/db_1/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin ++ export PATH +++ LANG=C +++ ulimit ++ ULIMIT=unlimited ++ '[' 0 = 0 -a unlimited '!=' unlimited ']' + mkdir -p /rhnsat/data /rhnsat/admin + chown -R oracle:dba /rhnsat + restorecon -r /rhnsat restorecon: invalid option -- r usage: restorecon [-Rnv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]
Issue from initial comment and from comment #2 addressed in Spacewalk, commits 64c27a9b2f062cf6b27d27d509d715d2ad03c859, spacewalk-setup-0.5.7-1.
The other issues addressed in svn, r181097, oracle-server-scripts-10.2.0-24, and in Spacewalk, commit a4c92cecc09614f5c86d70919bcb221aa331f7f5, spacewalk-setup-0.5.7-1.
With spacewalk-setup-0.5.8-1 and oracle-server-scripts-10.2.0-24 available on Satellite-5.3.0-RHEL5-re20090206.1, moving ON_QA.
Pulling away from ON_QA for now.
With compose Satellite-5.3.0-RHEL5-re20090220.1 available, moving ON_QA.
Verified
Verified in stage -> RELEASE_PENDING
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html