Fix CVE-2018-1000802: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000802 Taken from upstream commit (sans NEWS): https://github.com/python/cpython/commit/d8b103b8b3ef9644805341216963a64098642435 diff --git a/Lib/shutil.py b/Lib/shutil.py index 3462f7c5e9..0ab1a06f52 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -413,17 +413,21 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, return archive_name -def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False): +def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger): # XXX see if we want to keep an external call here if verbose: zipoptions = "-r" else: zipoptions = "-rq" - from distutils.errors import DistutilsExecError - from distutils.spawn import spawn + cmd = ["zip", zipoptions, zip_filename, base_dir] + if logger is not None: + logger.info(' '.join(cmd)) + if dry_run: + return + import subprocess try: - spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) - except DistutilsExecError: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: # XXX really should distinguish between "couldn't find # external 'zip' command" and "zip failed". raise ExecError, \ @@ -458,7 +462,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): zipfile = None if zipfile is None: - _call_external_zip(base_dir, zip_filename, verbose, dry_run) + _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger) else: if logger is not None: logger.info("creating '%s' and adding '%s' to it", n>
path: root/etc/completion/bash
AgeCommit message (Expand)Author
2022-05-29bash completion: Fix & unify option parsing....Tobias Geerinckx-Rice
2022-01-17bash completion: Complete "guix home" sub-commands....Ludovic Courtès
2022-01-16bash completion: Fix options completion....Fulbert
2021-12-08bash completion: Complete ‘guix shell -f’....Tobias Geerinckx-Rice
2021-10-31bash completion: Complete top-level options....Tobias Geerinckx-Rice
2021-10-31bash completion: Don't hard-code "guix" binary name....Tobias Geerinckx-Rice
2021-10-25Add 'guix shell'....Ludovic Courtès
2021-10-03bash completion: Fix ‘system’ & ‘container’ subcommands....Tobias Geerinckx-Rice
2021-10-03bash completion: Complete ‘guix size’ file names....Tobias Geerinckx-Rice
2021-10-03bash completion: Complete ‘guix build’ file names....Tobias Geerinckx-Rice
2021-10-03bash completion: Complete ‘guix weather’ packages....Tobias Geerinckx-Rice
2021-10-03bash completion: Append to $COMPREPLY where possible....Tobias Geerinckx-Rice
2021-10-03bash completion: Consolidate similar $command ‘if’ branches....Tobias Geerinckx-Rice
2021-06-16bash_completion: Complete options for ‘guix environment’....Tobias Geerinckx-Rice
2021-06-16bash completion: Complete options for the right command....Tobias Geerinckx-Rice
2021-06-16bash completion: Really support subcommands....Tobias Geerinckx-Rice
2020-12-04bash completion: Complete file names after '-f' and '-l'....Ludovic Courtès