Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827AbbHCDJh (ORCPT ); Sun, 2 Aug 2015 23:09:37 -0400 Received: from trent.utfs.org ([94.185.90.103]:36613 "EHLO trent.utfs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbbHCDJg (ORCPT ); Sun, 2 Aug 2015 23:09:36 -0400 X-Greylist: delayed 366 seconds by postgrey-1.27 at vger.kernel.org; Sun, 02 Aug 2015 23:09:36 EDT Date: Sun, 2 Aug 2015 20:03:26 -0700 (PDT) From: Christian Kujau To: Michal Marek cc: linux-kernel@vger.kernel.org Subject: [PATCH] fallback to hostname in scripts/package/builddeb Message-ID: User-Agent: Alpine 2.20.8 (DEB 77 2015-05-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AV-Checked: ClamAV using ClamSMTP (127.0.0.1 (trent) at Mon Aug 3 05:03:27 2015 +0200 (CEST)) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 42 Hi, I happened to build a kernel with "make deb-pkg" on a machine with no network connectivity, but this failed with: [...] INSTALL debian/headertmp/usr/include/asm/ (65 files) hostname: Name or service not known ../scripts/package/Makefile:90: recipe for target 'deb-pkg' failed make[2]: *** [deb-pkg] Error 1 In scripts/package/builddeb it tries to construct an email address (that can be queried in /proc/version later on) but with no network, the "hostname -f" fails. The following patch falls back to just use the shortname if we cannot determine our FQDN. Signed-off-by: Christian Kujau diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 88dbf23..7de1d1c 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -206,7 +206,7 @@ if [ -n "$DEBEMAIL" ]; then elif [ -n "$EMAIL" ]; then email=$EMAIL else - email=$(id -nu)@$(hostname -f) + email=$(id -nu)@$(hostname -f 2>/dev/null || hostname) fi if [ -n "$DEBFULLNAME" ]; then name=$DEBFULLNAME -- BOFH excuse #334: 50% of the manual is in .pdf readme files -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/