From patchwork Tue Jul 7 18:26:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 6737231 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C76D89F3E6 for ; Tue, 7 Jul 2015 18:32:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 049F22060D for ; Tue, 7 Jul 2015 18:32:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26678205C1 for ; Tue, 7 Jul 2015 18:32:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757765AbbGGSc4 (ORCPT ); Tue, 7 Jul 2015 14:32:56 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:42097 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932581AbbGGScx (ORCPT ); Tue, 7 Jul 2015 14:32:53 -0400 X-Greylist: delayed 399 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Jul 2015 14:32:52 EDT Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 76fea981; Tue, 7 Jul 2015 18:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id; s=mail; bh=npKJ2yTsCvICxVBLmlk3WpK3sUk =; b=Gl5XFUZwKop29D90LsZzcnAt531rrFHioUnUvPEXufMWRMyK7K6Pc4nmTDU e75hN9Kk5eK/AW4AvnUV+khb7JLbxnCuLwixEvdmxMIJP7fwUj1Bfbf6gxJhpl/u zBb+mu44KFbO8H5mErRU9r0bZhalOl+L+cHNoV9llmxL8IoJMQIOE2BNelQ9clBD ILRHMD7MoZ5XeSw2A8q1IV6Y+3pHky73QTI2X1Ip8qEFdEc8Ccwo9D8+ESTB6vHI TcE2tFyCeBvzzuxkgk3Jy7vptq0pgobizd/XmEcWUSc1EmcgeCKYKROAZMMYou8e Rg/CO8e/6rAQm72gG1ysMiH/FQg== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 1b5abbbe TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 7 Jul 2015 18:25:47 +0000 (UTC) From: "Jason A. Donenfeld" To: Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" Subject: [PATCH] Makefile: Force gzip and xz on module install Date: Tue, 7 Jul 2015 20:26:07 +0200 Message-Id: <1436293567-20226-1-git-send-email-Jason@zx2c4.com> X-Mailer: git-send-email 2.4.2 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Running `make modules_install` ordinarily will overwrite existing modules. This is the desired behavior, and is how pretty much every other `make install` target works. However, if CONFIG_MODULE_COMPRESS is enabled, modules are passed through gzip and xz which then do the file writing. Both gzip and xz will error out if the file already exists, unless -f is passed. This patch adds -f so that the behavior is uniform. Signed-off-by: Jason A. Donenfeld --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6c6f146..5d2ec1c 100644 --- a/Makefile +++ b/Makefile @@ -849,10 +849,10 @@ export mod_strip_cmd mod_compress_cmd = true ifdef CONFIG_MODULE_COMPRESS ifdef CONFIG_MODULE_COMPRESS_GZIP - mod_compress_cmd = gzip -n + mod_compress_cmd = gzip -n -f endif # CONFIG_MODULE_COMPRESS_GZIP ifdef CONFIG_MODULE_COMPRESS_XZ - mod_compress_cmd = xz + mod_compress_cmd = xz -f endif # CONFIG_MODULE_COMPRESS_XZ endif # CONFIG_MODULE_COMPRESS export mod_compress_cmd