Bug#844692: luasandbox support

2016-11-29 Thread Raphael Hertzog
On Tue, 29 Nov 2016, Raphael Hertzog wrote:
> We have just rebuilt 130 packages build-depending on dh-lua. They

Sorry, 94 packages have been rebuilt in truth (I mistakenly counted lines
in a file that had duplicate entries).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Bug#844692: luasandbox support

2016-11-29 Thread Raphael Hertzog
Hi Mathieu,

On Fri, 18 Nov 2016, Mathieu Parent wrote:
> We'll do the following:
> - Ensure that those patches don't introduce FTBFS in reverse build-
>   dependencies

We have just rebuilt 130 packages build-depending on dh-lua. They
are all building except:
- elektra (#846200)
- lua-dbi (#844852)
- lua-sql (#844492)

In all cases, the failures are reproducible also with the current dh-lua.

> - Upload dh-lua 24 with those patches

Thus from my point of view, you can go ahead with this.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Bug#844692: luasandbox support

2016-11-17 Thread Mathieu Parent
Package: dh-lua
Version: 23+nmu2
Severity: wishlist
Tags: patch

Hello,

There is a new lua interpreter in Debian!

It's luasandbox which is a modified lua5.1 targeted at data parsing,
transformation, and analysis.

It's in Debian:


The attached patch 4 add support for it in dh-lua. The other patches
are missing bits in git repo.

I've requested on Alioth to be part of the pkg-heka team.

We'll do the following:
- Ensure that those patches don't introduce FTBFS in reverse build-
  dependencies
- Upload dh-lua 24 with those patches
- Patch lua-* package one by one to add luasandbox support.
  Probably starting with:
  - lua-bit32
  - lua-lpeg
  - lua-posix
  - lua-socket
  - lua-systemd (NEW)
>From c9653190b552a8dae855c178f6320a14b1368ed8 Mon Sep 17 00:00:00 2001
From: James McCoy 
Date: Fri, 12 Aug 2016 19:58:09 -0400
Subject: [PATCH 2/5] Changelog for 23+nmu1

---
 debian/changelog | 8 
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c20f55f..c63c24a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dh-lua (23+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update app.c to emulate lua's ability to read a script from stdin, as used
+by lua-luv's test suite.  (Closes: #832078)
+
+ -- James McCoy   Fri, 12 Aug 2016 19:58:09 -0400
+
 dh-lua (23) unstable; urgency=medium
 
   * Build depend on txt2man (Closes: #796803) 
-- 
2.10.2

>From c39720bc2dc42e0108d477fd90f9232fb453c0af Mon Sep 17 00:00:00 2001
From: Mathieu Parent 
Date: Sat, 5 Nov 2016 22:16:27 +0100
Subject: [PATCH 5/5] Release version 24

---
 debian/changelog | 8 
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 459ae3b..0aa07a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dh-lua (24) unstable; urgency=medium
+
+  * Team upload
+  * Acknowledge NMUs
+  * Add support for luasandbox (i.e. lua embedded in libluasandbox0)
+
+ -- Mathieu Parent   Fri, 18 Nov 2016 06:35:41 +0100
+
 dh-lua (23+nmu2) unstable; urgency=medium
 
   * Non-maintainer upload.
-- 
2.10.2

>From 9d56aaf9f3947b5063cd09415203a98f2ac446ee Mon Sep 17 00:00:00 2001
From: James McCoy 
Date: Thu, 21 Jul 2016 22:35:58 -0400
Subject: [PATCH 1/5] app.c: Emulate lua's ability to run a script from stdin

If the arg "-" is given, or there are no arguments supplied, tell
luaL_loadfile to load from stdin.

Signed-off-by: James McCoy 
---
 test/5.1/app.c | 10 --
 test/5.2/app.c | 10 --
 test/5.3/app.c | 10 --
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/test/5.1/app.c b/test/5.1/app.c
index e5e3da6..781b683 100644
--- a/test/5.1/app.c
+++ b/test/5.1/app.c
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -41,7 +42,12 @@ int main(int argn,char** argv){
 	app_open(L);
 
 	// LOAD
-	rc = luaL_loadfile(L,argv[1]);
+	if (argn < 2 || !strcmp("-", argv[1])) {
+		rc = luaL_loadfile(L, NULL);
+	}
+	else {
+		rc = luaL_loadfile(L,argv[1]);
+	}
 
 	// check for errors
 	if (rc != 0){
@@ -61,7 +67,7 @@ int main(int argn,char** argv){
 	lua_setglobal(L,"arg");
 
 	for(i=2;i 2 ? argn-2 : 0),LUA_MULTRET,0);
 	
 	// check for errors
 	if (rc != 0){
diff --git a/test/5.2/app.c b/test/5.2/app.c
index 690751c..669d6b3 100644
--- a/test/5.2/app.c
+++ b/test/5.2/app.c
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -41,7 +42,12 @@ int main(int argn,char** argv){
 	app_open(L);
 
 	// LOAD
-	rc = luaL_loadfile(L,argv[1]);
+	if (argn < 2 || !strcmp("-", argv[1])) {
+		rc = luaL_loadfile(L, NULL);
+	}
+	else {
+		rc = luaL_loadfile(L,argv[1]);
+	}
 
 	// check for errors
 	if (rc != 0){
@@ -61,7 +67,7 @@ int main(int argn,char** argv){
 	lua_setglobal(L,"arg");
 
 	for(i=2;i 2 ? argn-2 : 0),LUA_MULTRET,0);
 	
 	// check for errors
 	if (rc != 0){
diff --git a/test/5.3/app.c b/test/5.3/app.c
index 690751c..669d6b3 100644
--- a/test/5.3/app.c
+++ b/test/5.3/app.c
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -41,7 +42,12 @@ int main(int argn,char** argv){
 	app_open(L);
 
 	// LOAD
-	rc = luaL_loadfile(L,argv[1]);
+	if (argn < 2 || !strcmp("-", argv[1])) {
+		rc = luaL_loadfile(L, NULL);
+	}
+	else {
+		rc = luaL_loadfile(L,argv[1]);
+	}
 
 	// check for errors
 	if (rc != 0){
@@ -61,7 +67,7 @@ int main(int argn,char** argv){
 	lua_setglobal(L,"arg");
 
 	for(i=2;i 2 ? argn-2 : 0),LUA_MULTRET,0);
 	
 	// check for errors
 	if (rc !=