From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yM1xFnT14mA+VwAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 14:05:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2Ow3EnT14mA6bQAAB5/wlQ (envelope-from ) for ; Mon, 05 Jul 2021 12:05:08 +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 E6F7DD500 for ; Mon, 5 Jul 2021 14:05:07 +0200 (CEST) Received: from localhost ([::1]:48570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0NLW-00033U-U2 for larch@yhetil.org; Mon, 05 Jul 2021 08:05:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0NKT-0001Vv-Sx for guix-patches@gnu.org; Mon, 05 Jul 2021 08:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0NKT-0002eI-Kg for guix-patches@gnu.org; Mon, 05 Jul 2021 08:04:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0NKT-0008C0-Hy for guix-patches@gnu.org; Mon, 05 Jul 2021 08:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49238] [PATCH v1 2/2] gnu: Add ytfzf. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Jul 2021 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49238 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Maxime Devos Cc: 49238@debbugs.gnu.org, jgart@dismail.de Received: via spool by 49238-submit@debbugs.gnu.org id=B49238.162548664031485 (code B ref 49238); Mon, 05 Jul 2021 12:04:01 +0000 Received: (at 49238) by debbugs.gnu.org; 5 Jul 2021 12:04:00 +0000 Received: from localhost ([127.0.0.1]:44330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0NKS-0008Bl-C6 for submit@debbugs.gnu.org; Mon, 05 Jul 2021 08:04:00 -0400 Received: from out0.migadu.com ([94.23.1.103]:41933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0NKP-0008Bb-OG for 49238@debbugs.gnu.org; Mon, 05 Jul 2021 08:03:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1625486635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QLLSpJw32BtjK5WFweYUcdvqiPJfEVSJNd2toOztTbE=; b=eV7EVMY9Iws3IrHVjOmn/MYGxMLPoh/agL3sG7Pv32T1TfTsOrA99OwA9U7ZVBHZElfNpO qzJTaoJ4qANMhEIs0JTlJnvA02OZX3nzEdCAvtAt9pU2hQZb4aXhkLBmgw1T0dt2aCVLTh xGpJtydXCkVkZhHYkmyTEdNErZlvIe5CPNIo9iOLSI68YFzCQcoht9xWoCN7bvNjgF3c7u AdbJUTGl3mi1eetXwV1g+he2qXOhYpNNvSL+Ttch7nG1Ujgxbu1j/lgEjmWDmGuneFNlsN UsI02FUaiHgmICq6Lr4mXRT/fYNv73y0972Q1KHBlj3LsCwWGknSl7GOrAR2ww== References: <20210627054737.7972-1-rg@raghavgururajan.name> <20210627054737.7972-2-rg@raghavgururajan.name> <2e6b08035ebeddd60faa283e0a183d8d76e0f709.camel@telenet.be> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Message-ID: Date: Mon, 5 Jul 2021 08:03:53 -0400 MIME-Version: 1.0 In-Reply-To: <2e6b08035ebeddd60faa283e0a183d8d76e0f709.camel@telenet.be> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TNizMfWK7IDDTthxpSLbDS1l3srJBTE6h" X-Migadu-Auth-User: rg@raghavgururajan.name 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: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan 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=1625486708; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=QLLSpJw32BtjK5WFweYUcdvqiPJfEVSJNd2toOztTbE=; b=WT9kK9oAm+8cRT3r2zHcBADxUcxcQJZ2fVmcC+QYYedOOIG8hQbdhIa1gQvuMkUxnzleTh VRFnVLYn3y/bBjudhP488/Ocsf6f7QmyXEUwKA08HF6kNmgqtib034u7Dh2E/7eLstRTQF EnhJPqbMQSEsBYN0lc7CmDiWsQ1Oxg+L8ZDWJttsHyciDnCSyz8EkawieU6g0UVSsWC5eG 6NuC1JIkNWBGP17Z/o/wBYNBBveghD35kP/6RKPboymUclYgqCIrnZ3dTPnzvLvwtHNbtJ Zw18IDSBaENQIKsGx/UzSzO++ERhejXu//TXgE4LtW//GlVM6E+LshLUGhx21A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625486708; a=rsa-sha256; cv=none; b=YXTXLr2imQIMBtMMAvt5+YP1SCcEfCEY8c4987PHosSG68cxLWGC8fqYvQwx7QDzFCk9Fr 5/IDuko90SPOCSiwh/XVhugdBdR1R8HJUKvpcHooLGMou5N1k3t9TCI7ShwibEDg73Dn2/ ZouEj2n/tqSo9gUSF+vcDd+ZPd1e4VuRejdFGu6yZcLsd6TvIpD7It6RRQY8bh1fniCqCh Wt0vzlJ8lPJni77OYCPo9vjjKJZtxm7KlheH5M6BZ/BiKjik0yB0PJ39aDTBNxPqnwTKJ7 +gcVcp1DaM3r2oZa5nag5LC8zClsT6lNmBxHHE7d/keiv1uOGpuEGXy3G5jSPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=eV7EVMY9; 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-Spam-Score: -5.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=eV7EVMY9; 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: E6F7DD500 X-Spam-Score: -5.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: VF82jJCyPm6S This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TNizMfWK7IDDTthxpSLbDS1l3srJBTE6h Content-Type: multipart/mixed; boundary="5eg7lQUWQzGYbsv2CDgwdZ6JfLqJ0F3q6"; protected-headers="v1" From: Raghav Gururajan To: Maxime Devos Cc: jgart@dismail.de, 49238@debbugs.gnu.org Message-ID: Subject: Re: [bug#49238] [PATCH v1 2/2] gnu: Add ytfzf. References: <20210627054737.7972-1-rg@raghavgururajan.name> <20210627054737.7972-2-rg@raghavgururajan.name> <2e6b08035ebeddd60faa283e0a183d8d76e0f709.camel@telenet.be> In-Reply-To: <2e6b08035ebeddd60faa283e0a183d8d76e0f709.camel@telenet.be> --5eg7lQUWQzGYbsv2CDgwdZ6JfLqJ0F3q6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: quoted-printable Hi Maxime! > That's a neat trick to avoid fragile (substitute* ...). > However, as I understand it, the origin is meant to be > usable as source code (think install dependencies && guix build && tar = xzf stuff.tgz > && ./configure && make && try it out), such that > "guix build --source=3Dtransitive stuff" would give all the > source code for building stuff (in the sense of =E2=80=98Corresponding = Source=E2=80=99 > of the GPL), and "guix-mpv", 'guix-jq" ... don't exist anywhere. >=20 > I don't know if that has been spelled out somewhere though. >=20 > I'd suggest adding "patch" to 'native-inputs', adding the patch > to 'inputs' or 'native-inputs' (doesn't really matter which) and > doing (invoke "patch" OPTIONS "blabla.patch") before the substitute*. >=20 > Actually, myself I'm not convinced because you could consider > the package definition itself to be part of the =E2=80=98corresponding = source=E2=80=99. I get the idea, but I don't think we can call .patch files inside=20 phases, the patches directory is not exposed/available inside=20 build-environment. > I'm wondering if (string-append (assoc-ref inputs "catimg") "/bin/catim= g") > would be better, as 'string-append' is less complex than 'format' > and "format" doesn't seem to provide any additional value here. Cool! I have made this change in v4. > Now about the patch: >=20 > Maybe tell people to report issues at bug-guix@gnu.org or #guix? Dunno Changed in v4. > Don't forget to patch 'column'. >=20 > Don't forget to patch "mkfifo". >=20 > Don't forget patching 'sleep'. It is not shell a built-in > (try "type sleep" and "type [" in a terminal"). >=20 > Don't forget patching 'grep' and 'tr'. >=20 > Don't forget 'grep -> guix-grep' and 'cut -> guix-cut' >=20 > Don't forget 'awk -> guix-awk' and 'sort -> guix-sort' and 'uniq -> 'gu= ix-uniq' >=20 > Don't forget 'sed -> guix-sed' and 'awk -> guix-awk' Thanks, I have patched these in v4. > FWIW, writing to "/tmp/ytfzf" seems to be a potential security problem > and bad behaviour on multiple-user systems. >=20 > What would happen if /tmp/ytfzf is a symlink to /etc/passwd an ytfzf is= run > as root (yes, running as root is not recommended)? Would that brick the= system? > What if /tmp/ytfzf is a symlink to ~/.profile? Would that brick the log= in? >=20 > What if multiple users run ytfzf concurrently? Would they overwrite eae= ch > other subtitles? Would a different user be able to see what the other > is downloading? >=20 > A relatively easy fix would be to write to, say, $HOME/.cache/ytzf-subs= > instead (not sure what the proper directory would be), which is complet= ely > under the user's control. Good catch. I have changed this in v4. Let me know if v4 looks good. Regards, RG. --5eg7lQUWQzGYbsv2CDgwdZ6JfLqJ0F3q6-- --TNizMfWK7IDDTthxpSLbDS1l3srJBTE6h Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTNLV6qqYzLN9qR1rBfWBZkf4vlUQUCYOL1KQUDAAAAAAAKCRBfWBZkf4vlUVrR AQCOAlVxtTsBgWRC3yRBy2WcVqq/p9aHcy7IHY/v4sH/jQEAtzYIbv2eVZEZKDQJjvMJuRsO93Zc mOnrPcFiXl38MgE= =bcn4 -----END PGP SIGNATURE----- --TNizMfWK7IDDTthxpSLbDS1l3srJBTE6h--