[DRE-commits] [ruby-em-proxy] 01/01: initial debian import, based on kali (thanks to S. Brun work)

Philippe Thierry pthierry-guest at moszumanska.debian.org
Wed Jun 21 10:56:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

pthierry-guest pushed a commit to branch master
in repository ruby-em-proxy.

commit 9377dea7a6e7da3bf15e695c1e438dc559d63783
Author: Philippe Thierry <philippe.thierry at thalesgroup.com>
Date:   Wed Jun 21 10:10:50 2017 +0200

    initial debian import, based on kali (thanks to S. Brun work)
---
 debian/changelog                       |  5 ++++
 debian/compat                          |  1 +
 debian/control                         | 31 ++++++++++++++++++++++++
 debian/copyright                       | 32 +++++++++++++++++++++++++
 debian/em-proxy.1.md                   | 43 ++++++++++++++++++++++++++++++++++
 debian/gbp.conf                        |  7 ++++++
 debian/lib/release.py                  | 43 ++++++++++++++++++++++++++++++++++
 debian/patches/drop-git-ls-files.patch | 20 ++++++++++++++++
 debian/patches/series                  |  1 +
 debian/ruby-em-proxy.docs              |  1 +
 debian/ruby-em-proxy.examples          |  1 +
 debian/ruby-em-proxy.lintian-overrides |  2 ++
 debian/ruby-em-proxy.manpages          |  1 +
 debian/rules                           | 13 ++++++++++
 debian/source/format                   |  1 +
 debian/watch                           |  4 ++++
 16 files changed, 206 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..137d00e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ruby-em-proxy (0.1.9-1) unstable; urgency=medium
