[Debian-iot-packaging] [duktape] 02/02: Import Debian patch 1.5.0-1

Thorsten Alteholz alteholz at moszumanska.debian.org
Fri Oct 14 20:32:24 UTC 2016


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

alteholz pushed a commit to branch master
in repository duktape.

commit 4cfd1a7c443224d1258d536b16ca7a1ac21e3871
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Mon Jun 20 21:26:11 2016 +0200

    Import Debian patch 1.5.0-1
---
 debian/README.source                 |  4 +++
 debian/changelog                     |  5 +++
 debian/compat                        |  1 +
 debian/control                       | 53 +++++++++++++++++++++++++++++
 debian/copyright                     | 30 ++++++++++++++++
 debian/duk.1                         | 66 ++++++++++++++++++++++++++++++++++++
 debian/duktape-dev.install           |  1 +
 debian/install                       |  1 +
 debian/manpages                      |  1 +
 debian/missing-sources/duk_initjs.js | 22 ++++++++++++
 debian/patches/hardening.patch       | 16 +++++++++
 debian/patches/series                |  1 +
 debian/rules                         | 20 +++++++++++
 debian/source/format                 |  1 +
 debian/watch                         |  8 +++++
 15 files changed, 230 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..32b45df
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,4 @@
+The directory src contains a combintaion of all source files from src-separate into duktape.c.
+This combination can be done with the script combine_src.py[1] from the upstream repository.
+
+[1]https://github.com/svaarala/duktape/blob/master/util/combine_src.py
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..cf5ab44
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+duktape (1.5.0-1) unstable; urgency=medium
+
+  * Initial release (Closes: #827773)
+
+ -- Thorsten Alteholz <debian at alteholz.de>  Mon, 20 Jun 2016 21:26:11 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..0d70c9c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,53 @@
+Source: duktape
+Section: interpreters
+Priority: optional
+Maintainer: Thorsten Alteholz <debian at alteholz.de>
+Build-Depends: debhelper (>=9)
+Standards-Version: 3.9.8
+Homepage: http://duktape.org
+#Vcs-Git: git://anonscm.debian.org/collab-maint/duktape.git
+#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/duktape.git
+
+Package: duktape
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: embeddable Javascript engine
+ Duktape is an embeddable Javascript engine, with a focus on portability 
+ and compact footprint.
+ .
+ Duktape is easy to integrate into a C/C++ project: add duktape.c, duktape.h, 
+ and duk_config.h to your build, and use the Duktape API to call Ecmascript 
+ functions from C code and vice versa.
+ .
+ The main features are
+    - Embeddable, portable, compact: can run on platforms with 
+      256kB flash and 64kB system RAM
+    - Ecmascript E5/E5.1 compliant, some features borrowed from 
+      Ecmascript E6
+    - Khronos/ES6 TypedArray and Node.js Buffer bindings
+    - Built-in debugger
+    - Built-in regular expression engine
+    - Built-in Unicode support
+    - Minimal platform dependencies
+    - Combined reference counting and mark-and-sweep garbage 
+      collection with finalization
+    - Custom features like coroutines, built-in logging framework, 
+      and built-in CommonJS-based module loading framework
+    - Property virtualization using a subset of Ecmascript E6 Proxy 
+      object
+    - Bytecode dump/load for caching compiled functions
+ .
+ This package contains a commandline duk interpreter
+
+Package: duktape-dev
+Architecture: all
+Depends: ${misc:Depends}
+Description: embeddable Javascript engine, development files
+ Duktape is an embeddable Javascript engine, with a focus on portability 
+ and compact footprint.
+ .
+ Duktape is easy to integrate into a C/C++ project: add duktape.c, duktape.h, 
+ and duk_config.h to your build, and use the Duktape API to call Ecmascript 
+ functions from C code and vice versa.
+ .
+ This package contains all source files to use in own projects.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..4527cde
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,30 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: duktape
+Source: http://duktape.org
+
+Files: *
+Copyright: (c) 2013-2016 by Duktape authors (see AUTHORS.rst)
+License: expat
+
+Files: debian/*
+Copyright: 2016 Thorsten Alteholz <debian at alteholz.de>
+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/duk.1 b/debian/duk.1
new file mode 100644
index 0000000..0eb6247
--- /dev/null
+++ b/debian/duk.1
@@ -0,0 +1,66 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.4.
+.TH DUK "1" "June 2016" "duk" "User Commands"
+.SH NAME
+duk \- duktape, embeddable Javascript engine
+.SH SYNOPSIS
+.B duk
+[\fI\,options\/\fR] [\fI\,<filenames>\/\fR]
+.SH DESCRIPTION
+.TP
+\fB\-i\fR
+enter interactive mode after executing argument file(s) / eval code
+.TP
+\fB\-e\fR CODE
+evaluate code
+.TP
+\fB\-c\fR FILE
+compile into bytecode (use with only one file argument)
+.TP
+\fB\-\-run\-stdin\fR
+treat stdin like a file, i.e. compile full input (not line by line)
+.TP
+\fB\-\-verbose\fR
+verbose messages to stderr
+.TP
+\fB\-\-restrict\-memory\fR
+use lower memory limit (used by test runner)
+.TP
+\fB\-\-alloc\-default\fR
+use Duktape default allocator
+.TP
+\fB\-\-recreate\-heap\fR
+recreate heap after every file
+.TP
+\fB\-\-no\-heap\-destroy\fR
+force GC, but don't destroy heap at end (leak testing)
+.PP
+If <filename> is omitted, interactive mode is started automatically.
+.TP
+\fB\-i\fR
+enter interactive mode after executing argument file(s) / eval code
+.TP
+\fB\-e\fR CODE
+evaluate code
+.TP
+\fB\-c\fR FILE
+compile into bytecode (use with only one file argument)
+.TP
+\fB\-\-run\-stdin\fR
+treat stdin like a file, i.e. compile full input (not line by line)
+.TP
+\fB\-\-verbose\fR
+verbose messages to stderr
+.TP
+\fB\-\-restrict\-memory\fR
+use lower memory limit (used by test runner)
+.TP
+\fB\-\-alloc\-default\fR
+use Duktape default allocator
+.TP
+\fB\-\-recreate\-heap\fR
+recreate heap after every file
+.TP
+\fB\-\-no\-heap\-destroy\fR
+force GC, but don't destroy heap at end (leak testing)
+.PP
+If <filename> is omitted, interactive mode is started automatically.
diff --git a/debian/duktape-dev.install b/debian/duktape-dev.install
new file mode 100644
index 0000000..29de202
--- /dev/null
+++ b/debian/duktape-dev.install
@@ -0,0 +1 @@
+src/* usr/share/duktape
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..03f61ae
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+duk /usr/bin
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..d535c0b
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/duk.1
diff --git a/debian/missing-sources/duk_initjs.js b/debian/missing-sources/duk_initjs.js
new file mode 100644
index 0000000..7847f34
--- /dev/null
+++ b/debian/missing-sources/duk_initjs.js
@@ -0,0 +1,22 @@
+/*
+ *  Init code executed for new global environments.
+ */
+
+(function(G, D) {
+    'use strict';
+
+    function def(object, name, value) {
+        Object.defineProperty(object, name, {
+            value: value,
+            writable: true,
+            enumerable: false,
+            configurable: true
+        });
+    }
+
+    function defD(name, value) {
+        def(D, name, value);
+    }
+
+    // XXX: at the moment there's no init stuff; remove?
+})(this, Duktape);
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..d352a38
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,16 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: add hardening flags
+Index: duktape-1.5.0/Makefile.cmdline
+===================================================================
+--- duktape-1.5.0.orig/Makefile.cmdline	2016-06-16 14:26:32.000000000 +0200
++++ duktape-1.5.0/Makefile.cmdline	2016-06-16 14:27:55.000000000 +0200
+@@ -11,7 +11,9 @@
+ CC	= gcc
+ CCOPTS	= -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
+ CCOPTS += -I./src   # duktape.h and duk_config.h must be in include path
++CCOPTS += -fPIE -D_FORTIFY_SOURCE=2
+ CCLIBS	= -lm
++CCLIBS += -z relro -z now
+ 
+ # If you want linenoise, you can enable these.  At the moment linenoise
+ # will cause some harmless compilation warnings.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..814900f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+hardening.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..941b2c8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,20 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE = 1
+
+
+# does not seem to work here, so no debug stuff
+export DEB_BUILD_OPTIONS=noddebs
+
+%:
+	dh $@ 
+
+override_dh_auto_build:
+	make -f Makefile.sharedlibrary
+	make -f Makefile.cmdline
+	dh_auto_build
+
+override_dh_auto_clean:
+	rm -f duk
+	rm -f libduktaped.so.*
+	rm -f libduktape.so.*
+	dh_auto_clean
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..765dcbf
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,8 @@
+version=4
+
+# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig
+#opts="pgpsigurlmangle=s%$%.sig%"
+
+# HTTP site (basic)
+http://duktape.org/download.html \
+ duktape-([\d\.]+)\.tar\.xz debian uupdate

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/duktape.git



More information about the Debian-iot-packaging mailing list