From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6545822013293854720 X-Received: by 10.28.51.142 with SMTP id z136mr2496504wmz.30.1524734910573; Thu, 26 Apr 2018 02:28:30 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:e44e:: with SMTP id t14-v6ls462905wrm.4.gmail; Thu, 26 Apr 2018 02:28:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomSibFknEZS+FsiNVlZ4Yh6p+TFQABfpPpPCW34g14yVWIRFA1UwuqKzCAxOEpFsO7foQK X-Received: by 2002:adf:ea87:: with SMTP id s7-v6mr93554wrm.5.1524734909878; Thu, 26 Apr 2018 02:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524734909; cv=none; d=google.com; s=arc-20160816; b=uXHQLgYs0qpFwj8dpmAzG04BX2epjaXd5DNrWgRRp1FrAdggsX8H45CCm9E+d7eVuM dvYBym/XvjtFoI1C4Vx91JtO9/YdpA/4WwGJnh6OyX7PJ60QYeNd9OJcfmDfopOKqEvk gXjPFn8EPjXJLZ4Bpte2oOvXHg5RW+7vBnD3A+rLSb5wZcmsKvkLOxxLHjyRONtnIKKN NdR1qHFCXo/PjCYrc3NHk0aKoxJ3D0tObtK7t2yROUFEDKLzb0ZeX73TTBVEWTOicWHV yOV8y1B2+nq9HE78z0aeMyY5/wD9BjXWCcpjQaejBuxyIpJgANzROelNseq5QFw6c3Rm uHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=3iuyEHXQ76g/PhKAesvSCcu0bCXtZ9KHDP05MMajkPQ=; b=H6Ck+KltWZlboBkOcOcfmsxrFItOX2kolxB4fZxR8YswuLJI7grWak6/Gp4t07iCb1 Wyx2C6QOqpQGtECldkqo4NLBwxPI16ddZs/N2LTjMYi802HZk/oQuCNUUsUu8pyenEld f+Hej13AeHmsbuP71+R0ftOSBHo2mreh5hPTDr6Uipnf0zH1yOMQg5qkZw4rAbyE7fBE mWyfSkwTbPX1AoF1VlotYG2zEWcuBSEap0B1p90aGRnAQ9nmBZmTtx7UTDb8pMPSNH6j Vq7okDdzAyqO3PcK4GXUQF3wX7zgtJdU/ZjLrjeh+I/u64BHPa/rtMKHOzoxSLN/F7mY cKZg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id v1si173245wmc.4.2018.04.26.02.28.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 02:28:29 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@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 henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3Q9SRQg009043 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Apr 2018 11:28:27 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w3Q9SQ3U002355; Thu, 26 Apr 2018 11:28:27 +0200 Date: Thu, 26 Apr 2018 11:28:26 +0200 From: Henning Schild To: Francesco Cc: Subject: Re: Install debian packages from other sources Message-ID: <20180426112826.24362b33@md1pvb1c.ad001.siemens.net> In-Reply-To: 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> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TUID: KWdRBIvjTr19 Am Thu, 19 Apr 2018 16:19:37 +0200 schrieb Francesco : > Hello again, >=20 > Thank to your suggestions I managed to install my custom application > to the rootfs. >=20 > I still have difficulties in overwriting upstream packages=C2=A0 from=20 > different repos. Let me explain this a bit better, >=20 > =C2=A0 Let's say I have a debian-repo and another-repo. If I organize th= e=20 > files=C2=A0 in the way Claudius suggested >=20 > =C2=A0=C2=A0=C2=A0 conf/distro/custom.conf: > =C2=A0=C2=A0=C2=A0 require conf/distro/debian-stretch.conf > =C2=A0=C2=A0=C2=A0 DISTRO_APT_SOURCES +=3D "conf/distro/custom.list" >=20 > =C2=A0 conf/distro/custom.list: > =C2=A0=C2=A0=C2=A0 deb http://url/to/repo suite component >=20 > =C2=A0 conf/multiconfig/custom-config.conf: > =C2=A0=C2=A0=C2=A0 require conf/multiconfig/qemuamd64-stretch.conf > =C2=A0=C2=A0=C2=A0 DISTRO =3D "custom" >=20 > and then in my image I put=C2=A0 "mypackage" to the variable=20 > IMAGE_PREINSTALL, I end up getting the rootfs=C2=A0 with the version of > the package provided in the=C2=A0 debian-repo and not the one available in > the another-repo. >=20 > I would like to overwrite a debian-repo's package with the packages=20 > 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. You should see a similar effect when adding your custom repo to another Debian system. You will have to configure apt-preferences to make sure your custom repo has a higher prio and packages from it will be preferred. Have a look at DISTRO_APT_PREFERENCES, which should allow you to insert such configuration files into the process. Henning > Thank you >=20 > Frank >=20 >=20 > On 19/04/2018 15:03, Claudius Heine wrote: > > Hi, > > > > On 2018-04-19 11:07, Francesco wrote: =20 > >> 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. =20 > > > > 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=20 > > "IMAGE_INSTALL" instead of "IMAGE_PREINSTALL". Then the pin > > priority should take over and install yours instead of upstreams. > > =20 > >> 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? =20 > > > > I did something similar before multi-repo support was implemented: > > > > =C2=A0=C2=A0=C2=A0 inherit dpkg-base > > =C2=A0=C2=A0=C2=A0 DESCRIPTION =3D "My Package" > > =C2=A0=C2=A0=C2=A0 LICENSE =3D "gpl-2.0" > > =C2=A0=C2=A0=C2=A0 LIC_FILES_CHKSUM =3D=20 > > "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=3D751419260aa954499= f7abaabaa882bbe" > > =C2=A0=C2=A0=C2=A0 PN =3D "my-package" > > =C2=A0=C2=A0=C2=A0 PV =3D "1.0.0" > > =C2=A0=C2=A0=C2=A0 SRC_URI =3D=20 > > "https://path/to/server/${PN}_${PV}_${DISTRO_ARCH}.deb;unpack=3D0" > > =C2=A0=C2=A0=C2=A0 SRC_URI[sha256sum] =3D "xxxx" > > > > =C2=A0=C2=A0=C2=A0 dpkg_runbuild() { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo "Task intentionally lef= t empty" > > =C2=A0=C2=A0=C2=A0 } > > > > Cheers, > > Claudius > > =20 > >> > >> Thanks > >> > >> Frank > >> > >> > >> On 19/04/2018 09:10, Claudius Heine wrote: =20 > >>> Hi, > >>> > >>> On 2018-04-18 20:26, Henning Schild wrote: =20 > >>>> 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. =20 > >>> > >>> 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: > >>> > >>> =C2=A0 conf/distro/custom.conf: > >>> =C2=A0=C2=A0=C2=A0 require conf/distro/debian-stretch.conf > >>> =C2=A0=C2=A0=C2=A0 DISTRO_APT_SOURCES +=3D "conf/distro/custom.list" > >>> > >>> =C2=A0 conf/distro/custom.list: > >>> =C2=A0=C2=A0=C2=A0 deb http://url/to/repo suite component > >>> > >>> =C2=A0 conf/multiconfig/custom-config.conf: > >>> =C2=A0=C2=A0=C2=A0 require conf/multiconfig/qemuamd64-stretch.conf > >>> =C2=A0=C2=A0=C2=A0 DISTRO =3D "custom" > >>> > >>> For just testing you could also put > >>> 'DISTRO_APT_SOURCES_append =3D " conf/distro/custom.list"' > >>> in the local.conf, you will also need the custom.list at the > >>> right place. > >>> > >>> Cheers, > >>> Claudius > >>> =20 > >>>> We still lack an example for that, but Claudius might have one. > > >>>> If we are talking about a proper repo and not some random=20 > >>>> drop-location > >>>> for .debs the latter would be the way to go. > >>>> > >>>> Henning > >>>> > >>>> Am Wed, 18 Apr 2018 18:12:31 +0200 > >>>> schrieb Francesco : > >>>> =20 > >>>>> 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 > >>>>> > >>>>> =20 > >>>> =20 > >>> =20 > >> =20 > > =20 >=20