From patchwork Sat Jun 22 12:11:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 1120630 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VaE+akqt"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fDnJmf49"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45WDvC4lmDz9s3Z for ; Sat, 22 Jun 2019 22:12:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fVddu+Z4agbwWK4fjdEH8I84DA+bbqP+O9csnhTBxMA=; b=VaE+akqtv7NNXA Bt94FepOv+Up18JYuSd4MmKdXTwC3IM/NRvkHd4OtoInEy4NPJQiBs1EIMPQD85+XZPjUxOCRVVNg vXOfPCnFl7fnZZBvOirEE4Na9XgS7gAA3TSW+Ml6OK0Zrgmz9/ypdWTzN9P7zW24lv879deSp6Ms8 5zBlX5bDpXHsjjXqt4VPxqW6L4OgPd/Xm7E2XKPtC4U6Z6HnA1PGq5dhuZFa1v88ihgX7EGwZ+Wxc wrHUBRosmYXdQnSD8/1olibfHdUqgcFkxmZi4bzQdTrrCifpfA7BYTAQUVOLk3Rh/+omKkBS2MA/F KAfBw8qVEnzJEu/EYKlw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hees1-0005ek-Mo; Sat, 22 Jun 2019 12:11:49 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1heerx-0005e7-HD for openwrt-devel@lists.openwrt.org; Sat, 22 Jun 2019 12:11:48 +0000 Received: by mail-lj1-x242.google.com with SMTP id k18so8307481ljc.11 for ; Sat, 22 Jun 2019 05:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v5CYkNa1wQcBIOBr0jvSuivebWiEPoAzO9rbCU4pPrE=; b=fDnJmf49I8A6lcAkiP5IpN2tWftZfK9pe3HSBqa1+uGZUmVzOmkJzleUmVnq6/MAio OTcjrJuWJY0DmPLhzAsIOjTb/3UWtehQ8CFAsMfLkY3ymiUMw96cO0f8Ar35XpbA7FC0 T2nLvrz/14k8p9sIx4IIoGY9vBm0xQstoVF5sHfF9987/KxyJkztJhdFB7tsYqcJUZjI 0pEqgB5WepSs+Sv+tQfnv8yGLCjkk2b2sDhuRClamzyC6X0TnjcAKusjgXItGz48NkdH 9mfLAkHtA72BA5r0GcGkTEXim0W0UsBextPUr6LiLdHm8HnT+xfEPYI4U9POjNcEtoy6 cWNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v5CYkNa1wQcBIOBr0jvSuivebWiEPoAzO9rbCU4pPrE=; b=Cgn6jUFjzLssoZ0e5Eg1VJo43lHQubPRf/np2NyUUn6Erb8d+da4slcazcUi94Elrq RiAEVChdPUFlKsuD1PtE6KoQdpIgQq4Y4q7adD+WJKyH8WO8xMy3UMUofqovN+gTYlhL bwj1WoMdP+heMW7veAP54YAR/r9yASeL2i77cXGNUkfqrSVuv9Xh4mzxltwfxNbLIyhO jttHqMLk+HR2+G00YE8d2XmW2SRBqkklFxyKVxxTI2/Vbshih67VprgvVQNzxpju3VE+ gkRH6ZL2WSaLswHjkcHjtMiLqNr8L5+LdewujF3zHIC86LhU9vk+SVZe/QjIwhauDo79 73Ow== X-Gm-Message-State: APjAAAWqWSKVc4lVd7MEqeUlc83PNzitXQlzB2oCQb2hxMMIi2bK9rvh EBYDRtJHU9q85tBeD8Zwmv5f2i3g X-Google-Smtp-Source: APXvYqysTK1SBHp2l2gJA9JREbcGesqjBoJ/NXzAl/+uNoRlc2AeGnewI79fhOE2F4ZabO4l1aSKGA== X-Received: by 2002:a2e:9788:: with SMTP id y8mr52842791lji.41.1561205503421; Sat, 22 Jun 2019 05:11:43 -0700 (PDT) Received: from elitebook.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id x19sm825540ljb.6.2019.06.22.05.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2019 05:11:42 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: openwrt-devel@lists.openwrt.org, Jo-Philipp Wich Date: Sat, 22 Jun 2019 14:11:34 +0200 Message-Id: <20190622121135.5029-1-zajec5@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190621123002.9404-1-zajec5@gmail.com> References: <20190621123002.9404-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190622_051146_535466_A925A79B X-CRM114-Status: GOOD ( 13.01 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH V2 1/2] lua: include version number in installed files X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Rafał Miłecki This will allow installing Lua 5.1 and newer versions at the same time. Signed-off-by: Rafał Miłecki --- V2: Bump PKG_RELEASE --- package/utils/lua/Makefile | 8 ++-- .../001-include-version-number.patch | 48 +++++++++++++++++++ .../patches/001-include-version-number.patch | 48 +++++++++++++++++++ .../013-lnum-strtoul-parsing-fixes.patch | 11 +---- .../utils/lua/patches/020-shared_liblua.patch | 8 ++-- 5 files changed, 107 insertions(+), 16 deletions(-) create mode 100644 package/utils/lua/patches-host/001-include-version-number.patch create mode 100644 package/utils/lua/patches/001-include-version-number.patch diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile index 077a60fbf3..c911c6a913 100644 --- a/package/utils/lua/Makefile +++ b/package/utils/lua/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua PKG_VERSION:=5.1.5 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.lua.org/ftp/ \ @@ -154,12 +154,14 @@ endef define Package/lua/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lua $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lua5.1 $(1)/usr/bin/ + $(LN) lua5.1 $(1)/usr/bin/lua endef define Package/luac/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luac $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luac5.1 $(1)/usr/bin/ + $(LN) luac5.1 $(1)/usr/bin/luac endef define Package/lua-examples/install diff --git a/package/utils/lua/patches-host/001-include-version-number.patch b/package/utils/lua/patches-host/001-include-version-number.patch new file mode 100644 index 0000000000..b7056fd47c --- /dev/null +++ b/package/utils/lua/patches-host/001-include-version-number.patch @@ -0,0 +1,48 @@ +From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 21 Jun 2019 14:08:38 +0200 +Subject: [PATCH] include version number + +Including it allows multiple lua versions to coexist. + +Signed-off-by: Rafał Miłecki +--- + +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -41,10 +41,10 @@ RANLIB= ranlib + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + # What to install. +-TO_BIN= lua luac ++TO_BIN= lua$V luac$V + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp + TO_LIB= liblua.a +-TO_MAN= lua.1 luac.1 ++TO_MAN= lua$V.1 luac$V.1 + + # Lua version and release. + V= 5.1 +diff --git a/doc/lua.1 b/doc/lua5.1.1 +rename from doc/lua.1 +rename to doc/lua5.1.1 +diff --git a/doc/luac.1 b/doc/luac5.1.1 +rename from doc/luac.1 +rename to doc/luac5.1.1 +diff --git a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ + lstrlib.o loadlib.o linit.o + +-LUA_T= lua ++LUA_T= lua$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac$V + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) diff --git a/package/utils/lua/patches/001-include-version-number.patch b/package/utils/lua/patches/001-include-version-number.patch new file mode 100644 index 0000000000..b7056fd47c --- /dev/null +++ b/package/utils/lua/patches/001-include-version-number.patch @@ -0,0 +1,48 @@ +From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 21 Jun 2019 14:08:38 +0200 +Subject: [PATCH] include version number + +Including it allows multiple lua versions to coexist. + +Signed-off-by: Rafał Miłecki +--- + +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -41,10 +41,10 @@ RANLIB= ranlib + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + # What to install. +-TO_BIN= lua luac ++TO_BIN= lua$V luac$V + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp + TO_LIB= liblua.a +-TO_MAN= lua.1 luac.1 ++TO_MAN= lua$V.1 luac$V.1 + + # Lua version and release. + V= 5.1 +diff --git a/doc/lua.1 b/doc/lua5.1.1 +rename from doc/lua.1 +rename to doc/lua5.1.1 +diff --git a/doc/luac.1 b/doc/luac5.1.1 +rename from doc/luac.1 +rename to doc/luac5.1.1 +diff --git a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ + lstrlib.o loadlib.o linit.o + +-LUA_T= lua ++LUA_T= lua$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac$V + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) diff --git a/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch b/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch index 7f00c8c3a2..8887229589 100644 --- a/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch +++ b/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch @@ -1,8 +1,6 @@ -diff --git a/src/lnum.c b/src/lnum.c -index 1456b6a2ed23..b0632b04c2b7 100644 --- a/src/lnum.c +++ b/src/lnum.c -@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lua_Integer *res, char **endptr_ref) { +@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lu #else return 0; /* Reject the number */ #endif @@ -11,7 +9,7 @@ index 1456b6a2ed23..b0632b04c2b7 100644 } } else if ((v > LUA_INTEGER_MAX) || (*endptr && (!isspace(*endptr)))) { return TK_NUMBER; /* not in signed range, or has '.', 'e' etc. trailing */ -@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Integer ib ) { +@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Inte return 0; } @@ -25,8 +23,6 @@ index 1456b6a2ed23..b0632b04c2b7 100644 + return (unsigned LUA_INTEGER)v; +} +#endif -diff --git a/src/lnum_config.h b/src/lnum_config.h -index 19d7a4231a49..1092eead6629 100644 --- a/src/lnum_config.h +++ b/src/lnum_config.h @@ -141,7 +141,12 @@ @@ -43,6 +39,3 @@ index 19d7a4231a49..1092eead6629 100644 #endif #ifndef LUA_INTEGER_MIN # define LUA_INTEGER_MIN (-LUA_INTEGER_MAX -1) /* -2^16|32 */ --- -1.9.1 - diff --git a/package/utils/lua/patches/020-shared_liblua.patch b/package/utils/lua/patches/020-shared_liblua.patch index 64f683ddbe..f67ee2b3c7 100644 --- a/package/utils/lua/patches/020-shared_liblua.patch +++ b/package/utils/lua/patches/020-shared_liblua.patch @@ -3,12 +3,12 @@ @@ -42,8 +42,8 @@ PLATS= aix ansi bsd freebsd generic linu # What to install. - TO_BIN= lua luac + TO_BIN= lua$V luac$V -TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp -TO_LIB= liblua.a +TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp lnum_config.h +TO_LIB= liblua.a liblua.so.$R - TO_MAN= lua.1 luac.1 + TO_MAN= lua$V.1 luac$V.1 # Lua version and release. @@ -63,6 +63,7 @@ install: dummy @@ -87,10 +87,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o lnum.o -@@ -33,11 +34,12 @@ LUA_T= lua +@@ -33,11 +34,12 @@ LUA_T= lua$V LUA_O= lua.o - LUAC_T= luac + LUAC_T= luac$V -LUAC_O= luac.o print.o +LUAC_O= luac.o print.o lopcodes.o