[arch-commits] Commit in hefur/repos (12 files)

2017-02-10 Thread Jelle van der Waa
Date: Friday, February 10, 2017 @ 21:36:46
  Author: jelle
Revision: 288559

db-move: moved hefur from [staging] to [testing] (i686, x86_64)

Added:
  hefur/repos/testing-i686/
  hefur/repos/testing-i686/PKGBUILD
(from rev 288558, hefur/repos/staging-i686/PKGBUILD)
  hefur/repos/testing-i686/hefurd.service
(from rev 288558, hefur/repos/staging-i686/hefurd.service)
  hefur/repos/testing-i686/sysusers.conf
(from rev 288558, hefur/repos/staging-i686/sysusers.conf)
  hefur/repos/testing-i686/tmpfiles.conf
(from rev 288558, hefur/repos/staging-i686/tmpfiles.conf)
  hefur/repos/testing-x86_64/
  hefur/repos/testing-x86_64/PKGBUILD
(from rev 288558, hefur/repos/staging-x86_64/PKGBUILD)
  hefur/repos/testing-x86_64/hefurd.service
(from rev 288558, hefur/repos/staging-x86_64/hefurd.service)
  hefur/repos/testing-x86_64/sysusers.conf
(from rev 288558, hefur/repos/staging-x86_64/sysusers.conf)
  hefur/repos/testing-x86_64/tmpfiles.conf
(from rev 288558, hefur/repos/staging-x86_64/tmpfiles.conf)
Deleted:
  hefur/repos/staging-i686/
  hefur/repos/staging-x86_64/

---+
 testing-i686/PKGBUILD |   36 
 testing-i686/hefurd.service   |   12 
 testing-i686/sysusers.conf|1 +
 testing-i686/tmpfiles.conf|2 ++
 testing-x86_64/PKGBUILD   |   36 
 testing-x86_64/hefurd.service |   12 
 testing-x86_64/sysusers.conf  |1 +
 testing-x86_64/tmpfiles.conf  |2 ++
 8 files changed, 102 insertions(+)

Copied: hefur/repos/testing-i686/PKGBUILD (from rev 288558, 
hefur/repos/staging-i686/PKGBUILD)
===
--- testing-i686/PKGBUILD   (rev 0)
+++ testing-i686/PKGBUILD   2017-02-10 21:36:46 UTC (rev 288559)
@@ -0,0 +1,36 @@
+# $Id$
+# Maintainer: Pierre Schmitz 
+# Contributor: Alexandre Bique 
+
+pkgname=hefur
+pkgver=0.4
+pkgrel=11
+pkgdesc='A standalone and lightweight BitTorrent tracker'
+arch=('i686' 'x86_64')
+url='http://github.com/abique/hefur'
+license=('MIT')
+makedepends=('cmake')
+depends=('gnutls' 'xz' 'protobuf')
+source=("https://github.com/downloads/abique/${pkgname}/${pkgname}-${pkgver}.tar.xz;
+'hefurd.service' 'tmpfiles.conf' 'sysusers.conf')
+md5sums=('f0461363f38105140a1f119a3b97d818'
+ '3107be29769b8afde3574dc6e31d5b6a'
+ 'b884385d6c87c350172427da4ba2688f'
+ '7971708a1fe25c1b51e0a05e812f17c9')
+
+build() {
+   cd ${srcdir}/${pkgname}-${pkgver}
+   mkdir build
+   cd build
+   cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+   make
+}
+
+package() {
+   cd ${srcdir}/${pkgname}-${pkgver}/build
+   DESTDIR=${pkgdir} make install
+   install -D -m644 ${srcdir}/hefurd.service 
${pkgdir}/usr/lib/systemd/system/hefurd.service
+   install -D -m644 ${srcdir}/tmpfiles.conf 
${pkgdir}/usr/lib/tmpfiles.d/hefurd.conf
+   install -D -m644 ${srcdir}/sysusers.conf 
${pkgdir}/usr/lib/sysusers.d/hefurd.conf
+   install -D -m644 ${srcdir}/${pkgname}-${pkgver}/LICENSE 
${pkgdir}/usr/share/licenses/hefur/LICENSE
+}

