[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more p
From: |
Danny Milosavljevic |
Subject: |
[bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths. |
Date: |
Fri, 16 Mar 2018 23:29:41 +0100 |
> + (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!
pgpC506fsH8MD.pgp
Description: Digitale Signatur von OpenPGP
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., (continued)
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Chris Marusich, 2018/03/21
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Danny Milosavljevic, 2018/03/21
[bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Ludovic Courtès, 2018/03/17
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Chris Marusich, 2018/03/21
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Ludovic Courtès, 2018/03/21
- [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz., Chris Marusich, 2018/03/22
[bug#30572] [PATCH 3/7] vm: Allow control of deduplication in root-partition-initializer., Chris Marusich, 2018/03/15
[bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths., Chris Marusich, 2018/03/15
- [bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths.,
Danny Milosavljevic <=
[bug#30572] [PATCH 7/7] tests: Add tests for "guix system disk-image" et al., Chris Marusich, 2018/03/15
[bug#30572] [PATCH 4/7] gnu: When building in a VM, share a temporary directory., Chris Marusich, 2018/03/15
[bug#30572] [PATCH 6/7] system: Add "guix system docker-image" command., Chris Marusich, 2018/03/15