+
+  * Initial release (Closes: #nnn).
+
+ -- Philippe Thierry <phil at reseau-libre.net>  Tue, 20 Jun 2017 11:42:25 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..cf61f8c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,31 @@
+Source: ruby-em-proxy
+Section: net
+Priority: optional
+Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
+Uploaders: Philippe Thierry <phil at reseau-libre.net>
+Testsuite: autopkgtest-pkg-ruby
+Build-Depends:
+ debhelper (>= 10),
+ gem2deb,
+ rake,
+ ruby-eventmachine,
+ ruby-rspec,
+ go-md2man
+Standards-Version: 3.9.8
+Homepage: https://github.com/igrigorik/em-proxy
+XS-Ruby-Versions: all
+
+Package: ruby-em-proxy
+Architecture: all
+XB-Ruby-Versions: ${ruby:Versions}
+Depends:
+ ruby | ruby-interpreter,
+ ruby-eventmachine,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: EventMachine Proxy DSL
+ This package contains an EventMachine Proxy DSL for writing high-performance
+ transparent / intercepting proxies in Ruby.
+ It permits one to implement filtering various protocol such as SMTP, etc. and
+ support duplication traffic duplication.
+ It can be use as a standalone tool or as a ruby library.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..387bb19
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: em-proxy
+Source: http://github.com/igrigorik/em-proxy
+
+Files: *
+Copyright: 2010 Ilya Grigorik
+License: MIT
+
+Files: debian/*
+Copyright: 2016 Sophie Brun <sophie at freexian.com>
+           2017 Philippe Thierry <phil at reseau-libre.net>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
diff --git a/debian/em-proxy.1.md b/debian/em-proxy.1.md
new file mode 100644
index 0000000..95bb344
--- /dev/null
+++ b/debian/em-proxy.1.md
@@ -0,0 +1,43 @@
+% EM-PROXY(1) em-proxy Man Page
+% Philippe Thierry
+% June 2017
+# NAME
+em-proxy - EventMachine Proxy DSL for writing high-performance transparent / intercepting proxies in Ruby
+
+# SYNOPSIS
+
+Usage:
+**backdoor-factory [options]**
+
+# DESCRIPTION
+
+**em-factory** is an EventMachine Proxy DSL for writing high-performance transparent / intercepting proxies in Ruby.
+It permits one to implement filtering various protocol such as SMTP, etc. and support duplication traffic duplication.
+It can be use as a standalone tool or as a ruby library.
+
+# OPTIONS
+
+**-l, --listen [PORT]**
+Port to listen on
+
+**-d, --duplex [host:port, ...]**
+List of backends to duplex data to
+
+**-r, --relay [hostname:port]**
+Relay endpoint: hostname:port
+
+**-s, --socket [filename]**
+Relay endpoint: unix filename
+
+**-v, --verbose**
+Run in debug mode
+
+#EXAMPLE
+
+The following will start em-proxy on port 8080, relay and respond with data from port 8081, and also (optional) duplicate all traffic to ports 8082 and 8083 (and discard their responses).
+
+`em-proxy -l 8080 -r localhost:8081 -d localhost:8082,localhost:8083 -v`
+
+# HISTORY
+
+June 2017, Man page originally written by Philippe Thierry (phil at reseau-libre dot com)
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..379cfa6
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,7 @@
+[DEFAULT]
+debian-branch = master
+debian-tag = debian/%(version)s
+upstream-tag = v%(version)s
+pristine-tar = False
+cleaner = /bin/true
+
diff --git a/debian/lib/release.py b/debian/lib/release.py
new file mode 100755
index 0000000..bade9cd
--- /dev/null
+++ b/debian/lib/release.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+"""
+release.py: Get back the upstream releaseNotes to generate the correponsing
+ChangeLog file
+"""
+
+import codecs
+import json
+import re
+import subprocess
+import sys
+import requests
+
+__author__ = "P. Thierry"
+__license__ = "GPL2+"
+__version__ = "1.0"
+__maintainer__ = "P. Thierry"
+__email__ = "phil at reseau-libre.net"
+
+CMD = 'dpkg-parsechangelog -l debian/changelog -S Version'
+BASEURL = 'https://api.github.com/repos/evilsocket/bettercap/releases/tags/v'
+
+# runing subprocess and waiting for its end
+P = subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
+(STDOUT, STDERR) = P.communicate()
+P_STATUS = P.wait()
+
+# cleaning Debian subversion
+VERSION = re.sub(r"-.+$", "", STDOUT)
+
+# loading the current version ReleaseNote.md from Github
+print 'Loading ReleaseNotes from ' + BASEURL + VERSION
+R = requests.get(BASEURL + VERSION)
+if R.ok:
+    REPOITEM = json.loads(R.text or R.content)
+    with codecs.open("changelog", "w", "utf-8") as ch:
+        ch.write("# bettercap" + " " + REPOITEM['tag_name'] + "\r\n")
+        ch.write("\r\n")
+        ch.write(REPOITEM['body'])
+else:
+    print "error loading request: got " + str(R.status_code)
+    sys.exit(1)
diff --git a/debian/patches/drop-git-ls-files.patch b/debian/patches/drop-git-ls-files.patch
new file mode 100644
index 0000000..04c2ade
--- /dev/null
+++ b/debian/patches/drop-git-ls-files.patch
@@ -0,0 +1,20 @@
+Description: Drop git ls-files in .gemspec
+ Replace the git ls-files with Dir.glob as build is not in git directory
+ Author: Sophie Brun <sophie at freexian.com>
+Origin: vendor
+Last-Update: 2016-04-14
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/em-proxy.gemspec
++++ b/em-proxy.gemspec
+@@ -20,8 +20,7 @@ Gem::Specification.new do |s|
+   s.add_development_dependency "rake"
+   s.add_development_dependency "posix-spawn"
+
+-  s.files         = `git ls-files`.split("\n")
+-  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
+-  s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
++  s.files         = Dir.glob('**/*')
++  s.test_files    = Dir.glob('spec/**/*')
+   s.require_paths = ["lib"]
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b6c9316
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+drop-git-ls-files.patch
diff --git a/debian/ruby-em-proxy.docs b/debian/ruby-em-proxy.docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/ruby-em-proxy.docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/ruby-em-proxy.examples b/debian/ruby-em-proxy.examples
new file mode 100644
index 0000000..e39721e
--- /dev/null
+++ b/debian/ruby-em-proxy.examples
@@ -0,0 +1 @@
+examples/*
diff --git a/debian/ruby-em-proxy.lintian-overrides b/debian/ruby-em-proxy.lintian-overrides
new file mode 100644
index 0000000..d14b369
--- /dev/null
+++ b/debian/ruby-em-proxy.lintian-overrides
@@ -0,0 +1,2 @@
+# ruby-* naming is the ruby packaging convention
+ruby-em-proxy: library-package-name-for-application usr/bin/em-proxy
diff --git a/debian/ruby-em-proxy.manpages b/debian/ruby-em-proxy.manpages
new file mode 100644
index 0000000..7738406
--- /dev/null
+++ b/debian/ruby-em-proxy.manpages
@@ -0,0 +1 @@
+debian/em-proxy.1
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..18399e0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+export GEM2DEB_TEST_RUNNER = --check-dependencies
+
+clean_examples:
+	chmod 644 examples/balancing-client.rb
+
+override_dh_auto_build: clean_examples
+	dh_auto_build -O--buildsystem=ruby
+	go-md2man -in debian/em-proxy.1.md -out debian/em-proxy.1
+
+%:
+	dh $@ --buildsystem=ruby --with ruby
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..9b5a9a6
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/<project>-$1\.tar\.gz/ \
+  https://github.com/igrigorik/em-proxy/tags .*/v?(\d\S*)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-em-proxy.git



More information about the Pkg-ruby-extras-commits mailing list