From owner-freebsd-python@freebsd.org Tue Jul 28 02:08:49 2020 Return-Path: Delivered-To: freebsd-python@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12C39376F44 for ; Tue, 28 Jul 2020 02:08:49 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BG0TX0Z1hz4f54 for ; Tue, 28 Jul 2020 02:08:47 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf1-x442.google.com with SMTP id z3so10068874pfn.12 for ; Mon, 27 Jul 2020 19:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Gujzxsfy5sqkTY+4DUc8zElZTq//BJMARnrOXI8HwjM=; b=LCcuOvBPP0KS4Sae7IEKAWRkYtFlImD6p1TvS/9EgVnJTieZrxgebfQK+Bew2kKFt8 4mZmuNXrGVqtcKYetbxuhKs8/Ywjx2UasANFKppaa5iDc8RlreNYjSu8S4IaTDST5Hhs +aDZXao8nGF6p/Z5dF25qDdHP+lUPWYm1AEUm25OoNXESG5yHA5yN2h5BwrGMg7MfuUO jeA0XtgSSPU/8QUsi2+pcmxa00diReyke48Ur5dMLKKOtlr7ABMeIxsOkhTHeqO6yPbU IHyAo/GiRi7p4O6iug7TZFqtHbMfW1vJHD80jfLIUHM92zCTZV2PTZ4B66RiGKzxNMln vPOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Gujzxsfy5sqkTY+4DUc8zElZTq//BJMARnrOXI8HwjM=; b=F1dZ8kewiuv/P9ULfylIXreXDfBkbtBjz2XLj89b34m72Ci5wU3WX7i0GcOBYb/OMi EWo1zs8ANuAYy3TtnApddTjdXhKLkd65JD1VRsu8P0IEmGM9ticBWoRV6bPBlX3omod/ pkDjPGo7bSiQiTpoLEGQukzAGBTacGkJ/WD5UWnvez0mKWN6/p698SOJWDeuhI+zFTJp lG8okFPf2KcO0GSw93iPDqKkGWrgrpPqGxvHhoQT0ADqzA3WJ18iySlxKGLNt+CWqykd 09ZIdG2iq4ZJce7wZ1E26dWLX945owT5StqpkTjWe+BzAUPDzM/ZrXf70rk4kR3csHjI 9PQA== X-Gm-Message-State: AOAM533Zs0Ot1AG2qlod87teNXfHVl1ZnrMJSkKRGLq55A0WB0XzhCNN 9aSU3tLeOqgiErnNqoZbk3AB9uIK X-Google-Smtp-Source: ABdhPJzpCy/6cgTR+AQxmCesSeMO8WO+lU0RSFmzxOZtQ9NuG7SoBn0Pfcd9HCxjmQalA1claZqiIQ== X-Received: by 2002:a62:e202:: with SMTP id a2mr23292114pfi.8.1595902126491; Mon, 27 Jul 2020 19:08:46 -0700 (PDT) Received: from ?IPv6:2403:5800:7100:5d01:2015:1844:3be6:7181? (2403-5800-7100-5d01-2015-1844-3be6-7181.ip6.aussiebb.net. [2403:5800:7100:5d01:2015:1844:3be6:7181]) by smtp.gmail.com with ESMTPSA id q10sm3603694pfs.75.2020.07.27.19.08.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jul 2020 19:08:46 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: security/py-pycryptodome: Soft dependency on devel/py-cffi To: "John W. O'Brien" , FreeBSD Python References: <779685b4-2036-b128-da77-31a131d19951@saltant.com> From: Kubilay Kocak Message-ID: <852935a9-0abb-5284-f06a-f561f80fd0f5@FreeBSD.org> Date: Tue, 28 Jul 2020 12:08:42 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Thunderbird/79.0 MIME-Version: 1.0 In-Reply-To: <779685b4-2036-b128-da77-31a131d19951@saltant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BG0TX0Z1hz4f54 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LCcuOvBP; dmarc=none; spf=pass (mx1.freebsd.org: domain of koobsfreebsd@gmail.com designates 2607:f8b0:4864:20::442 as permitted sender) smtp.mailfrom=koobsfreebsd@gmail.com X-Spamd-Result: default: False [-2.40 / 15.00]; HAS_REPLYTO(0.00)[koobs@FreeBSD.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.17)[-0.167]; FORGED_SENDER(0.30)[koobs@FreeBSD.org,koobsfreebsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.026]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_NEQ_ENVFROM(0.00)[koobs@FreeBSD.org,koobsfreebsd@gmail.com]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.002]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-python@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::442:from]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 02:08:49 -0000 On 28/07/2020 5:43 am, John W. O'Brien wrote: > Greetings FreeBSD Python, > > I have been mulling over a thing and would like the list's perspective > before I decide whether to take action or not. > > security/py-pycryptodome will use devel/py-cffi if it is available [0] > or ctypes otherwise [1]. This makes me just a little bit uneasy since it > leaves the door open to certain Heisenbugs and red herrings. My question > is whether it warrants adding devel/py-cffi to RUN_DEPENDS to ensure > consistency behavior? If not, what about as an OPTION for those who care > about that sort of thing? > > [0] > https://github.com/Legrandin/pycryptodome/blob/v3.9.8/lib/Crypto/Util/_raw_api.py#L71-L161 > [1] > https://github.com/Legrandin/pycryptodome/blob/v3.9.8/lib/Crypto/Util/_raw_api.py#L163-L263 > [2] https://en.wikipedia.org/wiki/Heisenbug > The Python Policy section on optional dependencies should cover this: https://wiki.freebsd.org/Python/PortsPolicy#Optional_Dependencies tldr; For either at build or run-time optional dependencies (where the pattern is, check if dep exists, use some code path if true, else use another code path), add OPTIONS for them. Re heisenbugs/etc, this is where support for running test suites in the port are critical, let us know in #freebsd-python on freenode IRC if you need help getting these hooked up