Copied: hefur/repos/testing-i686/hefurd.service (from rev 288558, 
hefur/repos/staging-i686/hefurd.service)
===
--- testing-i686/hefurd.service (rev 0)
+++ testing-i686/hefurd.service 2017-02-10 21:36:46 UTC (rev 288559)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Hefur BitTorrent tracker
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/hefurd -torrent-dir /var/lib/hefurd
+User=hefur
+Group=hefur
+CPUSchedulingPolicy=batch
+
+[Install]
+WantedBy=multi-user.target

Copied: hefur/repos/testing-i686/sysusers.conf (from rev 288558, 
hefur/repos/staging-i686/sysusers.conf)
===
--- testing-i686/sysusers.conf  (rev 0)
+++ testing-i686/sysusers.conf  2017-02-10 21:36:46 UTC (rev 288559)
@@ -0,0 +1 @@
+u hefur - - /var/lib/hefurd

Copied: hefur/repos/testing-i686/tmpfiles.conf (from rev 288558, 
hefur/repos/staging-i686/tmpfiles.conf)
===
--- testing-i686/tmpfiles.conf  (rev 0)
+++ testing-i686/tmpfiles.conf  2017-02-10 21:36:46 UTC (rev 288559)
@@ -0,0 +1,2 @@
+d /run/hefur - hefur hefur -
+d /var/lib/hefurd - hefur hefur -

Copied: hefur/repos/testing-x86_64/PKGBUILD (from rev 288558, 
hefur/repos/staging-x86_64/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2017-02-10 21:36:46 UTC (rev 288559)
@@ -0,0 +1,36 @@
+# $Id$
+# Maintainer: Pierre Schmitz 
+# Contributor: Alexandre Bique 
+
+pkgname=hefur
+pkgver=0.4

[arch-commits] Commit in hefur/repos (12 files)

2012-12-06 Thread Pierre Schmitz
Date: Thursday, December 6, 2012 @ 06:02:02
  Author: pierre
Revision: 172896

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

Added:
  hefur/repos/extra-i686/PKGBUILD
(from rev 172895, hefur/trunk/PKGBUILD)
  hefur/repos/extra-i686/hefurd.service
(from rev 172895, hefur/trunk/hefurd.service)
  hefur/repos/extra-x86_64/PKGBUILD
(from rev 172895, hefur/trunk/PKGBUILD)
  hefur/repos/extra-x86_64/hefurd.service
(from rev 172895, hefur/trunk/hefurd.service)
Deleted:
  
hefur/repos/extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch
  hefur/repos/extra-i686/PKGBUILD
  hefur/repos/extra-i686/Replace-by-amp-in-stat.html.patch
  hefur/repos/extra-i686/hefurd.service
  
hefur/repos/extra-x86_64/Check-that-added-torrents-from-the-disk-are-still-on.patch
  hefur/repos/extra-x86_64/PKGBUILD
  hefur/repos/extra-x86_64/Replace-by-amp-in-stat.html.patch
  hefur/repos/extra-x86_64/hefurd.service

-+
 extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   |   93 
--
 extra-i686/PKGBUILD |   72 
+++
 extra-i686/Replace-by-amp-in-stat.html.patch|   27 
--
 extra-i686/hefurd.service   |   24 
+-
 extra-x86_64/Check-that-added-torrents-from-the-disk-are-still-on.patch |   93 
--
 extra-x86_64/PKGBUILD   |   72 
+++
 extra-x86_64/Replace-by-amp-in-stat.html.patch  |   27 
--
 extra-x86_64/hefurd.service |   24 
+-
 8 files changed, 90 insertions(+), 342 deletions(-)

Deleted: extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch
===
--- extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   
2012-12-06 11:01:27 UTC (rev 172895)
+++ extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   
2012-12-06 11:02:02 UTC (rev 172896)
@@ -1,93 +0,0 @@
-From dbd00cfc3805b6f1ff794f7de0b52b1a7893401f Mon Sep 17 00:00:00 2001
-From: Alexandre Bique bique.alexan...@gmail.com
-Date: Thu, 15 Nov 2012 20:43:41 +0100
-Subject: [PATCH 07/12] Check that added torrents from the disk are still on
- the disk.
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-

- hefur/fs-tree-white-list.cc | 20 
- hefur/fs-tree-white-list.hh |  1 +
- hefur/torrent-db.hh |  4 +++-
- 3 files changed, 24 insertions(+), 1 deletion(-)
-
-diff --git a/hefur/fs-tree-white-list.cc b/hefur/fs-tree-white-list.cc
-index f493e95..61714d0 100644
 a/hefur/fs-tree-white-list.cc
-+++ b/hefur/fs-tree-white-list.cc
-@@ -54,10 +54,30 @@ namespace hefur
-   }
- 
-   void
-+  FsTreeWhiteList::check()
-+  {
-+std::vectorm::StringRef keys;
-+auto db = Hefur::instance().torrentDb();
-+m::SharedMutex::Locker locker(db-torrents_lock_);
-+db-torrents_.foreach([this, keys] (Torrent::Ptr torrent) {
-+if (::strncmp(torrent-path().c_str(), root_.c_str(), root_.size()))
-+  return;
-+
-+struct ::stat st;
-+if (::stat(torrent-path().c_str(), st)  errno == ENOENT)
-+  keys.push_back(torrent-key());
-+  });
-+
-+for (auto it = keys.begin(); it != keys.end(); ++it)
-+  db-torrents_.erase(*it);
-+  }
-+
-+  void
-   FsTreeWhiteList::loopScan()
-   {
- do {
-   scan();
-+  check();
- } while (!stop_.timedWait(m::time() + rescan_interval_));
-   }
- }
-diff --git a/hefur/fs-tree-white-list.hh b/hefur/fs-tree-white-list.hh
-index c32bcd4..643fb78 100644
 a/hefur/fs-tree-white-list.hh
