From 2bdec3984850a093a6bd97cf0a7183dbb877eb38 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Mon, 5 Aug 2019 21:09:01 +0200 Subject: [PATCH 01/12] gdbstub: Fix handling of '!' packet with new infra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the '!' packet is not handled by the new infrastructure, gdb_handle_packet() would call run_cmd_parser() with a NULL cmd_parser value, which would lead to an unsupported packet ("$#00") being sent, which could confuse the gdb client. This also has a side-effect of speeding up the initial connection with gdb. Fixes: 3e2c12615b52 ("gdbstub: Implement deatch (D pkt) with new infra") Signed-off-by: Ramiro Polla Message-Id: <20190805190901.14072-1-ramiro.polla@gmail.com> Signed-off-by: Alex Bennée --- gdbstub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index b92ba59e4d..5c067594ba 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2588,7 +2588,9 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) break; } - run_cmd_parser(s, line_buf, cmd_parser); + if (cmd_parser) { + run_cmd_parser(s, line_buf, cmd_parser); + } return RS_IDLE; } From c6ee95216b1a98c909e24659741622aaf563df86 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 27 Aug 2019 16:33:17 -0600 Subject: [PATCH 02/12] gdbstub: Fix handler for 'F' packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handling of the 'F' packet has been broken since commit 4b20fab101b9e2d0fb47454209637a17fc7a13d5, which converted it to use the new packet parsing infrastructure. Per the GDB RSP specification https://sourceware.org/gdb/current/onlinedocs/gdb/The-F-Reply-Packet.html the second parameter may be omitted, but the rewritten implementation was failing to recognize this case. The result was that QEMU was repeatedly resending the fileio request and ignoring GDB's replies of successful completion. This patch restores the behavior of the previous code in allowing the errno parameter to be omitted and passing 0 to the callback in that case. Signed-off-by: Sandra Loosemore Reviewed-by: Richard Henderson Message-Id: <20190827223317.8614-1-sandra@codesourcery.com> Signed-off-by: Alex Bennée --- gdbstub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 5c067594ba..4cf8af365e 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1820,11 +1820,15 @@ static void handle_read_all_regs(GdbCmdContext *gdb_ctx, void *user_ctx) static void handle_file_io(GdbCmdContext *gdb_ctx, void *user_ctx) { - if (gdb_ctx->num_params >= 2 && gdb_ctx->s->current_syscall_cb) { + if (gdb_ctx->num_params >= 1 && gdb_ctx->s->current_syscall_cb) { target_ulong ret, err; ret = (target_ulong)gdb_ctx->params[0].val_ull; - err = (target_ulong)gdb_ctx->params[1].val_ull; + if (gdb_ctx->num_params >= 2) { + err = (target_ulong)gdb_ctx->params[1].val_ull; + } else { + err = 0; + } gdb_ctx->s->current_syscall_cb(gdb_ctx->s->c_cpu, ret, err); gdb_ctx->s->current_syscall_cb = NULL; } From 2f1b409a6f6010545866e288299a3336a418ef97 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 22 Aug 2019 14:23:49 +0200 Subject: [PATCH 03/12] contrib/gitdm: filetype interface is not in order, fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gitm prints the rather cryptic message "interface not found, appended to the last order". This is because filetypes.txt has filetype interface, but neglects to mention it in order. Fix that. Fixes: 2f28271d807edfcdc47a280c06999dd866dcae10 Signed-off-by: Markus Armbruster Reviewed-by: Aleksandar Markovic Message-Id: <20190822122350.29852-2-armbru@redhat.com> Signed-off-by: Alex Bennée --- contrib/gitdm/filetypes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.txt index 165b71b3f9..2d5002fea0 100644 --- a/contrib/gitdm/filetypes.txt +++ b/contrib/gitdm/filetypes.txt @@ -34,7 +34,7 @@ # If there is an filetype which is not in order but has values, it will # be added at the end. # -order build,tests,code,documentation,devel-doc,blobs +order build,interface,tests,code,documentation,devel-doc,blobs # # From 565571820b5d6da0914607e9a839e274e6e84cb1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 22 Aug 2019 14:23:50 +0200 Subject: [PATCH 04/12] contrib/gitdm: Add armbru@pond.sub.org to group-map-redhat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just to get the (few) accidental uses of my private e-mail address attributed correctly. Signed-off-by: Markus Armbruster Message-Id: <20190822122350.29852-3-armbru@redhat.com> Signed-off-by: Alex Bennée --- contrib/gitdm/group-map-redhat | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gitdm/group-map-redhat b/contrib/gitdm/group-map-redhat index 6d05c6b54f..d15db2d35e 100644 --- a/contrib/gitdm/group-map-redhat +++ b/contrib/gitdm/group-map-redhat @@ -5,3 +5,4 @@ david@gibson.dropbear.id.au laurent@vivier.eu pjp@fedoraproject.org +armbru@pond.sub.org From 6b97a1d84aa70eaa9d3a0a5ebd40a926cca512b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 23 Aug 2019 01:09:14 +0200 Subject: [PATCH 05/12] mailmap: Reorder by sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our mailmap currently has 4 sections somehow documented. Reorder few entries not related to "addresses from the original git import" into the 3rd section, and add a comment to describe it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Message-Id: <20190822230916.576-2-philmd@redhat.com> Signed-off-by: Alex Bennée --- .mailmap | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.mailmap b/.mailmap index b8e08297c9..e1fdc88d25 100644 --- a/.mailmap +++ b/.mailmap @@ -4,20 +4,12 @@ # into proper addresses so that they are counted properly by git shortlog. Andrzej Zaborowski balrog Anthony Liguori aliguori -Anthony Liguori Anthony Liguori Aurelien Jarno aurel32 Blue Swirl blueswir1 Edgar E. Iglesias edgar_igl Fabrice Bellard bellard -James Hogan Jocelyn Mayer j_mayer Paul Brook pbrook -Yongbok Kim -Aleksandar Markovic -Aleksandar Markovic -Paul Burton -Paul Burton -Paul Burton Thiemo Seufer ths malc malc @@ -32,6 +24,15 @@ Ian McKellar Ian McKellar via Qemu-devel Julia Suvorova via Qemu-devel Justin Terry (VM) Justin Terry (VM) via Qemu-devel +# Next, replace old addresses by a more recent one. +Anthony Liguori Anthony Liguori +James Hogan +Aleksandar Markovic +Aleksandar Markovic +Paul Burton +Paul Burton +Paul Burton +Yongbok Kim # Also list preferred name forms where people have changed their # git author config, or had utf8/latin1 encoding issues. From 289371239153b24cb7bd96b6948c6b40b4627a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 23 Aug 2019 01:09:15 +0200 Subject: [PATCH 06/12] mailmap: Update philmd email address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the email address where I spend most of my time. Suggested-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Message-Id: <20190822230916.576-3-philmd@redhat.com> Signed-off-by: Alex Bennée --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index e1fdc88d25..e68ddd26e6 100644 --- a/.mailmap +++ b/.mailmap @@ -32,6 +32,7 @@ Aleksandar Markovic Paul Burton Paul Burton Paul Burton +Philippe Mathieu-Daudé Yongbok Kim # Also list preferred name forms where people have changed their From 1fed8f004465ce1cb6994b5d3de6fd7df91c4c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 23 Aug 2019 01:09:16 +0200 Subject: [PATCH 07/12] mailmap: Add many entries to improve 'git shortlog' statistics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All of these emails have a least 1 commit with utf8/latin1 encoding issue, or one with no author name. When there are multiple commits, keep the author name the most used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Message-Id: <20190822230916.576-4-philmd@redhat.com> Signed-off-by: Alex Bennée --- .mailmap | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/.mailmap b/.mailmap index e68ddd26e6..d0fc1d793c 100644 --- a/.mailmap +++ b/.mailmap @@ -37,5 +37,110 @@ Yongbok Kim # Also list preferred name forms where people have changed their # git author config, or had utf8/latin1 encoding issues. +Aaron Lindsay +Alexey Gerasimenko +Alex Ivanov +Andreas Färber +Bandan Das +Benjamin MARSILI +Benoît Canet +Benoît Canet +Benoît Canet +Boqun Feng +Boqun Feng +Brad Smith +Brijesh Singh +Brilly Wu +Cédric Vincent +CheneyLin +Chen Gang +Chen Gang +Chen Gang +Chen Wei-Ren +Christophe Lyon +Collin L. Walling Daniel P. Berrangé +Eduardo Otubo +Fabrice Desclaux +Fernando Luis Vázquez Cao +Fernando Luis Vázquez Cao +Gautham R. Shenoy +Gautham R. Shenoy +Gonglei (Arei) +Guang Wang +Hailiang Zhang +Hervé Poussineau +Jakub Jermář +Jakub Jermář +Jean-Christophe Dubois +Jindřich Makovička +John Arbuckle +Juha Riihimäki +Juha Riihimäki +Jun Li +Laurent Vivier +Leandro Lupori +Li Guang +Liming Wang +linzhecheng +Liran Schour +Liu Yu +Liu Yu +Li Zhang +Li Zhang +Lluís Vilanova +Lluís Vilanova +Longpeng (Mike) +Luc Michel +Luc Michel +Marc Marí +Marc Marí +Michael Avdienko +Michael S. Tsirkin +Munkyu Im +Nicholas Bellinger +Nicholas Thomas +Nikunj A Dadhania +Orit Wasserman +Paolo Bonzini +Pavel Dovgaluk +Pavel Dovgaluk +Pavel Dovgaluk +Peter Crosthwaite +Peter Crosthwaite +Peter Crosthwaite +Prasad J Pandit +Prasad J Pandit +Qiao Nuohan Reimar Döffinger +Remy Noel +Roger Pau Monné +Shin'ichiro Kawasaki +Shin'ichiro Kawasaki +Sochin Jiang +Takashi Yoshii +Thomas Huth +Thomas Knych +Timothy Baldwin +Tony Nguyen +Venkateswararao Jujjuri +Vibi Sreenivasan +Vijaya Kumar K +Vijaya Kumar K +Vijay Kumar +Vijay Kumar +Wang Guang +Wenchao Xia +Wenshuang Ma +Xiaoqiang Zhao +Xinhua Cao +Xiong Zhang +Yin Yin +yuchenlin +YunQiang Su +YunQiang Su +Yuri Pudgorodskiy +Zhengui Li +Zhenwei Pi +Zhenwei Pi +Zhuang Yanying From f4cf1edc3b897c5fbc82b388285de53b7f614ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 28 Aug 2019 12:03:23 +0100 Subject: [PATCH 08/12] .mailmap/aliases: add some further commentary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two files are not interchangeable but a change to one *might* require a change to the other so lets flag that up with an explanation of what both files are trying to achieve. While we are at it document the many forms .mailmap can take in the header. Signed-off-by: Alex Bennée Reviewed-by: Aleksandar Markovic --- .mailmap | 14 ++++++++++++++ contrib/gitdm/aliases | 20 ++++++++++++++++++-- contrib/gitdm/group-map-individuals | 3 ++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index d0fc1d793c..0756a0bf66 100644 --- a/.mailmap +++ b/.mailmap @@ -1,4 +1,18 @@ # This mailmap fixes up author names/addresses. +# +# If you are adding to this file consider if a similar change needs to +# be made to contrib/gitdm/aliases. They are not however completely +# analogous. .mailmap is concerned with fixing up damaged author +# fields where as the gitdm equivalent is more concerned with making +# sure multiple email addresses get mapped onto the same author. +# +# From man git-shortlog the forms are: +# +# Proper Name +# +# Proper Name +# Proper Name Commit Name +# # The first section translates weird addresses from the original git import # into proper addresses so that they are counted properly by git shortlog. diff --git a/contrib/gitdm/aliases b/contrib/gitdm/aliases index 07fd3391a5..c1e744312f 100644 --- a/contrib/gitdm/aliases +++ b/contrib/gitdm/aliases @@ -1,6 +1,22 @@ # -# This is the email aliases file, mapping secondary addresses -# onto a single, canonical address. Duplicates some info from .mailmap +# This is the email aliases file, mapping secondary addresses onto a +# single, canonical address. It duplicates some info from .mailmap so +# if you are adding something here also consider if the .mailmap needs +# updating. +# +# If you just want to avoid gitdm complaining about author fields +# which are actually email addresses with the message: +# +# "...is an author name, probably not what you want" +# +# you can just apply --use-mailmap to you git-log command, e.g: +# +# git log --use-mailmap --numstat --since "last 2 years" | $GITDM +# +# however that will have the effect of squashing multiple addresses to +# a canonical address which will distort the stats of those who +# contribute in both personal and professional capacities from +# different addresses. # # weird commits diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals index 05e355d30e..1c84717438 100644 --- a/contrib/gitdm/group-map-individuals +++ b/contrib/gitdm/group-map-individuals @@ -2,7 +2,8 @@ # Individual and personal contributors # # This is simply to allow prolific developers with no company -# affiliations to be grouped together in the summary stats. +# affiliations (or non-company related personal work) to be grouped +# together in the summary stats. # f4bug@amsat.org From 0b8b65ed70e2ed711945d523a557cf999eb18f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 23 Aug 2019 01:12:31 +0200 Subject: [PATCH 09/12] contrib/gitdm: Add RT-RK to the domain-map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This company has at least 7 contributors, add a domain-map entry. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190822231231.1306-1-philmd@redhat.com> Reviewed-by: Aleksandar Markovic Signed-off-by: Alex Bennée --- contrib/gitdm/domain-map | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gitdm/domain-map b/contrib/gitdm/domain-map index fa9d454473..9efe066ec9 100644 --- a/contrib/gitdm/domain-map +++ b/contrib/gitdm/domain-map @@ -18,6 +18,7 @@ nokia.com Nokia oracle.com Oracle proxmox.com Proxmox redhat.com Red Hat +rt-rk.com RT-RK siemens.com Siemens sifive.com SiFive suse.de SUSE From 5d3cbddb58823ba0a44fc2b5a90abfec6b56abff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 27 Aug 2019 18:02:40 +0400 Subject: [PATCH 10/12] build-sys: build ui-spice-app as a module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 45db1ac157 ("modules-test: ui-spice-app is not built as module") and fixes commit d8aec9d9f1 ("display: add -display spice-app launching a Spice client"). Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20190827140241.20818-1-marcandre.lureau@redhat.com> Signed-off-by: Alex Bennée --- tests/modules-test.c | 3 +++ ui/Makefile.objs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/modules-test.c b/tests/modules-test.c index f9de3afdb7..a8118e9042 100644 --- a/tests/modules-test.c +++ b/tests/modules-test.c @@ -52,6 +52,9 @@ int main(int argc, char *argv[]) #endif #ifdef CONFIG_SDL "ui-", "sdl", +#endif +#if defined(CONFIG_SPICE) && defined(CONFIG_GIO) + "ui-", "spice-app", #endif }; int i; diff --git a/ui/Makefile.objs b/ui/Makefile.objs index cc2bf5b180..ba39080edb 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -49,7 +49,9 @@ curses.mo-objs := curses.o curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS) curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS) -common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo +ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy) +common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo +endif spice-app.mo-objs := spice-app.o spice-app.mo-cflags := $(GIO_CFLAGS) spice-app.mo-libs := $(GIO_LIBS) From 6954a04d5dc587496b9a3f19c6637bf6391696de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 27 Aug 2019 18:02:41 +0400 Subject: [PATCH 11/12] tests: fix modules-test with no default machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: eb062cfa733 ("tests: add module loading test") Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20190827140241.20818-2-marcandre.lureau@redhat.com> Signed-off-by: Alex Bennée --- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/modules-test.c b/tests/modules-test.c index a8118e9042..d1a6ace218 100644 --- a/tests/modules-test.c +++ b/tests/modules-test.c @@ -1,12 +1,14 @@ #include "qemu/osdep.h" #include "libqtest.h" +const char common_args[] = "-nodefaults -machine none"; + static void test_modules_load(const void *data) { QTestState *qts; const char **args = (const char **)data; - qts = qtest_init(NULL); + qts = qtest_init(common_args); qtest_module_load(qts, args[0], args[1]); qtest_quit(qts); } From 4112aff7cdd932f273e920911a45a5d5a2d5d299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 29 Aug 2019 12:08:27 +0100 Subject: [PATCH 12/12] tests/docker: upgrade docker.py to python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent podman changes (9459f754134bb) imported enum which is part of the python3 standard library but only available as an external library for python2. This causes problems on the fairly restricted environment such as shippable. Lets bite the bullet and make the script a fully python3 one. To that end: - drop the from __future__ import (we are there now ;-) - avoid the StringIO import hack - be consistent with the mode we read/write dockerfiles - s/iteritems/items/ - ensure check_output returns strings for processing Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Cc: Marc-André Lureau --- tests/docker/docker.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index ac5baab4ca..4bba29e104 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # # Docker controlling module # @@ -11,7 +11,6 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory. -from __future__ import print_function import os import sys import subprocess @@ -25,10 +24,7 @@ import tempfile import re import signal from tarfile import TarFile, TarInfo -try: - from StringIO import StringIO -except ImportError: - from io import StringIO +from io import StringIO from shutil import copy, rmtree from pwd import getpwuid from datetime import datetime, timedelta @@ -62,11 +58,13 @@ USE_ENGINE = EngineEnum.AUTO def _text_checksum(text): """Calculate a digest string unique to the text content""" - return hashlib.sha1(text).hexdigest() + return hashlib.sha1(text.encode('utf-8')).hexdigest() +def _read_dockerfile(path): + return open(path, 'rt', encoding='utf-8').read() def _file_checksum(filename): - return _text_checksum(open(filename, 'rb').read()) + return _text_checksum(_read_dockerfile(filename)) def _guess_engine_command(): @@ -192,7 +190,7 @@ def _read_qemu_dockerfile(img_name): df = os.path.join(os.path.dirname(__file__), "dockerfiles", img_name + ".docker") - return open(df, "r").read() + return _read_dockerfile(df) def _dockerfile_preprocess(df): @@ -262,6 +260,7 @@ class Docker(object): def _output(self, cmd, **kwargs): return subprocess.check_output(self._command + cmd, stderr=subprocess.STDOUT, + encoding='utf-8', **kwargs) def inspect_tag(self, tag): @@ -283,7 +282,9 @@ class Docker(object): if argv is None: argv = [] - tmp_df = tempfile.NamedTemporaryFile(dir=docker_dir, suffix=".docker") + tmp_df = tempfile.NamedTemporaryFile(mode="w+t", + encoding='utf-8', + dir=docker_dir, suffix=".docker") tmp_df.write(dockerfile) if user: @@ -396,7 +397,7 @@ class BuildCommand(SubCommand): help="Dockerfile name") def run(self, args, argv): - dockerfile = open(args.dockerfile, "rb").read() + dockerfile = _read_dockerfile(args.dockerfile) tag = args.tag dkr = Docker() @@ -442,7 +443,7 @@ class BuildCommand(SubCommand): cksum += [(filename, _file_checksum(filename))] argv += ["--build-arg=" + k.lower() + "=" + v - for k, v in os.environ.iteritems() + for k, v in os.environ.items() if k.lower() in FILTERED_ENV_NAMES] dkr.build_image(tag, docker_dir, dockerfile, quiet=args.quiet, user=args.user, argv=argv, @@ -611,7 +612,7 @@ class CheckCommand(SubCommand): print("Need a dockerfile for tag:%s" % (tag)) return 1 - dockerfile = open(args.dockerfile, "rb").read() + dockerfile = _read_dockerfile(args.dockerfile) if dkr.image_matches_dockerfile(tag, dockerfile): if not args.quiet: