From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewxrR-0000Fw-KU for guix-patches@gnu.org; Fri, 16 Mar 2018 18:30:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewxrO-0002NN-Gp for guix-patches@gnu.org; Fri, 16 Mar 2018 18:30:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewxrO-0002NE-Dh for guix-patches@gnu.org; Fri, 16 Mar 2018 18:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ewxrO-0004GS-3p for guix-patches@gnu.org; Fri, 16 Mar 2018 18:30:02 -0400 Subject: [bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths. Resent-Message-ID: Date: Fri, 16 Mar 2018 23:29:41 +0100 From: Danny Milosavljevic Message-ID: <20180316232941.3040c051@scratchpost.org> In-Reply-To: <20180315040915.5556-6-cmmarusich@gmail.com> References: <20180222102933.4978-1-cmmarusich@gmail.com> <20180315040915.5556-1-cmmarusich@gmail.com> <20180315040915.5556-6-cmmarusich@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/L=Xc26NEk0.t41dbEIgOR2g"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Chris Marusich Cc: bug#30572 <30572@debbugs.gnu.org> --Sig_/L=Xc26NEk0.t41dbEIgOR2g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable > + (define (sanitize path-fragment) > + (escape-special-chars > + ;; GNU tar strips the leading slash off of absolute paths before ap= plying > + ;; 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 synt= ax"). > + ;; 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! --Sig_/L=Xc26NEk0.t41dbEIgOR2g Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlqsRVUACgkQ5xo1VCww uqW/cwf+P0zLKHQ94eoYPQDS9FU94L+lHXEN0BIBeNyspmYnZzvPOIen5blwLGGX aEMXkGQlAO7YacaiGlxaouuJYSxINUyxY98LHoA9q77FEb5vE8W4pawrF1uSbyFu w7l4YFvA2Zpd9YVk3s+V55jKCLGB7jw2Ikv7VigpvNqK7sFTtIcG66uMjWnf7Ogy +uupCk4wW/vk7g4GK9f6q85xkwZVWVJIL+X3Jn1XKYKCaJ5hbMAAEmtAOPjl1sX+ +JOwiffCJf4FantT6DU6Bl5EW4Lj1BLrap0tuMr+QRg4ONmZHho1F44zbq1eumj6 LDJ7m4NHRwQ1NNl7jJbTExI8soyCnQ== =GfIU -----END PGP SIGNATURE----- --Sig_/L=Xc26NEk0.t41dbEIgOR2g--