-+++ b/hefur/fs-tree-white-list.hh
-@@ -30,6 +30,7 @@ namespace hefur
-  * When a .torrent is found, call TorrentDb::addTorrent().
-  */
- void scan();
-+void check();
- 
-   private:
- /**
-diff --git a/hefur/torrent-db.hh b/hefur/torrent-db.hh
-index a1e5d38..e25ed33 100644
 a/hefur/torrent-db.hh
-+++ b/hefur/torrent-db.hh
-@@ -17,6 +17,7 @@ namespace hefur
- {
-   class StatHandler;
-   class PeersHandler;
-+  class FsTreeWhiteList;
- 
-   /**
-* This is the in memory torrent database.
-@@ -63,6 +64,7 @@ namespace hefur
- friend class StatHandler;
- friend class PeersHandler;
- friend class FileHandler;
-+friend class FsTreeWhiteList;
- 
- /** helper to use torrent-key() as a key for the trie */
- static inline m::StringRef torrentKey(Torrent::Ptr torrent) {
-@@ -77,7 +79,7 @@ namespace hefur
- m::Futurebool cleanup_stop_;
- m::Thread   cleanup_thread_;
- m::SharedMutex  torrents_lock_;
--torrents_typetorrents_;
-+torrents_type   torrents_;
-   };
- }
- 
--- 
-1.8.0.1
-

Deleted: extra-i686/PKGBUILD
===
--- extra-i686/PKGBUILD 

[arch-commits] Commit in hefur/repos (12 files)

2012-11-30 Thread Thomas Bächler
Date: Friday, November 30, 2012 @ 16:59:44
  Author: thomas
Revision: 172176

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

Added:
  
hefur/repos/extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch
(from rev 172175, 
hefur/trunk/Check-that-added-torrents-from-the-disk-are-still-on.patch)
  hefur/repos/extra-i686/PKGBUILD
(from rev 172175, hefur/trunk/PKGBUILD)
  hefur/repos/extra-i686/Replace-by-amp-in-stat.html.patch
(from rev 172175, hefur/trunk/Replace-by-amp-in-stat.html.patch)
  hefur/repos/extra-i686/hefurd.service
(from rev 172175, hefur/trunk/hefurd.service)
  
hefur/repos/extra-x86_64/Check-that-added-torrents-from-the-disk-are-still-on.patch
(from rev 172175, 
hefur/trunk/Check-that-added-torrents-from-the-disk-are-still-on.patch)
  hefur/repos/extra-x86_64/PKGBUILD
(from rev 172175, hefur/trunk/PKGBUILD)
  hefur/repos/extra-x86_64/Replace-by-amp-in-stat.html.patch
(from rev 172175, hefur/trunk/Replace-by-amp-in-stat.html.patch)
  hefur/repos/extra-x86_64/hefurd.service
