From patchwork Sun Jun 3 09:08:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 924703 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y/2hgPbV"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40zC0m0CGvz9s0x for ; Sun, 3 Jun 2018 19:08:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7B328228C2; Sun, 3 Jun 2018 09:08:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5u2fPGWjb9wV; Sun, 3 Jun 2018 09:08:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3DCB1227CD; Sun, 3 Jun 2018 09:08:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 58A4B1C0000 for ; Sun, 3 Jun 2018 09:08:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 36CBD88506 for ; Sun, 3 Jun 2018 09:08:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eq8eHlApKQd7 for ; Sun, 3 Jun 2018 09:08:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id E3261884CC for ; Sun, 3 Jun 2018 09:08:27 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id d2-v6so24652551wrm.10 for ; Sun, 03 Jun 2018 02:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=MhXV3wajCbz6e0ZO+iwt6Wo+B/LF5k7nFXauUXiQ+cY=; b=Y/2hgPbViufxe3g8wnHPOiVWqjuDPcVU82cZG5FQZSWYClKjbzl4UZhGY2vCv9UMtz bcMNBhG4lNmjIQ54A91XU5nTrWxWk/5hEyIA7bDcYvPw0Q66JdtDuOZnMWzAaVYKPAAM vFjREHbBIW9ItH4JkD6J5be28KmZGfQDkOtdbLLNv3bzE3WiOFzVck5U5lBWkG9O/TNz WBJstm5R9HLQ7qj/Zr2cKLJz9d9HAtAyRa4pH94Yvx6a0D/vsETdfDztTt4Akmf3iKxQ NF/4e+h4vaZdFHdAcJYuWUd9RphkidE0ti+1JU+WZtV3QlQh7+0yeDFN6kEG2eNkazf6 UKjA== 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 :in-reply-to:references; bh=MhXV3wajCbz6e0ZO+iwt6Wo+B/LF5k7nFXauUXiQ+cY=; b=YbHE8NKCxFFmjV0UtV0l0xgTydzkF7mdqlfVXYVRz7Etg5zxPiAVvDJAXesJjRroCr fj+ozFifNLEkd4Ps8fAiYZWQHHr6BLSbGA7t4B1RdEOWlRS3+dwMxC5zko2ZGFnuWbHg nheNfUvvTNBP/iIawBRJ6MdwUJiXUAI3+04E6IzMUNTwkbgbEeBOchEPmBmd4HYhhXBI UfObYEQccjZ/vp0c81UyXZFCyiGldVEbelxbXqIXTWepAKbmICifwSCl2zR3DGeA4jEI DohScxWW0q3Rd85VxUIY7MxBVKtMZM9f2Df3TIecK+AQCoHERHB7E0uvkZjAweP0tAMk S3QQ== X-Gm-Message-State: ALKqPwcdpaLlgr0pJee2UWOQab1zic/p4TxuJiEnvftharX4WUGTkTiK v2XdwDxNmhx4b+bQY1FjM2LC9Q== X-Google-Smtp-Source: ADUXVKIudaWWYESMhki4n4iBcMyh0b6iV/+g0uEb51Y2ez4otEQ071qnCzUngg0mQ6yvjPBXyyd/7Q== X-Received: by 2002:adf:d204:: with SMTP id g4-v6mr13103924wri.229.1528016906243; Sun, 03 Jun 2018 02:08:26 -0700 (PDT) Received: from scaer.bzh.lan (2a01cb0886107300d539cb71123e92f9.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:d539:cb71:123e:92f9]) by smtp.gmail.com with ESMTPSA id q17-v6sm4476704wrs.5.2018.06.03.02.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 02:08:25 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 3 Jun 2018 11:08:20 +0200 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 3/5] support/docker: use the distro-provided flake8 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, we install flake8 and its dependencies via pip. We tried to be reproducible by pinning the version of those python packages, but we did forget quite a few of them, and thus some dependencies for flake8 are installed as uncontrolled versions. Furthermore, before we install flake8 and its dependencies, we forcibly update pip, setuptools, and wheels packages to their latest versions. This explicitly breaks reproducibility. While we could enforce a specific version of all those packages and still grab them from PyPI, we can simply grab them from the distribution-provided packages instead. Since we're using a pinned version of stretch, this already guarantees we'll reproducibly get the same versions over and over again. Besides, we just need to list flake8 as a package to install to automatically get all its dependencies (again, in a reproducible way). This has the slight unfortunate drawback of downgrading flake8 to version 3.2.1, from version 3.5.0, as well as downgrading a few of flake8's dependencies, as noticed by Ricardo: http://lists.busybox.net/pipermail/buildroot/2018-May/222376.html However, as Ricardo said, there isn't "any serious limitation of this old version, the release notes for a version in the between mentions 'Dramatically improve the performance' but we have a limited number of scripts and running on Gitlab for all of them still takes less than 5 minutes". Signed-off-by: "Yann E. MORIN" Cc: Ricardo Martincoski Acked-by: Ricardo Martincoski --- Changes v1 -> v2: - improve commit log to mention downgrading of flake8 (Ricardo) - correctly use python2's version of flake8, not python3's (Ricardo) - fix typoes (Ricardo) --- support/docker/Dockerfile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile index fe9e643a34..8d40aeecdf 100644 --- a/support/docker/Dockerfile +++ b/support/docker/Dockerfile @@ -35,9 +35,9 @@ RUN apt-get install -y --no-install-recommends \ libncurses5-dev \ locales \ mercurial \ + python-flake8 \ python-nose2 \ python-pexpect \ - python-pip \ qemu-system-arm \ qemu-system-x86 \ rsync \ @@ -48,14 +48,6 @@ RUN apt-get install -y --no-install-recommends \ apt-get -y autoremove && \ apt-get -y clean -# For check-flake8 -RUN python -m pip install --upgrade pip setuptools wheel && \ - pip install -q \ - flake8==3.5.0 \ - mccabe==0.6.1 \ - pycodestyle==2.3.1 \ - pyflakes==1.6.0 - # To be able to generate a toolchain with locales, enable one UTF-8 locale RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \ /usr/sbin/locale-gen