From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6477538949418975232 X-Received: by 10.80.167.162 with SMTP id i31mr4198094edc.9.1508334464884; Wed, 18 Oct 2017 06:47:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.146.172 with SMTP id k41ls1876755eda.2.gmail; Wed, 18 Oct 2017 06:47:44 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBFSuPT8OHw0otdLBIyPXp44Zo7ndmrTDxRpCV38dZTfpJh2LDTX7GVK9iAW2ExZxzG8sqh X-Received: by 10.80.222.130 with SMTP id c2mr4196524edl.8.1508334464622; Wed, 18 Oct 2017 06:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508334464; cv=none; d=google.com; s=arc-20160816; b=Zp8NR5ci9MhxaWe0kHKzQ71GbQP/RW2S7ygrO6EMiRFu/RBbflEIEfnaHmOzZmB4rZ /Lth2/hy93T4JfbRaIu+/xaFDuIJdPh+qIT77BSUflXwoVpJGpzU3niU8bfgw9WhDWdI 6TZdf1Y+hOi97NOrJ0j2d9T9z7i7AT1HulD54dQPO/z0h8bCB+IzZHbNBNCXsiJsvltB bytYRaIs+KrBap5POgUD2pU56Qi06Ojqa1TwA0SBSnWtaEyrW3mt9MzKuZQOgKrHqn3R qAPWjihYqUypNiCsAdOBnUq2WHQEODThexgN7tHSwAvaUi6sZEYGBuP5/HVs2/IkXTjO Sd4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=EH7rA3nV1TKnVTrgAdVnDBVYEIuBBbRtHrXkYnN+QTA=; b=I3CU4cEgRGvaUDOx6O8U5PI1uLZ4t2rsOAXvRU6y3HfS8LlfMnCskfNB+KP+voEjce ElxiSQaWUGcf7ieXs3fGPNH07I1l6lRmCZtrUqkfdCOt9WoM11+ra7r1OCk+0vw3Ti/B ZDW9W2gIq4Md6ItkZIQyazsO68MKyTg5pataX2OiSC2UUq2ALrbqU/ONQRyklwfNpU6G Vs8U+ObdejD5yV2PNfRtnlrI5hruK3ranNMSwrjSD+q+HyQutsHdzmH8BU8mEoYy5sxr gPhdFPuEVHFC7+9KbS9ZM3PgRZygZkt+t+czKshyrXhUjsXjCGcm830qp31z9lpSOpEU Xzxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id a57si554505edd.3.2017.10.18.06.47.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 06:47:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v9IDlfoh027995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 18 Oct 2017 15:47:43 +0200 Subject: Re: [URGENT][PATCH v3 0/2] Correctly determine kernel and initrd versions To: Claudius Heine , isar-users@googlegroups.com References: <20171018101325.12358-1-asmirnov@ilbers.de> <435959dc-da9c-6cb3-92b6-e275d446c153@ilbers.de> <462a48a1-571f-d25f-ebcc-c3d311605ba0@siemens.com> From: Alexander Smirnov Message-ID: <8f89e657-1496-7a12-a6ca-f8c51aad8b97@ilbers.de> Date: Wed, 18 Oct 2017 16:47:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <462a48a1-571f-d25f-ebcc-c3d311605ba0@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: IT+8sixfmyp+ On 10/18/2017 04:23 PM, Claudius Heine wrote: > Hi, > > On 10/18/2017 02:08 PM, Alexander Smirnov wrote: >> Hi all, >> On 10/18/2017 01:13 PM, Alexander Smirnov wrote: >>> Hello all, >>> >>> IMPORTANT: lets try to review this series ASAP, becuase Isar build is >>> broken again due to recent update of Raspbian kernel version in apt. >>> Instead of yet-another-version update I'd like to commit proper >>> solution. >>> >>> In current Isar implementation, multiconfig file contains hardcoded >>> version for boot files: kernel and initrd. This is used for both: >>> >>> - Add respective package to multistrap config. >>> - Copy boot files to deploy directory. >>> >>> This series drops this hardcoded versions, so now Isar is able to >>> determine version of boot files during building. >>> >>> Changes since v2: >>> - Avoid races in 'deploy/images' folder creation. >>> >>> Changes since v1: >>> - Differentiate 'do_copy_boot_files' stamps. >>> - Update start_vm script accordingly. >>> - Check if symlinks 'vmlinuz' and 'initrd.img' exist before reading >>> them. If symlink doesn't exist, this function skips it. >> >> any feedback on this? > > Just about Hennings readlink remark. You might want to try 'readlink -m' > instead of 'readlink -e'. It appears that the target of your symlink > didn't exist, so 'readlink -e' returns nothing. I've tried '-m', but there is another problem: 1. If symlink references absolute path, then readlink returns this absolute path, i.e.: $ ln -s /boot/abc l1 $ readlink -m l1 /boot/abc/ 2. If symlink references relative path, so the absolute path is added: $ ln -s boot/abc l2 $ readlink -m l2 /home/asmirnov/Work/isar/isar/boot/abc/ So then I propose to use basename and concatenate absolute path like: KERNEL_IMAGE=$(basename $(readlink -m ...)) cp ${IMAGE_ROOTFS}/boot/$KERNEL_IMAGE ... Alex > > Cheers, > Claudius > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov