Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3993592imm; Mon, 20 Aug 2018 08:05:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy2dz6LMNaghfil/iCCzBVv99s9S4B2f8eMGjdQ6vjqE97k1ZxhMEa0PZsQMThOGJGCR3Xr X-Received: by 2002:a17:902:246a:: with SMTP id m39-v6mr45199220plg.57.1534777522196; Mon, 20 Aug 2018 08:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534777522; cv=none; d=google.com; s=arc-20160816; b=Mc5Ujs8W7uG/Aqr+JZjR63l3w6DrH0ySMziGpqGe0ilL5nvCwmHLRuYDdsXj6syQMe pa715E9gjzFPos15bdeYXL0tHn7b7S90z9eMOYa/zGtOvZFb0YFSS9orAJi9wALQ81hm E/1X/Mu8IdkODIqZb388Hm5a9eW4N7vChLfoQsnTZ8OKmk1QUgFWCz7MlLGKTBRsjWmI HcZnYXwY1tXpVa2mpoLIcZvvzTeeY2fhwObNfkbniv0/MwjpJN1xRh/CG8prPaJ6Abjp L7HQxZkmqAu6ixotCnX/8AYqj3yuBb2ZI0CJHODvMgiNep+EPsOHKzKah+uoRt0isHO3 s4gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=nR5DtJy+O7ogwNcWy066ETtMzfWxlgbRh8aMZI7pNmI=; b=iiVefHLUvR6Z8+DMkaeH+pMcWhp3cZNF5FFKcPwAhbNtYNk4ZPWUg257uwCTxpVBT2 5ZxUFzPq9vmhfAaAnCuDogSZ4W5kTCvewi1Ku/sLIbmOZAArXYyX1yMVlGJ7JzWXLy6d 8jtiHAEtlQQpQrszHNfXjfjRX5bymFro1wO2jE1Xt/Cn+9//+NWdsww5NA+QFP76k8gu L7D2PotULSyPMsqqMYg+UFmjXZuRN2I7D+DokFvfawBy75V0u21b0CyY0+guRvnn9pAK cIYYhE4WMyzbBWTp0YR7kJDDwPfRbXZX61ZMqyoXgXW/D9MbzLjEncl0OAVWt7R/XftW Sb2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ApMvS+P5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62-v6si10446632pfa.73.2018.08.20.08.05.06; Mon, 20 Aug 2018 08:05:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ApMvS+P5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726714AbeHTST5 (ORCPT + 99 others); Mon, 20 Aug 2018 14:19:57 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:47591 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726132AbeHTST4 (ORCPT ); Mon, 20 Aug 2018 14:19:56 -0400 Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (authenticated) by conssluserg-03.nifty.com with ESMTP id w7KF3nnc020496 for ; Tue, 21 Aug 2018 00:03:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com w7KF3nnc020496 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1534777430; bh=nR5DtJy+O7ogwNcWy066ETtMzfWxlgbRh8aMZI7pNmI=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=ApMvS+P5EbtpoTRBD/HFFAbw1J6DIv+SElcruwtPyTU4bZi+BjZ7MV4Jv3iNGlklQ XcKzWROInAbj7hXUIsOniPxCJpphbgTxwbpFFnaKwu0R5hPHdGd+HP2e/BPTr2WwY5 iAsWrYoJVp/YOztIW8GSEXfm4rv4AmYyGklXrzQEiIfhxu3CE3USLx4+lvdPSKqAWI qNPX0acfUmfxNKTC1fZDPuHluUroycHdWjG3cIRQi/vJWuswzTVsqyx+y1oNCs8rjL aEKIBWXFVYJ6IdJntRt2ohRKCW/7dD9Why/o3tL8fcJTZuZSFXVxFgwTmXjKefzJSK QwbV7yS27gieA== X-Nifty-SrcIP: [209.85.222.42] Received: by mail-ua1-f42.google.com with SMTP id h1-v6so9895647uao.8 for ; Mon, 20 Aug 2018 08:03:49 -0700 (PDT) X-Gm-Message-State: AOUpUlHVmWt+iYCjJHs6ud/W4erDZcLwby0TZ2S+emRnMMy1baDNzpzT Jsxs5x/reWj7ZLDDPXbWxiBa9XmyHIKDIZndHPk= X-Received: by 2002:ab0:30ce:: with SMTP id c14-v6mr30352420uam.58.1534777428424; Mon, 20 Aug 2018 08:03:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:2642:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 08:03:08 -0700 (PDT) In-Reply-To: <20180817120319.21002-1-andrzej.p@samsung.com> References: <20180817120319.21002-1-andrzej.p@samsung.com> From: Masahiro Yamada Date: Tue, 21 Aug 2018 00:03:08 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: make sorting initramfs contents independent of locale To: Andrzej Pietrasiewicz Cc: Linux Kernel Mailing List , =?UTF-8?Q?Bj=C3=B8rn_Forsman?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-08-17 21:03 GMT+09:00 Andrzej Pietrasiewicz : > Some LANG values (e.g. pl_PL.UTF-8) cause the sort command to output > files before their parent directories, which makes them inaccessible for > the kernel. In other words, when the kernel populates the rootfs, it is > unable to create files whose parent directories have not been yet created. > > This patch makes sorting use the default (LANG=C) locale, which results in > correctly laid out initramfs images (parent directories before files). > > Signed-off-by: Andrzej Pietrasiewicz > --- Applied to linux-kbuild. Thanks! > scripts/gen_initramfs_list.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh > index 10e528b..0aad760 100755 > --- a/scripts/gen_initramfs_list.sh > +++ b/scripts/gen_initramfs_list.sh > @@ -174,7 +174,7 @@ dir_filelist() { > ${dep_list}header "$1" > > srcdir=$(echo "$1" | sed -e 's://*:/:g') > - dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | sort) > + dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort) > > # If $dirlist is only one line, then the directory is empty > if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then > -- > 2.7.4 > -- Best Regards Masahiro Yamada