[Pkg-javascript-commits] [node-uid-safe] 02/03: initial debian commit
Leo Iannacone
l3on-guest at moszumanska.debian.org
Sat Jul 12 16:15:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
l3on-guest pushed a commit to branch master
in repository node-uid-safe.
commit 0b938fe9f255bca77f6a14c21bbece6ad51714df
Author: Leo Iannacone <l3on at ubuntu.com>
Date: Sat Jul 12 18:11:43 2014 +0200
initial debian commit
---
debian/changelog | 5 ++++
debian/compat | 1 +
debian/control | 31 ++++++++++++++++++++
debian/copyright | 34 ++++++++++++++++++++++
debian/docs | 1 +
debian/install | 2 ++
.../patches/0001-use_promise_instead_of_mz.patch | 20 +++++++++++++
debian/patches/0002-remove_base64-url_module.patch | 26 +++++++++++++++++
debian/patches/series | 2 ++
debian/rules | 11 +++++++
debian/source/format | 1 +
debian/tests/control | 2 ++
debian/tests/require | 3 ++
debian/watch | 5 ++++
14 files changed, 144 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6dfa9dd
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+node-uid-safe (1.0.1-1) UNRELEASED; urgency=low
+
+ * Initial release (Closes: #754574)
+
+ -- Leo Iannacone <l3on at ubuntu.com> Sat, 12 Jul 2014 17:14:21 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..bb97d43
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,31 @@
+Source: node-uid-safe
+Section: web
+Priority: extra
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Leo Iannacone <l3on at ubuntu.com>
+Build-Depends:
+ debhelper (>= 8)
+ , dh-buildinfo
+ , nodejs
+ , node-promise
+ , mocha
+Standards-Version: 3.9.5
+Homepage: https://github.com/crypto-utils/uid-safe
+Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-uid-safe.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/node-uid-safe.git
+XS-Testsuite: autopkgtest
+
+Package: node-uid-safe
+Architecture: all
+Depends:
+ ${misc:Depends}
+ , nodejs
+ , node-promise
+Description: UIDs generator for URL and Cookie middlewares - Node.js module
+ This modules provides a generator to create cryptographically secure UIDs
+ safe for both cookie and URL usage.
+ .
+ This is in contrast to modules such as rand-token whose UIDs are actually skewed
+ due to the use of `%` and unnecessarily truncate the UID
+ .
+ Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..ffb5621
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,34 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: uid-safe
+Upstream-Contact: https://github.com/crypto-utils/uid-safe/issues
+Source: https://github.com/crypto-utils/uid-safe
+
+Files: *
+Copyright: 2014 Jonathan Ong <me at jongleberry.com>
+License: Expat
+
+Files: debian/*
+Copyright: 2014 Leo Iannacone <l3on at ubuntu.com>
+License: Expat
+
+License: Expat
+ 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/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..6cc892d
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+package.json usr/lib/nodejs/uid-safe/
+index.js usr/lib/nodejs/uid-safe/
diff --git a/debian/patches/0001-use_promise_instead_of_mz.patch b/debian/patches/0001-use_promise_instead_of_mz.patch
new file mode 100644
index 0000000..55b7b4c
--- /dev/null
+++ b/debian/patches/0001-use_promise_instead_of_mz.patch
@@ -0,0 +1,20 @@
+Description: Module 'mz` is still not in Debian right now.
+ Use 'promise` instead.
+Author: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+
+---
+ index.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/index.js
++++ b/index.js
+@@ -14,7 +14,7 @@
+ })
+ }
+
+- pseudoRandomBytesProm || (pseudoRandomBytesProm = require('mz/crypto').pseudoRandomBytes)
++ pseudoRandomBytesProm || (pseudoRandomBytesProm = require('promise').denodeify(pseudoRandomBytes))
+ return pseudoRandomBytesProm(length).then(escapeBuffer)
+ }
+
diff --git a/debian/patches/0002-remove_base64-url_module.patch b/debian/patches/0002-remove_base64-url_module.patch
new file mode 100644
index 0000000..18d8dcc
--- /dev/null
+++ b/debian/patches/0002-remove_base64-url_module.patch
@@ -0,0 +1,26 @@
+Description: It has no sense require a module only for a simple
+ replaces chain.
+ Import the function directly from upstream:
+ https://github.com/joaquimserafim/base64-url/blob/master/index.js
+ Author: Joaquim Serafim
+ License: ISC
+Author: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+---
+ index.js | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/index.js
++++ b/index.js
+@@ -1,6 +1,10 @@
+
+ var pseudoRandomBytes = require('crypto').pseudoRandomBytes
+-var escape = require('base64-url').escape
++
++// from https://github.com/joaquimserafim/base64-url/blob/master/index.js
++function escape (str) {
++ return str.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
++};
+
+ var pseudoRandomBytesProm
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7793921
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-use_promise_instead_of_mz.patch
+0002-remove_base64-url_module.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9d66b79
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
+
+override_dh_auto_test:
+ mocha -C --reporter spec --bail
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/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8ade220
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: require
+Depends: node-uid-safe
diff --git a/debian/tests/require b/debian/tests/require
new file mode 100644
index 0000000..3f892da
--- /dev/null
+++ b/debian/tests/require
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+nodejs -e "require('uid-safe');"
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..4838a29
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=3
+opts=\
+dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
+filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-uid-safe-$1.tar.gz/ \
+ https://github.com/crypto-utils/uid-safe/tags .*/archive/v?([\d\.]+).tar.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-uid-safe.git
More information about the Pkg-javascript-commits
mailing list