Tim Starling has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/366782 )
Change subject: Merge branch 'master' into debian ...................................................................... Merge branch 'master' into debian Change-Id: Icbacb6818484f81109236ef99bfbb7e713614971 --- M debian/changelog A debian/compat A debian/control A debian/copyright A debian/php-luasandbox.install A debian/php-luasandbox.postinst A debian/php-luasandbox.prerm A debian/rules A debian/source/format 9 files changed, 160 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox refs/changes/82/366782/1 diff --git a/debian/changelog b/debian/changelog index 917e5a9..dd918b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,3 @@ -<<<<<<< HEAD (b4a80e Add gbp.conf for non-standard branches) php-luasandbox (2.0.13) UNRELEASED; urgency=medium [ Kunal Mehta ] @@ -163,5 +162,3 @@ * Initial release -- Tim Starling <tstarl...@wikimedia.org> Tue, 14 Aug 2012 11:23:40 +1000 -======= ->>>>>>> BRANCH (a07565 Redo PHP->Lua data structure recursion protection) 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..dbea8bb --- /dev/null +++ b/debian/control @@ -0,0 +1,32 @@ +Source: php-luasandbox +Section: web +Priority: optional +Maintainer: Tim Starling <tstarl...@wikimedia.org> +Build-Depends: debhelper (>= 9), + liblua5.1-0-dev, + pkg-config, + php5-dev (<< 5.5) | php5-dev (>= 5.5), + php5-dev (<< 5.5) | hhvm, + php5-dev (<< 5.5) | hhvm-dev, + php5-dev (<< 5.5) | cmake, + php5-dev (<< 5.5) | libboost-dev, + php5-dev (<< 5.5) | libgoogle-glog-dev, + php5-dev (<< 5.5) | libdouble-conversion-dev, + php5-dev (<< 5.5) | libjemalloc-dev, + php5-dev (<< 5.5) | libtbb-dev +Standards-Version: 3.9.5 +Homepage: https://www.mediawiki.org/wiki/Extension:Scribunto + +Package: php-luasandbox +Architecture: any +Depends: php5 | php5-cli, ${shlibs:Depends}, ${misc:Depends}, ${php:Depends} +Description: Lua extension for PHP + A PHP extension providing a sandboxed Lua environment which can be used to run + untrusted code. + +Package: hhvm-luasandbox +Architecture: any +Depends: ${hhvm:ApiVersion}, ${shlibs:Depends}, ${misc:Depends} +Description: Lua extension for HHVM + A HHVM extension providing a sandboxed Lua environment which can be used to run + untrusted code. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9b58d8d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: luasandbox +Source: https://www.mediawiki.org/wiki/Extension:Scribunto + +Files: * +Copyright: 2011-2014 Tim Starling + 2011-2014 Wikimedia Foundation +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/php-luasandbox.install b/debian/php-luasandbox.install new file mode 100644 index 0000000..e50171f --- /dev/null +++ b/debian/php-luasandbox.install @@ -0,0 +1 @@ +luasandbox.ini /etc/php5/mods-available diff --git a/debian/php-luasandbox.postinst b/debian/php-luasandbox.postinst new file mode 100755 index 0000000..639753a --- /dev/null +++ b/debian/php-luasandbox.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +#EXTRA# +[ "$1" = "configure" ] && [ -x /usr/sbin/php5enmod ] && php5enmod -s ALL luasandbox + +#DEBHELPER# + +exit 0 diff --git a/debian/php-luasandbox.prerm b/debian/php-luasandbox.prerm new file mode 100755 index 0000000..f9c4bc4 --- /dev/null +++ b/debian/php-luasandbox.prerm @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +#EXTRA# + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + [ -x /usr/sbin/php5enmod ] && php5dismod -s ALL luasandbox +fi; + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c19f212 --- /dev/null +++ b/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f + +HHVM=$(shell test -f /usr/bin/hphpize && echo "HHVM") + +ifeq ($(HHVM), HHVM) + configure_targets = php_configure hhvm_configure + build_targets = php_build hhvm_build + install_targets = php_install hhvm_install + gencontrol_targets = php_gencontrol hhvm_gencontrol +else + configure_targets = php_configure + build_targets = php_build + install_targets = php_install + gencontrol_targets = php_gencontrol hhvm_gencontrol +endif + +%: + dh $@ + +override_dh_auto_configure: $(configure_targets) + +php_configure: + mkdir -p debian/build-php + ## PHP + tar -cf - --exclude=debian/build* --exclude=.pc . \ + | tar -xf - -C debian/build-php + cd debian/build-php && /usr/bin/phpize && dh_auto_configure + +hhvm_configure: + ## HHVM + mkdir -p debian/build-hhvm + tar -cf - --exclude=debian/build* --exclude=.pc . \ + | tar -xf - -C debian/build-hhvm + cd debian/build-hhvm && /usr/bin/hphpize + # workaround "cmake .." bug in HHVM's CMake extension code + # Also, link to lua-c++ + cd debian/build-hhvm && cmake . \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=None \ + -DLUA_USE_CPP=1 + cd debian/build-hhvm && dh_auto_configure + +override_dh_auto_build: $(build_targets) + +php_build: + cd debian/build-php && dh_auto_build + +hhvm_build: + cd debian/build-hhvm && dh_auto_build + +override_dh_auto_test: + +override_dh_auto_install: $(install_targets) + +php_install: + INSTALL_ROOT=$(CURDIR)/debian/php-luasandbox make -C debian/build-php install + +hhvm_install: + DESTDIR=$(CURDIR)/debian/hhvm-luasandbox make -C debian/build-hhvm install + +override_dh_gencontrol: $(gencontrol_targets) + dh_gencontrol + +php_gencontrol: + echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" >> debian/php-luasandbox.substvars + +hhvm_gencontrol: + # HHVM does *not* ensure binary compatibility + hhvmapi=$(shell /usr/bin/hhvm --version | sed -ne 's/^HipHop VM \(.*\)\..*/\1/p') && \ + [ -n "$${hhvmapi}" ] && echo "hhvm:ApiVersion=hhvm-api-$${hhvmapi}" >> debian/hhvm-luasandbox.substvars + +override_dh_auto_clean: + rm -rf debian/build* + dh_auto_clean + +.PHONY: override_dh_auto_configure override_dh_auto_build override_dh_auto_test override_dh_auto_install override_dh_gencontrol diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- To view, visit https://gerrit.wikimedia.org/r/366782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbacb6818484f81109236ef99bfbb7e713614971 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: debian Gerrit-Owner: Tim Starling <tstarl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits