rpms/cyphesis/devel cyphesis.spec, 1.14, 1.15 cyphesis.te, 1.3, 1.4 logwatch.logconf.cyphesis, 1.1, 1.2

Michael Thomas (wart) fedora-extras-commits at redhat.com
Wed Dec 19 05:18:45 UTC 2007


Author: wart

Update of /cvs/extras/rpms/cyphesis/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv597

Modified Files:
	cyphesis.spec cyphesis.te logwatch.logconf.cyphesis 
Log Message:
Move logs to the proper log directory so that they get the right
selinux contexts for logwatch to run.




Index: cyphesis.spec
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/devel/cyphesis.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cyphesis.spec	16 Dec 2007 19:27:34 -0000	1.14
+++ cyphesis.spec	19 Dec 2007 05:18:07 -0000	1.15
@@ -7,7 +7,7 @@
 
 Name:           cyphesis
 Version:        0.5.15
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        WorldForge game server
 Group:          System Environment/Libraries
 # Would be GPLv2+, except server/protocol_instructions.h is GPLv2 only.
@@ -21,7 +21,8 @@
 Source5:        logwatch.script.cyphesis
 Source6:        logwatch.serviceconf.cyphesis
 Source7:        logwatch.shared.applycyphesisdate
-Patch0:         cyphesis-0.5.8-init.patch
+Patch0:         cyphesis-0.5.15-init.patch
+Patch1:         cyphesis-0.5.11-logdir.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  python-devel libgcrypt-devel pkgconfig atlascpp-devel
 BuildRequires:  varconf-devel libsigc++20-devel mercator-devel skstream-devel
@@ -67,7 +68,8 @@
 
 %prep
 %setup -q
-%patch0
+%patch0 -p1
+%patch1 -p0
 
 # Fix a bug where DESTDIR is added twice to some files during the
 # install step.  Upstream has been notified.
@@ -116,6 +118,8 @@
 install -pD -m 0644 %{SOURCE6} %{buildroot}%{logwatch_conf}/services/%{name}.conf
 install -pD -m 0755 %{SOURCE7} %{buildroot}%{logwatch_scripts}/shared/applycyphesisdate
 
+mkdir -p %{buildroot}%{_var}/log/%{name}
+
 
 # Install selinux policies
 pushd SELinux
@@ -210,6 +214,9 @@
 %config(noreplace) %{_sysconfdir}/%{name}/*
 %{_sysconfdir}/init.d/%{name}
 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+# Package up the log directory with special permissions so that the
+# service can write to it.
+%dir %attr(0755,cyphesis,cyphesis) %{_var}/log/%{name}
 
 %files logwatch
 %defattr(-,root,root,-)
@@ -225,6 +232,9 @@
 
 
 %changelog
+* Tue Dec 18 2007 Wart <wart at kobold.org> 0.5.15-2
+- Move log files so they get they get the correct context
+
 * Sun Dec 16 2007 Wart <wart at kobold.org> 0.5.15-1
 - Update to 0.5.15
 


Index: cyphesis.te
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/devel/cyphesis.te,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cyphesis.te	20 Jul 2007 20:28:07 -0000	1.3
+++ cyphesis.te	19 Dec 2007 05:18:07 -0000	1.4
@@ -24,16 +24,10 @@
 # setsebool cyphesis_disable_trans 1
 init_daemon_domain(cyphesis_t, cyphesis_exec_t)
 
-
-
 # pid files
 type cyphesis_var_run_t;
 files_pid_file(cyphesis_var_run_t)
 
-# log files
-type cyphesis_var_log_t;
-logging_log_file(cyphesis_var_log_t)
-
 ########################################
 #
 # cyphesis local policy
@@ -62,11 +56,9 @@
 files_pid_filetrans(cyphesis_t,cyphesis_var_run_t, { file sock_file })
 
 # log files
-allow cyphesis_t cyphesis_var_log_t:file create_file_perms;
-allow cyphesis_t cyphesis_var_log_t:sock_file create_file_perms;
-allow cyphesis_t cyphesis_var_log_t:dir { rw_dir_perms setattr };
-logging_log_filetrans(cyphesis_t,cyphesis_var_log_t,{ sock_file file dir })
+allow cyphesis_t var_log_t:file create;
 logging_send_syslog_msg(cyphesis_t)
+logging_write_generic_logs(cyphesis_t)
 
 ## Networking basics (adjust to your needs!)
 sysnet_dns_name_resolve(cyphesis_t)


Index: logwatch.logconf.cyphesis
===================================================================
RCS file: /cvs/extras/rpms/cyphesis/devel/logwatch.logconf.cyphesis,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- logwatch.logconf.cyphesis	26 Feb 2007 02:50:21 -0000	1.1
+++ logwatch.logconf.cyphesis	19 Dec 2007 05:18:07 -0000	1.2
@@ -2,7 +2,7 @@
 ##########################################################################
 
 # What actual file?  Defaults to LogPath if not absolute path....
-LogFile = /var/tmp/cyphesis_event.log
+LogFile = /var/log/cyphesis/cyphesis_event.log
 
 # Keep only the lines in the proper date range...
 *ApplyCyphesisDate




More information about the fedora-extras-commits mailing list