From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6591699875972251648 X-Received: by 2002:a19:1f44:: with SMTP id f65-v6mr2512258lff.20.1534880214277; Tue, 21 Aug 2018 12:36:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:520f:: with SMTP id m15-v6ls1052086lfb.12.gmail; Tue, 21 Aug 2018 12:36:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy3/uN5PilTsOEe71w9V+4wJPJZdHDNJBzSnlgEvrg7z0pjTbKeZwCcxP2S1o04z7DtPFCh X-Received: by 2002:ac2:4146:: with SMTP id c6-v6mr275908lfi.3.1534880213673; Tue, 21 Aug 2018 12:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534880213; cv=none; d=google.com; s=arc-20160816; b=vURkAvdTi7p3JP/zTedLa2nnWvJ5FiyHQrq1i4qPXCr6kn2j+HFL76tI0bUfEpocZ4 dAdOzAtV+gGT6fRNQZYPtHYTjM1ljfGEDSXG5jFE3dUul+0uaXlDf1Oem85bEUynoCpc /+yKcpZliwUqlHb+l6tbNQDXSALUXHPgvRBmOZ9PDH0fzcgBxWzCJfK3dA4mE2VBye/r iVx1zL4v7yIooG/puEc2MD+1StcOMsVGaWHPvqW9iYChU4NdodlXy7MxLCn8CO5wuY6J X3j8b6Il+EzJnV1XjFdQ2OML976JvQjmQzAD9LDkiFGyRbrB4a9LelzDNMESfOaW+zAx PcjQ== 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=xkiw1xZ7/kNr7g5Qrk+Z1QacLwDZ9EF4CRmxpcjCJj4=; b=TCzlbu4cO8dNF10d7ubCo48whF71w1uq2JxXfpIqA+KZ7MdQ1FogknoIXJ7WK7GqdX HaNInsImLXzHP2fZ/12Umdq+K8ltAEHVOy06+RqHH0K74bYVJG6+hRxXGNMTScikghRG 96NoYMMa3VlmViKwlCWi+Meue40KeaDhFzX964IyVjDW4japGhrNldpGWc8AK7PhlTNR Q/nA42bXyAM8DLlO3Dv5dXQVsyoPxGu8x3hNd5fLB78t5Cj/n++xWjEJ4CfVJDGCjJuZ PL4aZwY5R/JFgJz1pu/a3r7mABzQUIZ7eQplnOsqfLRsYS+oA4EY16MleJJ9+raCSc4A t/cw== 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 n1-v6si480341ljg.0.2018.08.21.12.36.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 12:36:53 -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 w7LJanj1024306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 21 Aug 2018 21:36:51 +0200 Subject: Re: Minimizing isar-image-base To: Jan Kiszka , isar-users References: <0228b199-d672-6610-0180-c8a84542366c@siemens.com> From: Alexander Smirnov Message-ID: Date: Tue, 21 Aug 2018 22:36:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0228b199-d672-6610-0180-c8a84542366c@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: 7yotvLTYWCcz Hi Jan, On 20.08.2018 10:22, Jan Kiszka wrote: > Hi all, > > a couple of questions on what we pre-install into the de-facto standard > base image for everything that builds on Isar: > > - Why do we pre-install init, but only for >= stretch? > IIRC, for jessie and wheezy, the list of pre-installed packages was created based on attempt to boot the board. So it's just a result of experiment, no references to official Debian sources. > - Why do we pre-install dbus? > Again, IIRC, without dbus there was dirty boot log in QEMU, some services failed to start. > - Can we make apt optional? Installing it as transient package by >   default, e.g. What would happen if a downstream image then puts it >   into PREINSTALL again? Should we filter IMAGE_TRANSIENT_PACKAGES >   against IMAGE_PREINSTALL? I could suppose how apt went to isar-image-base recipe, initially it was a copy of buildchroot one. So nobody actually cares about the list of packages, there was only one requirement - no error and warnings during image boot in QEMU. In buildchroot apt is needed to populate the dependencies. With current Isar implementation the apt is a must package for image. Let me explain why. Below is the whole chain to generate image: 1. At first, isar-debootstrap is called. This recipe fetches minimal *pure* Debian suite for specified architecture. It's stored in tmp/deploy folder. 2. Image generation is started from copying this pre-fetched suite to work folder. 3. Then you chroot to this *pure* minimal suite. 4. And finally all the additional packages in pre-install list are installed via apt-get. So, the only way for current architecture - remove apt in post-build task. Hope this a bit clarifies your questions. > > Alternatively, we could define some isar-image-tiny that removes > packages from the base image, possibly also some that debootstrap pulls in. > > Ideas, suggestions? > I'd support you with this idea. For example sometimes I really need minimal QEMU image with just console, let's say 10-20MB of disk space and 2-3 minutes to build it. But my proposal will be to start from requirements - which packages should go to tiny image and why. Otherwise we will have the same questions as above in 1-2 years :-) Alex