pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/ecap_clamav_adapter



Module Name:    pkgsrc
Committed By:   prlw1
Date:           Thu Jun 23 15:17:28 UTC 2016

Modified Files:
        pkgsrc/security/ecap_clamav_adapter: Makefile distinfo
Added Files:
        pkgsrc/security/ecap_clamav_adapter/patches: patch-src_Pointers.h
            patch-src_Service.cc patch-src_Service.h patch-src_Xaction.cc
            patch-src_Xaction.h

Log Message:
Update ecap_clamav_adapter to use C++11 in line with libecap (and squid3).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/security/ecap_clamav_adapter/Makefile \
    pkgsrc/security/ecap_clamav_adapter/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Pointers.h \
    pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.cc \
    pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.h \
    pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.cc \
    pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/ecap_clamav_adapter/Makefile
diff -u pkgsrc/security/ecap_clamav_adapter/Makefile:1.1 pkgsrc/security/ecap_clamav_adapter/Makefile:1.2
--- pkgsrc/security/ecap_clamav_adapter/Makefile:1.1    Sat Jun 18 10:18:57 2016
+++ pkgsrc/security/ecap_clamav_adapter/Makefile        Thu Jun 23 15:17:28 2016
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2016/06/18 10:18:57 prlw1 Exp $
+# $NetBSD: Makefile,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
 
 DISTNAME=      ecap_clamav_adapter-2.0.0
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  http://www.measurement-factory.com/tmp/ecap/
 
@@ -14,6 +15,8 @@ USE_LANGUAGES=        c c++
 USE_LIBTOOL=   yes
 USE_TOOLS+=    pkg-config
 
+CXXFLAGS+=     -std=c++11
+
 .include "../../security/clamav/buildlink3.mk"
 .include "../../www/libecap/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/security/ecap_clamav_adapter/distinfo
diff -u pkgsrc/security/ecap_clamav_adapter/distinfo:1.1 pkgsrc/security/ecap_clamav_adapter/distinfo:1.2
--- pkgsrc/security/ecap_clamav_adapter/distinfo:1.1    Sat Jun 18 10:18:57 2016
+++ pkgsrc/security/ecap_clamav_adapter/distinfo        Thu Jun 23 15:17:28 2016
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.1 2016/06/18 10:18:57 prlw1 Exp $
+$NetBSD: distinfo,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
 
 SHA1 (ecap_clamav_adapter-2.0.0.tar.gz) = 2aaf6c970db3622d1380d353c4c38b21b6aab769
 RMD160 (ecap_clamav_adapter-2.0.0.tar.gz) = 1869b60b4de16ef0202fd86c47c053413948674d
 SHA512 (ecap_clamav_adapter-2.0.0.tar.gz) = 882e66ad566220f68e59d41ea5c199af2745eaaa96610cdb7fe475811dbf87b01b5a6a97e6c9a729aecbf470aaae7082dbe502830aa88e86d32ae0d1acabde4b
 Size (ecap_clamav_adapter-2.0.0.tar.gz) = 383682 bytes
+SHA1 (patch-src_Pointers.h) = 9e9b562c12af401de15aeeddb595a9134d31e1d6
+SHA1 (patch-src_Service.cc) = e14a4b29539c25f679b4f207cdd659ae752c0fac
+SHA1 (patch-src_Service.h) = 5b4997278e7b67aa7ee4813ba5a7753e154cb2ae
+SHA1 (patch-src_Xaction.cc) = bca8f15a1985b952f10c94a8c0c9953c91e4e310
+SHA1 (patch-src_Xaction.h) = 59348fcc787fda5d0b80021526561faef44e285d

Added files:

