Date: Thursday, May 8, 2014 @ 01:03:49
  Author: seblu
Revision: 110821

archrelease: copy trunk to community-i686, community-x86_64

Added:
  znc/repos/community-i686/01-sec-correctly-handle-channel-names.patch
    (from rev 110820, znc/trunk/01-sec-correctly-handle-channel-names.patch)
  znc/repos/community-i686/PKGBUILD
    (from rev 110820, znc/trunk/PKGBUILD)
  znc/repos/community-i686/znc.install
    (from rev 110820, znc/trunk/znc.install)
  znc/repos/community-x86_64/01-sec-correctly-handle-channel-names.patch
    (from rev 110820, znc/trunk/01-sec-correctly-handle-channel-names.patch)
  znc/repos/community-x86_64/PKGBUILD
    (from rev 110820, znc/trunk/PKGBUILD)
  znc/repos/community-x86_64/znc.install
    (from rev 110820, znc/trunk/znc.install)
Deleted:
  znc/repos/community-i686/01-sec-correctly-handle-channel-names.patch
  znc/repos/community-x86_64/01-sec-correctly-handle-channel-names.patch

--------------------------------------------------------------+
 /01-sec-correctly-handle-channel-names.patch                 |  144 ++++++++++
 community-i686/01-sec-correctly-handle-channel-names.patch   |   72 -----
 community-i686/PKGBUILD                                      |   45 +++
 community-i686/znc.install                                   |   29 ++
 community-x86_64/01-sec-correctly-handle-channel-names.patch |   72 -----
 community-x86_64/PKGBUILD                                    |   45 +++
 community-x86_64/znc.install                                 |   29 ++
 7 files changed, 292 insertions(+), 144 deletions(-)

Deleted: community-i686/01-sec-correctly-handle-channel-names.patch
===================================================================
--- community-i686/01-sec-correctly-handle-channel-names.patch  2014-05-07 
20:59:25 UTC (rev 110820)
+++ community-i686/01-sec-correctly-handle-channel-names.patch  2014-05-07 
23:03:49 UTC (rev 110821)
@@ -1,72 +0,0 @@
-From 8756be513ab6663dcd64087006b257ff34e8e487 Mon Sep 17 00:00:00 2001
-From: Uli Schlachter <psyc...@znc.in>
-Date: Sun, 13 Apr 2014 20:36:55 +0200
-Subject: [PATCH] webadmin/add channel: Correctly handle channel names
-
-The CChan constructor makes sure that the channel name begins with a valid
-channel prefix. Thus, this could change the name of the resulting channel.
-
-When you edited an irc network which already had a channel "#foo", were
-connected to IRC (so ZNC knows which prefixes are valid) and added a channel
-"foo", this would lead to a problem:
-
-Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a
-new CChan instance for "foo". The CChan constructor notices that "f" is not a
-valid channel prefix and instead calls itself "#foo". Then,
-CIRCNetwork::AddChan() would see that this channel already exists, delete the
-given channel and return false.
-
-However, webadmin didn't check this result and would continue changing settings
-on an already destroyed CChan instance.
-
-Fix this by checking if the channel exists after CChan had its chance to mess
-with the channel name. Also handle failures from CIRCNetwork::AddChan().
-
-Fixes #528.
-
-Signed-off-by: Uli Schlachter <psyc...@znc.in>
-(cherry picked from commit 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f)
----
- modules/webadmin.cpp | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
-index ec67508..2a03367 100644
---- a/modules/webadmin.cpp
-+++ b/modules/webadmin.cpp
-@@ -667,13 +667,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());
-@@ -699,7 +705,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.9.1
-

Copied: znc/repos/community-i686/01-sec-correctly-handle-channel-names.patch 
(from rev 110820, znc/trunk/01-sec-correctly-handle-channel-names.patch)
===================================================================
--- community-i686/01-sec-correctly-handle-channel-names.patch                  
        (rev 0)
+++ community-i686/01-sec-correctly-handle-channel-names.patch  2014-05-07 
23:03:49 UTC (rev 110821)
@@ -0,0 +1,72 @@
+From 8756be513ab6663dcd64087006b257ff34e8e487 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psyc...@znc.in>
+Date: Sun, 13 Apr 2014 20:36:55 +0200
+Subject: [PATCH] webadmin/add channel: Correctly handle channel names
+
+The CChan constructor makes sure that the channel name begins with a valid
+channel prefix. Thus, this could change the name of the resulting channel.
+
+When you edited an irc network which already had a channel "#foo", were
+connected to IRC (so ZNC knows which prefixes are valid) and added a channel
+"foo", this would lead to a problem:
+
+Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a
+new CChan instance for "foo". The CChan constructor notices that "f" is not a
+valid channel prefix and instead calls itself "#foo". Then,
+CIRCNetwork::AddChan() would see that this channel already exists, delete the
+given channel and return false.
+
+However, webadmin didn't check this result and would continue changing settings
+on an already destroyed CChan instance.
+
+Fix this by checking if the channel exists after CChan had its chance to mess
+with the channel name. Also handle failures from CIRCNetwork::AddChan().
+
+Fixes #528.
+
+Signed-off-by: Uli Schlachter <psyc...@znc.in>
+(cherry picked from commit 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f)
+---
+ modules/webadmin.cpp | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
+index ec67508..2a03367 100644
+--- a/modules/webadmin.cpp
++++ b/modules/webadmin.cpp
+@@ -667,13 +667,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());
+@@ -699,7 +705,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.9.1
+

