From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.80.202.201 with SMTP id f9mr658884edi.12.1518441007086; Mon, 12 Feb 2018 05:10:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.171.6 with SMTP id s6ls6331636edc.2.gmail; Mon, 12 Feb 2018 05:10:06 -0800 (PST) X-Google-Smtp-Source: AH8x224/rFHArFV2FOfRw3PHCcRSo7gqVGDnSb5tVvmF267MmjSso1MxceRofsjS44IYjS6tuYmx X-Received: by 10.80.134.135 with SMTP id r7mr3185331eda.1.1518441006155; Mon, 12 Feb 2018 05:10:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518441006; cv=none; d=google.com; s=arc-20160816; b=nnFtLeFrTCaCMA1t9Olh/kS/fDFrHZtp9H1J+b6tWUenRh4VZzXXztSpF/XP8PpdIT 7OLTVwC3oNrQ1svYh4zrs+jJi1XER9Rw+hAO+A1Sz9mqEBQCbsgNEe/ozdcFtjHIhkDJ 6LmX3zJ+6SpoVPh8GQAy0nqI/2BDfZcoZyfeaB/xA0BlVfe12N0/pMNRDIhvp8VwrQse vBiQr6wVHChvaNWYYIz6KipkiQP7VDUsXCYpoFgJ6n166AmO8fK/ToMMWhKR0oQC+8n6 so4RmJoG3XnSxWwBQDUh5sLQ4hwmY1CBRJTfLxRx1E4AyIIlql1d46YRmS9IdwzHvHKJ 1rdA== 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=4eAuWqp/32IYPYpsezkhBJuJEg5XoZcsrpvEUcOwEnM=; b=l5xCVTQRcsJZDDsHnAUJIKrWhAhV282hk946j2Wi15fiFNrWh7HkXVKIL0r0B9W9Nz jXRAM4T8myn/rn+5IeFY9UdHW+Hzpp/2iv8+dlbcVKv3bgAHmanqHlLoEcmdsMVKDRp2 lrTYEnAb6pHBdogJrlw/mCltsSJ3XXqMkc1gaisEIzxjtt7bKvT0lajpZ76EsiZM6Jje C57GzrdiivHxrUINPX+OYYA1PrFXSrAkCHrM8cXutb3ESIe5mrk3M5HYMMOlX70vah1j p7zqvsy+lC0Mp5Xb22fg+JZbUOiXhKU1zEs0/4ru72Jfmg3emhFNssdw5CGMERwIjf/q f1jg== 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 z17si599326edz.1.2018.02.12.05.10.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 05:10:06 -0800 (PST) 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 w1CDA202000883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 12 Feb 2018 14:10:04 +0100 Subject: Re: [PATCH v4 2/8] Prioritize isar-apt repo over all others To: Jan Kiszka , isar-users References: <136df397-5fce-9f50-fd74-f35f038fbda2@siemens.com> <905dabd5-e9b9-9382-8c86-8e33d8559b21@siemens.com> From: Alexander Smirnov Message-ID: Date: Mon, 12 Feb 2018 16:09:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <905dabd5-e9b9-9382-8c86-8e33d8559b21@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: lh2genv0icHe On 02/12/2018 01:27 PM, Jan Kiszka wrote: > On 2018-02-12 11:11, Jan Kiszka wrote: >> On 2018-02-12 11:08, Alexander Smirnov wrote: >>> On 02/12/2018 12:41 PM, Jan Kiszka wrote: >>>> On 2018-02-12 10:33, Alexander Smirnov wrote: >>>>> On 02/11/2018 06:25 PM, Jan Kiszka wrote: >>>>>> From: Jan Kiszka >>>>>> >>>>>> This ensures that we can override packages from upstream Debian or >>>>>> other >>>>>> external sources with our self-built versions. We achieve this for now >>>>>> by asking multistrap to drop a preferences file for the buildchroot so >>>>>> that dependency installations use the right priority. For the image >>>>>> build, this does not work because all packages are pull during the >>>>>> bootstrap. Therefore, we set aptdefaultrelease to isar to ensure that >>>>>> our repo gets the higher priority. >>>>>> >>>>> >>>>> I'm not sure that I completely understand this. What is the use-case for >>>>> this? If you build your own copy of upstream package, this >>>>> prioritization could be resolved by specifying suffix to version. >>>> >>>> Simple example: custom kernel build of linux-cip >>>> >>>> This generates a package called linux-image-amd64 (for amd64 as target), >>>> and that may have a version < debian's kernel. Now, if we do not >>>> prioritize isar-apt over upstream, the upstream kernel is taken, even >>>> when you switched PREFERRED_PROVIDER (in fact, the build will break when >>>> that virtual package linux-cip is selected but can't be installed due to >>>> the version preference "newest"). >>> >>> Ok, but why you can't name you kernel 'linux-cip-image-amd64'? Having >>> the same name as with original Debian one could be confusing. >>> >> >> That is mandatory, in order to write packages that depend on THE kernel, >> instead of "my-custom-kernel-in-version-4.4.112". > > To make it clearer, just look at the example-module case: The recipe can > build both against the distro as well as all custom kernels, without > touching it. And that is a pattern not limited to kernel<->module > relationships. kernel<->module pair are built from the same source tree, so here no problem with ${PN}-${PV} substitution as dependency. Also I've parsed pure Debian packages, nobody depends from 'linux-image-*', so no correlation with upstream packages. What are the other use-cases for this pattern? As I mentioned above with 'glibc' example, this is unclean approach, distro could become broken at anytime. This could become robust *only* after build reproducibility integration, when you cache the upstream content. But with build-rep you could manually manage the content of the cache, so prioritization is not needed, you could just drop duplications from the cache. In general having packages with the same name in 'source.list' and overriding version policies in apt looks very dangerous for me. If the current series requires prioritization for kernel only, it would be nice to specify only this package in apt preferences. Alex