Index: pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Pointers.h
diff -u /dev/null pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Pointers.h:1.1
--- /dev/null   Thu Jun 23 15:17:28 2016
+++ pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Pointers.h    Thu Jun 23 15:17:28 2016
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_Pointers.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Pointers.h.orig        2015-11-08 18:07:35.000000000 +0000
++++ src/Pointers.h
+@@ -5,15 +5,14 @@
+ #ifndef ECAP_CLAMAV_ADAPTER_POINTERS_H
+ #define ECAP_CLAMAV_ADAPTER_POINTERS_H
+ 
+-#include <libecap/common/forward.h>
+-#include <libecap/common/memory.h>
++#include <memory>
+ 
+ namespace Adapter {
+ 
+     class Xaction;
+ 
+-    typedef libecap::shared_ptr<Xaction> SharedXactionPointer;
+-    typedef libecap::weak_ptr<Xaction> XactionPointer;
++    typedef std::shared_ptr<Xaction> SharedXactionPointer;
++    typedef std::weak_ptr<Xaction> XactionPointer;
+ 
+ } // namespace Adapter
+ 
Index: pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.cc
diff -u /dev/null pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.cc:1.1
--- /dev/null   Thu Jun 23 15:17:28 2016
+++ pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.cc    Thu Jun 23 15:17:28 2016
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Service.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Service.cc.orig        2015-11-09 01:12:46.000000000 +0000
++++ src/Service.cc
+@@ -177,7 +177,7 @@ void Adapter::Service::setAll(const Opti
+     tmpFileNameTemplate = TmpFileNameTemplateDefault;
+ 
+     // TODO: convert to std::unique_ptr when we require C++11.
+-    const std::auto_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
++    const std::unique_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
+     tricklingConfig_ = new TricklingConfig();
+ 
+     Cfgtor cfgtor(*this);
+@@ -339,7 +339,7 @@ Adapter::Service::MadeXactionPointer
+ Adapter::Service::makeXaction(libecap::host::Xaction *hostx)
+ {
+     checkpoint();
+-    const libecap::shared_ptr<Service> s = std::tr1::static_pointer_cast<Service>(self);
++    const std::shared_ptr<Service> s = std::static_pointer_cast<Service>(self);
+     SharedXactionPointer x(new Xaction(s, hostx));
+     x->self = x;
+     x->serviceRegistration = new Xactions::iterator(xactions->insert(xactions->end(), x));
+@@ -385,7 +385,7 @@ Adapter::Service::tricklingConfig()
+     return *tricklingConfig_;
+ }
+ 
+-void Adapter::Service::finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig)
++void Adapter::Service::finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig)
+ {
+     if (!tricklingConfig_->dropSize) {
+         // TODO: Warn if at least one other trickling option was explicitly configured.
Index: pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.h
diff -u /dev/null pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.h:1.1
--- /dev/null   Thu Jun 23 15:17:28 2016
+++ pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Service.h     Thu Jun 23 15:17:28 2016
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Service.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Service.h.orig 2015-11-09 01:19:35.000000000 +0000
++++ src/Service.h
+@@ -96,7 +96,7 @@ protected:
+ 
+ private:
+     void notifyTimeouts();
+-    void finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig);
++    void finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig);
+     void printTricklingConfig() const;
+ 
+     // either sets how long we can wait for resume() or returns false
Index: pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.cc
diff -u /dev/null pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.cc:1.1
--- /dev/null   Thu Jun 23 15:17:28 2016
+++ pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.cc    Thu Jun 23 15:17:28 2016
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Xaction.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Xaction.cc.orig        2015-11-09 01:33:00.000000000 +0000
++++ src/Xaction.cc
+@@ -89,7 +89,7 @@ void Adapter::MyAnswer::deliver()
+     DebugFun(flXaction) << "exiting " << this
+ 
+ 
+-Adapter::Xaction::Xaction(libecap::shared_ptr<Service> aService,
++Adapter::Xaction::Xaction(std::shared_ptr<Service> aService,
+     libecap::host::Xaction *aHostX):
+     serviceRegistration(0),
+     service(aService),
+@@ -347,7 +347,7 @@ void Adapter::Xaction::noteVbContentDone
+ 
+     vbFile->flush();
+ 
+-    libecap::shared_ptr<Antivirus> scanner = service->scanner;
++    std::shared_ptr<Antivirus> scanner = service->scanner;
+     Must(scanner);
+ 
+     if (service->makesAsyncXactions()) {
+@@ -411,7 +411,7 @@ void Adapter::Xaction::useVirgin()
+ 
+ void Adapter::Xaction::useStored()
+ {
+-    libecap::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
++    std::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
+     Must(adapted != 0);
+ 
+     Must(adapted->body());
Index: pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.h
diff -u /dev/null pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.h:1.1
--- /dev/null   Thu Jun 23 15:17:28 2016
+++ pkgsrc/security/ecap_clamav_adapter/patches/patch-src_Xaction.h     Thu Jun 23 15:17:28 2016
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_Xaction.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Xaction.h.orig 2015-11-09 01:18:50.000000000 +0000
++++ src/Xaction.h
+@@ -13,7 +13,6 @@
+ #include <libecap/adapter/xaction.h>
+ #include <libecap/host/host.h>
+ #include <libecap/host/xaction.h>
+-#include <libecap/common/memory.h>
+ #include <libecap/common/message.h>
+ #include <libecap/common/header.h>
+ #include <libecap/common/names.h>
+@@ -47,7 +46,7 @@ private:
+ class Xaction: public libecap::adapter::Xaction, public Antivirus::User
+ {
+ public:
+-    Xaction(libecap::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
++    Xaction(std::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
+     virtual ~Xaction();
+ 
+     // meta-information for the host transaction
+@@ -166,7 +165,7 @@ private:
+ 
+     void disconnect(); // expect no more notifications from Service or Host
+ 
+-    libecap::shared_ptr<const Service> service; // configuration access
++    std::shared_ptr<const Service> service; // configuration access
+     libecap::host::Xaction *hostx_; // host transaction representative
+     libecap::Area uri; // Request-URI from headers, for logging
+ 



Home | Main Index | Thread Index | Old Index