From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6545822013293854720 X-Received: by 10.46.158.24 with SMTP id e24mr357587ljk.12.1524143011951; Thu, 19 Apr 2018 06:03:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.62.13 with SMTP id l13ls273383lja.8.gmail; Thu, 19 Apr 2018 06:03:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bSRvoIwWp8LdyNF2tAftwE1B+wNj7+wkLV1tWfZru3PaziT+M8WGpoSYFno53skiIsC5+ X-Received: by 10.46.149.216 with SMTP id y24mr360582ljh.32.1524143011332; Thu, 19 Apr 2018 06:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524143011; cv=none; d=google.com; s=arc-20160816; b=EAn6vZH1x8nOfpsdF0MjheOPuJ1COpiwL24l9BZOiy0wfm5dSwHSXH5FLteWOGcGNV rSqVjWILHLp++R6BF/ZS3XbAWrEmZ6MVQCTM12CnVEMBcRbYhEaEldQEGXh5z+pynMuK dJkyLMPMRTwJbtR5+/o1UV6z8xUX/5Gaceb8VrS0CmyOd0+AffmQn4+pVvELaqJihNYc HUk2p5bN3tQnOxl4oqiDWPyqddLauw6H1u5mJz7XBklyK+EOo9no8O8pzKogsUM9OPVo ko52mvosUJqvh9Wm8eZpUWO1rgqupAu7WFbqQ3W+dZ2mUbt52C9lNjETQ9FhMppOJ0k+ NFmQ== 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=Bhb04ArWq0dXcxZQfTmMiJI+t0xrh4qWFePMVb9Aung=; b=PEsGIoHGA6C8oMfTPfbOxPXW64F+o5++pYppb2Q+aW4FC2Qh2ufp4o2qctLVzC3Sp4 8Q4i0XKit7s8368RK6LPnv4BXye6kjptbTm2OFF9B4y5TSAZCiEiYYihkH3ooKlwMF6x wB6GTKDyIJWV7vig8NEsuryL0ZqeLVrzReebyrzfgpXRkpxOmSf3of7fbsHWTmTaeiGU 0do//tsvbgocT7BXBLEUElTBlNqQsNfRW2evytEfdZiEibHMtrsJwTHfJefTN3ZFjQbm 8uIJmrsfPM0U069MgKp3WoBQgUSI01h6kuK+TmMB6PGQrX5WwqEL7uCnDPZ+5JxFIZ/r ediw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id i24-v6si164087lfc.4.2018.04.19.06.03.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3JD3MNw002586 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Apr 2018 15:03:26 +0200 Received: from [139.25.69.226] (linux-ses-ext02.ppmd.siemens.net [139.25.69.226]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w3JD3LEd024659; Thu, 19 Apr 2018 15:03:21 +0200 Subject: Re: Install debian packages from other sources To: Francesco , 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> From: Claudius Heine Message-ID: <0dc39e6b-7769-1ffb-9f5a-1b2f15bab84e@siemens.com> Date: Thu, 19 Apr 2018 15:03:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <6bbe9d5c-73e8-019e-d79c-de2263879795@dave.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: 7eBMTmlSr7QV 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 >>>> >>>> >>> >> > -- 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