From: Raghav Gururajan via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 49238@debbugs.gnu.org, jgart@dismail.de
Subject: [bug#49238] [PATCH v1 2/2] gnu: Add ytfzf.
Date: Mon, 5 Jul 2021 08:03:53 -0400 [thread overview]
Message-ID: <c96b27b4-7fb4-1a40-046f-0721048e3c68@raghavgururajan.name> (raw)
In-Reply-To: <2e6b08035ebeddd60faa283e0a183d8d76e0f709.camel@telenet.be>
[-- Attachment #1.1: Type: text/plain, Size: 2744 bytes --]
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=transitive stuff" would give all the
> source code for building stuff (in the sense of ‘Corresponding Source’
> of the GPL), and "guix-mpv", 'guix-jq" ... don't exist anywhere.
>
> I don't know if that has been spelled out somewhere though.
>
> 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*.
>
> Actually, myself I'm not convinced because you could consider
> the package definition itself to be part of the ‘corresponding source’.
I get the idea, but I don't think we can call .patch files inside
phases, the patches directory is not exposed/available inside
build-environment.
> I'm wondering if (string-append (assoc-ref inputs "catimg") "/bin/catimg")
> 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:
>
> Maybe tell people to report issues at bug-guix@gnu.org or #guix? Dunno
Changed in v4.
> Don't forget to patch 'column'.
>
> Don't forget to patch "mkfifo".
>
> Don't forget patching 'sleep'. It is not shell a built-in
> (try "type sleep" and "type [" in a terminal").
>
> Don't forget patching 'grep' and 'tr'.
>
> Don't forget 'grep -> guix-grep' and 'cut -> guix-cut'
>
> Don't forget 'awk -> guix-awk' and 'sort -> guix-sort' and 'uniq -> 'guix-uniq'
>
> 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.
>
> 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 login?
>
> What if multiple users run ytfzf concurrently? Would they overwrite eaech
> other subtitles? Would a different user be able to see what the other
> is downloading?
>
> 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 completely
> under the user's control.
Good catch. I have changed this in v4.
Let me know if v4 looks good.
Regards,
RG.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2021-07-05 12:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 5:44 [bug#49238] Ytfzf Raghav Gururajan via Guix-patches via
2021-06-27 5:47 ` [bug#49238] [PATCH v1 1/2] gnu: Add python-ueberzug Raghav Gururajan via Guix-patches via
2021-06-27 5:47 ` [bug#49238] [PATCH v1 2/2] gnu: Add ytfzf Raghav Gururajan via Guix-patches via
2021-06-30 19:38 ` Maxime Devos
2021-07-05 12:03 ` Raghav Gururajan via Guix-patches via [this message]
2021-07-05 12:13 ` Maxime Devos
2021-07-05 12:20 ` Raghav Gururajan via Guix-patches via
2021-06-29 19:06 ` [bug#49238] [PATCH v2 1/2] gnu: Add python-ueberzug Raghav Gururajan via Guix-patches via
2021-06-29 19:06 ` [bug#49238] [PATCH v2 2/2] gnu: Add ytfzf Raghav Gururajan via Guix-patches via
2021-07-05 11:14 ` [bug#49238] [PATCH v3 1/2] gnu: Add python-ueberzug Raghav Gururajan via Guix-patches via
2021-07-05 11:14 ` [bug#49238] [PATCH v3 2/2] gnu: Add ytfzf Raghav Gururajan via Guix-patches via
2021-07-05 12:02 ` Maxime Devos
2021-07-05 12:19 ` Raghav Gururajan via Guix-patches via
2021-07-05 15:10 ` [bug#49238] [PATCH v5 1/2] gnu: Add python-ueberzug Raghav Gururajan via Guix-patches via
2021-07-05 15:10 ` [bug#49238] [PATCH v5 2/2] gnu: Add ytfzf Raghav Gururajan via Guix-patches via
2021-07-05 15:42 ` Maxime Devos
2021-07-06 5:25 ` Raghav Gururajan via Guix-patches via
2021-07-06 5:37 ` bug#49238: (no subject) Raghav Gururajan via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c96b27b4-7fb4-1a40-046f-0721048e3c68@raghavgururajan.name \
--to=guix-patches@gnu.org \
--cc=49238@debbugs.gnu.org \
--cc=jgart@dismail.de \
--cc=maximedevos@telenet.be \
--cc=rg@raghavgururajan.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).