(from rev 172175, hefur/trunk/hefurd.service)
Deleted:
  hefur/repos/extra-i686/PKGBUILD
  hefur/repos/extra-i686/hefurd.service
  hefur/repos/extra-x86_64/PKGBUILD
  hefur/repos/extra-x86_64/hefurd.service

-+
 extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   |   93 
++
 extra-i686/PKGBUILD |   72 
---
 extra-i686/Replace-by-amp-in-stat.html.patch|   27 
++
 extra-i686/hefurd.service   |   23 
+-
 extra-x86_64/Check-that-added-torrents-from-the-disk-are-still-on.patch |   93 
++
 extra-x86_64/PKGBUILD   |   72 
---
 extra-x86_64/Replace-by-amp-in-stat.html.patch  |   27 
++
 extra-x86_64/hefurd.service |   23 
+-
 8 files changed, 342 insertions(+), 88 deletions(-)

Copied: 
hefur/repos/extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch
 (from rev 172175, 
hefur/trunk/Check-that-added-torrents-from-the-disk-are-still-on.patch)
===
--- extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   
(rev 0)
+++ extra-i686/Check-that-added-torrents-from-the-disk-are-still-on.patch   
2012-11-30 21:59:44 UTC (rev 172176)
@@ -0,0 +1,93 @@
+From dbd00cfc3805b6f1ff794f7de0b52b1a7893401f Mon Sep 17 00:00:00 2001
+From: Alexandre Bique bique.alexan...@gmail.com
+Date: Thu, 15 Nov 2012 20:43:41 +0100
+Subject: [PATCH 07/12] Check that added torrents from the disk are still on
+ the disk.
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ hefur/fs-tree-white-list.cc | 20 
+ hefur/fs-tree-white-list.hh |  1 +
+ hefur/torrent-db.hh |  4 +++-
+ 3 files changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/hefur/fs-tree-white-list.cc b/hefur/fs-tree-white-list.cc
+index f493e95..61714d0 100644
+--- a/hefur/fs-tree-white-list.cc
 b/hefur/fs-tree-white-list.cc
+@@ -54,10 +54,30 @@ namespace hefur
+   }
+ 
+   void
++  FsTreeWhiteList::check()
++  {
++std::vectorm::StringRef keys;
++auto db = Hefur::instance().torrentDb();
++m::SharedMutex::Locker locker(db-torrents_lock_);
++db-torrents_.foreach([this, keys] (Torrent::Ptr torrent) {
++if (::strncmp(torrent-path().c_str(), root_.c_str(), root_.size()))
++  return;
++
++struct ::stat st;
++if (::stat(torrent-path().c_str(), st)  errno == ENOENT)
++  keys.push_back(torrent-key());
++  });
++
++for (auto it = keys.begin(); it != keys.end(); ++it)
++  db-torrents_.erase(*it);
++  }
++
++  void
+   FsTreeWhiteList::loopScan()
+   {
+ do {
+   scan();
++  check();
+ } while (!stop_.timedWait(m::time() + rescan_interval_));
+   }
+ }
+diff --git a/hefur/fs-tree-white-list.hh b/hefur/fs-tree-white-list.hh
+index c32bcd4..643fb78 100644
+--- a/hefur/fs-tree-white-list.hh
 b/hefur/fs-tree-white-list.hh
+@@ -30,6 +30,7 @@ namespace hefur
+  * When a .torrent is found, call TorrentDb::addTorrent().
+  */
+ void scan();
++void check();
+ 
+   private:
+ /**
+diff --git a/hefur/torrent-db.hh b/hefur/torrent-db.hh
+index a1e5d38..e25ed33 100644
+--- a/hefur/torrent-db.hh
 b/hefur/torrent-db.hh
+@@ -17,6 +17,7 @@ namespace hefur
+ {
+   class StatHandler;
+   class PeersHandler;
++  class FsTreeWhiteList;
+ 
+   /**
+* This is the in memory torrent database.
+@@ -63,6 +64,7 @@ namespace hefur
+ friend class StatHandler;
+ friend class PeersHandler;
+ friend class FileHandler;
++friend class FsTreeWhiteList;
+ 
+ /** helper to use torrent-key() as a key for the trie */
+