From patchwork Thu Aug 13 20:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1344404 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Q9SdYK46; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BSJ8v3N87z9sTW for ; Fri, 14 Aug 2020 06:30:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 24BF4870E5; Thu, 13 Aug 2020 20:30:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0bsM0t067m8r; Thu, 13 Aug 2020 20:30:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C8DE8870EA; Thu, 13 Aug 2020 20:30:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2E9771BF35C for ; Thu, 13 Aug 2020 20:29:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E7F33870EA for ; Thu, 13 Aug 2020 20:29:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mKIyTydWm3Pg for ; Thu, 13 Aug 2020 20:29:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9E5B3870E5 for ; Thu, 13 Aug 2020 20:29:57 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id s23so5387234qtq.12 for ; Thu, 13 Aug 2020 13:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bQGGT6ItEOM0Ic3qrRrMhJUzFzSzBjmFVN3qmTnFIFQ=; b=Q9SdYK46jzOY+NyEpD5nk2cSMtQfaEsjpgUjZxRk+gEbo+9yVculyWoFmTnPoQABOG jhL639rIqFzJRIcd2tbPK7Fz0nS9GKA50s0twWdAgjQx2SXyjfYjBDDqUmDP6au97tAJ gnu3m6g94z/SXTBUxUfy7cq7dpjr0+p6HFPI0/OFlbaBXcTUuQbmA8JN1x3ppEMjvu02 7DCCzINaE468Rk53lXKymK7UDMswV/l2B+OLxMuPIin0isx7L6+dc7S5nrSCEVyo8w1Z ijLo826ulzPN6+T2Unflk2Hnygj1yZEES3TGNXYWlkp2fEnKzTZ5eFY4Z2neSmhLa/mm WvMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bQGGT6ItEOM0Ic3qrRrMhJUzFzSzBjmFVN3qmTnFIFQ=; b=bQ8Izp4rA4RvHmy8M7e3umnwYusH28xYQ8//BwsHdCxYj+zhnbuhqc3eSJuW0xBmyW hJhYc49jSgQxofJrB2li28QqcxdZL/opV3AX4Y/ra3xbO4e8d4ilcPFrS8uu54t1m4uq 0Eh3Jo6iiKacsbrJvuMdK1l4iLVp3PWOZF1MXinbazjEGwnn6fswfVZqdQ7BRk5C1Vgn Tbc6vwA5boBoGSVxhFa47BXBQ7nS7f3/VXGNAaqhUIpWzhzv5d0FsV2XxJzVE1DiSeo9 Pr3zVgLDCIYAAm/iWFQPnz1TEgINahq44vQOjtn/We35DwSTAJ4s8vdTnevHdzdx5XtS iy2w== X-Gm-Message-State: AOAM532VahGmJoPiAkSHlhHZTQ6Z8hnyuaE9ZpyUZavy1iDZ5hK58qcX PYnRP1VEMC/mfdrKVxtjQnPm/zkOeVg= X-Google-Smtp-Source: ABdhPJwDp9TxkQPrknEZRa6ikpNUwHzwVxoDj0Q/lShxAxTtyYXwNAveOosBOw2M3/IbLMQCZ4t+cA== X-Received: by 2002:ac8:5546:: with SMTP id o6mr6776910qtr.211.1597350595369; Thu, 13 Aug 2020 13:29:55 -0700 (PDT) Received: from aduskett-workstation.rai.com ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id u21sm5918635qkk.1.2020.08.13.13.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 13:29:54 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Thu, 13 Aug 2020 13:29:52 -0700 Message-Id: <20200813202952.926828-1-aduskett@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] package/mender-artifact: do not download modules during the build process X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mirza Krak , Angelo Compagnucci , Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett By default, go will attempt to download needed modules before building, which is not desirable. This behavior also causes permission issues when cleaning, as go downloads modules as read-only by default. Because mender-artifact includes the modules in the vendor directory, mod=vendor prevents the package from downloading the go modules during the build process and prevents permission issues when cleaning. Fixes: http://autobuild.buildroot.net/results/d5bcaca73ae74fe8b0ebd39b6331564cd639fb66 Signed-off-by: Mirza Krak Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Reword commit message - Add a comment in the .mk file package/mender-artifact/mender-artifact.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/mender-artifact/mender-artifact.mk b/package/mender-artifact/mender-artifact.mk index c81ec9ba53..67fdc44b9d 100644 --- a/package/mender-artifact/mender-artifact.mk +++ b/package/mender-artifact/mender-artifact.mk @@ -31,6 +31,14 @@ HOST_MENDER_ARTIFACT_LICENSE_FILES = \ HOST_MENDER_ARTIFACT_DEPENDENCIES = host-xz +# By default, go will attempt to download needed modules before building, which +# is not desirable. This behavior also causes permission issues when cleaning, +# as go downloads modules as read-only by default. Because mender-artifact +# includes the modules in the vendor directory, mod=vendor prevents the package +# from downloading the go modules during the build process and prevents +# permission issues when cleaning. +HOST_MENDER_ARTIFACT_GO_ENV = GOFLAGS="-mod=vendor" + HOST_MENDER_ARTIFACT_LDFLAGS = -X main.Version=$(HOST_MENDER_ARTIFACT_VERSION) HOST_MENDER_ARTIFACT_BUILD_TARGETS = cli/mender-artifact