merge to get common history in all branches
This commit is contained in:
commit
5d6645262f
@ -1,37 +0,0 @@
|
|||||||
diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
|
|
||||||
index 40a28d3..90ddfd2 100644
|
|
||||||
--- a/modules/webadmin.cpp
|
|
||||||
+++ b/modules/webadmin.cpp
|
|
||||||
@@ -668,13 +668,19 @@ class CWebAdminMod : public CModule {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (pNetwork->FindChan(sChanName.Token(0))) {
|
|
||||||
- WebSock.PrintErrorPage("Channel [" + sChanName.Token(0) + "] already exists");
|
|
||||||
+ // This could change the channel name and e.g. add a "#" prefix
|
|
||||||
+ pChan = new CChan(sChanName, pNetwork, true);
|
|
||||||
+
|
|
||||||
+ if (pNetwork->FindChan(pChan->GetName())) {
|
|
||||||
+ WebSock.PrintErrorPage("Channel [" + pChan->GetName() + "] already exists");
|
|
||||||
+ delete pChan;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- pChan = new CChan(sChanName, pNetwork, true);
|
|
||||||
- pNetwork->AddChan(pChan);
|
|
||||||
+ if (!pNetwork->AddChan(pChan)) {
|
|
||||||
+ WebSock.PrintErrorPage("Could not add channel [" + pChan->GetName() + "]");
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
pChan->SetBufferCount(WebSock.GetParam("buffercount").ToUInt(), spSession->IsAdmin());
|
|
||||||
@@ -700,7 +706,7 @@ class CWebAdminMod : public CModule {
|
|
||||||
|
|
||||||
CTemplate TmplMod;
|
|
||||||
TmplMod["User"] = pUser->GetUserName();
|
|
||||||
- TmplMod["ChanName"] = sChanName;
|
|
||||||
+ TmplMod["ChanName"] = pChan->GetName();
|
|
||||||
TmplMod["WebadminAction"] = "change";
|
|
||||||
FOR_EACH_MODULE(it, pNetwork) {
|
|
||||||
(*it)->OnEmbeddedWebRequest(WebSock, "webadmin/channel", TmplMod);
|
|
@ -1,11 +0,0 @@
|
|||||||
--- znc-0.2-alpha1-original/modules/modperl/Makefile.inc 2011-08-05 16:27:44.000000000 -0500
|
|
||||||
+++ znc-0.2-alpha1/modules/modperl/Makefile.inc 2011-08-05 17:24:25.658100254 -0500
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
@mkdir -p modperl
|
|
||||||
$(Q)$(PERL) $(srcdir)/modperl/codegen.pl $< $@
|
|
||||||
|
|
||||||
-modperl_install: create_install_dir modperl.so
|
|
||||||
+modperl_install: install_datadir modperl.so
|
|
||||||
for i in $(wildcard $(srcdir)/*.pm); do \
|
|
||||||
$(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \
|
|
||||||
done
|
|
@ -1,11 +0,0 @@
|
|||||||
--- znc-0.2-alpha1-original/modules/modpython/Makefile.inc 2011-08-05 16:27:44.000000000 -0500
|
|
||||||
+++ znc-0.2-alpha1/modules/modpython/Makefile.inc 2011-08-05 17:24:07.317001140 -0500
|
|
||||||
@@ -58,7 +58,7 @@
|
|
||||||
$(E) Building optimizer for python files...
|
|
||||||
$(Q)$(CXX) $(PYTHONCOMMON) -o $@ $< $(PY_LDFLAGS)
|
|
||||||
|
|
||||||
-modpython_install: create_install_dir modpython_all
|
|
||||||
+modpython_install: install_datadir modpython_all
|
|
||||||
-for i in *.pyc; do \
|
|
||||||
$(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \
|
|
||||||
done
|
|
@ -1,11 +0,0 @@
|
|||||||
--- znc-0.200-rc1-orig/znc.cpp 2011-08-13 01:36:13.000000000 -0500
|
|
||||||
+++ znc-0.200-rc1/znc.cpp 2011-08-13 16:56:21.118177776 -0500
|
|
||||||
@@ -84,7 +84,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
char szBuf[128];
|
|
||||||
- snprintf(szBuf, sizeof(szBuf), "ZNC %1.3f"VERSION_EXTRA" - http://znc.in", VERSION);
|
|
||||||
+ snprintf(szBuf, sizeof(szBuf), "ZNC %1.3f - http://znc.in", VERSION);
|
|
||||||
// If snprintf overflows (which I doubt), we want to be on the safe side
|
|
||||||
szBuf[sizeof(szBuf) - 1] = '\0';
|
|
||||||
|
|
237
znc.spec
237
znc.spec
@ -1,69 +1,72 @@
|
|||||||
# Define variables to use in conditionals
|
# ZNC is a daemon application and that's why needs hardening
|
||||||
%define use_systemd 0
|
|
||||||
|
|
||||||
%if 0%{?fedora} >= 15
|
|
||||||
%define use_systemd 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
%global __python %{__python3}
|
# Define variables to use in conditionals
|
||||||
|
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||||
|
%global use_systemd 1
|
||||||
|
%endif # 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 6
|
||||||
|
%global with_modperl 1
|
||||||
|
%endif # 0%{?fedora} || 0%{?rhel} >= 6
|
||||||
|
|
||||||
|
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 8
|
||||||
|
%global with_modpython 1
|
||||||
|
%endif # 0%{?fedora} >= 13 || 0%{?rhel} >= 8
|
||||||
|
|
||||||
Summary: An advanced IRC bouncer
|
|
||||||
Name: znc
|
Name: znc
|
||||||
Version: 1.4
|
Version: 1.4
|
||||||
#Release: 0.1.20110801git%{?dist}
|
Release: 5%{?dist}
|
||||||
#Release: 0.4.rc2%{?dist}
|
Summary: An advanced IRC bouncer
|
||||||
Release: 1%{?dist}
|
|
||||||
License: ASL 2.0
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
|
|
||||||
|
License: ASL 2.0
|
||||||
URL: http://znc.in
|
URL: http://znc.in
|
||||||
Source0: http://znc.in/releases/znc-1.4.tar.gz
|
Source0: %{url}/releases/%{name}-%{version}.tar.gz
|
||||||
#Patch0: znc-crashbug.patch
|
|
||||||
|
|
||||||
%if %{use_systemd}
|
%if 0%{?use_systemd}
|
||||||
Source1: znc.service
|
Source1: znc.service
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
|
|
||||||
%if !%{use_systemd}
|
|
||||||
Source1: znc.init
|
Source1: znc.init
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
# git clone https://github.com/znc/znc.git
|
%if 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
# cd znc
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
# git archive --prefix=znc/ HEAD | xz > ../znc-0.097.tar.gz
|
%endif # 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRequires: automake
|
||||||
BuildRequires: gcc-c++ perl
|
BuildRequires: c-ares-devel
|
||||||
BuildRequires: openssl-devel >= 0.9.8
|
|
||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
BuildRequires: c-ares-devel automake
|
BuildRequires: gettext-devel
|
||||||
BuildRequires: tcl-devel perl(ExtUtils::Embed)
|
BuildRequires: openssl-devel >= 0.9.8
|
||||||
Obsoletes: znc-extra <= %{version}-%{release}
|
BuildRequires: perl(ExtUtils::Embed)
|
||||||
|
|
||||||
%if %{use_systemd}
|
%if (0%{?fedora} && 0%{?fedora} <= 24) || (0%{?rhel} && 0%{?rhel} <= 9)
|
||||||
|
Obsoletes: znc-extra <= %{version}-%{release}
|
||||||
|
%endif # (0%{?fedora} && 0%{?fedora} <= 24) || (0%{?rhel} && 0%{?rhel} <= 9)
|
||||||
|
|
||||||
|
%if 0%{?use_systemd}
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
%endif
|
%endif
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
%if %{use_systemd}
|
%if 0%{?use_systemd}
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
Requires(post): systemd-sysv
|
Requires(post): systemd-sysv
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
Requires(postun): systemd-units
|
Requires(postun): systemd-units
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
|
|
||||||
%if !%{use_systemd}
|
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig
|
Requires(preun): chkconfig
|
||||||
# This is for /sbin/service
|
# This is for /sbin/service
|
||||||
Requires(preun): initscripts
|
Requires(preun): initscripts
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ZNC is an IRC bouncer with many advanced features like detaching,
|
ZNC is an IRC bouncer with many advanced features like detaching,
|
||||||
multiple users, per channel playback buffer, SSL, IPv6, transparent
|
multiple users, per channel playback buffer, SSL, IPv6, transparent
|
||||||
DCC bouncing, Perl and C++ module support to name a few.
|
DCC bouncing, Perl and C++ module support to name a few.
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files needed to compile ZNC modules
|
Summary: Development files needed to compile ZNC modules
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -75,92 +78,136 @@ BuildRequires: pkgconfig
|
|||||||
All includes and program files you need to compile your own znc
|
All includes and program files you need to compile your own znc
|
||||||
modules.
|
modules.
|
||||||
|
|
||||||
|
|
||||||
%package modtcl
|
%package modtcl
|
||||||
Summary: TCL module for ZNC
|
Summary: TCL module for ZNC
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
|
||||||
|
BuildRequires: tcl-devel
|
||||||
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: tcl
|
Requires: tcl
|
||||||
|
|
||||||
%description modtcl
|
%description modtcl
|
||||||
TCL module for ZNC
|
TCL module for ZNC
|
||||||
|
|
||||||
|
%if 0%{?with_modperl}
|
||||||
|
%package modperl
|
||||||
|
Summary: perl module for ZNC
|
||||||
|
Group: Development/Libraries
|
||||||
|
|
||||||
|
BuildRequires: perl-devel
|
||||||
|
BuildRequires: swig
|
||||||
|
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: perl
|
||||||
|
|
||||||
|
Provides: perl(ZNC::Module) = %{version}-%{release}
|
||||||
|
|
||||||
|
%description modperl
|
||||||
|
perl module for ZNC
|
||||||
|
%endif # 0%{?with_modperl}
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_modpython}
|
||||||
|
%package modpython
|
||||||
|
Summary: python3 module for ZNC
|
||||||
|
Group: Development/Libraries
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: swig
|
||||||
|
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: python3
|
||||||
|
|
||||||
|
%description modpython
|
||||||
|
python3 module for ZNC
|
||||||
|
%endif # 0%{?with_modpython}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q
|
||||||
#%setup -q -n znc-1.2-rc2
|
|
||||||
#%patch0 -p1
|
|
||||||
%__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
|
%__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
|
||||||
chmod -x modules/q.cpp
|
chmod -x modules/q.cpp
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
--with-module-prefix=%{_libdir}/znc \
|
--with-module-prefix=%{_libdir}/znc \
|
||||||
--enable-ipv6 --enable-sasl --disable-perl --enable-tcl
|
%if 0%{?with_modperl}
|
||||||
|
--enable-perl
|
||||||
|
%else
|
||||||
|
--disable-perl
|
||||||
|
%endif # 0%{?with_modperl}
|
||||||
|
%if 0%{?with_modpython}
|
||||||
|
--enable-python \
|
||||||
|
%else # 0%{?with_modpython}
|
||||||
|
--disable-python \
|
||||||
|
%endif # 0%{?with_modpython}
|
||||||
|
--enable-ipv6 --enable-sasl --enable-tcl
|
||||||
%__make %{?_smp_mflags}
|
%__make %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
|
%__rm -Rf "%{buildroot}"
|
||||||
|
%endif # 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
|
%__make install DESTDIR="%{buildroot}"
|
||||||
|
%if 0%{?use_systemd}
|
||||||
|
mkdir -p %buildroot%{_unitdir}
|
||||||
|
install -m 0644 %{SOURCE1} %buildroot%{_unitdir}/znc.service
|
||||||
|
%else # 0%{?use_systemd}
|
||||||
|
mkdir -p %buildroot%{_initrddir}
|
||||||
|
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/znc
|
||||||
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
|
%clean
|
||||||
|
%__rm -Rf "%{buildroot}"
|
||||||
|
%endif # 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
#%if %{use_systemd}
|
|
||||||
getent group znc >/dev/null || groupadd -r znc
|
getent group znc >/dev/null || groupadd -r znc
|
||||||
getent passwd znc >/dev/null || \
|
getent passwd znc >/dev/null || \
|
||||||
useradd -r -g znc -d /var/lib/znc -s /sbin/nologin \
|
useradd -r -g znc -d /var/lib/znc -s /sbin/nologin \
|
||||||
-c "Account for ZNC to run as" znc
|
-c "Account for ZNC to run as" znc
|
||||||
mkdir -p /var/lib/znc
|
mkdir -p /var/lib/znc
|
||||||
chown znc:znc /var/lib/znc
|
chown znc:znc /var/lib/znc
|
||||||
#exit 0
|
|
||||||
#%endif
|
|
||||||
|
|
||||||
%install
|
|
||||||
%__rm -Rf "%{buildroot}"
|
|
||||||
%__make install DESTDIR="%{buildroot}"
|
|
||||||
%if %{use_systemd}
|
|
||||||
mkdir -p %buildroot%{_unitdir}
|
|
||||||
install -m 0644 %{SOURCE1} %buildroot%{_unitdir}/znc.service
|
|
||||||
%endif
|
|
||||||
%if !%{use_systemd}
|
|
||||||
mkdir -p %buildroot%{_initrddir}
|
|
||||||
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/znc
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
|
||||||
%__rm -Rf "%{buildroot}"
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%if 0%{?use_systemd}
|
||||||
%if %{use_systemd}
|
|
||||||
%systemd_post znc.service
|
%systemd_post znc.service
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
|
|
||||||
%if !%{use_systemd}
|
|
||||||
# This adds the proper /etc/rc*.d links for the script
|
# This adds the proper /etc/rc*.d links for the script
|
||||||
/sbin/chkconfig --add znc
|
/sbin/chkconfig --add znc
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%if 0%{?use_systemd}
|
||||||
%if %{use_systemd}
|
|
||||||
%systemd_postun_with_restart znc.service
|
%systemd_postun_with_restart znc.service
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
|
|
||||||
%if !%{use_systemd}
|
|
||||||
if [ "$1" -ge "1" ] ; then
|
if [ "$1" -ge "1" ] ; then
|
||||||
/sbin/service znc condrestart >/dev/null 2>&1 || :
|
/sbin/service znc condrestart >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if 0%{?use_systemd}
|
||||||
%if %{use_systemd}
|
|
||||||
%systemd_preun znc.service
|
%systemd_preun znc.service
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
|
|
||||||
%if !%{use_systemd}
|
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
/sbin/service znc stop >/dev/null 2>&1 || :
|
/sbin/service znc stop >/dev/null 2>&1 || :
|
||||||
/sbin/chkconfig --del znc || :
|
/sbin/chkconfig --del znc || :
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc AUTHORS LICENSE README.md
|
%doc AUTHORS LICENSE README.md
|
||||||
%{_bindir}/znc
|
%{_bindir}/znc
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
@ -218,25 +265,53 @@ fi
|
|||||||
%{_libdir}/znc/watch.so
|
%{_libdir}/znc/watch.so
|
||||||
%{_libdir}/znc/webadmin.so
|
%{_libdir}/znc/webadmin.so
|
||||||
%{_datadir}/znc/
|
%{_datadir}/znc/
|
||||||
%if %{use_systemd}
|
%if 0%{?use_systemd}
|
||||||
%{_unitdir}/znc.service
|
%{_unitdir}/znc.service
|
||||||
%endif
|
%else # 0%{?use_systemd}
|
||||||
%if !%{use_systemd}
|
|
||||||
%{_initrddir}/znc
|
%{_initrddir}/znc
|
||||||
%endif
|
%endif # 0%{?use_systemd}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_bindir}/znc-buildmod
|
%{_bindir}/znc-buildmod
|
||||||
#%{_bindir}/znc-config
|
#%{_bindir}/znc-config
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_includedir}/znc/
|
%{_includedir}/znc/
|
||||||
|
|
||||||
%files modtcl
|
%files modtcl
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_libdir}/znc/modtcl.so
|
%{_libdir}/znc/modtcl.so
|
||||||
|
|
||||||
|
%if 0%{?with_modperl}
|
||||||
|
%files modperl
|
||||||
|
%{_libdir}/znc/modperl/
|
||||||
|
%{_libdir}/znc/modperl.so
|
||||||
|
%{_libdir}/znc/perleval.pm
|
||||||
|
%endif # 0%{?with_modperl}
|
||||||
|
|
||||||
|
%if 0%{?with_modpython}
|
||||||
|
%files modpython
|
||||||
|
%{_libdir}/znc/modpython/
|
||||||
|
%{_libdir}/znc/modpython.so
|
||||||
|
%endif # 0%{?with_modpython}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Aug 03 2014 Björn Esser <bjoern.esser@gmail.com> - 1.4-5
|
||||||
|
- skip the python-subpkg on EPEL <= 7
|
||||||
|
- replaced %%define with %%global
|
||||||
|
- removed %%defattr, since it is not needed for recent releases
|
||||||
|
- conditionalized stuff for el <= 5
|
||||||
|
- small cleanups
|
||||||
|
- purged unused patches
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
||||||
|
|
||||||
|
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
|
||||||
|
|
||||||
* Mon Apr 14 2014 Nick Bebout <nb@fedoraproject.org> - 1.2-3
|
* Mon Apr 14 2014 Nick Bebout <nb@fedoraproject.org> - 1.2-3
|
||||||
- Fix potential crash bug when adding channels
|
- Fix potential crash bug when adding channels
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user