Merge branch 'master' into f14

This commit is contained in:
Nick Bebout 2010-12-24 23:08:14 -06:00
commit 74bc073ac6
5 changed files with 63 additions and 44 deletions

5
.gitignore vendored
View File

@ -1 +1,6 @@
/znc-0.096.tar.gz
/znc-0.097.svn2196.tar.bz2
/znc-0.097.svn2197.tar.bz2
/znc-0.097.svn2202.tar.bz2
/znc-0.097.svn2213.tar.bz2
/znc-0.097.svn2214.tar.bz2

View File

@ -1 +1 @@
38eec4f1911a68b4d2fc704170e7cbf6 znc-0.096.tar.gz
a61e6fd9bac0a9cbbd17d352dab7b70c znc-0.097.svn2214.tar.bz2

View File

@ -0,0 +1,23 @@
--- znc-0.097.svn2213/modules/modpython/compiler.cpp 2010-12-22 08:52:53.106613000 -0600
+++ znc-0.097.svn2213-fixed/modules/modpython/compiler.cpp 2010-12-24 22:49:47.076861076 -0600
@@ -8,9 +8,18 @@
#include <Python.h>
-int main() {
+int main(int argc, char** argv) {
Py_Initialize();
- int res = PyRun_SimpleString("import compileall; print('Optimizing python files for later use...'); compileall.compile_dir('.')");
+ int res = PyRun_SimpleString(
+ "import compileall\n"
+ "print('Optimizing python files for later use...')\n"
+ "import sys\n"
+ "if sys.version_info < (3, 2):\n"
+ " compileall.compile_dir('.')\n"
+ "else:\n"
+ " compileall.compile_dir('.', legacy=True)\n"
+ );
Py_Finalize();
return res;
}
+

View File

@ -1,31 +0,0 @@
--- znc-0.090/znc.cpp 2010-05-10 12:45:15.000000000 -0500
+++ trunk/znc.cpp 2010-06-16 16:43:48.706323545 -0500
@@ -1914,18 +1914,18 @@
}
for (CSockManager::const_iterator it = m_Manager.begin(); it != m_Manager.end(); ++it) {
+ CUser *pUser = NULL;
if ((*it)->GetSockName().Left(5) == "IRC::") {
- CIRCSock *p = (CIRCSock *) *it;
- ret[p->GetUser()->GetUserName()].first += p->GetBytesRead();
- ret[p->GetUser()->GetUserName()].second += p->GetBytesWritten();
- uiUsers_in += p->GetBytesRead();
- uiUsers_out += p->GetBytesWritten();
+ pUser = ((CIRCSock *) *it)->GetUser();
} else if ((*it)->GetSockName().Left(5) == "USR::") {
- CClient *p = (CClient *) *it;
- ret[p->GetUser()->GetUserName()].first += p->GetBytesRead();
- ret[p->GetUser()->GetUserName()].second += p->GetBytesWritten();
- uiUsers_in += p->GetBytesRead();
- uiUsers_out += p->GetBytesWritten();
+ pUser = ((CClient*) *it)->GetUser();
+ }
+
+ if (pUser) {
+ ret[pUser->GetUserName()].first += (*it)->GetBytesRead();
+ ret[pUser->GetUserName()].second += (*it)->GetBytesWritten();
+ uiUsers_in += (*it)->GetBytesRead();
+ uiUsers_out += (*it)->GetBytesWritten();
} else {
uiZNC_in += (*it)->GetBytesRead();
uiZNC_out += (*it)->GetBytesWritten();

View File

@ -1,24 +1,23 @@
Summary: An advanced IRC bouncer
Name: znc
Version: 0.096
#Release: 2.svn2101%{?dist}
Version: 0.097
Release: 2.svn2214%{?dist}
#Release: 0.1.rc1%{?dist}
Release: 2%{?dist}
#Release: 2%{?dist}
License: GPLv2 with exceptions
Group: System Environment/Daemons
URL: http://znc.sf.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
#Source0: znc-0.093.svn2101.tar.bz2
# svn export -r 2101 https://znc.svn.sourceforge.net/svnroot/znc/trunk
# mv trunk znc-0.093.svn2101
# tar jcvf znc-0.093.svn2101.tar.bz2 znc-0.093.svn2101/
#Patch0: znc-trafficstats.patch
#Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source0: znc-0.097.svn2214.tar.bz2
# svn export -r 2214 https://znc.svn.sourceforge.net/svnroot/znc/trunk
# mv trunk znc-0.097.svn2214
# tar jcvf znc-0.097.svn2214.tar.bz2 znc-0.097.svn2214/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl gcc-c++
BuildRequires: openssl-devel >= 0.9.8
BuildRequires: cyrus-sasl-devel
BuildRequires: c-ares-devel
BuildRequires: c-ares-devel python3-devel
BuildRequires: perl(ExtUtils::Embed) swig tcl-devel
%description
@ -62,15 +61,27 @@ Requires: perl
%description modperl
perl module for ZNC
%package modpython
Summary: python module for ZNC
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python3
%description modpython
python module for ZNC
%prep
%setup -q
#%setup -q
%setup -q -n znc-0.097.svn2214
%__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
chmod -x modules/q.cpp
%build
%configure \
--with-module-prefix=%{_libdir}/znc \
--enable-ipv6 --enable-extra --enable-sasl --enable-perl --enable-tcl
--enable-ipv6 --enable-extra --enable-sasl --enable-perl --enable-tcl \
--enable-python
%__make %{?_smp_mflags}
%install
@ -160,7 +171,18 @@ chmod -x modules/q.cpp
%{_libdir}/znc/modperl/
%{_libdir}/znc/modperl.so
%files modpython
%defattr(-,root,root)
%{_libdir}/znc/modpython/
%{_libdir}/znc/modpython.so
%changelog
* Fri Dec 24 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-2.svn2214
- Patch has been upstreamed, update to svn2214
* Wed Dec 22 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-1.svn2213
- Update to znc 0.097-svn2213 which also adds modpython
* Sun Nov 7 2010 Nick Bebout <nb@fedoraproject.org> - 0.096-2
- Build TCL module, move modperl and modtcl to separate subpackages