public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/luajit/files/, dev-lang/luajit/
@ 2020-02-01 21:56 Rafael Martins
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael Martins @ 2020-02-01 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     5f5a0bb3c9c316e21701d998d39eeec2fe3ac683
Author:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 21:52:07 2020 +0000
Commit:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 21:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5a0bb3

dev-lang/luajit: fix build for musl systems. bug #707588

Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Rafael Martins <rafaelmartins <AT> gentoo.org>

 dev-lang/luajit/files/luajit-2-ldconfig.patch | 31 +++++++++++++++++++++++++++
 dev-lang/luajit/luajit-2.0.5-r1.ebuild        |  4 +++-
 dev-lang/luajit/luajit-2.1.0_beta3.ebuild     |  4 +++-
 3 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/dev-lang/luajit/files/luajit-2-ldconfig.patch b/dev-lang/luajit/files/luajit-2-ldconfig.patch
new file mode 100644
index 00000000000..add449a6038
--- /dev/null
+++ b/dev-lang/luajit/files/luajit-2-ldconfig.patch
@@ -0,0 +1,31 @@
+From 18c9cf7d3788a8f7408df45df92fc4ae3bcc0d80 Mon Sep 17 00:00:00 2001
+From: Mike Pall <mike>
+Date: Sat, 25 Jan 2020 17:37:12 +0100
+Subject: [PATCH] Fix POSIX install with missing or incompatible ldconfig.
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 07bc70faf..bff53f286 100644
+--- a/Makefile
++++ b/Makefile
+@@ -74,7 +74,7 @@ SYMLINK= ln -sf
+ INSTALL_X= install -m 0755
+ INSTALL_F= install -m 0644
+ UNINSTALL= $(RM)
+-LDCONFIG= ldconfig -n
++LDCONFIG= ldconfig -n 2>/dev/null
+ SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
+             -e "s|^multilib=.*|multilib=$(MULTILIB)|"
+ 
+@@ -118,7 +118,7 @@ install: $(INSTALL_DEP)
+ 	$(RM) $(INSTALL_TSYM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
+ 	cd src && test -f $(FILE_SO) && \
+ 	  $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \
+-	  $(LDCONFIG) $(INSTALL_LIB) && \
++	  ( $(LDCONFIG) $(INSTALL_LIB) || : ) && \
+ 	  $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
+ 	  $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
+ 	cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)

diff --git a/dev-lang/luajit/luajit-2.0.5-r1.ebuild b/dev-lang/luajit/luajit-2.0.5-r1.ebuild
index a90f9c43d19..6b07deee37a 100644
--- a/dev-lang/luajit/luajit-2.0.5-r1.ebuild
+++ b/dev-lang/luajit/luajit-2.0.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -23,6 +23,8 @@ SLOT="2"
 KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
 IUSE="lua52compat static-libs"
 
