From nobody Fri May 3 23:02:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.208.44 as permitted sender) client-ip=209.85.208.44; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-f44.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1611035106; cv=none; d=zohomail.com; s=zohoarc; b=Chm4oaXYPAArmc1mpNTKP9M5KOu/7aud67zBQAZVxyID3y54wZbc8Y1gYehShvZp28c1ZVVF0zRiT97M2/kEKVWPQZVSNMEpwv4ZdoAHSL/dkPJDU5j7ruFMzMWl7bEQObnTW1oeoPlTgSLyC4B+4A4BY4HUzuPQvoXfalB220w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611035106; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=yUfq9iUTTeJbfUFfp93xinjLhYmr1UXMYsejJJiGQ/k=; b=K8yXxJnhGteEC+tgxRItpJdjSC857m8VDfQ2S96GUQj2QCPjpaqvtZ+wxqr4tyPZE3gljNkkQG1Jumcon5sHa1G0/qQjvrmWjvyTWpqQq7bkctgLsp8c+EnO79GDjshzxvdIdFcwF8FteJ0od0jeBtjppOz5ji0F+s8CU3OvWHs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.208.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by mx.zohomail.com with SMTPS id 16110351067751013.1828513661918; Mon, 18 Jan 2021 21:45:06 -0800 (PST) Received: by mail-ed1-f44.google.com with SMTP id f1so5946531edr.12 for ; Mon, 18 Jan 2021 21:45:06 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id g90sm2960014edd.30.2021.01.18.21.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 21:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yUfq9iUTTeJbfUFfp93xinjLhYmr1UXMYsejJJiGQ/k=; b=CtWXlz5JAWz9TCsh/9j6u347OmFSVl7J0fRMg1lbhAp2QeWv4qTQl0bCc83WvpPMW2 vIBWkcKaLUaxN6VkB+UhCEzVTZjXanAm5oOcdRQBPgcgtJaaOtTUzd7hwQtpKETrWyuq TcxjVTGh2XFuFWfYn62k6ochivlLdD+Vwbw9RmPl06/jFTJj8jXe6si4MQtnAkphruIW zjmcFWLUyY4JUx342LOEQn1AKZ24v2636SPkXBP2pOfTG1cr479+jxYJhWRmL25d9kuK ud2IKlbz2rQLEVZaRBm1tGpoqLpBzyX8lUDnCZExVImgJC68n10eQp03ZrRfSM47Y7v+ 4axg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=yUfq9iUTTeJbfUFfp93xinjLhYmr1UXMYsejJJiGQ/k=; b=iYvQchKSQYNaDYeS9Ktn9MoUsbMb8a8C6v2UsES+qUdfqXIX2ApbcaxkEBVPUwia9F lr7En0pZxVERRDyHTsn2zu7WVFNO9M5BMe8XzKzmRqTUWaMnVEyMqzzL+6mMaXUBAdZ+ fjjHGhdJLMmcCKh9RpGPHXw+urLu8rptnB2g6Nj7qIFdrQH4uk2knfTbQCOmENanEHH/ FgnROVbqNIxFFVlSWhEzJcPSiRmTvk59BkDycqC58pPLk8fA4IGN8L7qg6gsT7pBHPG6 SSqUxkNYEsMlJxE9ZljN8Qkget7x9clind53vDUONTIYvya0hWr/6etu6NEzvZsBlWKX um8Q== X-Gm-Message-State: AOAM531BkWqa1tLCoK0CI4LqN7iz2LqiLsYvsv3IUkFt9zUX/SSCsEj1 tIHVdS6z3YgAzTRewN/QV6s= X-Google-Smtp-Source: ABdhPJwzvJ6/uz5gLiJX9KOhaXnuZNqxOagDalyU9dITZAvRA7tQGIp1qdBrymYKuYuO7kpv+NEGHg== X-Received: by 2002:a05:6402:2683:: with SMTP id w3mr2063229edd.378.1611035105007; Mon, 18 Jan 2021 21:45:05 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Daniel P . Berrange" , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH] tests/docker: Allow passing --network option when building images Date: Tue, 19 Jan 2021 06:45:02 +0100 Message-Id: <20210119054502.531451-1-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) When using the Docker engine, build fails because the container is unable to resolve hostnames: $ make docker-image-debian-s390x-cross NETWORK=3Dhost ENGINE=3Ddocker BUILD debian10 #6 9.679 Err:1 http://deb.debian.org/debian buster InRelease #6 9.679 Temporary failure resolving 'deb.debian.org' #6 16.69 Err:2 http://security.debian.org/debian-security buster/updates = InRelease #6 16.69 Temporary failure resolving 'security.debian.org' #6 22.69 Err:3 http://deb.debian.org/debian buster-updates InRelease #6 22.69 Temporary failure resolving 'deb.debian.org' #6 22.74 W: Failed to fetch http://deb.debian.org/debian/dists/buster/InR= elease Temporary failure resolving 'deb.debian.org' #6 22.74 W: Failed to fetch http://security.debian.org/debian-security/di= sts/buster/updates/InRelease Temporary failure resolving 'security.debian.= org' #6 22.74 W: Failed to fetch http://deb.debian.org/debian/dists/buster-upd= ates/InRelease Temporary failure resolving 'deb.debian.org' #6 22.74 W: Some index files failed to download. They have been ignored, = or old ones used instead. Traceback (most recent call last): File "./tests/docker/docker.py", line 709, in sys.exit(main()) File "./tests/docker/docker.py", line 705, in main return args.cmdobj.run(args, argv) File "./tests/docker/docker.py", line 498, in run dkr.build_image(tag, docker_dir, dockerfile, File "./tests/docker/docker.py", line 353, in build_image self._do_check(build_args, File "./tests/docker/docker.py", line 244, in _do_check return subprocess.check_call(self._command + cmd, **kwargs) File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) make: *** [tests/docker/Makefile.include:61: docker-image-debian10] Error= 1 Fix by passing the NETWORK variable with --network=3D argument. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index bdc53ddfcf9..b65fd684011 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -63,6 +63,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker $(if $V,,--quiet) \ $(if $(NOCACHE),--no-cache, \ $(if $(DOCKER_REGISTRY),--registry $(DOCKER_REGISTRY))) \ + $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--network=3D$(NETWORK))) \ $(if $(NOUSER),,--add-current-user) \ $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ $(if $(EXECUTABLE),--include-executable=3D$(EXECUTABLE)),\ --=20 2.26.2