client/tools/osad/Makefile.defs | 6 ++--
client/tools/osad/Makefile.osad | 4 +-
client/tools/osad/logrotate/osa-dispatcher | 14 +++++++---
client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable | 6 ++--
client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.fc | 1
client/tools/osad/osad.spec | 10 +++++--
client/tools/osad/prog.init | 5 +++
client/tools/osad/sysconfig/Makefile | 9 ++++++
client/tools/osad/sysconfig/osa-dispatcher | 4 ++
client/tools/osad/tns-admin-osa-dispatcher/Makefile | 10 +++++++
client/tools/osad/tns-admin-osa-dispatcher/sqlnet.ora | 3 ++
client/tools/osad/tns-admin-osa-dispatcher/tnsnames.ora | 1
12 files changed, 62 insertions(+), 11 deletions(-)
New commits:
commit f0dbdc76ff853e1e57896999c9d9fa3db4c3c5c1
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 09:47:47 2010 +0200
No need to be extra verbose.
This addresses the warning
Warning! /etc/rhn/tns_admin/osa-dispatcher/tnsnames.ora refers to a symbolic link, not
following last component.
diff --git a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
index b444e21..7628576 100644
--- a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
+++ b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
@@ -12,6 +12,6 @@ for selinuxvariant in mls strict targeted
| grep '^osa_dispatcher_upstream_notif_server_port_t\b.*\btcp\b.*\b1290\b' >
/dev/null \
|| /usr/sbin/semanage port -a -t osa_dispatcher_upstream_notif_server_port_t -p tcp
1290
-rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
+rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
/sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 2935260..141c22e 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -168,7 +168,7 @@ fi
%posttrans -n osa-dispatcher-selinux
#this may be safely remove when BZ 505066 is fixed
if /usr/sbin/selinuxenabled ; then
- rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
+ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
/sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log
fi
@@ -188,7 +188,7 @@ if [ $1 -eq 0 ]; then
done
fi
-rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
+rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
/sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log
%endif
commit d3875dda3c49529843ec9a890359cf636f71040a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 09:46:09 2010 +0200
Silence semanage upon package upgrade.
We do not issue the semanage port -a if the port is already there, which
addresses the warning
/usr/sbin/semanage: Port tcp/1290 already defined
diff --git a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
index dc2a01c..b444e21 100644
--- a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
+++ b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
@@ -8,7 +8,9 @@ for selinuxvariant in mls strict targeted
/usr/share/selinux/${selinuxvariant}/osa-dispatcher.pp || :
done
-/usr/sbin/semanage port -a -t osa_dispatcher_upstream_notif_server_port_t -p tcp 1290 ||
:
+/usr/sbin/semanage port -l \
+ | grep '^osa_dispatcher_upstream_notif_server_port_t\b.*\btcp\b.*\b1290\b' >
/dev/null \
+ || /usr/sbin/semanage port -a -t osa_dispatcher_upstream_notif_server_port_t -p tcp
1290
rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
/sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log
commit d9c9529015b0ae3705046cc318e238fd415484d6
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 08:52:39 2010 +0200
580047 - label /var/log/rhn/oracle/osa-dispatcher as osa_dispatcher_log_t, so that
osa-dispatcher can create sqlnet.logs there.
diff --git a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.fc
b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.fc
index 303ec7d..503b076 100644
--- a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.fc
+++ b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.fc
@@ -1,3 +1,4 @@
/usr/sbin/osa-dispatcher gen_context(system_u:object_r:osa_dispatcher_exec_t,s0)
/var/log/rhn/osa-dispatcher\.log gen_context(system_u:object_r:osa_dispatcher_log_t,s0)
+/var/log/rhn/oracle/osa-dispatcher gen_context(system_u:object_r:osa_dispatcher_log_t,s0)
/var/run/osa-dispatcher\.pid gen_context(system_u:object_r:osa_dispatcher_var_run_t,s0)
commit 72755b7518ecde99364eb8726fca0d39f6b1fbb2
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon May 3 17:05:33 2010 +0200
580047 - configure osa-dispatcher to put sqlnet.log to
/var/log/rhn/oracle/osa-dispatcher.
diff --git a/client/tools/osad/Makefile.defs b/client/tools/osad/Makefile.defs
index 48605b7..5adc1c1 100644
--- a/client/tools/osad/Makefile.defs
+++ b/client/tools/osad/Makefile.defs
@@ -35,11 +35,13 @@ INSTALL_DEST ?= $(ROOT)/$(SUBDIR)
DIRS += $(addprefix $(PREFIX), \
$(sort $(EXTRA_DIRS)) $(INSTALL_DEST))
-all :: $(INSTALL_FILES)
+all :: $(INSTALL_FILES) $(INSTALL_LINKS)
-install :: all $(DIRS) $(INSTALL_FILES)
+install :: all $(DIRS) $(INSTALL_FILES) $(INSTALL_LINKS)
@$(foreach f,$(INSTALL_FILES), \
$(INSTALL_DATA) $(f) $(PREFIX)$(INSTALL_DEST)/$(f) ; )
+ @$(foreach f,$(INSTALL_LINKS), \
+ ln -s `echo $(f)` $(PREFIX)$(INSTALL_DEST)/$(f) ; )
$(DIRS):
$(INSTALL_DIR) $@
diff --git a/client/tools/osad/Makefile.osad b/client/tools/osad/Makefile.osad
index 2dcded3..f8424cd 100644
--- a/client/tools/osad/Makefile.osad
+++ b/client/tools/osad/Makefile.osad
@@ -7,11 +7,11 @@ VERSION = $(shell echo `awk '{ print $$1 }' version`)
RELEASE = $(shell echo `awk '{ print $$2 }' version`)
CODE_DIRS = src
-CONF_DIRS = rhn-conf osad-conf logrotate
+CONF_DIRS = rhn-conf osad-conf logrotate sysconfig tns-admin-osa-dispatcher
# We look for config files in "well known" locations (rhn-conf,
# httpd-conf, logrotate)
-EXTRA_DIRS = /var/log/rhn $(BINDIR) $(SBINDIR) $(INITDIR)
+EXTRA_DIRS = /var/log/rhn /var/log/rhn/oracle /var/log/rhn/oracle/osa-dispatcher
$(BINDIR) $(SBINDIR) $(INITDIR)
BINDIR = /usr/bin
SBINDIR = /usr/sbin
INITDIR = /etc/rc.d/init.d
diff --git a/client/tools/osad/logrotate/osa-dispatcher
b/client/tools/osad/logrotate/osa-dispatcher
index 2dac67e..d0b8be4 100644
--- a/client/tools/osad/logrotate/osa-dispatcher
+++ b/client/tools/osad/logrotate/osa-dispatcher
@@ -1,6 +1,4 @@
-# logrotation file for Red Hat Network Server
-#
-# $Id$
+# logrotation file for RHN Satellite's osa-dispatcher
/var/log/rhn/osa-dispatcher.log {
weekly
@@ -11,3 +9,13 @@
missingok
size 100M
}
+
+/var/log/rhn/oracle/osa-dispatcher/sqlnet.ora {
+ weekly
+ rotate 5
+ copytruncate
+ compress
+ notifempty
+ missingok
+ size 100M
+}
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 6834e7e..2935260 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -220,9 +220,15 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
%{rhnroot}/osad/osa_dispatcher.py*
%{rhnroot}/osad/dispatcher_client.py*
%{rhnroot}/osad/rhn_log.py*
+%config(noreplace) %{_sysconfdir}/sysconfig/osa-dispatcher
%config(noreplace) %{_sysconfdir}/logrotate.d/osa-dispatcher
%config %{_sysconfdir}/rhn/default/rhn_osa-dispatcher.conf
+%config %{_sysconfdir}/rhn/tns_admin/osa-dispatcher
+%config(noreplace) %{_sysconfdir}/rhn/tns_admin/osa-dispatcher/tnsnames.ora
+%config(noreplace) %{_sysconfdir}/rhn/tns_admin/osa-dispatcher/sqlnet.ora
%attr(755,root,root) %{_initrddir}/osa-dispatcher
+%attr(770,root,apache) %dir %{_var}/log/rhn/oracle
+%attr(770,root,root) %dir %{_var}/log/rhn/oracle/osa-dispatcher
%doc LICENSE
%doc PYTHON-LICENSES.txt
diff --git a/client/tools/osad/prog.init b/client/tools/osad/prog.init
index a214e2c..58db558 100755
--- a/client/tools/osad/prog.init
+++ b/client/tools/osad/prog.init
@@ -20,6 +20,11 @@
# Source networking configuration.
. /etc/sysconfig/network
+# Source prog-specific configuration
+if [ -f /etc/sysconfig/@@PROG@@ ]; then
+ . /etc/sysconfig/@@PROG@@
+fi
+
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
diff --git a/client/tools/osad/sysconfig/Makefile b/client/tools/osad/sysconfig/Makefile
new file mode 100644
index 0000000..5badc70
--- /dev/null
+++ b/client/tools/osad/sysconfig/Makefile
@@ -0,0 +1,9 @@
+# Makefile for installation of the RHN server configuration files
+
+# what is the backend top dir
+TOP = ..
+
+INSTALL_FILES = osa-dispatcher
+INSTALL_DEST = /etc/sysconfig
+
+include $(TOP)/Makefile.defs
diff --git a/client/tools/osad/sysconfig/osa-dispatcher
b/client/tools/osad/sysconfig/osa-dispatcher
new file mode 100644
index 0000000..4347d64
--- /dev/null
+++ b/client/tools/osad/sysconfig/osa-dispatcher
@@ -0,0 +1,4 @@
+
+TNS_ADMIN=/etc/rhn/tns_admin/osa-dispatcher
+export TNS_ADMIN
+
diff --git a/client/tools/osad/tns-admin-osa-dispatcher/Makefile
b/client/tools/osad/tns-admin-osa-dispatcher/Makefile
new file mode 100644
index 0000000..d88544b
--- /dev/null
+++ b/client/tools/osad/tns-admin-osa-dispatcher/Makefile
@@ -0,0 +1,10 @@
+# Makefile for installation of the RHN server configuration files
+
+# what is the backend top dir
+TOP = ..
+
+INSTALL_FILES = sqlnet.ora
+INSTALL_LINKS = tnsnames.ora
+INSTALL_DEST = /etc/rhn/tns_admin/osa-dispatcher
+
+include $(TOP)/Makefile.defs
diff --git a/client/tools/osad/tns-admin-osa-dispatcher/sqlnet.ora
b/client/tools/osad/tns-admin-osa-dispatcher/sqlnet.ora
new file mode 100644
index 0000000..13206ad
--- /dev/null
+++ b/client/tools/osad/tns-admin-osa-dispatcher/sqlnet.ora
@@ -0,0 +1,3 @@
+
+log_directory_client = /var/log/rhn/oracle/osa-dispatcher
+
diff --git a/client/tools/osad/tns-admin-osa-dispatcher/tnsnames.ora
b/client/tools/osad/tns-admin-osa-dispatcher/tnsnames.ora
new file mode 100644
index 0000000..7c467fe
--- /dev/null
+++ b/client/tools/osad/tns-admin-osa-dispatcher/tnsnames.ora
@@ -0,0 +1 @@
+/etc/tnsnames.ora