From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E442D158094 for ; Sun, 10 Jul 2022 22:52:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 20908E0D5B; Sun, 10 Jul 2022 22:52:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01914E0D5B for ; Sun, 10 Jul 2022 22:52:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1DF5E34109E for ; Sun, 10 Jul 2022 22:52:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E1A1538 for ; Sun, 10 Jul 2022 22:52:06 +0000 (UTC) From: "Quentin Retornaz" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Quentin Retornaz" Message-ID: <1657493413.ccdc75130c19dcf17ef0b1770a7628d06b4c5930.quentin@gentoo> Subject: [gentoo-commits] repo/proj/libressl:master commit in: www-servers/h2o/files/, www-servers/h2o/ X-VCS-Repository: repo/proj/libressl X-VCS-Files: www-servers/h2o/files/h2o-2.2-libressl-3.5.patch www-servers/h2o/files/h2o.initd www-servers/h2o/h2o-2.2.6-r1.ebuild www-servers/h2o/metadata.xml X-VCS-Directories: www-servers/h2o/ www-servers/h2o/files/ X-VCS-Committer: quentin X-VCS-Committer-Name: Quentin Retornaz X-VCS-Revision: ccdc75130c19dcf17ef0b1770a7628d06b4c5930 X-VCS-Branch: master Date: Sun, 10 Jul 2022 22:52:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d79326fa-ad24-49cc-a98b-be38aaf4de43 X-Archives-Hash: 64ab51dc314d377cdba70f153b720c0d commit: ccdc75130c19dcf17ef0b1770a7628d06b4c5930 Author: orbea riseup net> AuthorDate: Thu Jul 7 21:08:34 2022 +0000 Commit: Quentin Retornaz retornaz 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 riseup.net> Signed-off-by: Quentin Retornaz 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 @@ - + hattya@gentoo.org