From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6631131420328722432 X-Received: by 2002:a02:1149:: with SMTP id 70mr18249559jaf.24.1544005714597; Wed, 05 Dec 2018 02:28:34 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a02:5f48:: with SMTP id r69ls7198794jab.2.gmail; Wed, 05 Dec 2018 02:28:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQEOPR/nIivyF6o7r5KV8uGoaiq0Aner+mPEe0x1aqsysH8Hk3MfPCfEG+gyVryIjwt+j4 X-Received: by 2002:a02:77c2:: with SMTP id g185mr18342553jac.9.1544005714366; Wed, 05 Dec 2018 02:28:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544005714; cv=none; d=google.com; s=arc-20160816; b=eBiyX54z9FU3FPuOKUPqvjKRnHm+6rY3UgaP8iOKEdLlPc+chAe0jqK7cKSBbshTsM 4LWkMV4I3FcyX6thT0JrxxwHK2nAyAOsYsTJSaS0WOxpev/99YXnxMuoXbls7emZuK2s 6W2cFIdOwM75uG/6WgsEPhpMhtIU1PNnjg+uc1V8VfHc6DPfZBOEKcjFJFVN+ZXAthrW Dh2+VmaqqYgmomjkb4RS9WTXCPwO2cDRyDyfBG2A2S8+4Ta3gk47UDH1z4Dwet7EI7zx 6s2MZYWSy7Rhg4lXrF4dEHppFJrGMX8rxL42+FZr9X8KOePVbdRdyhIf3bKPBc432ZJo hOsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:sender:in-reply-to:references :mime-version:dkim-signature; bh=IYVGN4Xu5qFx4CFEE6/32W6i5d8egBJx9/R5DBFcDno=; b=GyEEzoTeFilLsXdVc+D+pE6ekMY4xxDEdVwo6WBYkJfKbKeEcctw2yvWkKLMka5MWB AJaQWhs9aSVz5UcMeD6DnuVM9YktkYzkJas0qcnnb0oRVZUJThjXKrq/OIfFQastAQZZ HGyekXAzIccsNz0Iiu0T+KKjpAUYEsyoneM42Msow8Za/ctOI721iQnjWmlbEH9RkVn+ 9nKlGNb2RBqsSg6AmV4NQhh9PlCsvfWiapbsQ2X7jwahI018xcPGHTTuMEk9MjUtl1jK YmcNbp0db8zhLzs+WW9oPdEMD7ZbcTyzongtYwPd9YUSu7KY4PXFdU3RkojpNJ9TUaEo ztYg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ku4WEDrz; spf=pass (google.com: domain of tlghosgor@gmail.com designates 2607:f8b0:4864:20::743 as permitted sender) smtp.mailfrom=tlghosgor@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com. [2607:f8b0:4864:20::743]) by gmr-mx.google.com with ESMTPS id 204si538804itw.2.2018.12.05.02.28.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 02:28:34 -0800 (PST) Received-SPF: pass (google.com: domain of tlghosgor@gmail.com designates 2607:f8b0:4864:20::743 as permitted sender) client-ip=2607:f8b0:4864:20::743; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ku4WEDrz; spf=pass (google.com: domain of tlghosgor@gmail.com designates 2607:f8b0:4864:20::743 as permitted sender) smtp.mailfrom=tlghosgor@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qk1-x743.google.com with SMTP id y16so11498433qki.7 for ; Wed, 05 Dec 2018 02:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:sender:from:date:message-id :subject:to:cc; bh=IYVGN4Xu5qFx4CFEE6/32W6i5d8egBJx9/R5DBFcDno=; b=ku4WEDrzn9Fkl2Wf5uWapJs3cfM6Ciiw6FrTBVjU8uWwjuR5KCM3iDJdt94MPjtiVX 0Ux00BJo2/sZv3LyGKh714StuRQKl+QSgIwHDXeaVeJFK9HZP4PakYtmLUlY3pmkv+5C sYhbMl5X7ZKW/UxGl1mNSSTW/osXTfz8OjNnZ8xUUxyXH8+oiXz1VR7WXFLK3pi/CBDL PuhJ8VQe6b/10NkPVD/rXBejA5FnBrzEFcdslUA2Bn3CUBRmhDfUPsFzi7gh3UOd7fC0 xGTUdVlj2P1KQ4G9TuewhLELbmmx8McrgNSzJ9G47SnU1RtsQpsjsCyZ0oKAvLHUXhGo v6zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:sender:from :date:message-id:subject:to:cc; bh=IYVGN4Xu5qFx4CFEE6/32W6i5d8egBJx9/R5DBFcDno=; b=aYNFeAhazAr6AXYIFQmrJodULEexI3Vt7TeOC+QSUofvVO3/dgIdJRQ7jbWv3wHmX4 GcrH2cLDB5lrLdc9VQFQ+dEVxU6Iav9L3LJn0iBMUaeHxTgrcN58jwuEQp6CF1y1N7w9 dzt+t43y0kIV8ShpzX0p6jrlSrS2zKtdLCCMXMRSWmV0N9hZLPZzCqNayhpo3bQEFN4A MrjQByRYm2923UxgAK6sHga68fqkeJ5vSFl2tUxHy+i9/SusAduUx1JSqGHTKUUL/wva 1xzAodZTXO42pGAUGtBmnswuM+sjIxtfe1tV0TFYShSek3QGIzGbddnGp59og0yqlR8a v44Q== X-Gm-Message-State: AA+aEWZ+kAJ5yGzv8MZ8qBM3jtSQtSnILh+cWxLw8IPlScEfDZzLHeEN gRWSi8h/RScKCMTSnFTiam20JqcqzSDaBy+Is0c= X-Received: by 2002:ae9:e311:: with SMTP id v17mr21001817qkf.193.1544005713833; Wed, 05 Dec 2018 02:28:33 -0800 (PST) MIME-Version: 1.0 References: <20181204133544.50621-1-tolga.hosgor@siemens.com> <45323f2d-7dac-9b9d-6382-013b9ae1242c@siemens.com> In-Reply-To: <45323f2d-7dac-9b9d-6382-013b9ae1242c@siemens.com> Sender: fasdfasdas@gmail.com X-Google-Sender-Delegation: fasdfasdas@gmail.com From: =?UTF-8?B?VG9sZ2EgSG/Fn2fDtnI=?= Date: Wed, 5 Dec 2018 13:28:22 +0300 X-Google-Sender-Auth: 7qG6LdCQcVcb3RUMM3qNuA1Ctng Message-ID: Subject: Re: [PATCH] isar-bootstrap: debootstrap --include flag to support https:// sources To: claudius.heine.ext@siemens.com Cc: jan.kiszka@siemens.com, isar-users@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-TUID: W4xeWSNrOuWL On Tue, Dec 4, 2018 at 5:46 PM Claudius Heine wrote: > > Hi Jan, > > On 04/12/2018 15.28, Jan Kiszka wrote: > > On 04.12.18 15:23, [ext] Claudius Heine wrote: > >>> @@ -138,6 +154,12 @@ def get_distro_components_argument(d, is_host): > >>> else: > >>> return "" > >>> +def get_debootstrap_includes(d, is_host=False): > >>> + if get_distro_have_https_source(d, is_host): > >>> + return "locales,apt-transport-https,ca-certificates" > >> > >> Those package names should be configured in the distro config. I partly agree. It makes sense that it is the responsibility of distro config but "debootstrap" does this automatically [1]. This intervention by "debootstrap" creates some erratic behavior. Scenario 1: - No special bootstrap config on distro. - Distro sources have an "https" and "http" in that order. Scenario 2: - No special bootstrap config on distro. - Distro sources have an "http" and "https" in that order. While we were happily building on scenario 1, with a minor change now the build magically fails on scenario 2. An acceptable solution for consistency would be to disable this behavior [1] but "debootstrap" does not seem to have an option to disable this magic-package-adding behavior. How about explicitly `--exclude` the packages for consistency? "debootstrap" also did this in its distro-specific scripts [1], like your approach. But now it is on a common script "debian-common" [2]. So now they think this is more or less a standard package I guess. Actually what is needed is something the output of: "DEBOOTSTRAP_DIR=/usr/share/debootstrap source /usr/share/debootstrap/scripts/; MIRRORS= work_out_debs && echo $base" but this is not publicly exposed in any way. Could call `debootstrap --print-debs ` for each mirror and sort/uniq the result but it would be ugly. > >> > > > > Means you would suggest to introduce two variables, e.g. > > DEBOOTSTRAP_INCLUDE and DEBOOTSTRAP_INCLUDE_HTTPS to encode those > > packages? Those could then be set in distro confs and simply used here. > Now I am completely lost. I suppose there is no need to create the logic to to differentiate HTTP and HTTPS in ISAR if distro conf will set the packages. Distro configuration knows whether if it is using HTTP or HTTPS (or in theory something else) and it should be enough to define/extend _one_ variable accordingly. > Not sure about those names, but in principle yes. Package names are How about BOOTSTRAP_PACKAGES as the variable name? > distro specific and should not be part of isar-bootstrap IMO. > Not sure why the 'locales' package made it through review, but that > might just be because its just one package that is probably named like > this in every distribution, past and future. > > Claudius > > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de Do you agree on adding `--exclude=apt-transport-https,ca-certificates` and introducing a `BOOTSTRAP_PACKAGES` variable to be configured in distro? [1] https://salsa.debian.org/installer-team/debootstrap/blob/08cfced48bdf7bc1240efb63f69cde7ed385038b/scripts/sid#L36-40 [2] https://salsa.debian.org/installer-team/debootstrap/blob/4a4e7186de7237c58eae4f0b2de3ad670ad7436f/scripts/debian-common#L30-34