Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Eric Sandall (fc254645f79c836a344f9febc8de59064b76ae62)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Eric Sandall <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Eric Sandall (fc254645f79c836a344f9febc8de59064b76ae62)
  • Date: Fri, 9 Aug 2019 08:40:25 +0000

GIT changes to master grimoire by Eric Sandall <sandalle AT sourcemage.org>:

devel/perl/HISTORY | 4 ++++
devel/perl/PRE_BUILD | 8 ++++++--
http/elinks/HISTORY | 17 ++++++++++++-----
http/elinks/PRE_BUILD | 8 ++++++++
http/elinks/openssl-1.1.patch | 31 +++++++++++++++++++++++++++++++
http/elinks/rand-egd.patch | 22 ++++++++++++++++++++++
6 files changed, 83 insertions(+), 7 deletions(-)

New commits:
commit fc254645f79c836a344f9febc8de59064b76ae62
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

elinks: Apply openssl-1.1.patch and rand-egd.patch

* openssl-1.1.patch: Fix compilation with newer OpenSSL and LibreSSL (no
TLSv1)
From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-libressl.patch
* rand-edg.patch: Fix undefined reference to RAND_egd
From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch

commit f7273edcebeb2b67e23a9750123601be28ac0803
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

perl: I don't know what folks are doing with musl, but do NOT break
non-musl installs please.

Disable gccversion hack, breaks non-musl builds. Find a compatible way to
do it. :)
Causes this segfault during compilation of perl:
cc -c -DPERL_CORE -fwrapv -fpcc-struct-return -pipe
-fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_FORTIFY_SOURCE=2 -march=core2 -fPIC -DPIC -pipe -DPIC -fPIC -O2 -fPIC
-Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra
-Wc++-compat -Wwrite-strings op.c
In file included from perl.h:5359,
from miniperlmain.c:57:
miniperlmain.c: In function ‘main’:
miniperlmain.c:139:29: warning: cast between incompatible function
types from ‘void (*)(int)’ to ‘void (*)(int, siginfo_t *, void *)’ {aka
‘void (*)(int, struct <anonymous> *, void *)’} [-Wcast-function-type]
139 | rsignal(PL_sig_num[i], (Sighandler_t) SIG_DFL);
| ^
embed.h:643:44: note: in definition of macro ‘rsignal’
643 | #define rsignal(a,b) Perl_rsignal(aTHX_ a,b)
| ^
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o
util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o
scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o
pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lpthread
-lnsl -ldl -lm -lcrypt -lutil -lc
LD_LIBRARY_PATH=/usr/src/perl-5.30.0 ./miniperl -w -Ilib
-Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build
miniperl. Please run make minitest; exit 1'
Attempt to free unreferenced scalar: SV 0x55a9dfd3a140.
/bin/sh: line 1: 3655 Segmentation fault
LD_LIBRARY_PATH=/usr/src/perl-5.30.0 ./miniperl -w -Ilib -Idist/Exporter/lib
-MExporter -e '<?>'
Failed to build miniperl. Please run make minitest
make: *** [makefile:363: lib/buildcustomize.pl] Error 1

diff --git a/devel/perl/HISTORY b/devel/perl/HISTORY
index 999e637..d62dfce 100644
--- a/devel/perl/HISTORY
+++ b/devel/perl/HISTORY
@@ -1,3 +1,7 @@
+2019-08-09 Eric Sandall <sandalle AT sourcemage.org>
+ * I don't know what folks are doing with musl, but do NOT break
non-musl installs please.
+ * PRE_BUILD: Disable gccversion hack, breaks non-musl builds. Find a
compatible way to do it. :)
+
2019-05-23 Treeve Jelbert <treeve AT sourcemage.org>
* BUILD: force -fPIC

diff --git a/devel/perl/PRE_BUILD b/devel/perl/PRE_BUILD
old mode 100755
new mode 100644
index 4090b47..e4d6111
--- a/devel/perl/PRE_BUILD
+++ b/devel/perl/PRE_BUILD
@@ -1,3 +1,7 @@
default_pre_build &&
-cd "$SOURCE_DIRECTORY" &&
-sedit 's@gccversion" in@& [1-3][!.]*|[4-9]*|\\@' Configure
+# This breaks on gcc 9.1.0 and glibc 2.29, no musl
+# I tried downgrading -fstack-protector-strong to just -fstack-protector
with sed, but that still segfaulted.
+# gcc with non-musl is built with '--enable-default-ssp', but with musl is
built with '--disable-default-ssp'
+# see `git log PRE_BUILD` for error
+#cd "$SOURCE_DIRECTORY" &&
+#sedit 's@gccversion" in@& [1-3][!.]*|[4-9]*|\\@' Configure &&
diff --git a/http/elinks/HISTORY b/http/elinks/HISTORY
index 2f42d6c..0eb7b37 100644
--- a/http/elinks/HISTORY
+++ b/http/elinks/HISTORY
@@ -1,8 +1,15 @@
-2014-08-24 Treeve Jelbert <treeve AT sourcemage.org>
- * DEPENDS: fix bad with-SSL usage
-
-2014-08-19 Treeve Jelbert <treeve AT sourcemage.org>
- * DEPENDS: openssl => SSL
+2019-08-09 Eric Sandall <sandalle AT sourcemage.org>
+ * PRE_BUILD: Apply openssl-1.1.patch and rand-egd.patch
+ * openssl-1.1.patch: Fix compilation with newer OpenSSL and LibreSSL
(no TLSv1)
+ From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-libressl.patch
+ * rand-edg.patch: Fix undefined reference to RAND_egd
+ From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch
+
+2014-08-24 Treeve Jelbert <treeve AT sourcemage.org>
+ * DEPENDS: fix bad with-SSL usage
+
+2014-08-19 Treeve Jelbert <treeve AT sourcemage.org>
+ * DEPENDS: openssl => SSL

