diff -Nru ori-0.8.1+ds1/debian/changelog ori-0.8.1+ds1/debian/changelog --- ori-0.8.1+ds1/debian/changelog 2017-11-24 12:53:42.000000000 +0000 +++ ori-0.8.1+ds1/debian/changelog 2017-11-28 13:55:06.000000000 +0000 @@ -1,3 +1,9 @@ +ori (0.8.1+ds1-3ubuntu2) bionic; urgency=medium + + * Cherrypick upstream patches to move to C++11. + + -- Dimitri John Ledkov Tue, 28 Nov 2017 13:54:52 +0000 + ori (0.8.1+ds1-3ubuntu1) bionic; urgency=medium * Fix path to the integration test suite. Closes: #882522 diff -Nru ori-0.8.1+ds1/debian/patches/0001-Move-to-C-11.patch ori-0.8.1+ds1/debian/patches/0001-Move-to-C-11.patch --- ori-0.8.1+ds1/debian/patches/0001-Move-to-C-11.patch 1970-01-01 00:00:00.000000000 +0000 +++ ori-0.8.1+ds1/debian/patches/0001-Move-to-C-11.patch 2017-11-28 13:50:26.000000000 +0000 @@ -0,0 +1,1050 @@ +From 48862f2477b181940ec27f4d3c09d7d125802161 Mon Sep 17 00:00:00 2001 +From: Ali Mashtizadeh +Date: Fri, 10 Oct 2014 10:54:37 -0700 +Subject: [PATCH] Move to C++11 + +--- + SConstruct | 20 +++--------------- + libori/index.cc | 3 +-- + libori/localrepo.cc | 8 ++++---- + libori/metadatalog.cc | 4 ++-- + libori/packfile.cc | 4 ++-- + libori/peer.cc | 3 +-- + libori/remoterepo.cc | 3 +-- + libori/sshrepo.cc | 1 - + libori/treediff.cc | 1 - + libori/udsrepo.cc | 1 - + liboriutil/kvserializer.cc | 40 ++++++++++++++++++------------------ + liboriutil/lrucache.cc | 2 +- + liboriutil/oriutil.cc | 10 ++++----- + liboriutil/rwlock.cc | 2 +- + liboriutil/rwlock_posix.cc | 2 +- + liboriutil/rwlock_windows.cc | 2 +- + orifs/oricmd.cc | 2 +- + orifs/orifuse.cc | 2 +- + orifs/oripriv.cc | 5 ++--- + orifs/oripriv.h | 2 +- + oris3/s3backup.h | 4 ++-- + public/ori/backup.h | 8 ++++---- + public/ori/httprepo.h | 4 ++-- + public/ori/index.h | 4 ++-- + public/ori/largeblob.h | 2 +- + public/ori/localobject.h | 4 ++-- + public/ori/localrepo.h | 8 ++++---- + public/ori/metadatalog.h | 8 ++++---- + public/ori/object.h | 4 ++-- + public/ori/packfile.h | 12 +++++------ + public/ori/peer.h | 8 ++++---- + public/ori/remoterepo.h | 10 ++++----- + public/ori/sshrepo.h | 2 +- + public/ori/tempdir.h | 8 ++++---- + public/ori/treediff.h | 4 ++-- + public/ori/udsrepo.h | 2 +- + public/oriutil/dag.h | 48 ++++++++++++++++++++++---------------------- + public/oriutil/lrucache.h | 4 ++-- + public/oriutil/objecthash.h | 12 +++++++++++ + public/oriutil/objectinfo.h | 2 +- + public/oriutil/oritr1.h | 24 ---------------------- + public/oriutil/rwlock.h | 2 +- + 42 files changed, 134 insertions(+), 167 deletions(-) + delete mode 100644 public/oriutil/oritr1.h + +--- a/SConstruct ++++ b/SConstruct +@@ -214,6 +214,7 @@ + print 'Your C compiler and/or environment is incorrectly configured.' + CheckFailed() + ++ env.AppendUnique(CXXFLAGS = ['-std=c++11']) + if not conf.CheckCXX(): + print 'Your C++ compiler and/or environment is incorrectly configured.' + CheckFailed() +@@ -226,23 +227,8 @@ + print 'pkg-config not found!' + Exit(1) + +- # +- #env.AppendUnique(CXXFLAGS = ['-std=c++11']) +- #if not conf.CheckCXX(): +- # env['CXXFLAGS'].remove('-std=c++11') +- # +- #env.AppendUnique(CXXFLAGS = ['-std=c++0x']) +- #if not conf.CheckCXX(): +- # env['CXXFLAGS'].remove('-std=c++0x') +- # +- +- if conf.CheckCXXHeader('unordered_map'): +- env.Append(CPPFLAGS = "-DHAVE_CXX11") +- elif conf.CheckCXXHeader('tr1/unordered_map'): +- env.Append(CPPFLAGS = "-DHAVE_CXXTR1") +- else: +- print 'Either C++11, C++0x, or C++ TR1 must be present!' +- CheckFailed() ++ if not conf.CheckCXXHeader('unordered_map'): ++ print 'C++11 libraries appear to be missing' + + if not conf.CheckCXXHeader('boost/uuid/uuid.hpp'): + print 'Boost UUID headers are missing!' +--- a/libori/index.cc ++++ b/libori/index.cc +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -37,7 +37,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + /// Adds a checksum + #define TOTAL_ENTRYSIZE (IndexEntry::SIZE + 16) +--- a/libori/localrepo.cc ++++ b/libori/localrepo.cc +@@ -995,7 +995,7 @@ + + // Pull queue + deque toPull; +- tr1::unordered_set toPullSet; ++ unordered_set toPullSet; + + // Remotes + std::vector remotes; +@@ -1171,7 +1171,7 @@ + void + LocalRepo::transmit(bytewstream *bs, const ObjectHashVec &objs) + { +- std::tr1::unordered_set includedHashes; ++ unordered_set includedHashes; + + typedef std::vector IndexEntryVec; + std::map packs; +@@ -1998,8 +1998,8 @@ + cout << "Grafting " << (*it).hex() << endl; + + // Compute and set parents +- tr1::unordered_set parents = gDag.getParents(*it); +- tr1::unordered_set::iterator p; ++ unordered_set parents = gDag.getParents(*it); ++ unordered_set::iterator p; + + p = parents.begin(); + if (parents.size() == 0) { +--- a/libori/metadatalog.cc ++++ b/libori/metadatalog.cc +@@ -25,8 +25,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + + #include + #include +--- a/libori/packfile.cc ++++ b/libori/packfile.cc +@@ -29,7 +29,7 @@ + #include + #include + #include +-#include ++#include + + #include "tuneables.h" + +@@ -401,7 +401,7 @@ + } + + // Transmit object infos +- tr1::unordered_set includedHashes; ++ unordered_set includedHashes; + numobjs_t totalObjs = 0; + + strwstream infos_ss; +--- a/libori/peer.cc ++++ b/libori/peer.cc +@@ -20,7 +20,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -34,7 +34,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + /******************************************************************** + * +--- a/libori/remoterepo.cc ++++ b/libori/remoterepo.cc +@@ -19,7 +19,7 @@ + #include + + #include +-#include ++#include + + #include + #include +@@ -34,7 +34,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + RemoteRepo::RemoteRepo() + : r(NULL) +--- a/libori/sshrepo.cc ++++ b/libori/sshrepo.cc +@@ -38,7 +38,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + /* + * SshRepo +--- a/libori/treediff.cc ++++ b/libori/treediff.cc +@@ -33,7 +33,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + TreeDiffEntry::TreeDiffEntry() + : type(Noop), +--- a/libori/udsrepo.cc ++++ b/libori/udsrepo.cc +@@ -34,7 +34,6 @@ + #include + + using namespace std; +-using namespace std::tr1; + + /* + * UDSRepo +--- a/liboriutil/kvserializer.cc ++++ b/liboriutil/kvserializer.cc +@@ -332,25 +332,25 @@ + + blob = KVSERIALIZER_VERSIONSTR; + +- for (it = table.begin(); it != table.end(); it++) ++ for (auto &it : table) + { + string entry; + uint8_t lenH, lenL; + + // length must be less than size +- NOT_IMPLEMENTED(it->first.length() <= 0x0000FFFF); +- lenH = it->first.length() >> 8; +- lenL = it->first.length() & 0x00FF; ++ NOT_IMPLEMENTED(it.first.length() <= 0x0000FFFF); ++ lenH = it.first.length() >> 8; ++ lenL = it.first.length() & 0x00FF; + entry = lenH; + entry += lenL; +- entry += it->first; ++ entry += it.first; + +- NOT_IMPLEMENTED(it->second.length() <= 0x0000FFFF); +- lenH = it->second.length() >> 8; +- lenL = it->second.length() & 0x00FF; ++ NOT_IMPLEMENTED(it.second.length() <= 0x0000FFFF); ++ lenH = it.second.length() >> 8; ++ lenL = it.second.length() & 0x00FF; + entry += lenH; + entry += lenL; +- entry += it->second; ++ entry += it.second; + + blob += entry; + } +@@ -364,25 +364,25 @@ + map::const_iterator it; + + cout << "KVSerializer Dump:" << endl; +- for (it = table.begin(); it != table.end(); it++) ++ for (auto &it : table) + { +- KVType type = getType(it->first); ++ KVType type = getType(it.first); + char buf[32]; + + if (type == KVTypeString) { +- cout << it->first << ": " << getStr(it->first) << endl; ++ cout << it.first << ": " << getStr(it.first) << endl; + } else if (type == KVTypeU8) { +- snprintf(buf, sizeof(buf), "%u", getU8(it->first)); +- cout << it->first << ": " << buf << endl; ++ snprintf(buf, sizeof(buf), "%u", getU8(it.first)); ++ cout << it.first << ": " << buf << endl; + } else if (type == KVTypeU16) { +- snprintf(buf, sizeof(buf), "%u", getU16(it->first)); +- cout << it->first << ": " << buf << endl; ++ snprintf(buf, sizeof(buf), "%u", getU16(it.first)); ++ cout << it.first << ": " << buf << endl; + } else if (type == KVTypeU32) { +- snprintf(buf, sizeof(buf), "%u", getU32(it->first)); +- cout << it->first << ": " << buf << endl; ++ snprintf(buf, sizeof(buf), "%u", getU32(it.first)); ++ cout << it.first << ": " << buf << endl; + } else if (type == KVTypeU64) { +- snprintf(buf, sizeof(buf), "%llu", getU64(it->first)); +- cout << it->first << ": " << buf << endl; ++ snprintf(buf, sizeof(buf), "%llu", getU64(it.first)); ++ cout << it.first << ": " << buf << endl; + } else { + cout << "Unknown type!" << endl; + } +--- a/liboriutil/lrucache.cc ++++ b/liboriutil/lrucache.cc +@@ -17,7 +17,7 @@ + #include + + #include +-#include ++#include + + #include + #include +--- a/liboriutil/oriutil.cc ++++ b/liboriutil/oriutil.cc +@@ -68,15 +68,15 @@ + if (path.size() == 0) + return false; + +- for (it = path.begin(); it != path.end(); it++) ++ for (const char &it : path) + { +- if (*it >= 'a' && *it <= 'z') ++ if (it >= 'a' && it <= 'z') + continue; +- if (*it >= 'A' && *it <= 'Z') ++ if (it >= 'A' && it <= 'Z') + continue; +- if (*it >= '0' && *it <= '9') ++ if (it >= '0' && it <= '9') + continue; +- if (*it == '_' || *it == '.') ++ if (it == '_' || it == '.') + continue; + return false; + } +--- a/liboriutil/rwlock.cc ++++ b/liboriutil/rwlock.cc +@@ -17,7 +17,7 @@ + #include + #include + +-#include ++#include + + #include + #include +--- a/liboriutil/rwlock_posix.cc ++++ b/liboriutil/rwlock_posix.cc +@@ -25,7 +25,7 @@ + #include + + #include +-#include ++#include + + #include + #include +--- a/liboriutil/rwlock_windows.cc ++++ b/liboriutil/rwlock_windows.cc +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +--- a/orifs/oricmd.cc ++++ b/orifs/oricmd.cc +@@ -27,7 +27,7 @@ + + #include + #include +-#include ++#include + + #include + #include +--- a/orifs/orifuse.cc ++++ b/orifs/orifuse.cc +@@ -35,7 +35,7 @@ + + #include + #include +-#include ++#include + + #include + #include +--- a/orifs/oripriv.cc ++++ b/orifs/oripriv.cc +@@ -31,8 +31,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + #include + #include +@@ -51,7 +51,6 @@ + #include "server.h" + + using namespace std; +-using namespace std::tr1; + + // XXX: Hacky remove dependence + extern mount_ori_config config; +--- a/orifs/oripriv.h ++++ b/orifs/oripriv.h +@@ -205,7 +205,7 @@ + uint64_t nextFH; + std::map dirs; + std::map paths; +- std::tr1::unordered_map handles; ++ std::unordered_map handles; + + // Journal + OriJournalMode::JournalMode journalMode; +--- a/oris3/s3backup.h ++++ b/oris3/s3backup.h +@@ -2,7 +2,7 @@ + #define __S3BACKUP_H__ + + #include +-#include ++#include + + #include + #include +@@ -30,7 +30,7 @@ + std::string bucketName; + std::string _hostname; + +- std::tr1::shared_ptr ctx; ++ std::shared_ptr ctx; + }; + + #endif /* __S3BACKUP_H__ */ +--- a/public/ori/backup.h ++++ b/public/ori/backup.h +@@ -18,8 +18,8 @@ + #define __BACKUP_H__ + + #include +-#include +-#include ++#include ++#include + + #include "object.h" + +@@ -54,7 +54,7 @@ + + class BackupService { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + // Is cached for the lifetime of a BackupService + bool hasKey(const std::string &key) { +@@ -91,7 +91,7 @@ + } + + protected: +- typedef std::tr1::unordered_map HasKeyCache; ++ typedef std::unordered_map HasKeyCache; + HasKeyCache hasKeyCache; + }; + +--- a/public/ori/httprepo.h ++++ b/public/ori/httprepo.h +@@ -19,7 +19,7 @@ + + #include + #include +-#include ++#include + + #include "repo.h" + +@@ -56,7 +56,7 @@ + + std::map payloads; + +- std::tr1::unordered_set *containedObjs; ++ std::unordered_set *containedObjs; + }; + + class HttpObject : public Object +--- a/public/ori/index.h ++++ b/public/ori/index.h +@@ -21,7 +21,7 @@ + + #include + #include +-#include ++#include + + #include "object.h" + #include "packfile.h" +@@ -44,7 +44,7 @@ + private: + int fd; + std::string fileName; +- std::tr1::unordered_map index; ++ std::unordered_map index; + + void _writeEntry(const IndexEntry &e); + }; +--- a/public/ori/largeblob.h ++++ b/public/ori/largeblob.h +@@ -39,7 +39,7 @@ + class LargeBlob + { + public: +- LargeBlob(Repo *r); ++ explicit LargeBlob(Repo *r); + ~LargeBlob(); + void chunkFile(const std::string &path); + void extractFile(const std::string &path); +--- a/public/ori/localobject.h ++++ b/public/ori/localobject.h +@@ -22,7 +22,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include "object.h" +@@ -31,7 +31,7 @@ + class LocalObject : public Object + { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + LocalObject(PfTransaction::sp transaction, size_t ix); + LocalObject(Packfile::sp packfile, const IndexEntry &entry); +--- a/public/ori/localrepo.h ++++ b/public/ori/localrepo.h +@@ -17,7 +17,7 @@ + #ifndef __LOCALREPO_H__ + #define __LOCALREPO_H__ + +-#include ++#include + + #include + #include +@@ -70,15 +70,15 @@ + { + std::string lockFile; + public: +- LocalRepoLock(const std::string &filename); ++ explicit LocalRepoLock(const std::string &filename); + ~LocalRepoLock(); +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + }; + + class LocalRepo : public Repo + { + public: +- LocalRepo(const std::string &root = ""); ++ explicit LocalRepo(const std::string &root = ""); + ~LocalRepo(); + void open(const std::string &root = ""); + void close(); +--- a/public/ori/metadatalog.h ++++ b/public/ori/metadatalog.h +@@ -20,9 +20,9 @@ + #include + + typedef int32_t refcount_t; +-typedef std::tr1::unordered_map RefcountMap; +-typedef std::tr1::unordered_map ObjMetadata; +-typedef std::tr1::unordered_map MetadataMap; ++typedef std::unordered_map RefcountMap; ++typedef std::unordered_map ObjMetadata; ++typedef std::unordered_map MetadataMap; + + class MetadataLog; + class MdTransaction +@@ -30,7 +30,7 @@ + public: + MdTransaction(MetadataLog *log); + ~MdTransaction(); +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + void addRef(const ObjectHash &hash); + void decRef(const ObjectHash &hash); +--- a/public/ori/object.h ++++ b/public/ori/object.h +@@ -22,14 +22,14 @@ + #include + #include + #include +-#include ++#include + + #include + #include + + class Object { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + Object() {} + Object(const ObjectInfo &info) : info(info) {} +--- a/public/ori/packfile.h ++++ b/public/ori/packfile.h +@@ -19,8 +19,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + + #include + #include +@@ -47,7 +47,7 @@ + class PfTransaction + { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + PfTransaction(Packfile *pf, Index *idx); + ~PfTransaction(); +@@ -62,7 +62,7 @@ + size_t totalSize; + bool committed; + +- std::tr1::unordered_map hashToIx; ++ std::unordered_map hashToIx; + + private: + Packfile *pf; +@@ -73,7 +73,7 @@ + class Packfile + { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + Packfile(const std::string &filename, packid_t id); + ~Packfile(); +@@ -110,7 +110,7 @@ + class PackfileManager + { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + PackfileManager(const std::string &rootPath); + ~PackfileManager(); +--- a/public/ori/peer.h ++++ b/public/ori/peer.h +@@ -22,7 +22,7 @@ + + #include + #include +-#include ++#include + + class Repo; + class HttpClient; +@@ -57,9 +57,9 @@ + std::string repoId; + // Volatile State + std::string peerFile; +- std::tr1::shared_ptr cachedRepo; +- std::tr1::shared_ptr hc; +- std::tr1::shared_ptr sc; ++ std::shared_ptr cachedRepo; ++ std::shared_ptr hc; ++ std::shared_ptr sc; + }; + + #endif /* __PEER_H__ */ +--- a/public/ori/remoterepo.h ++++ b/public/ori/remoterepo.h +@@ -18,7 +18,7 @@ + #define __REMOTEREPO_H__ + + #include +-#include ++#include + + #include "repo.h" + #include "httpclient.h" +@@ -28,7 +28,7 @@ + class RemoteRepo + { + public: +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + RemoteRepo(); + ~RemoteRepo(); +@@ -42,9 +42,9 @@ + } + private: + Repo *r; +- std::tr1::shared_ptr hc; +- std::tr1::shared_ptr sc; +- std::tr1::shared_ptr uc; ++ std::shared_ptr hc; ++ std::shared_ptr sc; ++ std::shared_ptr uc; + std::string url; + }; + +--- a/public/ori/sshrepo.h ++++ b/public/ori/sshrepo.h +@@ -54,7 +54,7 @@ + + std::map payloads; + +- std::tr1::unordered_set *containedObjs; ++ std::unordered_set *containedObjs; + }; + + class SshObject : public Object +--- a/public/ori/tempdir.h ++++ b/public/ori/tempdir.h +@@ -20,8 +20,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + #include "repo.h" + #include "commit.h" +@@ -36,7 +36,7 @@ + TempDir(const std::string &dirpath); + ~TempDir(); + +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + + std::string pathTo(const std::string &file); + /// Temp files are deleted along with the directory +@@ -60,7 +60,7 @@ + private: + Index index; + int objects_fd; +- std::tr1::unordered_map offsets; ++ std::unordered_map offsets; + }; + + class TempObject : public Object +--- a/public/ori/treediff.h ++++ b/public/ori/treediff.h +@@ -19,7 +19,7 @@ + + #include + #include +-#include ++#include + + #include "repo.h" + #include "tree.h" +@@ -81,7 +81,7 @@ + std::vector entries; + + private: +- std::tr1::unordered_map latestEntries; ++ std::unordered_map latestEntries; + void _resetLatestEntry(const std::string &filepath); + }; + +--- a/public/ori/udsrepo.h ++++ b/public/ori/udsrepo.h +@@ -63,7 +63,7 @@ + + std::map payloads; + +- std::tr1::unordered_set *containedObjs; ++ std::unordered_set *containedObjs; + }; + + class UDSObject : public Object +--- a/public/oriutil/dag.h ++++ b/public/oriutil/dag.h +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include "oritr1.h" ++#include + + #include "debug.h" + +@@ -50,17 +50,17 @@ + { + return v; + } +- std::tr1::unordered_set<_Key> listParents() ++ std::unordered_set<_Key> listParents() + { + return parents; + } +- std::tr1::unordered_set<_Key> listChildren() ++ std::unordered_set<_Key> listChildren() + { + return children; + } + void dump() + { +- typename std::tr1::unordered_set<_Key>::iterator it; ++ typename std::unordered_set<_Key>::iterator it; + for (it = parents.begin(); it != parents.end(); it++) { + std::cout << (*it).hex() << " <- " << k.hex() << std::endl; + } +@@ -70,8 +70,8 @@ + friend class DAG <_Key, _Val>; + _Key k; + _Val v; +- typename std::tr1::unordered_set<_Key> parents; +- typename std::tr1::unordered_set<_Key> children; ++ typename std::unordered_set<_Key> parents; ++ typename std::unordered_set<_Key> children; + }; + + template +@@ -126,9 +126,9 @@ + + ASSERT(n != nodeMap.end()); + +- std::tr1::unordered_set<_Key> parents = (*n).listParents(); +- std::tr1::unordered_set<_Key> children = (*n).listChildren(); +- typename std::tr1::unordered_set<_Key>::iterator i; ++ std::unordered_set<_Key> parents = (*n).listParents(); ++ std::unordered_set<_Key> children = (*n).listChildren(); ++ typename std::unordered_set<_Key>::iterator i; + + // Break edges to parents + for (i = parents.begin(); i != parents.end(); i++) +@@ -156,8 +156,8 @@ + + ASSERT(n != nodeMap.end()); + +- std::tr1::unordered_set<_Key> children = (*n).listChildren(); +- typename std::tr1::unordered_set<_Key>::iterator i; ++ std::unordered_set<_Key> children = (*n).listChildren(); ++ typename std::unordered_set<_Key>::iterator i; + + NOT_IMPLEMENTED(false); + } +@@ -177,7 +177,7 @@ + /* + * Get a node's parents + */ +- std::tr1::unordered_set<_Key> getParents(_Key k) ++ std::unordered_set<_Key> getParents(_Key k) + { + typename std::map<_Key, DAGNode<_Key, _Val> >::iterator it = nodeMap.find(k); + +@@ -220,10 +220,10 @@ + { + typename std::map<_Key, DAGNode<_Key, _Val> >::iterator it1; + typename std::map<_Key, DAGNode<_Key, _Val> >::iterator it2; +- typename std::tr1::unordered_set<_Key> p1p, p2p; +- typename std::tr1::unordered_set<_Key> new_p1p, new_p2p; +- typename std::tr1::unordered_set<_Key> next_p1p, next_p2p; +- typename std::tr1::unordered_set<_Key>::iterator it; ++ typename std::unordered_set<_Key> p1p, p2p; ++ typename std::unordered_set<_Key> new_p1p, new_p2p; ++ typename std::unordered_set<_Key> next_p1p, next_p2p; ++ typename std::unordered_set<_Key>::iterator it; + + /* + * Step 1: Add next set of nodes in p1 & p2 to unordered_set and paths to +@@ -259,7 +259,7 @@ + * nodes stored in p1p and p2p. + */ + for (it = new_p1p.begin(); it != new_p1p.end(); it++) { +- typename std::tr1::unordered_set<_Key>::iterator k; ++ typename std::unordered_set<_Key>::iterator k; + k = p2p.find(*it); + if (k != p2p.end()) { + return *k; +@@ -269,7 +269,7 @@ + p1p.insert(*it); + } + for (it = new_p2p.begin(); it != new_p2p.end(); it++) { +- typename std::tr1::unordered_set<_Key>::iterator k; ++ typename std::unordered_set<_Key>::iterator k; + k = p1p.find(*it); + if (k != p1p.end()) { + return *k; +@@ -285,7 +285,7 @@ + for (it = new_p1p.begin(); it != new_p1p.end(); it++) { + it1 = nodeMap.find(*it); + if (it1 != nodeMap.end()) { +- typename std::tr1::unordered_set<_Key>::iterator k; ++ typename std::unordered_set<_Key>::iterator k; + for (k = it1->second.parents.begin(); + k != it1->second.parents.end(); + k++) +@@ -297,7 +297,7 @@ + for (it = new_p2p.begin(); it != new_p2p.end(); it++) { + it2 = nodeMap.find(*it); + if (it2 != nodeMap.end()) { +- typename std::tr1::unordered_set<_Key>::iterator k; ++ typename std::unordered_set<_Key>::iterator k; + for (k = it2->second.parents.begin(); + k != it2->second.parents.end(); + k++) +@@ -328,7 +328,7 @@ + } + // XXX: THIS DOES NOT PRODUCE THE RIGHT ORDERING + std::list<_Key> getBottomUp(_Key tip) { +- std::tr1::unordered_set<_Key> s = std::tr1::unordered_set<_Key>(); ++ std::unordered_set<_Key> s = std::unordered_set<_Key>(); + std::list<_Key> v = std::list<_Key>(); + std::list<_Key> q = std::list<_Key>(); + std::list<_Key> nextQ = std::list<_Key>(); +@@ -342,14 +342,14 @@ + it != q.end(); + it++) + { +- typename std::tr1::unordered_set<_Key>::iterator p; ++ typename std::unordered_set<_Key>::iterator p; + p = s.find(*it); + if (p == s.end()) { + v.push_front(*it); + s.insert(*it); + +- std::tr1::unordered_set<_Key> parents; +- typename std::tr1::unordered_set<_Key>::iterator jt; ++ std::unordered_set<_Key> parents; ++ typename std::unordered_set<_Key>::iterator jt; + + parents = nodeMap[*it].listParents(); + +--- a/public/oriutil/lrucache.h ++++ b/public/oriutil/lrucache.h +@@ -22,7 +22,7 @@ + #include + #include + #include +-#include "oritr1.h" ++#include + + #include "debug.h" + #include "rwlock.h" +@@ -32,7 +32,7 @@ + { + public: + typedef std::list lru_list; +- typedef std::tr1::unordered_map > lru_cache; + LRUCache() + : numItems(0) +--- a/public/oriutil/objecthash.h ++++ b/public/oriutil/objecthash.h +@@ -53,5 +53,17 @@ + + std::size_t hash_value(ObjectHash const& key); + ++namespace std ++{ ++ template<> ++ struct hash ++ { ++ std::size_t operator()(ObjectHash const& key) const ++ { ++ return hash_value(key); ++ } ++ }; ++} ++ + #endif /* __OBJECTHASH_H__ */ + +--- a/public/oriutil/objectinfo.h ++++ b/public/oriutil/objectinfo.h +@@ -40,7 +40,7 @@ + enum ZipAlgo { ZIPALGO_UNKNOWN, ZIPALGO_NONE, ZIPALGO_FASTLZ, ZIPALGO_LZMA }; + + ObjectInfo(); +- ObjectInfo(const ObjectHash &hash); ++ explicit ObjectInfo(const ObjectHash &hash); + + std::string toString() const; + void fromString(const std::string &info); +--- a/public/oriutil/oritr1.h ++++ /dev/null +@@ -1,24 +0,0 @@ +-/* +- * Copyright (c) 2013 Stanford University +- * +- * Permission to use, copy, modify, and distribute this software for any +- * purpose with or without fee is hereby granted, provided that the above +- * copyright notice and this permission notice appear in all copies. +- * +- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES +- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHORS BE LIABLE FOR +- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- */ +- +-#ifndef __ORITR1_H__ +-#define __ORITR1_H__ +- +-#include +-#include +- +-#endif /* __ORITR1_H__ */ +- +--- a/public/oriutil/rwlock.h ++++ b/public/oriutil/rwlock.h +@@ -41,7 +41,7 @@ + + class RWLock; + struct RWKey { +- typedef std::tr1::shared_ptr sp; ++ typedef std::shared_ptr sp; + virtual ~RWKey() { }; + }; + struct ReaderKey : public RWKey { diff -Nru ori-0.8.1+ds1/debian/patches/0001-Removed-boost-depedency.patch ori-0.8.1+ds1/debian/patches/0001-Removed-boost-depedency.patch --- ori-0.8.1+ds1/debian/patches/0001-Removed-boost-depedency.patch 1970-01-01 00:00:00.000000000 +0000 +++ ori-0.8.1+ds1/debian/patches/0001-Removed-boost-depedency.patch 2017-11-28 13:53:36.000000000 +0000 @@ -0,0 +1,104 @@ +From ef44bae7f844087ea84ed43364c37fd232d8f379 Mon Sep 17 00:00:00 2001 +From: Ali Mashtizadeh +Date: Wed, 15 Apr 2015 10:34:37 -0700 +Subject: [PATCH] Removed boost depedency + +--- + README | 1 - + SConstruct | 14 -------------- + libori/httpserver.cc | 2 +- + libori/localrepo.cc | 9 ++++----- + public/ori/httpserver.h | 1 + + public/oriutil/zeroconf.h | 4 ++-- + 6 files changed, 8 insertions(+), 23 deletions(-) + +--- a/README ++++ b/README +@@ -20,7 +20,6 @@ + + Dependences: + - openssl (tested with 1.0.1+) (Required) +- - boost headers (tested with 1.48+) (Required) + - libevent 2.0 (Required) + - FUSE (API Version 26+) + - liblzma (for LZMA compression) +--- a/SConstruct ++++ b/SConstruct +@@ -193,8 +193,6 @@ + env.Append(CPPFLAGS = "-DHAVE_EXECINFO") + + if sys.platform == "win32": +- env.Append(LIBPATH=['#../boost_1_53_0\stage\lib'], +- CPPPATH=['#../boost_1_53_0']) + env.Append(LIBPATH=['#../libevent-2.0.21-stable'], + CPPPATH=['#../libevent-2.0.21-stable\include']) + +@@ -230,18 +228,6 @@ + if not conf.CheckCXXHeader('unordered_map'): + print 'C++11 libraries appear to be missing' + +- if not conf.CheckCXXHeader('boost/uuid/uuid.hpp'): +- print 'Boost UUID headers are missing!' +- Exit(1) +- +- if not conf.CheckCXXHeader('boost/bind.hpp'): +- print 'Boost bind headers are missing!' +- Exit(1) +- +- if not conf.CheckCXXHeader('boost/date_time/posix_time/posix_time.hpp'): +- print 'Boost posix_time headers are missing!' +- Exit(1) +- + if sys.platform.startswith("freebsd"): + if not conf.CheckLib('execinfo'): + print 'FreeBSD requires libexecinfo to build.' +--- a/libori/localrepo.cc ++++ b/libori/localrepo.cc +@@ -18,11 +18,11 @@ + #include + #include + #include +-#include + + #include + #include + #include ++#include + #include + + #include +@@ -33,8 +33,7 @@ + #include + #include + #include +- +-#include ++#include + + #include + #include +@@ -1057,8 +1056,8 @@ + #ifndef WITHOUT_MDNS + struct event *mdns_event = MDNS_Browse(evbase); + event_add(mdns_event, NULL); +- MDNS_RegisterBrowseCallback(boost::bind(&MultiPullOp::addCandidate, +- &mpo, _1)); ++ MDNS_RegisterBrowseCallback(std::bind(&MultiPullOp::addCandidate, ++ &mpo, std::placeholders::_1)); + #endif + + mpo.remotes.push_back(defaultRemote); +--- a/public/oriutil/zeroconf.h ++++ b/public/oriutil/zeroconf.h +@@ -33,9 +33,9 @@ + */ + struct event *MDNS_Browse(struct event_base *evbase); + +-#include ++#include + //typedef void (*BrowseCallback)(const OriPeer &peer); +-typedef boost::function BrowseCallback; ++typedef std::function BrowseCallback; + void MDNS_RegisterBrowseCallback(BrowseCallback cb); + std::vector MDNS_GetPeers(); + diff -Nru ori-0.8.1+ds1/debian/patches/0001-Removing-most-boost-dependencies.patch ori-0.8.1+ds1/debian/patches/0001-Removing-most-boost-dependencies.patch --- ori-0.8.1+ds1/debian/patches/0001-Removing-most-boost-dependencies.patch 1970-01-01 00:00:00.000000000 +0000 +++ ori-0.8.1+ds1/debian/patches/0001-Removing-most-boost-dependencies.patch 2017-11-28 13:51:20.000000000 +0000 @@ -0,0 +1,176 @@ +From 16126e10e3b03ab06fc3855eb43c3eb5d829c42c Mon Sep 17 00:00:00 2001 +From: Ali Mashtizadeh +Date: Wed, 15 Apr 2015 10:21:09 -0700 +Subject: [PATCH] Removing most boost dependencies + +--- + libori/httprepo.cc | 14 +++++++------- + libori/localrepo.cc | 2 -- + libori/sshrepo.cc | 14 +++++++------- + libori/udsrepo.cc | 14 +++++++------- + liboriutil/stopwatch.cc | 6 ++++++ + public/oriutil/stopwatch.h | 1 + + 6 files changed, 28 insertions(+), 23 deletions(-) + +diff --git a/libori/httprepo.cc b/libori/httprepo.cc +index f4ce9b9..67e608c 100644 +--- a/libori/httprepo.cc ++++ b/libori/httprepo.cc +@@ -30,10 +30,9 @@ + + #include + +-#include +- + #include + #include ++#include + #include + #include + #include +@@ -92,15 +91,16 @@ HttpRepo::getHead() + int + HttpRepo::distance() + { +- boost::posix_time::ptime t_begin = +- boost::posix_time::microsec_clock::local_time(); ++ Stopwatch sw; ++ ++ sw.start(); + + std::string uuid = getUUID(); + assert(uuid != ""); ++ ++ sw.stop(); + +- boost::posix_time::ptime t_end = +- boost::posix_time::microsec_clock::local_time(); +- return (t_end - t_begin).total_milliseconds(); ++ return sw.getElapsedMS(); + } + + Object::sp +diff --git a/libori/localrepo.cc b/libori/localrepo.cc +index 8a94e61..cdc5bc3 100644 +--- a/libori/localrepo.cc ++++ b/libori/localrepo.cc +@@ -34,8 +34,6 @@ + #include + #include + +-#include +-#include + #include + + #include +diff --git a/libori/sshrepo.cc b/libori/sshrepo.cc +index 641398d..becf851 100644 +--- a/libori/sshrepo.cc ++++ b/libori/sshrepo.cc +@@ -29,10 +29,9 @@ + #include + #include + +-#include +- + #include + #include ++#include + #include + #include + #include +@@ -84,8 +83,9 @@ ObjectHash SshRepo::getHead() + int + SshRepo::distance() + { +- boost::posix_time::ptime t_begin = +- boost::posix_time::microsec_clock::local_time(); ++ Stopwatch sw; ++ ++ sw.start(); + + // Send hello command + client->sendCommand("hello"); +@@ -95,9 +95,9 @@ SshRepo::distance() + std::string version; + bs->readPStr(version); + +- boost::posix_time::ptime t_end = +- boost::posix_time::microsec_clock::local_time(); +- return (t_end - t_begin).total_milliseconds(); ++ sw.stop(); ++ ++ return sw.getElapsedMS(); + } + + Object::sp SshRepo::getObject(const ObjectHash &id) +diff --git a/libori/udsrepo.cc b/libori/udsrepo.cc +index 590f35a..680a6b2 100644 +--- a/libori/udsrepo.cc ++++ b/libori/udsrepo.cc +@@ -25,10 +25,9 @@ + #include + #include + +-#include +- + #include + #include ++#include + #include + #include + #include +@@ -98,8 +97,9 @@ ObjectHash UDSRepo::getHead() + int + UDSRepo::distance() + { +- boost::posix_time::ptime t_begin = +- boost::posix_time::microsec_clock::local_time(); ++ Stopwatch sw; ++ ++ sw.start(); + + // Send hello command + client->sendCommand("hello"); +@@ -109,9 +109,9 @@ UDSRepo::distance() + std::string version; + bs->readPStr(version); + +- boost::posix_time::ptime t_end = +- boost::posix_time::microsec_clock::local_time(); +- return (t_end - t_begin).total_milliseconds(); ++ sw.stop(); ++ ++ return sw.getElapsedMS(); + } + + Object::sp UDSRepo::getObject(const ObjectHash &id) +diff --git a/liboriutil/stopwatch.cc b/liboriutil/stopwatch.cc +index 29a1b08..c004548 100644 +--- a/liboriutil/stopwatch.cc ++++ b/liboriutil/stopwatch.cc +@@ -90,3 +90,9 @@ Stopwatch::getElapsedTime() + } + } + ++uint64_t ++Stopwatch::getElapsedMS() ++{ ++ return getElapsedTime() / 1000; ++} ++ +diff --git a/public/oriutil/stopwatch.h b/public/oriutil/stopwatch.h +index 3f8ca36..3235be6 100644 +--- a/public/oriutil/stopwatch.h ++++ b/public/oriutil/stopwatch.h +@@ -26,6 +26,7 @@ public: + void stop(); + void reset(); + uint64_t getElapsedTime(); ++ uint64_t getElapsedMS(); + private: + uint64_t startTime; + uint64_t elapsedTime; +-- +2.7.4 + diff -Nru ori-0.8.1+ds1/debian/patches/series ori-0.8.1+ds1/debian/patches/series --- ori-0.8.1+ds1/debian/patches/series 2016-11-23 05:58:49.000000000 +0000 +++ ori-0.8.1+ds1/debian/patches/series 2017-11-28 13:51:27.000000000 +0000 @@ -5,3 +5,6 @@ fix-binary-reference.patch ignore-missing-file.patch configure-for-autopkgtest.patch +0001-Move-to-C-11.patch +0001-Removing-most-boost-dependencies.patch +0001-Removed-boost-depedency.patch