From 3ed757b9cee2e1fe2b18c4630539ccd36f0e0f52 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 29 Mar 2024 07:13:27 +0000 Subject: gentoo auto-resync : 29:03:2024 - 07:13:27 --- net-libs/Manifest.gz | Bin 32011 -> 32007 bytes net-libs/rustls-ffi/Manifest | 3 +- .../files/rustls-ffi-0.12.1-no-rust-nightly.patch | 48 +++++++++ net-libs/rustls-ffi/rustls-ffi-0.12.1-r1.ebuild | 113 -------------------- net-libs/rustls-ffi/rustls-ffi-0.12.1-r2.ebuild | 114 +++++++++++++++++++++ 5 files changed, 164 insertions(+), 114 deletions(-) create mode 100644 net-libs/rustls-ffi/files/rustls-ffi-0.12.1-no-rust-nightly.patch delete mode 100644 net-libs/rustls-ffi/rustls-ffi-0.12.1-r1.ebuild create mode 100644 net-libs/rustls-ffi/rustls-ffi-0.12.1-r2.ebuild (limited to 'net-libs') diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz index e3d0b3c61f6e..0ccd0e229e3d 100644 Binary files a/net-libs/Manifest.gz and b/net-libs/Manifest.gz differ diff --git a/net-libs/rustls-ffi/Manifest b/net-libs/rustls-ffi/Manifest index 0ad3b6581a43..86354f487159 100644 --- a/net-libs/rustls-ffi/Manifest +++ b/net-libs/rustls-ffi/Manifest @@ -1,4 +1,5 @@ AUX rustls-ffi-0.10.0-cargo-c.patch 1810 BLAKE2B a23b5cd4e950dcc5c35398677ce5c64a2ec6f8e7502474328874cd906cf9519270cc19b269b927f32b32ae7f6bb7990a4652354cd2ad2b3dacb762f0c7b42c9c SHA512 0e14dacfaab98a3865fc88ad3f402b5cd1ba7bf3ec1d4da79bd442c43d5da307a855fc91541cb60e965b971e94a8752b87c0a726ab30a9eda8882f8162d1fc89 +AUX rustls-ffi-0.12.1-no-rust-nightly.patch 1650 BLAKE2B 7f67355b6acd16165f98e0b3adbde46dd2b499a665e5244a188d667d9be2bec28d478f85ee260f215d2f6dbca58c1ad851863e1a5704146d161bb273b0a138cb SHA512 3818cbcf43162f1819912261a071fb92a047248a3cffe71e4753b643e858a45211520a85e19ea79287a1f47d18e4be0b74b4f7f8a17994d8b1a7fd7469ecdd3f AUX rustls-ffi-0.9.1-cargo-c.patch 1477 BLAKE2B d5d277f49a65f17b591979002c138e5def39d45aedcdc4065016f3b5d3b275817d15c6054fe2d4cbb037e1fb1ac8faff180842cfa63543012b79896ae834bd72 SHA512 1c7a0c319fd9ca939fff98eef335d809270eb0ec5a998b054c50b9dfb7ee5310bb4a9f4e916f750c4e0f5153d6269c762583b97803ddda7cf36998d0f05a725f AUX rustls-ffi-0.9.1-tests-32-bit.patch 4749 BLAKE2B bbd0e4e1a05e620e20117114212fac5bb5fc5b79bf3878aab0c71e457d9cb5b49c1c3c5df21e2afa6e9d989f420f5f746359ed16c7caf271ea5b2445909e23cf SHA512 89518c54f96d9ff4cea02f14782514069b85220a18fa04cd4ce5ce78e16bf126c8c3be8c05da16376b172a1b774d6a4c14a5261f7d57baf007ca6f80b74ac17c DIST aho-corasick-1.1.1.crate 182812 BLAKE2B df74c2cfa0ae392a8d466e370ba761c4cd37c65773affba9a3cdcf7f5797b34b4a25e1646be3de5081644b34db2dce273609edb4f18a1ce7fdbf31ac28a10b88 SHA512 a894e1cefbb63a3b7b78a3676874d0b7a507c27970f48cdfbda1e5deefbf6b20ed4271b660a12eea77b318cd2fa0f80850a0b1ddfe0d0731ffa326c0fc295692 @@ -121,6 +122,6 @@ DIST windows_x86_64_msvc-0.48.5.crate 798412 BLAKE2B 8abc0721e2fb337fe17c91d2789 DIST winnow-0.4.1.crate 138177 BLAKE2B 9fb55dc5dbca2250c5921aebc42fd8dff7da6fc70656d5690475cf9d81d569b01e68c5134401f70759a9edbe1704cf76727efe5442961b1d220827130497b735 SHA512 390b3da6688d61d90d9bb221d95c7243968209b692737999b13326204954d1e916b390ac8a3a0e0864695ad9a073ed8a79e592ca565be374cc6e909b4166d52a DIST zeroize-1.7.0.crate 19039 BLAKE2B 2f94a5025f409bd2b96a456d2f78a34c6b05b5554abe7ef3fad2a55a8fcff8a6a1b971be660aa4c2954ab7d6e89bebc431036e349edef74711292f9f64b1dbae SHA512 9d31e3e76e8c861309a3579c21f6da5fd6b056c7d7a350427445a1a832e8827204804783f7f9b808acaa2148efef883d9078bf84943b1db55526bba5bf5a2756 EBUILD rustls-ffi-0.10.0-r1.ebuild 2429 BLAKE2B 834e8ae3ba8886ee2170c8e5a62f9c882f3b60f8204397d598de3b95d4b2edd324013d4810d3d8ff4abaf5c09e8542d320f01028c48bf074425fb00edba91d06 SHA512 677d5ace039db50d3581a34eb3fc2e2c9f3b636c2993b804cda37a102cda02198bd8a45b5bf763bc3206dc4ca0ecbe4bd1900d53c1db92de9264bd92a081aa1f -EBUILD rustls-ffi-0.12.1-r1.ebuild 2428 BLAKE2B 5c371fb288d6a5be2d1670a125d057473d2f08efc41fd08535a0dc1ebd4990fb9e6b3d77793f3617ca613d7e804b9c48a9581b0146337aecf3f276729fbb2d54 SHA512 95dd7c9e7438cf440d05eab9b8cc0913f2b73ad9d9df64c981561c77070feebdc2a22989f078fcc4c8e270ec7685222c356f17f7c15e19229f646c39583cc384 +EBUILD rustls-ffi-0.12.1-r2.ebuild 2413 BLAKE2B 7c5e20bd8c82ff986eb12c3cbcdb5e64c5cd44d7007e060e30afd68723ebe4a05cc4b77a6ebcd6c31d72ce26b406992c64adffab2ea00197150d74610b4916b7 SHA512 0c6886c70a6118a9cba72d128a77951b7abe0244a17562d38918a0150bd64e9f5eb916418218dab8d9385ae99c454402db476f1140e4a7660e17212e995f6c87 EBUILD rustls-ffi-0.9.1-r1.ebuild 2747 BLAKE2B f73c676004c7a4869ada531391b2dd442bc1541259465e3171b8a2f478dbc737d91d7446b52cc6a44ce7716266c7eca0fb5f7cabab4aedab9b8771b6510aab84 SHA512 3fa80f3657fcb1ef2bb6dc8976469c87ac101f616e41626469270d750b1fd9e8fbe67522d90ba46f5ee07f3cd88854d4feff871b8024d2bea9430616b65de9b3 MISC metadata.xml 322 BLAKE2B 8c95cd2d631dfe96e34412bbc1c12bce2f13f631840642f2bd52384b554b0c1eeb03e2b959921ff2cf0f15f9cdb2ba37acc016549f84c47ca6e7ad857cf3e7df SHA512 08c35857ba4e7e85d619e94b5e6f0a3203faced5f83fb7bdb63d8e25c793bfb8af1b5e1f252613fa8e60e45e3e1a5e092b64f96b8ac2156c9f336bab7a4d6ae1 diff --git a/net-libs/rustls-ffi/files/rustls-ffi-0.12.1-no-rust-nightly.patch b/net-libs/rustls-ffi/files/rustls-ffi-0.12.1-no-rust-nightly.patch new file mode 100644 index 000000000000..c6349e37ddba --- /dev/null +++ b/net-libs/rustls-ffi/files/rustls-ffi-0.12.1-no-rust-nightly.patch @@ -0,0 +1,48 @@ +https://github.com/rustls/rustls-ffi/issues/397 +https://github.com/rustls/rustls-ffi/pull/398 + +From 9890aff0f0b1cc69f86c24b217a2515525e57056 Mon Sep 17 00:00:00 2001 +From: Daniel McCarney +Date: Wed, 27 Mar 2024 21:08:16 -0400 +Subject: [PATCH] Cargo: configure cargo-c to use vendored .h + +Presently we pre-generate the rustls.h header file using `cbindgen`, +commit the result to `src/rustls.h`, and check that the generated result +matches the checked-in result in CI. + +The new experimental cargo-c build regenerates its own header file using +`cbindgen` by default unless told to do otherwise. We'd prefer it didn't +do this because we're using a `cbindgen` feature that requires nightly +rust. + +This commit updates the `Cargo.toml` capi metadata to tell cargo-c to +skip generation of its own header file. We then configure the +pre-generated checked-in header file as an asset to be copied into the +install include directory. + +This better matches how the `Makefile` build allowed building the static +lib without needing nightly rust or `cbindgen`. +--- + Cargo.toml | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Cargo.toml b/Cargo.toml +index 7a910a9d..d601c7f8 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -41,6 +41,7 @@ regex = "1.9.6" + [package.metadata.capi.header] + name = "rustls" + subdirectory = false ++generation = false # Prefer a vendored .h + + [package.metadata.capi.library] + name = "rustls" +@@ -50,3 +51,6 @@ rustflags = "-Cmetadata=rustls-ffi" + [package.metadata.capi.pkg_config] + name = "rustls" + filename = "rustls" ++ ++[package.metadata.capi.install.include] ++asset = [{from = "src/rustls.h", to = "" }] + diff --git a/net-libs/rustls-ffi/rustls-ffi-0.12.1-r1.ebuild b/net-libs/rustls-ffi/rustls-ffi-0.12.1-r1.ebuild deleted file mode 100644 index 999355fd18f4..000000000000 --- a/net-libs/rustls-ffi/rustls-ffi-0.12.1-r1.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CRATES=" - aho-corasick@1.1.1 - base64@0.21.5 - cc@1.0.83 - cfg-if@1.0.0 - getrandom@0.2.11 - libc@0.2.153 - log@0.4.21 - memchr@2.6.4 - regex-automata@0.3.9 - regex-syntax@0.7.5 - regex@1.9.6 - ring@0.17.5 - rustls-pemfile@2.1.1 - rustls-pki-types@1.3.1 - rustls-webpki@0.102.0 - rustls@0.22.0 - rustversion@1.0.14 - spin@0.9.8 - subtle@2.5.0 - untrusted@0.9.0 - wasi@0.11.0+wasi-snapshot-preview1 - windows-sys@0.48.0 - windows-targets@0.48.5 - windows_aarch64_gnullvm@0.48.5 - windows_aarch64_msvc@0.48.5 - windows_i686_gnu@0.48.5 - windows_i686_msvc@0.48.5 - windows_x86_64_gnu@0.48.5 - windows_x86_64_gnullvm@0.48.5 - windows_x86_64_msvc@0.48.5 - zeroize@1.7.0 -" - -inherit cargo flag-o-matic multilib-minimal rust-toolchain - -DESCRIPTION="C-to-rustls bindings" -HOMEPAGE="https://github.com/rustls/rustls-ffi" -SRC_URI="https://github.com/rustls/rustls-ffi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" ${CARGO_CRATE_URIS}" - -LICENSE="|| ( Apache-2.0 MIT ISC )" -# Dependent crate licenses -LICENSE+=" BSD ISC MIT" -# For Ring (see its LICENSE) -LICENSE+=" ISC openssl SSLeay MIT" -SLOT="0/${PV}" -KEYWORDS="~amd64" - -BDEPEND="dev-util/cargo-c" - -QA_FLAGS_IGNORED="usr/lib.*/librustls.*" - -src_prepare() { - default - - multilib_copy_sources -} - -src_configure() { - # bug #927231 - filter-lto - - # textrels in ring - # Hopefully fixed with https://github.com/rustls/rustls-ffi/pull/389 - export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-Wl,-z,notext" - - # https://github.com/rustls/rustls-ffi/issues/397 - export RUSTC_BOOTSTRAP=1 - - multilib-minimal_src_configure -} - -multilib_src_compile() { - local cargoargs=( - --library-type=cdylib - --prefix="${EPREFIX}"/usr - --libdir="${EPREFIX}/usr/$(get_libdir)" - --target="$(rust_abi)" - $(usev !debug '--release') - ) - - cargo cbuild "${cargoargs[@]}" || die "cargo cbuild failed" -} - -multilib_src_test() { - local cargoargs=( - --prefix="${EPREFIX}"/usr - --libdir="${EPREFIX}/usr/$(get_libdir)" - --target="$(rust_abi)" - $(usex debug '--debug' '--release') - ) - - cargo ctest "${cargoargs[@]}" || die "cargo ctest failed" -} - -multilib_src_install() { - local cargoargs=( - --library-type=cdylib - --prefix="${EPREFIX}"/usr - --libdir="${EPREFIX}/usr/$(get_libdir)" - --target="$(rust_abi)" - --destdir="${D}" - $(usex debug '--debug' '--release') - ) - - cargo cinstall "${cargoargs[@]}" || die "cargo cinstall failed" -} diff --git a/net-libs/rustls-ffi/rustls-ffi-0.12.1-r2.ebuild b/net-libs/rustls-ffi/rustls-ffi-0.12.1-r2.ebuild new file mode 100644 index 000000000000..962808494628 --- /dev/null +++ b/net-libs/rustls-ffi/rustls-ffi-0.12.1-r2.ebuild @@ -0,0 +1,114 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + aho-corasick@1.1.1 + base64@0.21.5 + cc@1.0.83 + cfg-if@1.0.0 + getrandom@0.2.11 + libc@0.2.153 + log@0.4.21 + memchr@2.6.4 + regex-automata@0.3.9 + regex-syntax@0.7.5 + regex@1.9.6 + ring@0.17.5 + rustls-pemfile@2.1.1 + rustls-pki-types@1.3.1 + rustls-webpki@0.102.0 + rustls@0.22.0 + rustversion@1.0.14 + spin@0.9.8 + subtle@2.5.0 + untrusted@0.9.0 + wasi@0.11.0+wasi-snapshot-preview1 + windows-sys@0.48.0 + windows-targets@0.48.5 + windows_aarch64_gnullvm@0.48.5 + windows_aarch64_msvc@0.48.5 + windows_i686_gnu@0.48.5 + windows_i686_msvc@0.48.5 + windows_x86_64_gnu@0.48.5 + windows_x86_64_gnullvm@0.48.5 + windows_x86_64_msvc@0.48.5 + zeroize@1.7.0 +" + +inherit cargo flag-o-matic multilib-minimal rust-toolchain + +DESCRIPTION="C-to-rustls bindings" +HOMEPAGE="https://github.com/rustls/rustls-ffi" +SRC_URI="https://github.com/rustls/rustls-ffi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" ${CARGO_CRATE_URIS}" + +LICENSE="|| ( Apache-2.0 MIT ISC )" +# Dependent crate licenses +LICENSE+=" BSD ISC MIT" +# For Ring (see its LICENSE) +LICENSE+=" ISC openssl SSLeay MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" + +BDEPEND="dev-util/cargo-c" + +QA_FLAGS_IGNORED="usr/lib.*/librustls.*" + +PATCHES=( + "${FILESDIR}"/${PN}-0.12.1-no-rust-nightly.patch +) + +src_prepare() { + default + + multilib_copy_sources +} + +src_configure() { + # bug #927231 + filter-lto + + # textrels in ring + # Hopefully fixed with https://github.com/rustls/rustls-ffi/pull/389 + export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-Wl,-z,notext" + + multilib-minimal_src_configure +} + +multilib_src_compile() { + local cargoargs=( + --library-type=cdylib + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}/usr/$(get_libdir)" + --target="$(rust_abi)" + $(usev !debug '--release') + ) + + cargo cbuild "${cargoargs[@]}" || die "cargo cbuild failed" +} + +multilib_src_test() { + local cargoargs=( + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}/usr/$(get_libdir)" + --target="$(rust_abi)" + $(usex debug '--debug' '--release') + ) + + cargo ctest "${cargoargs[@]}" || die "cargo ctest failed" +} + +multilib_src_install() { + local cargoargs=( + --library-type=cdylib + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}/usr/$(get_libdir)" + --target="$(rust_abi)" + --destdir="${D}" + $(usex debug '--debug' '--release') + ) + + cargo cinstall "${cargoargs[@]}" || die "cargo cinstall failed" +} -- cgit v1.2.3