client/tools/osad/logrotate/Makefile | 2 +-
client/tools/osad/logrotate/osad | 9 +++++++++
client/tools/osad/osad.spec | 22 ++++++++++++++++++----
client/tools/osad/src/rhn_log.py | 3 ++-
rel-eng/packages/osad | 2 +-
5 files changed, 31 insertions(+), 7 deletions(-)
New commits:
commit 0cf13a20faf6b9dac059732ffedb4b03b44e4706
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 17:11:30 2012 +0100
Automatic commit of package [osad] release [5.10.39-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 9cbc062..369f514 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -16,7 +16,7 @@ Group: System Environment/Daemons
License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.10.38
+Version: 5.10.39
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -278,6 +278,14 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%endif
%changelog
+* Wed Feb 29 2012 Miroslav Suchý 5.10.39-1
+- log file may contain password, set chmod to 600
+- by default log to /var/log/osad
+- /etc/rhn/tns_admin/osa-dispatcher is directory, not config file
+- fix typo in description
+- mark log file osa-dispatcher.log as ghost owned
+- add logrotate for /var/log/osad and own this file (as ghost)
+
* Thu Feb 23 2012 Michael Mraka <michael.mraka(a)redhat.com> 5.10.38-1
- we are now just GPL
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index 95eba1c..05e5384 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.10.38-1 client/tools/osad/
+5.10.39-1 client/tools/osad/
commit cdee73585fb1446cb0a7438c7d7b6225776d2dd7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 16:38:31 2012 +0100
log file may contain password, set chmod to 600
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 2cb7c9a..9cbc062 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -231,7 +231,7 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%attr(755,root,root) %{_initrddir}/osad
%doc LICENSE
%config(noreplace) %{_sysconfdir}/logrotate.d/osad
-%ghost %attr(644,root,root) %{_var}/log/osad
+%ghost %attr(600,root,root) %{_var}/log/osad
%if 0%{?suse_version}
# provide directories not owned by any package during build
%dir %{rhnroot}
diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py
index d87788c..acb4166 100644
--- a/client/tools/osad/src/rhn_log.py
+++ b/client/tools/osad/src/rhn_log.py
@@ -40,6 +40,7 @@ class Logger:
if not Logger.logfile is None:
try:
file = open( Logger.logfile, 'a' )
+ os.chmod(Logger.logfile, 0600)
file.write( outstring )
file.close()
except IOError:
commit 21e1c450174d5160efb87f5929dcd0abc6091acc
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 16:30:24 2012 +0100
by default log to /var/log/osad
diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py
index 391d4a8..d87788c 100644
--- a/client/tools/osad/src/rhn_log.py
+++ b/client/tools/osad/src/rhn_log.py
@@ -21,7 +21,7 @@ import traceback
class Logger:
debug_level = 1
- logfile = "/var/log/messages"
+ logfile = "/var/log/osad"
def set_logfile( self, logfile ):
Logger.logfile = logfile
commit 20f8aef649a056231f3a60dbf67e8d958be45a45
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 16:22:41 2012 +0100
/etc/rhn/tns_admin/osa-dispatcher is directory, not config file
addressing:
warning: File listed twice: /etc/rhn/tns_admin/osa-dispatcher/sqlnet.ora
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index d678427..2cb7c9a 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -251,7 +251,8 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%config(noreplace) %{_sysconfdir}/sysconfig/osa-dispatcher
%config(noreplace) %{_sysconfdir}/logrotate.d/osa-dispatcher
%{rhnroot}/config-defaults/rhn_osa-dispatcher.conf
-%config %{_sysconfdir}/rhn/tns_admin/osa-dispatcher
+%dir %{_sysconfdir}/rhn/tns_admin
+%dir %{_sysconfdir}/rhn/tns_admin/osa-dispatcher
%config(noreplace) %{_sysconfdir}/rhn/tns_admin/osa-dispatcher/sqlnet.ora
%attr(755,root,root) %{_initrddir}/osa-dispatcher
%attr(770,root,%{apache_group}) %dir %{_var}/log/rhn/oracle
@@ -261,7 +262,6 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%if 0%{?suse_version}
%dir %{_sysconfdir}/rhn
%dir %{rhnroot}/config-defaults
-%dir %{_sysconfdir}/rhn/tns_admin
%dir %{_var}/log/rhn
%endif
commit 27de2ff590b534230f48cb06232e07a64294031c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 16:15:02 2012 +0100
fix typo in description
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 374674b..d678427 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -52,7 +52,7 @@ BuildRequires: sysconfig syslog
OSAD agent receives commands over jabber protocol from Spacewalk Server and
commands are instantly executed.
-This package effectively replaces the behaviour of rhnsd/rhn_check that
+This package effectively replaces the behavior of rhnsd/rhn_check that
only poll the Spacewalk Server from time to time.
%package -n osa-dispatcher
commit 3c0129e24e3d1da8d927c453cede9d6e929389b2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 16:10:15 2012 +0100
mark log file osa-dispatcher.log as ghost owned
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 0afd58e..374674b 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -126,8 +126,9 @@ do
make -C osa-dispatcher-selinux NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile clean
done
%endif
-mkdir -p %{buildroot}%{_var}/log/
+mkdir -p %{buildroot}%{_var}/log/rhn
touch %{buildroot}%{_var}/log/osad
+touch %{buildroot}%{_var}/log/rhn/osa-dispatcher.log
%install
rm -rf $RPM_BUILD_ROOT
@@ -256,6 +257,7 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%attr(770,root,%{apache_group}) %dir %{_var}/log/rhn/oracle
%attr(770,root,root) %dir %{_var}/log/rhn/oracle/osa-dispatcher
%doc LICENSE
+%ghost %attr(640,apache,root) %{_var}/log/rhn/osa-dispatcher.log
%if 0%{?suse_version}
%dir %{_sysconfdir}/rhn
%dir %{rhnroot}/config-defaults
commit b9ea7585807dd76b27c19da9a6ab4acc124d99f5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 29 15:55:55 2012 +0100
add logrotate for /var/log/osad and own this file (as ghost)
diff --git a/client/tools/osad/logrotate/Makefile b/client/tools/osad/logrotate/Makefile
index 28705f3..c13952a 100644
--- a/client/tools/osad/logrotate/Makefile
+++ b/client/tools/osad/logrotate/Makefile
@@ -5,7 +5,7 @@
# what is the backend top dir
TOP = ..
-INSTALL_FILES = $(wildcard osa-*)
+INSTALL_FILES = $(wildcard osa*)
INSTALL_DEST = /etc/logrotate.d
include $(TOP)/Makefile.defs
diff --git a/client/tools/osad/logrotate/osad b/client/tools/osad/logrotate/osad
new file mode 100644
index 0000000..f64c1b2
--- /dev/null
+++ b/client/tools/osad/logrotate/osad
@@ -0,0 +1,9 @@
+/var/log/osad {
+ weekly
+ rotate 5
+ copytruncate
+ compress
+ notifempty
+ missingok
+ size 100M
+}
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index eb69b9d..0afd58e 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -126,6 +126,8 @@ do
make -C osa-dispatcher-selinux NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile clean
done
%endif
+mkdir -p %{buildroot}%{_var}/log/
+touch %{buildroot}%{_var}/log/osad
%install
rm -rf $RPM_BUILD_ROOT
@@ -227,6 +229,8 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%config(noreplace) %{client_caps_dir}/*
%attr(755,root,root) %{_initrddir}/osad
%doc LICENSE
+%config(noreplace) %{_sysconfdir}/logrotate.d/osad
+%ghost %attr(644,root,root) %{_var}/log/osad
%if 0%{?suse_version}
# provide directories not owned by any package during build
%dir %{rhnroot}