2014-07-03 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: Use get_scm_version
diff --git a/http/elinks/PRE_BUILD b/http/elinks/PRE_BUILD
index 40be4f5..01a5e4f 100755
--- a/http/elinks/PRE_BUILD
+++ b/http/elinks/PRE_BUILD
@@ -1,6 +1,14 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

+message "${MESSAGE_COLOR}Patching undefined reference to
RAND_egd...${DEFAULT_COLOR}" &&
+patch -p1 < "${SPELL_DIRECTORY}"/rand-egd.patch &&
+
+if is_depends_enabled ${SPELL} $(get_spell_provider ${SPELL} SSL); then
+ message "${MESSAGE_COLOR}Patching for OpenSSL 1.1+...${DEFAULT_COLOR}" &&
+ patch -p1 < "${SPELL_DIRECTORY}"/openssl-1.1.patch
+fi &&
+
if is_depends_enabled $SPELL lua && [[ $ELINKS_VCS != y ]]; then
patch -p0 < "$SPELL_DIRECTORY/lua51.patch"
fi
diff --git a/http/elinks/openssl-1.1.patch b/http/elinks/openssl-1.1.patch
new file mode 100644
index 0000000..f0e5d2c
--- /dev/null
+++ b/http/elinks/openssl-1.1.patch
@@ -0,0 +1,31 @@
+# From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-libressl.patch
+Adapted from upstream
+commit 54ebe365b752f8969a67279d0d29552ab638e025
+Author: Witold Filipczyk <witekfl AT poczta.onet.pl>
+Date: Mon Mar 6 17:39:36 2017 +0100
+
+ Compilation fix for OpenSSL-1.1
+
+--- a/src/network/ssl/socket.c
++++ b/src/network/ssl/socket.c
+@@ -67,7 +67,9 @@
+ ssl_set_no_tls(struct socket *socket)
+ {
+ #ifdef CONFIG_OPENSSL
+- ((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1;
++#ifdef SSL_OP_NO_TLSv1
++ SSL_set_options((ssl_t *)socket->ssl, SSL_OP_NO_TLSv1);
++#endif
+ #elif defined(CONFIG_GNUTLS)
+ {
+ /* GnuTLS does not support SSLv2 because it is "insecure".
+@@ -145,7 +147,7 @@
+ }
+
+ if (client_cert) {
+- SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx;
++ SSL_CTX *ctx = SSL_get_SSL_CTX((SSL *) socket->ssl);
+
+ SSL_CTX_use_certificate_chain_file(ctx, client_cert);
+ SSL_CTX_use_PrivateKey_file(ctx, client_cert,
+
diff --git a/http/elinks/rand-egd.patch b/http/elinks/rand-egd.patch
new file mode 100644
index 0000000..2146191
--- /dev/null
+++ b/http/elinks/rand-egd.patch
@@ -0,0 +1,22 @@
+# From
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch
+--- a/src/network/ssl/ssl.c
++++ b/src/network/ssl/ssl.c
+@@ -84,11 +84,16 @@ init_openssl(struct module *module)
+ * cannot initialize the PRNG and so every attempt to use SSL fails.
+ * It's actually an OpenSSL FAQ, and according to them, it's up to the
+ * application coders to seed the RNG. -- William Yodlowsky */
+- if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
++ RAND_file_name(f_randfile, sizeof(f_randfile));
++#ifdef HAVE_RAND_EGD
++ if (RAND_egd(f_randfile) < 0) {
+ /* Not an EGD, so read and write to it */
++#endif
+ if (RAND_load_file(f_randfile, -1))
+ RAND_write_file(f_randfile);
++#ifdef HAVE_RAND_EGD
+ }
++#endif
+
+ SSLeay_add_ssl_algorithms();
+ context = SSL_CTX_new(SSLv23_client_method());
+




Archive powered by MHonArc 2.6.24.

Top of Page