From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6545822013293854720 X-Received: by 2002:a19:9a0b:: with SMTP id c11-v6mr24110lfe.26.1524147579938; Thu, 19 Apr 2018 07:19:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:1a02:: with SMTP id a2-v6ls821081lfa.11.gmail; Thu, 19 Apr 2018 07:19:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrWPoBw0KxYFeHWtuPxAjHgI49lREdIgQLiLciHE039V6MLuRGY8bqhWmEGSOUOl99SH4xn X-Received: by 2002:a19:594e:: with SMTP id n75-v6mr10926lfb.13.1524147579165; Thu, 19 Apr 2018 07:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147579; cv=none; d=google.com; s=arc-20160816; b=J2CL1cyH0E0tXTMdFIJmNydk51/7rOsLJEMuy6yiPfS/PHG0Lb+Hl0M4uox7W1yejy fgMnxhb5cIrzI2x/TE9IiImIMQsJlAYy+lUQnN78EFkhVKVtz836u6x1VSb93NOlyKK5 VmAre8XnBLkJZnpXEepm+tL8+FXlw0IJz3DK3hDhFJOfrYN2Y7P0amzD/hi1dTBmKgxU Qzo/v0h1b5DrTrwBZgenIS5BenAjkLrE0OxK2OLioZALkG5jClRDdvHFlzkMQjWtVCLY uCiExoz/tPZVl1+rCULEueOmG10xTD5x6WeqZMD28BDArSwjrk73vtKewTpVgegN1iCi AExw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=Ur8RMzwwT8ds7TyenZVApXXD5o0bs066sPgsPa3QNy0=; b=NWy1qkPmq9k+lMDZSnM658vE0fbtb7iuw6qk1h589jgb8zY0Lmi0SFwIXZaFpSq7i/ GrF+lT2Q9FF/WBh0S5B80a8egGJ7otTnQDYrDM/afUNoFARpznsRZK764aKFLIXCDPWk touQ1Kd2o96SVRABXToLctP57s1dbyUgH7i25k7SK6A4Wmru2Osa3dKKgmWQGZxnq9u/ fAE29PtbSVJnK+QNmnMu7d7zJRKtzqviRwl5C149p+jjreDjpInMVZGSUBZzofpzfl1I +3MfEVnRfx7gqgR/HqCVdgyYDw7EIzHTqyjP0zE6HfT2bgPsT5sTHfYJ8AS1wS5/5Hk4 +xHw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) smtp.mailfrom=fdprnd@dave.eu Return-Path: Received: from mx.dave-tech.it (mx.dave-tech.it. [185.100.109.150]) by gmr-mx.google.com with ESMTP id u16si133649ljg.4.2018.04.19.07.19.38 for ; Thu, 19 Apr 2018 07:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) client-ip=185.100.109.150; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of fdprnd@dave.eu designates 185.100.109.150 as permitted sender) smtp.mailfrom=fdprnd@dave.eu Received: from [127.0.0.1] (unknown [192.168.0.115]) by mx.dave-tech.it (Postfix) with ESMTPS id 14EA085 for ; Thu, 19 Apr 2018 16:19:38 +0200 (CEST) Subject: Re: Install debian packages from other sources To: isar-users@googlegroups.com References: <0fffdaa3-e4d6-90bd-d98f-5cd0e745ad25@dave.eu> <20180418202656.13f57c11@mmd1pvb1c.ad001.siemens.net> <6d4e88d9-4a5e-20dd-083e-e28009f13beb@siemens.com> <6bbe9d5c-73e8-019e-d79c-de2263879795@dave.eu> <0dc39e6b-7769-1ffb-9f5a-1b2f15bab84e@siemens.com> From: Francesco Message-ID: Date: Thu, 19 Apr 2018 16:19:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <0dc39e6b-7769-1ffb-9f5a-1b2f15bab84e@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-TUID: IwxP20rMrQuH Hello again, Thank to your suggestions I managed to install my custom application to the rootfs. I still have difficulties in overwriting upstream packages  from different repos. Let me explain this a bit better,   Let's say I have a debian-repo and another-repo. If I organize the files  in the way Claudius suggested     conf/distro/custom.conf:     require conf/distro/debian-stretch.conf     DISTRO_APT_SOURCES += "conf/distro/custom.list"   conf/distro/custom.list:     deb http://url/to/repo suite component   conf/multiconfig/custom-config.conf:     require conf/multiconfig/qemuamd64-stretch.conf     DISTRO = "custom" and then in my image I put  "mypackage" to the variable IMAGE_PREINSTALL, I end up getting the rootfs  with the version of the package provided in the  debian-repo and not the one available in the another-repo. I would like to overwrite a debian-repo's package with the packages provided in "another-repo". Should this work? Because from the attempts I have made so far I still haven't managed to get it to work. Thank you Frank On 19/04/2018 15:03, Claudius Heine wrote: > Hi, > > On 2018-04-19 11:07, Francesco wrote: >> Thanks for the example provided. >> >> I have now created a custom image file on another layer. Inside this >> image I set the IMAGE_PREINSTALL variable with other packages I want >> to install on my final target image. >> >> At the end of the building process I noticed that the version of the >> packages does not correspond to the version of the packages of my >> added repo, but it is instead that from the original repo. > > Honestly I haven't tested overwriting upstream packages with ones of > the same name and older version created by isar very thoroughly yet. > It should work, because isar-bootstrap adds a pin preference to > packages from the internal isar repo with a priority of 1000. > > But as Henning said, you should make sure that your package is build > and deployed in the internal isar repo first by adding it to > "IMAGE_INSTALL" instead of "IMAGE_PREINSTALL". Then the pin priority > should take over and install yours instead of upstreams. > >> I also would like to ask another thing. I tried to write a recipe to >> install a custom application in .deb format. The deb file is this >> time fetched from the host fs. >> >> My custom image inherits from the isar-base-image, and I would like >> to simply execute dpkg -i mypackage from the target rootfs. How am I >> supposed to write a recipe for this? > > I did something similar before multi-repo support was implemented: > >     inherit dpkg-base >     DESCRIPTION = "My Package" >     LICENSE = "gpl-2.0" >     LIC_FILES_CHKSUM = > "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" >     PN = "my-package" >     PV = "1.0.0" >     SRC_URI = > "https://path/to/server/${PN}_${PV}_${DISTRO_ARCH}.deb;unpack=0" >     SRC_URI[sha256sum] = "xxxx" > >     dpkg_runbuild() { >         echo "Task intentionally left empty" >     } > > Cheers, > Claudius > >> >> Thanks >> >> Frank >> >> >> On 19/04/2018 09:10, Claudius Heine wrote: >>> Hi, >>> >>> On 2018-04-18 20:26, Henning Schild wrote: >>>> Hi, >>>> >>>> you can do two things. You can actually go ahead and just fetch .deb >>>> files from somewhere in a package-recipe. Or you could derive and >>>> image-recipe from isar-image-base where you add another sources.list >>>> file to DISTRO_APT_SOURCES. >>> >>> Yes 'DISTRO_APT_SOURCES' is the right variable, but setting it in an >>> image recipe doesn't do anything. You have to expand it in a *.conf >>> file or in a isar-bootstrap.bbappend file. >>> >>> Personally I would create a new configs like this: >>> >>>   conf/distro/custom.conf: >>>     require conf/distro/debian-stretch.conf >>>     DISTRO_APT_SOURCES += "conf/distro/custom.list" >>> >>>   conf/distro/custom.list: >>>     deb http://url/to/repo suite component >>> >>>   conf/multiconfig/custom-config.conf: >>>     require conf/multiconfig/qemuamd64-stretch.conf >>>     DISTRO = "custom" >>> >>> For just testing you could also put >>> 'DISTRO_APT_SOURCES_append = " conf/distro/custom.list"' >>> in the local.conf, you will also need the custom.list at the right >>> place. >>> >>> Cheers, >>> Claudius >>> >>>> We still lack an example for that, but Claudius might have one. > >>>> If we are talking about a proper repo and not some random >>>> drop-location >>>> for .debs the latter would be the way to go. >>>> >>>> Henning >>>> >>>> Am Wed, 18 Apr 2018 18:12:31 +0200 >>>> schrieb Francesco : >>>> >>>>> Hello again, >>>>> >>>>> I would like to fetch debian packages from other repositories and >>>>> then install them into the rootfs. >>>>> >>>>> Which is the right way to achieve this? >>>>> >>>>> Thanks >>>>> >>>>> Frank >>>>> >>>>> >>>> >>> >> >