commit: 569a6cacb0c84ddbeee51eb808c37ce79c45b9b5
Author: Cyprien Nicolas (fulax) <gentoo <AT> fulax <DOT> fr>
AuthorDate: Sun Jul 7 15:03:03 2019 +0000
Commit: Cyprien Nicolas <c.nicolas+gentoo <AT> gmail <DOT> com>
CommitDate: Sun Jul 7 15:03:03 2019 +0000
URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=569a6cac
dev-scheme/guile: Add 2.2.6 SLOT=2.2 + patches
Package-Manager: Portage-2.3.66, Repoman-2.3.11
.../files/guile-2.2.6-configure-ldflags.patch | 13 ++++
.../files/guile-2.2.6-tests-00-repl-server.patch | 91 ++++++++++++++++++++++
.../{guile-2.2.5.ebuild => guile-2.2.6.ebuild} | 17 ++--
dev-scheme/guile/guile-2.9.2.ebuild | 17 ++--
4 files changed, 126 insertions(+), 12 deletions(-)
diff --git a/dev-scheme/guile/files/guile-2.2.6-configure-ldflags.patch
b/dev-scheme/guile/files/guile-2.2.6-configure-ldflags.patch
new file mode 100644
index 00000000..c368f98a
--- /dev/null
+++ b/dev-scheme/guile/files/guile-2.2.6-configure-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 9073deba0..92966ce34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1688,7 +1688,7 @@ do
+ done
+
+ GUILE_CFLAGS="$GUILE_CFLAGS $PTHREAD_CFLAGS"
+-GUILE_LIBS="$LDFLAGS $LIBS"
++GUILE_LIBS="$LIBS"
+
+ AC_SUBST(GUILE_LIBS)
+ AC_SUBST(GUILE_CFLAGS)
diff --git a/dev-scheme/guile/files/guile-2.2.6-tests-00-repl-server.patch
b/dev-scheme/guile/files/guile-2.2.6-tests-00-repl-server.patch
new file mode 100644
index 00000000..37c7e298
--- /dev/null
+++ b/dev-scheme/guile/files/guile-2.2.6-tests-00-repl-server.patch
@@ -0,0 +1,91 @@
+--- guile-2.2.6/test-suite/tests/00-repl-server.test.old 2017-04-14
23:26:40.000000000 +0200
++++ guile-2.2.6/test-suite/tests/00-repl-server.test 2019-07-07
15:14:59.681831790 +0200
+@@ -105,47 +105,48 @@
+ ;;; Since we call 'primitive-fork', these tests must run before any
+ ;;; tests that create threads.
+
+-(with-test-prefix "repl-server"
++(if (provided? 'socket)
++ (with-test-prefix "repl-server"
+
+- (pass-if-equal "simple expression"
+- "scheme@(repl-server)> $1 = 42\n"
+- (with-repl-server socket
+- (read-until-prompt socket %last-line-before-prompt)
+-
+- ;; Wait until 'repl-reader' in boot-9 has written the prompt.
+- ;; Otherwise, if we write too quickly, 'repl-reader' checks for
+- ;; 'char-ready?' and doesn't print the prompt.
+- (match (select (list socket) '() (list socket) 3)
+- (((_) () ())
+- (display "(+ 40 2)\n(quit)\n" socket)
+- (read-string socket)))))
+-
+- (pass-if "HTTP inter-protocol attack" ;CVE-2016-8606
+- (with-repl-server socket
+- ;; Avoid SIGPIPE when the server closes the connection.
+- (sigaction SIGPIPE SIG_IGN)
+-
+- (read-until-prompt socket %last-line-before-prompt)
+-
+- ;; Simulate an HTTP inter-protocol attack.
+- (write-request (build-request (string->uri "http://localhost"))
+- socket)
+-
+- ;; Make sure the server reacts by closing the connection. If it
+- ;; fails to do that, this test hangs.
+- (catch 'system-error
+- (lambda ()
+- (let loop ((n 0))
+- (display "(+ 40 2)\n(quit)\n" socket) ;trigger EPIPE
+- (read-string socket)
+- (if (> n 5)
+- #f ;failure
+- (begin
+- (sleep 1)
+- (loop (+ 1 n))))))
+- (lambda args
+- (->bool (memv (system-error-errno args)
+- (list ECONNRESET EPIPE ECONNABORTED))))))))
++ (pass-if-equal "simple expression"
++ "scheme@(repl-server)> $1 = 42\n"
++ (with-repl-server socket
++ (read-until-prompt socket %last-line-before-prompt)
++
++ ;; Wait until 'repl-reader' in boot-9 has written the prompt.
++ ;; Otherwise, if we write too quickly, 'repl-reader' checks for
++ ;; 'char-ready?' and doesn't print the prompt.
++ (match (select (list socket) '() (list socket) 3)
++ (((_) () ())
++ (display "(+ 40 2)\n(quit)\n" socket)
++ (read-string socket)))))
++
++ (pass-if "HTTP inter-protocol attack" ;CVE-2016-8606
++ (with-repl-server socket
++ ;; Avoid SIGPIPE when the server closes the connection.
++ (sigaction SIGPIPE SIG_IGN)
++
++ (read-until-prompt socket %last-line-before-prompt)
++
++ ;; Simulate an HTTP inter-protocol attack.
++ (write-request (build-request (string->uri "http://localhost"))
++ socket)
++
++ ;; Make sure the server reacts by closing the connection. If it
++ ;; fails to do that, this test hangs.
++ (catch 'system-error
++ (lambda ()
++ (let loop ((n 0))
++ (display "(+ 40 2)\n(quit)\n" socket) ;trigger EPIPE
++ (read-string socket)
++ (if (> n 5)
++ #f ;failure
++ (begin
++ (sleep 1)
++ (loop (+ 1 n))))))
++ (lambda args
++ (->bool (memv (system-error-errno args)
++ (list ECONNRESET EPIPE ECONNABORTED)))))))))
+
+ ;;; Local Variables:
+ ;;; eval: (put 'with-repl-server 'scheme-indent-function 1)
diff --git a/dev-scheme/guile/guile-2.2.5.ebuild
b/dev-scheme/guile/guile-2.2.6.ebuild
similarity index 90%
rename from dev-scheme/guile/guile-2.2.5.ebuild
rename to dev-scheme/guile/guile-2.2.6.ebuild
index 23095046..09bb768e 100644
--- a/dev-scheme/guile/guile-2.2.5.ebuild
+++ b/dev-scheme/guile/guile-2.2.6.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit flag-o-matic
+inherit autotools flag-o-matic
MAJOR="2.2"
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
@@ -32,9 +32,18 @@ BDEPEND="
sys-devel/libtool
sys-devel/gettext"
-PATCHES=( "${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch"
+ "${FILESDIR}/${P}-configure-ldflags.patch" # bug 590904
+ "${FILESDIR}/${P}-tests-00-repl-server.patch" # bug 629004
+)
DOCS=( GUILE-VERSION HACKING README )
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_configure() {
# see bug #178499
filter-flags -ftree-vectorize
@@ -69,10 +78,6 @@ src_install() {
# The guile.m4 macro files conflicts with other slots
mv "${ED}"/usr/share/aclocal/guile.m4
"${ED}"/usr/share/aclocal/guile-${MAJOR}.m4 || die "rename of guile.m4 failed"
- # Bug #590904, LDFLAGS are copied within the pkg-config gile
- sed -i "${ED}"/usr/$(get_libdir)/pkgconfig/guile-${MAJOR}.pc \
- -e s:"${LDFLAGS}"::
-
# From Novell
# https://bugzilla.novell.com/show_bug.cgi?id=874028#c0
dodir /usr/share/gdb/auto-load/$(get_libdir)
diff --git a/dev-scheme/guile/guile-2.9.2.ebuild
b/dev-scheme/guile/guile-2.9.2.ebuild
index 852109f4..dfb51d49 100644
--- a/dev-scheme/guile/guile-2.9.2.ebuild
+++ b/dev-scheme/guile/guile-2.9.2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit flag-o-matic
+inherit autotools flag-o-matic
MAJOR="3.0"
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
@@ -31,9 +31,18 @@ BDEPEND="
sys-devel/libtool
sys-devel/gettext"
-PATCHES=( "${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch"
+ "${FILESDIR}/${PN}-2.2.6-configure-ldflags.patch"
+ "${FILESDIR}/${PN}-2.2.6-tests-00-repl-server.patch"
+)
DOCS=( GUILE-VERSION HACKING README )
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_configure() {
# see bug #178499
filter-flags -ftree-vectorize
@@ -67,10 +76,6 @@ src_install() {
# The guile.m4 macro files conflicts with other slots
mv "${ED}"/usr/share/aclocal/guile.m4
"${ED}"/usr/share/aclocal/guile-${MAJOR}.m4 || die "rename of guile.m4 failed"
- # Bug #590904, LDFLAGS are copied within the pkg-config gile
- sed -i "${ED}"/usr/$(get_libdir)/pkgconfig/guile-${MAJOR}.pc \
- -e s:"${LDFLAGS}"::
-
# From Novell
# https://bugzilla.novell.com/show_bug.cgi?id=874028#c0
dodir /usr/share/gdb/auto-load/$(get_libdir)