rpms/crossfire/devel crossfire-1.10.0-log-login.patch, NONE, 1.1 crossfire-1.9.1-logtimestamp.patch, NONE, 1.1 logwatch.logconf.crossfire, NONE, 1.1 logwatch.script.crossfire, NONE, 1.1 logwatch.serviceconf.crossfire, NONE, 1.1 .cvsignore, 1.3, 1.4 crossfire.spec, 1.4, 1.5 sources, 1.3, 1.4 crossfire-1.9.0-plugin-io.patch, 1.1, NONE crossfire-1.9.1-autoconf.patch, 1.1, NONE
Michael Thomas (wart)
fedora-extras-commits at redhat.com
Wed May 23 18:39:47 UTC 2007
- Previous message (by thread): rpms/poker-eval/devel .cvsignore, 1.5, 1.6 poker-eval.spec, 1.15, 1.16 sources, 1.5, 1.6
- Next message (by thread): rpms/crossfire-maps/devel .cvsignore, 1.3, 1.4 crossfire-maps.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: wart
Update of /cvs/extras/rpms/crossfire/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26780
Modified Files:
.cvsignore crossfire.spec sources
Added Files:
crossfire-1.10.0-log-login.patch
crossfire-1.9.1-logtimestamp.patch logwatch.logconf.crossfire
logwatch.script.crossfire logwatch.serviceconf.crossfire
Removed Files:
crossfire-1.9.0-plugin-io.patch crossfire-1.9.1-autoconf.patch
Log Message:
Update to 1.10.0
Add logwatch subpackage
crossfire-1.10.0-log-login.patch:
--- NEW FILE crossfire-1.10.0-log-login.patch ---
--- server/login.c.orig 2007-05-22 20:38:19.000000000 -0700
+++ server/login.c 2007-05-22 20:37:36.000000000 -0700
@@ -504,6 +504,8 @@
*/
if ((fp=open_and_uncompress(filename,1,&comp)) == NULL) {
confirm_password(op);
+ LOG(llevInfo,"LOGIN: New player named %s from ip %s\n", op->name,
+ pl->socket.host);
return;
}
if (fstat(fileno(fp), &statbuf)) {
@@ -705,6 +707,8 @@
/* make sure he's a player--needed because of class change. */
op->type = PLAYER;
+ LOG(llevInfo,"LOGIN: Player named %s from ip %s\n", op->name,
+ pl->socket.host);
enter_exit(op,NULL);
pl->name_changed=1;
crossfire-1.9.1-logtimestamp.patch:
--- NEW FILE crossfire-1.9.1-logtimestamp.patch ---
--- common/logger.c.orig 2007-02-23 15:48:18.000000000 -0800
+++ common/logger.c 2007-02-23 21:28:46.000000000 -0800
@@ -30,6 +30,7 @@
#include <stdarg.h>
#include <global.h>
#include <funcpoint.h>
+#include <time.h>
/*
* Logs a message to stderr, or to file, and/or even to socket.
@@ -49,6 +50,18 @@
* than any other buffer, since that buffer may
* need to be put in this one.
*/
+ char time_buf[2048];
+ time_t now = time((time_t *)NULL);
+ struct tm *time_tmp;
+
+ now = time(NULL);
+ time_tmp = localtime(&now);
+ if (time_tmp == NULL) {
+ perror("localtime");
+ }
+ if (strftime(time_buf, sizeof(time_buf), "%m/%d/%y %H:%M:%S", time_tmp) == 0) {
+ fprintf(stderr, "strftime returned 0");
+ }
va_list ap;
va_start(ap, format);
@@ -68,8 +81,11 @@
fputs(buf, stderr);
}
#else
+ fputs(time_buf, logfile);
+ fputs(" ", logfile);
fputs(loglevel_names[logLevel], logfile);
fputs(buf, logfile);
+ fflush(logfile);
#endif
}
if (!exiting && !trying_emergency_save &&
--- NEW FILE logwatch.logconf.crossfire ---
##########################################################################
##########################################################################
# What actual file? Defaults to LogPath if not absolute path....
LogFile = /var/log/crossfire/crossfire.log
# Search the rotated log files
Archive = /var/log/crossfire/crossfire.log.*
# Keep only the lines in the proper date range...
*ApplyUsDate
# vi: shiftwidth=3 tabstop=3 et
--- NEW FILE logwatch.script.crossfire ---
##########################################################################
##########################################################################
use strict;
my ($junk, $Msg, $total);
my %Action = ();
my %Start = ();
my %Login = ();
my %TakeChar = ();
my %DropChar = ();
my %Logout = ();
my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
# Interesting events:
# 05/22/07 20:46:47 [Info] LOGIN: New player named wart from ip 192.168.1.7
# 05/22/07 21:01:12 [Info] LOGIN: Player named wart from ip 192.168.1.7
# 05/22/07 21:00:34 [Info] LOGOUT: Player named wart from ip 192.168.1.7
while (defined(my $ThisLine = <STDIN>)) {
chomp($ThisLine);
if ( ($Msg) = ($ThisLine =~ /LOGIN: (.*)$/)) {
$Login{$Msg}++;
}
if ( ($Msg) = ($ThisLine =~ /LOGOUT: (.*)$/)) {
$Logout{$Msg}++;
}
}
if (keys %Login) {
if ($Detail >= 5) {
foreach my $Msg (sort keys %Login) {
if ($Login{$Msg} > 1) {
print "$Msg ($Login{$Msg} times)\n"
} else {
print "$Msg\n"
}
}
} else {
my $total;
foreach my $Msg (sort keys %Login) {
$total += $Login{$Msg};
}
print "$total Users logged in\n";
}
}
if (keys %Logout) {
if ($Detail >= 5) {
foreach my $Msg (sort keys %Logout) {
if ($Logout{$Msg} > 1) {
print "$Msg ($Logout{$Msg} times)\n"
} else {
print "$Msg\n"
}
}
} else {
my $total;
foreach my $Msg (sort keys %Logout) {
$total += $Logout{$Msg};
}
print "$total players logged out\n";
}
}
exit(0);
# vi: shiftwidth=3 tabstop=3 syntax=perl et
--- NEW FILE logwatch.serviceconf.crossfire ---
###########################################################################
###########################################################################
# You can put comments anywhere you want to. They are effective for the
# rest of the line.
# this is in the format of <name> = <value>. Whitespace at the beginning
# and end of the lines is removed. Whitespace before and after the = sign
# is removed. Everything is case *insensitive*.
# Yes = True = On = 1
# No = False = Off = 0
Title = "Crossfire"
# Which logfile group...
LogFile = crossfire
# vi: shiftwidth=3 tabstop=3 et
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/crossfire/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 9 Jul 2006 21:14:18 -0000 1.3
+++ .cvsignore 23 May 2007 18:39:12 -0000 1.4
@@ -1,2 +1,2 @@
-crossfire-1.9.1.tar.gz
-crossfire-1.9.1.arch.tar.gz
+crossfire-1.10.0.tar.gz
+crossfire-1.10.0.arch.tar.gz
Index: crossfire.spec
===================================================================
RCS file: /cvs/extras/rpms/crossfire/devel/crossfire.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- crossfire.spec 14 Dec 2006 18:41:36 -0000 1.4
+++ crossfire.spec 23 May 2007 18:39:12 -0000 1.5
@@ -1,22 +1,30 @@
%define selinux_variants mls strict targeted
%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp)
+%define logwatch_root %{_datadir}/logwatch
+%define logwatch_conf %{logwatch_root}/dist.conf
+%define logwatch_scripts %{logwatch_root}/scripts
+
Name: crossfire
-Version: 1.9.1
-Release: 3%{?dist}
+Version: 1.10.0
+Release: 1%{?dist}
Summary: Server for hosting crossfire games
Group: Amusements/Games
License: GPL
URL: http://crossfire.real-time.com
-Source0: http://dl.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
-Source1: http://dl.sourceforge.net/crossfire/%{name}-%{version}.arch.tar.gz
+Source0: http://downloads.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
+Source1: http://downloads.sourceforge.net/crossfire/%{name}-%{version}.arch.tar.gz
Source2: crossfire.init
Source3: crossfire.sysconfig
Source4: crossfire.logrotate
Source5: crossfire.te
Source6: crossfire.fc
Source7: crossfire.if
-Patch0: crossfire-1.9.1-autoconf.patch
+Source8: logwatch.logconf.crossfire
+Source9: logwatch.script.crossfire
+Source10: logwatch.serviceconf.crossfire
+Patch0: crossfire-1.9.1-logtimestamp.patch
+Patch1: crossfire-1.10.0-log-login.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: crossfire-maps
BuildRequires: checkpolicy selinux-policy-devel hardlink
@@ -24,9 +32,7 @@
BuildRequires: libXext-devel
BuildRequires: libXaw-devel
BuildRequires: python-devel
-%if "%{selinux_policyver}" != ""
-Requires: selinux-policy >= %{selinux_policyver}
-%endif
+Requires: %{name}-plugins
Requires(post): /sbin/chkconfig
Requires(post): /sbin/service
@@ -80,16 +86,27 @@
Summary: SELinux policy files for crossfire
Group: Amusements/Games
Requires: %{name} = %{version}-%{release}
+%if "%{selinux_policyver}" != ""
+Requires: selinux-policy >= %{selinux_policyver}
+%endif
Requires(post): /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles
Requires(preun): /sbin/service /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles /usr/sbin/setsebool
Requires(postun): /usr/sbin/semodule
%description selinux
selinux policy files for the Crossfire game server
+%package logwatch
+Summary: logwatch scripts for the Crossfire game server
+Group: Amusements/Games
+Requires: %{name} = %{version}-%{release} logwatch
+%description logwatch
+logwatch scripts for the Crossfire game server
+
%prep
%setup -q
%setup -q -a 1
%patch0 -p0
+%patch1 -p0
mkdir SELinux
cp %{SOURCE5} %{SOURCE6} %{SOURCE7} SELinux
@@ -185,13 +202,18 @@
pushd SELinux
for variant in %{selinux_variants}
do
- install -d %{buildroot}%{_datadir}/selinux/${variant}
+ install -d $RPM_BUILD_ROOT%{_datadir}/selinux/${variant}
install -p -m 644 %{name}.pp.${variant} \
- %{buildroot}%{_datadir}/selinux/${variant}/%{name}.pp
+ $RPM_BUILD_ROOT%{_datadir}/selinux/${variant}/%{name}.pp
done
popd
# Hardlink identical policy module packages together
-/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
+/usr/sbin/hardlink -cv $RPM_BUILD_ROOT%{_datadir}/selinux
+
+# Install logwatch files
+install -pD -m 0644 %{SOURCE8} $RPM_BUILD_ROOT%{logwatch_conf}/logfiles/%{name}.conf
+install -pD -m 0755 %{SOURCE9} $RPM_BUILD_ROOT%{logwatch_scripts}/services/%{name}
+install -pD -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{logwatch_conf}/services/%{name}.conf
%pre
@@ -305,8 +327,19 @@
%doc SELinux/*.??
%{_datadir}/selinux/*/%{name}.pp
+%files logwatch
+%defattr(-,root,root,-)
+%{logwatch_conf}/logfiles/%{name}.conf
+%{logwatch_conf}/services/%{name}.conf
+%{logwatch_scripts}/services/%{name}
+
%changelog
+* Tue May 22 2007 Wart <wart at kobold.org> 1.10.0-1
+- Update to 1.10.0
+- Drop patch that was accepted upstream
+- Add logwatch subpackage
+
* Fri Dec 8 2006 Wart <wart at kobold.org> 1.9.1-3
- Rebuild for new python 2.5
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/crossfire/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 9 Jul 2006 21:14:18 -0000 1.3
+++ sources 23 May 2007 18:39:12 -0000 1.4
@@ -1,2 +1,2 @@
-9444daefe1a457b4a18101c255be6cdc crossfire-1.9.1.tar.gz
-83dfd11c565a76ea05e6be999862796d crossfire-1.9.1.arch.tar.gz
+d56ad6cac04ea49f8b6b326b441553a3 crossfire-1.10.0.tar.gz
+26a6d6c2ffb82fd408bf75b25ed339d1 crossfire-1.10.0.arch.tar.gz
--- crossfire-1.9.0-plugin-io.patch DELETED ---
--- crossfire-1.9.1-autoconf.patch DELETED ---
- Previous message (by thread): rpms/poker-eval/devel .cvsignore, 1.5, 1.6 poker-eval.spec, 1.15, 1.16 sources, 1.5, 1.6
- Next message (by thread): rpms/crossfire-maps/devel .cvsignore, 1.3, 1.4 crossfire-maps.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list