Copied: znc/repos/community-i686/PKGBUILD (from rev 110820, znc/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD                             (rev 0)
+++ community-i686/PKGBUILD     2014-05-07 23:03:49 UTC (rev 110821)
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer: Sébastien Luttringer
+# Contributor: Kaiting Chen <kaitocr...@gmail.com>
+# Contributor: mickael9 <mickael9 at gmail dot com>
+
+pkgname=znc
+pkgver=1.2
+pkgrel=3
+pkgdesc='An IRC bouncer with modules & scripts support'
+url='http://en.znc.in/wiki/index.php/ZNC'
+license=('GPL2')
+arch=('i686' 'x86_64')
+depends=('libsasl')
+makedepends=('tcl' 'python' 'perl')
+optdepends=('tcl: modtcl module'
+            'python: modpython module'
+            'perl: modperl module'
+            'cyrus-sasl: saslauth module')
+install=$pkgname.install
+source=("http://znc.in/releases/$pkgname-$pkgver.tar.gz";
+        '01-sec-correctly-handle-channel-names.patch')
+md5sums=('ef18e5402a82cc3fcab5c2ac5c2e6f3b'
+         'SKIP')
+
+prepare() {
+  patch -p1 -d $pkgname-$pkgver < 01-sec-correctly-handle-channel-names.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr \
+    --enable-cyrus \
+    --enable-python \
+    --enable-perl \
+    --enable-tcl \
+    --with-systemdsystemunitdir=/usr/lib/systemd/system
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: znc/repos/community-i686/znc.install (from rev 110820, 
znc/trunk/znc.install)
===================================================================
--- community-i686/znc.install                          (rev 0)
+++ community-i686/znc.install  2014-05-07 23:03:49 UTC (rev 110821)
@@ -0,0 +1,29 @@
+#/bin/sh
+
+# arg 1:  the new package version
+post_install() {
+  getent group znc >/dev/null || groupadd -g 136 znc
+  getent passwd znc >/dev/null || useradd -r -d /var/lib/znc -u 136 -g 136 znc
+  [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc
+  echo "==> Use 'znc --makeconf' as user znc to generate your first config"
+  true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  if [ "`vercmp $2 1.0-4`" -lt 0 ]; then
+    [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc
+    usermod -d /var/lib/znc znc 2>/dev/null && echo '==> znc home directory 
has moved to /var/lib/znc'
+  fi
+  true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  userdel -f znc >/dev/null 2>&1
+  groupdel znc >/dev/null 2>&1
+  true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Deleted: community-x86_64/01-sec-correctly-handle-channel-names.patch
===================================================================
--- community-x86_64/01-sec-correctly-handle-channel-names.patch        
2014-05-07 20:59:25 UTC (rev 110820)
+++ community-x86_64/01-sec-correctly-handle-channel-names.patch        
2014-05-07 23:03:49 UTC (rev 110821)
@@ -1,72 +0,0 @@
-From 8756be513ab6663dcd64087006b257ff34e8e487 Mon Sep 17 00:00:00 2001
-From: Uli Schlachter <psyc...@znc.in>
-Date: Sun, 13 Apr 2014 20:36:55 +0200
-Subject: [PATCH] webadmin/add channel: Correctly handle channel names
-
-The CChan constructor makes sure that the channel name begins with a valid
-channel prefix. Thus, this could change the name of the resulting channel.
-
-When you edited an irc network which already had a channel "#foo", were
-connected to IRC (so ZNC knows which prefixes are valid) and added a channel
-"foo", this would lead to a problem:
-
-Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a
-new CChan instance for "foo". The CChan constructor notices that "f" is not a
-valid channel prefix and instead calls itself "#foo". Then,
-CIRCNetwork::AddChan() would see that this channel already exists, delete the
-given channel and return false.
-
-However, webadmin didn't check this result and would continue changing settings
-on an already destroyed CChan instance.
-
-Fix this by checking if the channel exists after CChan had its chance to mess
-with the channel name. Also handle failures from CIRCNetwork::AddChan().
-
-Fixes #528.
-
-Signed-off-by: Uli Schlachter <psyc...@znc.in>
-(cherry picked from commit 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f)
----
- modules/webadmin.cpp | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
-index ec67508..2a03367 100644
---- a/modules/webadmin.cpp
-+++ b/modules/webadmin.cpp
-@@ -667,13 +667,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());
-@@ -699,7 +705,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.9.1
-

Copied: znc/repos/community-x86_64/01-sec-correctly-handle-channel-names.patch 
(from rev 110820, znc/trunk/01-sec-correctly-handle-channel-names.patch)
===================================================================
--- community-x86_64/01-sec-correctly-handle-channel-names.patch                
                (rev 0)
+++ community-x86_64/01-sec-correctly-handle-channel-names.patch        
2014-05-07 23:03:49 UTC (rev 110821)
@@ -0,0 +1,72 @@
+From 8756be513ab6663dcd64087006b257ff34e8e487 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psyc...@znc.in>
+Date: Sun, 13 Apr 2014 20:36:55 +0200
+Subject: [PATCH] webadmin/add channel: Correctly handle channel names
+
+The CChan constructor makes sure that the channel name begins with a valid
+channel prefix. Thus, this could change the name of the resulting channel.
+
+When you edited an irc network which already had a channel "#foo", were
+connected to IRC (so ZNC knows which prefixes are valid) and added a channel
+"foo", this would lead to a problem:
+
+Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a
+new CChan instance for "foo". The CChan constructor notices that "f" is not a
+valid channel prefix and instead calls itself "#foo". Then,
+CIRCNetwork::AddChan() would see that this channel already exists, delete the
+given channel and return false.
+
+However, webadmin didn't check this result and would continue changing settings
+on an already destroyed CChan instance.
+
+Fix this by checking if the channel exists after CChan had its chance to mess
+with the channel name. Also handle failures from CIRCNetwork::AddChan().
+
+Fixes #528.
+
+Signed-off-by: Uli Schlachter <psyc...@znc.in>
+(cherry picked from commit 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f)
+---
+ modules/webadmin.cpp | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
+index ec67508..2a03367 100644
+--- a/modules/webadmin.cpp
++++ b/modules/webadmin.cpp
+@@ -667,13 +667,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());
+@@ -699,7 +705,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.9.1
+

Copied: znc/repos/community-x86_64/PKGBUILD (from rev 110820, 
znc/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2014-05-07 23:03:49 UTC (rev 110821)
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer: Sébastien Luttringer
+# Contributor: Kaiting Chen <kaitocr...@gmail.com>
+# Contributor: mickael9 <mickael9 at gmail dot com>
+
+pkgname=znc
+pkgver=1.2
+pkgrel=3
+pkgdesc='An IRC bouncer with modules & scripts support'
+url='http://en.znc.in/wiki/index.php/ZNC'
+license=('GPL2')
+arch=('i686' 'x86_64')
+depends=('libsasl')
+makedepends=('tcl' 'python' 'perl')
+optdepends=('tcl: modtcl module'
+            'python: modpython module'
+            'perl: modperl module'
+            'cyrus-sasl: saslauth module')
+install=$pkgname.install
+source=("http://znc.in/releases/$pkgname-$pkgver.tar.gz";
+        '01-sec-correctly-handle-channel-names.patch')
+md5sums=('ef18e5402a82cc3fcab5c2ac5c2e6f3b'
+         'SKIP')
+
+prepare() {
+  patch -p1 -d $pkgname-$pkgver < 01-sec-correctly-handle-channel-names.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr \
+    --enable-cyrus \
+    --enable-python \
+    --enable-perl \
+    --enable-tcl \
+    --with-systemdsystemunitdir=/usr/lib/systemd/system
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: znc/repos/community-x86_64/znc.install (from rev 110820, 
znc/trunk/znc.install)
===================================================================
--- community-x86_64/znc.install                                (rev 0)
+++ community-x86_64/znc.install        2014-05-07 23:03:49 UTC (rev 110821)
@@ -0,0 +1,29 @@
+#/bin/sh
+
+# arg 1:  the new package version
+post_install() {
+  getent group znc >/dev/null || groupadd -g 136 znc
+  getent passwd znc >/dev/null || useradd -r -d /var/lib/znc -u 136 -g 136 znc
+  [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc
+  echo "==> Use 'znc --makeconf' as user znc to generate your first config"
+  true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  if [ "`vercmp $2 1.0-4`" -lt 0 ]; then
+    [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc
+    usermod -d /var/lib/znc znc 2>/dev/null && echo '==> znc home directory 
has moved to /var/lib/znc'
+  fi
+  true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  userdel -f znc >/dev/null 2>&1
+  groupdel znc >/dev/null 2>&1
+  true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Reply via email to