+PATCHES=( "${FILESDIR}/${PN}-2-ldconfig.patch" )
+
 S="${WORKDIR}/${MY_P}"
 
 src_prepare(){

diff --git a/dev-lang/luajit/luajit-2.1.0_beta3.ebuild b/dev-lang/luajit/luajit-2.1.0_beta3.ebuild
index 6497ae142c3..9406beb98c8 100644
--- a/dev-lang/luajit/luajit-2.1.0_beta3.ebuild
+++ b/dev-lang/luajit/luajit-2.1.0_beta3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,6 +19,8 @@ SLOT="2"
 KEYWORDS=""
 IUSE="lua52compat static-libs"
 
+PATCHES=( "${FILESDIR}/${PN}-2-ldconfig.patch" )
+
 S="${WORKDIR}/${MY_P}"
 
 _emake() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/luajit/files/, dev-lang/luajit/
@ 2020-07-22 19:41 Rafael Martins
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael Martins @ 2020-07-22 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     a2a054ce465da2fd25ff354c875024011b9fd2c9
Author:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 22 19:38:50 2020 +0000
Commit:     Rafael Martins <rafaelmartins <AT> gentoo <DOT> org>
CommitDate: Wed Jul 22 19:40:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2a054ce

dev-lang/luajit: apply fix for CVE-2020-15890

Bug: https://bugs.gentoo.org/733466
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Rafael Martins <rafaelmartins <AT> gentoo.org>

 dev-lang/luajit/files/CVE-2020-15890.patch   | 22 +++++++++
 dev-lang/luajit/luajit-2.0.5-r2.ebuild       | 67 ++++++++++++++++++++++++++++
 dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild | 56 +++++++++++++++++++++++
 3 files changed, 145 insertions(+)

diff --git a/dev-lang/luajit/files/CVE-2020-15890.patch b/dev-lang/luajit/files/CVE-2020-15890.patch
new file mode 100644
index 00000000000..751726571a0
--- /dev/null
+++ b/dev-lang/luajit/files/CVE-2020-15890.patch
@@ -0,0 +1,22 @@
+From 53f82e6e2e858a0a62fd1a2ff47e9866693382e6 Mon Sep 17 00:00:00 2001
+From: Mike Pall <mike>
+Date: Sun, 12 Jul 2020 14:30:34 +0200
+Subject: [PATCH] Fix frame traversal for __gc handler frames.
+
+Reported by Changochen.
+---
+ src/lj_err.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lj_err.c b/src/lj_err.c
+index caa7487f2..e3e0c2eb7 100644
+--- a/src/lj_err.c
++++ b/src/lj_err.c
+@@ -529,6 +529,7 @@ static ptrdiff_t finderrfunc(lua_State *L)
+       if (cframe_canyield(cf)) return 0;
+       if (cframe_errfunc(cf) >= 0)
+ 	return cframe_errfunc(cf);
++      cf = cframe_prev(cf);
+       frame = frame_prevd(frame);
+       break;
+     case FRAME_PCALL:

diff --git a/dev-lang/luajit/luajit-2.0.5-r2.ebuild b/dev-lang/luajit/luajit-2.0.5-r2.ebuild
new file mode 100644
index 00000000000..b36b964f23c
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.5-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ -n $(get_version_component_range 4) ]]; then
+	HOTFIX="v${PV}"
+	HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+	${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat static-libs"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2-ldconfig.patch"
+	"${FILESDIR}/CVE-2020-15890.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+	if [[ -n ${HOTFIX} ]]; then
+		eapply "${DISTDIR}/${HOTFIX}"
+	fi
+	default
+}
+
+_emake() {
+	emake \
+		Q= \
+		PREFIX="${EPREFIX}/usr" \
+		MULTILIB="$(get_libdir)" \
+		DESTDIR="${D}" \
+		HOST_CC="$(tc-getBUILD_CC)" \
+		STATIC_CC="$(tc-getCC)" \
+		DYNAMIC_CC="$(tc-getCC) -fPIC" \
+		TARGET_LD="$(tc-getCC)" \
+		TARGET_AR="$(tc-getAR) rcus" \
+		BUILDMODE="$(usex static-libs mixed dynamic)" \
+		TARGET_STRIP="true" \
+		INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+		"$@"
+}
+
+src_compile() {
+	_emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install() {
+	_emake install
+
+	pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+	HTML_DOCS="doc/." einstalldocs
+}

diff --git a/dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild b/dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild
new file mode 100644
index 00000000000..a959393a5d7
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.1.0_beta3-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils toolchain-funcs versionator
+
+MY_PV="$(get_version_component_range 1-4)"
+MY_PV="${MY_PV/_beta/-beta}"
+MY_P="LuaJIT-${MY_PV}"
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS=""
+IUSE="lua52compat static-libs"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2-ldconfig.patch"
+	"${FILESDIR}/CVE-2020-15890.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+_emake() {
+	emake \
+		Q= \
+		PREFIX="${EPREFIX}/usr" \
+		MULTILIB="$(get_libdir)" \
+		DESTDIR="${D}" \
+		HOST_CC="$(tc-getBUILD_CC)" \
+		STATIC_CC="$(tc-getCC)" \
+		DYNAMIC_CC="$(tc-getCC) -fPIC" \
+		TARGET_LD="$(tc-getCC)" \
+		TARGET_AR="$(tc-getAR) rcus" \
+		BUILDMODE="$(usex static-libs mixed dynamic)" \
+		TARGET_STRIP="true" \
+		INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+		"$@"
+}
+
+src_compile() {
+	_emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install() {
+	_emake install
+
+	pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+	HTML_DOCS="doc/." einstalldocs
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-22 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-01 21:56 [gentoo-commits] repo/gentoo:master commit in: dev-lang/luajit/files/, dev-lang/luajit/ Rafael Martins
  -- strict thread matches above, loose matches on Subject: below --
2020-07-22 19:41 Rafael Martins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox