From: "Quentin Retornaz" <gentoo@retornaz.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/libressl:master commit in: www-servers/h2o/files/, www-servers/h2o/
Date: Sun, 10 Jul 2022 22:52:06 +0000 (UTC) [thread overview]
Message-ID: <1657493413.ccdc75130c19dcf17ef0b1770a7628d06b4c5930.quentin@gentoo> (raw)
commit: ccdc75130c19dcf17ef0b1770a7628d06b4c5930
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jul 7 21:08:34 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun Jul 10 22:50:13 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ccdc7513
www-servers/h2o: Add 2.2.6-r1
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
www-servers/h2o/files/h2o-2.2-libressl-3.5.patch | 29 +++++++
www-servers/h2o/files/h2o.initd | 2 +-
www-servers/h2o/h2o-2.2.6-r1.ebuild | 105 +++++++++++++++++++++++
www-servers/h2o/metadata.xml | 2 +-
4 files changed, 136 insertions(+), 2 deletions(-)
diff --git a/www-servers/h2o/files/h2o-2.2-libressl-3.5.patch b/www-servers/h2o/files/h2o-2.2-libressl-3.5.patch
new file mode 100644
index 0000000..5d9144d
--- /dev/null
+++ b/www-servers/h2o/files/h2o-2.2-libressl-3.5.patch
@@ -0,0 +1,29 @@
+Fix build with opaque RSA{,_METHOD} in LibreSSL 3.5. The relevant OpenSSL API
+has been available since LibreSSL 2.9. ECDSA support is thus also available.
+
+Index: deps/neverbleed/neverbleed.c
+--- a/deps/neverbleed/neverbleed.c.orig
++++ b/deps/neverbleed/neverbleed.c
+@@ -45,7 +45,7 @@
+ #endif
+ #include "neverbleed.h"
+
+-#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1010000fL)
++#if ((!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2090000fL) && OPENSSL_VERSION_NUMBER >= 0x1010000fL)
+ #define OPENSSL_1_1_API 1
+ #else
+ #define OPENSSL_1_1_API 0
+Silence compiler warning. The get_session_cb has had const since LibreSSL 2.8.
+
+Index: lib/common/socket.c
+--- a/lib/common/socket.c.orig
++++ b/lib/common/socket.c
+@@ -920,7 +920,7 @@ static void create_ossl(h2o_socket_t *sock)
+ }
+
+ static SSL_SESSION *on_async_resumption_get(SSL *ssl,
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2080000fL)
+ const
+ #endif
+ unsigned char *data,
diff --git a/www-servers/h2o/files/h2o.initd b/www-servers/h2o/files/h2o.initd
index 7c7cb20..61944cc 100644
--- a/www-servers/h2o/files/h2o.initd
+++ b/www-servers/h2o/files/h2o.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
extra_commands="checkconfig"
diff --git a/www-servers/h2o/h2o-2.2.6-r1.ebuild b/www-servers/h2o/h2o-2.2.6-r1.ebuild
new file mode 100644
index 0000000..abb112d
--- /dev/null
+++ b/www-servers/h2o/h2o-2.2.6-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+CMAKE_MAKEFILE_GENERATOR="emake"
+SSL_DEPS_SKIP=1
+USE_RUBY="ruby26 ruby27"
+
+inherit cmake ruby-single ssl-cert systemd toolchain-funcs
+
+DESCRIPTION="H2O - the optimized HTTP/1, HTTP/2 server"
+HOMEPAGE="https://h2o.examp1e.net/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libh2o +mruby"
+
+RDEPEND="acct-group/h2o
+ acct-user/h2o
+ dev-lang/perl
+ !sci-libs/libh2o
+ sys-libs/zlib
+ libh2o? ( dev-libs/libuv )
+ dev-libs/openssl:0="
+DEPEND="${RDEPEND}
+ mruby? (
+ ${RUBY_DEPS}
+ || (
+ dev-libs/onigmo
+ dev-libs/oniguruma
+ )
+ )"
+BDEPEND="libh2o? ( virtual/pkgconfig )
+ mruby? (
+ sys-devel/bison
+ virtual/pkgconfig
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2-libressl-3.5.patch
+ "${FILESDIR}"/${PN}-2.2-mruby.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ local ruby="ruby"
+ if use mruby; then
+ for ruby in ${RUBY_TARGETS_PREFERENCE}; do
+ if has_version dev-lang/ruby:${ruby:4:1}.${ruby:5}; then
+ break
+ fi
+ ruby=
+ done
+ [[ -z ${ruby} ]] && die "no suitable ruby version found"
+ fi
+
+ sed -i \
+ -e "/INSTALL/s:\(/doc/${PN}\) :\1/html :" \
+ -e "/INSTALL/s:\(/doc\)/${PN}:\1/${PF}:" \
+ -e "s: ruby: ${ruby}:" \
+ CMakeLists.txt
+
+ sed -i "s:pkg-config:$(tc-getPKG_CONFIG):g" deps/mruby/lib/mruby/gem.rb
+ tc-export CC
+ export LD="$(tc-getCC)"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/${PN}
+ -DWITH_MRUBY=$(usex mruby)
+ -DWITHOUT_LIBS=$(usex !libh2o)
+ -DBUILD_SHARED_LIBS=$(usex libh2o)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ keepdir /var/www/localhost/htdocs
+
+ insinto /etc/${PN}
+ doins "${FILESDIR}"/${PN}.conf
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 0750 /var/log/${PN}
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}"/etc/ssl/${PN}/server.key ]]; then
+ install_cert /etc/ssl/${PN}/server
+ chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/server.*
+ fi
+}
diff --git a/www-servers/h2o/metadata.xml b/www-servers/h2o/metadata.xml
index dab1128..689e903 100644
--- a/www-servers/h2o/metadata.xml
+++ b/www-servers/h2o/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>hattya@gentoo.org</email>
next reply other threads:[~2022-07-10 22:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-10 22:52 Quentin Retornaz [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-28 14:36 [gentoo-commits] repo/proj/libressl:master commit in: www-servers/h2o/files/, www-servers/h2o/ orbea
2022-07-10 22:52 Quentin Retornaz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1657493413.ccdc75130c19dcf17ef0b1770a7628d06b4c5930.quentin@gentoo \
--to=gentoo@retornaz.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox