From: Henning Schild <henning.schild@siemens.com>
To: Francesco <fdprnd@dave.eu>
Cc: <isar-users@googlegroups.com>
Subject: Re: Install debian packages from other sources
Date: Thu, 26 Apr 2018 11:28:26 +0200 [thread overview]
Message-ID: <20180426112826.24362b33@md1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <b84fbb13-137b-e6d4-9677-024a56bd42d3@dave.eu>
Am Thu, 19 Apr 2018 16:19:37 +0200
schrieb Francesco <fdprnd@dave.eu>:
> 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.
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
>
> 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 <fdprnd@dave.eu>:
> >>>>
> >>>>> 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
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
>
prev parent reply other threads:[~2018-04-26 9:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 16:12 Francesco
2018-04-18 18:26 ` Henning Schild
2018-04-19 7:10 ` Claudius Heine
2018-04-19 9:07 ` Francesco
2018-04-19 12:02 ` Henning Schild
2018-04-19 13:03 ` Claudius Heine
2018-04-19 14:19 ` Francesco
2018-04-26 9:28 ` Henning Schild [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180426112826.24362b33@md1pvb1c.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=fdprnd@dave.eu \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox