From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6BGRH4+rimFWMQEAgWs5BA (envelope-from ) for ; Tue, 09 Nov 2021 18:10:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eAs+G4+rimG3VQAA1q6Kng (envelope-from ) for ; Tue, 09 Nov 2021 17:10:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B91CA5B08 for ; Tue, 9 Nov 2021 18:10:38 +0100 (CET) Received: from localhost ([::1]:52718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkUdp-00019L-TE for larch@yhetil.org; Tue, 09 Nov 2021 12:10:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkUZO-0003Rv-5X for guix-patches@gnu.org; Tue, 09 Nov 2021 12:06:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52256) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkUZN-0005en-Qh for guix-patches@gnu.org; Tue, 09 Nov 2021 12:06:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkUZN-0006NS-M7 for guix-patches@gnu.org; Tue, 09 Nov 2021 12:06:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51724] [PATCH 12/12] gnu: Add rust-adblock-0.4. References: In-Reply-To: Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Nov 2021 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51724 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "51724@debbugs.gnu.org" <51724@debbugs.gnu.org> Received: via spool by 51724-submit@debbugs.gnu.org id=B51724.163647750424442 (code B ref 51724); Tue, 09 Nov 2021 17:06:01 +0000 Received: (at 51724) by debbugs.gnu.org; 9 Nov 2021 17:05:04 +0000 Received: from localhost ([127.0.0.1]:35569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkUYS-0006M9-5B for submit@debbugs.gnu.org; Tue, 09 Nov 2021 12:05:04 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:13435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkUYP-0006LS-K6 for 51724@debbugs.gnu.org; Tue, 09 Nov 2021 12:05:02 -0500 Date: Tue, 09 Nov 2021 17:04:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1636477491; bh=oP8sLHpF8ie6PaovoTVX0/GcE/SHCO9LCm0NyVeEqOk=; h=Date:To:From:Reply-To:Subject:From; b=vxh9Gi+8n58xt1RCAY98AEbKgMB2SfSupnHge0dHQIWl7cZMe/T2i2nl+Lh83k1Li kuNtmlWH935jbCCsWw45rMDQt4/WJakEq3+Bpxx1FUGxisSLeQ0+DOov8j07vEQvjW 3PP+wgyqSVYUHJ73Y+5kL6kA5PPUCslpTj3GFb50= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches From: phodina via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636477838; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=oP8sLHpF8ie6PaovoTVX0/GcE/SHCO9LCm0NyVeEqOk=; b=CAO7x88+1GeC8xrXXImww7dYLe8GimpXV4Z4OnxXIfkv2GibPH7sdf9cAHyBqaBc7yVzIj cJ2bBlnEChMbGz3WuMCSk+R/CunkmvQCqkjVhZrcFrGw+5Oyh85C5EittUwWaYNvM8tvtQ fPhTCbnlqBQEGNH0JzRvEuRhj1vL4gmld72wTM+aJXdZAsBhT+t45frY2ExfhX9TeQ/VC3 fGb2HyWKmOA5DxUatuE12ziwyGB3m1SKr28aWw7fW20WAL1Ygm0wiW3QrOGQlkWT95qCJT 9nOfA9pCL0fUHFKsRYNECS8GFsuMPaRLqtUVuffJ8xgpElaBTMGU6jxZdieYrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636477838; a=rsa-sha256; cv=none; b=ELv0K0WE6Z6DPoz3/eD5lE4IbzS9KA/KYcOGef1tjQpRmYUZryzY14R6L1AwpeC6wf8ksp /SxAlxMvVKYt2vidHHisoNHaxIJ6PT3I6x9arpBUs7dLQifHV0hlvpIHhUSgljWIX4ydst vRdufCjeawWfV+QI1Mv3P7IQ/Aw14imkA0RzT4NEkY+JpzY66/7SAbR4ZXEFMFurh051Ah K8f9YNeRf9Or6hiIU6vrPRh0TFHjuzWoma0MYD9dKxjLrk7nYIxlmJWO5CYgY3bI+MvMvd NYpBrGLWOddPne65REAZVK4i966nLYCGHXBTMA5El3Wc2hZp3qAL23nladzSEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=vxh9Gi+8; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=vxh9Gi+8; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B91CA5B08 X-Spam-Score: -3.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7jLLDq2DHNC6 * gnu/packages/crates-io.scm (rust-adblock-0.4): New variable. * gnu/packages/patches/rust-adblock-ignore-live-tests.patch: New file. * gnu/local.mk: Add patch. diff --git a/gnu/local.mk b/gnu/local.mk index 05258ac054..c2923d45de 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1752,6 +1752,7 @@ dist_patch_DATA =3D=09=09=09=09=09\ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-1.45-linker-locale.patch=09=09\ %D%/packages/patches/rust-1.48-linker-locale.patch=09=09\ + %D%/packages/patches/rust-adblock-ignore-live-tests.patch=09=09\ %D%/packages/patches/rust-bootstrap-stage0-test.patch=09=09\ %D%/packages/patches/rust-coresimd-doctest.patch=09=09\ %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch=09\ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 159043d657..1da99d8da6 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -982,6 +982,60 @@ (define-public rust-adaptive-barrier-0.1 deadlock, like the standard Barrier).") (license (list license:asl2.0 license:expat)))) +(define-public rust-adblock-0.4 + (package + (name "rust-adblock") + (version "0.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/brave/adblock-rust") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "rust-adblock-ignore-live-tests.patch")) + (sha256 + (base32 + "0l2iacwkm66z6wc71wy62x2k5xllx94adrqncicxqsx203c3ljpl")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-addr" ,rust-addr-0.14) + ("rust-base64" ,rust-base64-0.13) + ("rust-bitflags" ,rust-bitflags-1) + ("rust-cssparser" ,rust-cssparser-0.25) + ("rust-flate2" ,rust-flate2-1) + ("rust-idna" ,rust-idna-0.2) + ("rust-itertools" ,rust-itertools-0.10) + ("rust-lifeguard" ,rust-lifeguard-0.6) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-percent-encoding" + ,rust-percent-encoding-2) + ("rust-regex" ,rust-regex-1) + ("rust-rmp-serde" ,rust-rmp-serde-0.13) + ("rust-rmp-serde" ,rust-rmp-serde-0.15) + ("rust-seahash" ,rust-seahash-3) + ("rust-selectors" ,rust-selectors-0.21) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-twoway" ,rust-twoway-0.2) + ("rust-url" ,rust-url-2)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.3) + ("rust-csv" ,rust-csv-1) + ("rust-futures" ,rust-futures-0.3) + ("rust-reqwest" ,rust-reqwest-0.11) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-sha2" ,rust-sha2-0.9) + ("rust-tokio" ,rust-tokio-1.8)))) + (native-inputs `(("pkg-config" ,pkg-config) + ("openssl" ,openssl))) + (home-page "https://github.com/brave/adblock-rust/") + (synopsis "Adblock Plus syntax filter parsing and matching") + (description "This package provides native Rust module for Adblock Plu= s +syntax (e.g. EasyList, EasyPrivacy) filter parsing and matching.") + (license license:mpl2.0))) + (define-public rust-addr2line-0.14 (package (name "rust-addr2line") diff --git a/gnu/packages/patches/rust-adblock-ignore-live-tests.patch b/gn= u/packages/patches/rust-adblock-ignore-live-tests.patch new file mode 100644 index 0000000000..a1c9c190b6 --- /dev/null +++ b/gnu/packages/patches/rust-adblock-ignore-live-tests.patch @@ -0,0 +1,69 @@ +From b83b5b453d3f7883ef4c12f84a7045486957c709 Mon Sep 17 00:00:00 2001 +From: Petr Hodina +Date: Tue, 9 Nov 2021 17:02:54 +0100 +Subject: [PATCH] Ignore live tests. + + +diff --git a/tests/live.rs b/tests/live.rs +index b1a19fc..6bd4685 100644 +--- a/tests/live.rs ++++ b/tests/live.rs +@@ -140,6 +140,7 @@ fn get_blocker_engine_deserialized_ios() -> Engine { + } + + #[test] ++#[ignore] + fn check_live_specific_urls() { + let mut engine =3D get_blocker_engine(); + { +@@ -176,6 +177,7 @@ fn check_live_specific_urls() { + } + + #[test] ++#[ignore] + fn check_live_deserialized_specific_urls() { + let mut engine =3D get_blocker_engine_deserialized(); + { +@@ -201,6 +203,7 @@ fn check_live_deserialized_specific_urls() { + } + + #[test] ++#[ignore] + fn check_live_from_filterlists() { + let engine =3D get_blocker_engine(); + let requests =3D load_requests(); +@@ -214,6 +217,7 @@ fn check_live_from_filterlists() { + } + + #[test] ++#[ignore] + fn check_live_deserialized_file() { + let engine =3D get_blocker_engine_deserialized(); + let requests =3D load_requests(); +@@ -243,6 +247,7 @@ fn check_live_deserialized_ios() { + + #[cfg(feature =3D "resource_assembler")] + #[test] ++#[ignore] + fn check_live_redirects() { + use adblock::resources::resource_assembler::assemble_web_accessible_r= esources; + +@@ -278,6 +283,7 @@ fn check_live_redirects() { + } + + #[test] ++#[ignore] + /// Ensure that two different engines loaded from the same textual filter= set serialize to + /// identical buffers. + fn stable_serialization() { +@@ -291,6 +297,7 @@ fn stable_serialization() { + } + + #[test] ++#[ignore] + /// Ensure that one engine's serialization result can be exactly reproduc= ed by another engine after + /// deserializing from it. + fn stable_serialization_through_load() { +-- +2.33.1 + -- 2.33.1