GNU bug report logs - #30572
[PATCH 0/7] Add "guix system docker-image" command

Previous Next

Package: guix-patches;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Thu, 22 Feb 2018 10:31:02 UTC

Severity: normal

Tags: patch

Done: Chris Marusich <cmmarusich <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #140 received at 30572 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: bug#30572 <30572 <at> debbugs.gnu.org>, Ludovic
 Courtès <ludo <at> gnu.org>
Subject: Re: [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths.
Date: Fri, 16 Mar 2018 23:29:41 +0100
[Message part 1 (text/plain, inline)]
> +  (define (sanitize path-fragment)
> +    (escape-special-chars
> +     ;; GNU tar strips the leading slash off of absolute paths before applying
> +     ;; the transformations, so we need to do the same, or else our
> +     ;; replacements won't match any paths.
> +     (string-trim path-fragment #\/)
> +     ;; Escape the basic regexp special characters (see: "(sed) BRE syntax").
> +     ;; We also need to escape "/" because we use it as a delimiter.
> +     "/*.^$[]\\"
> +     #\\))

I'm not such a fan of using blacklist.  Those can easily get out of sync and
nobody notices.  But in this case I guess people take care not to extend
basic regexp special characters in sed (tar) without the user specifying a flag
requiring it.

LGTM!
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 7 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.