All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Leitner - SKIDATA <Richard.Leitner@skidata.com>
To: "Yocto Project Discussion ML (yocto@yoctoproject.org)"
	<yocto@yoctoproject.org>
Subject: Re: Binary {deb,rpm} package install without repackaging
Date: Tue, 29 Apr 2014 07:51:52 +0000	[thread overview]
Message-ID: <F7680723A1CA6840825A59020FA77064010C8577@sdexmbx1srv.skidata.net> (raw)
In-Reply-To: <CAE_REAsfRB2=NUcb8dMPj8+=S-FYELU-x8=19+0+XE6XXgNAUQ@mail.gmail.com>

Hi,
thanks for that hint!
I finally managed to install a "third party" deb package using the ROOTFS_POSTPROCESS_COMMAND [1] in my rootfs.bb recipe.
Although I not fully understand why the "--admindir" parameter is required when the "--root" parameter is given.

The ROOTFS_POSTPROCESS_COMMAND I'm using is:
ROOTFS_POSTPROCESS_COMMAND += "${STAGING_BINDIR_NATIVE}/dpkg --root=${IMAGE_ROOTFS}/ --admindir=${IMAGE_ROOTFS}/var/lib/dpkg/  -i /path/to/package.deb"

I think pretty the same command will work for rpm packages.

Can anybody of you explain to me why "--root" AND "--admindir" are required for dpkg to work correctly?

According to the dpkg manpage --admindir shouldn't be required when --root is given:
--admindir=dir
              Change default administrative directory,  which  contains
              many   files   that  give  information  about  status  of
              installed or uninstalled  packages,  etc.   (Defaults  to
              /var/lib/dpkg)

--root=dir
              Changing root changes instdir  to  dir  and  admindir  to
              dir/var/lib/dpkg.

best regards,
Richard

[1] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-ROOTFS_POSTPROCESS_COMMAND

> From: Gaurang Shastri [mailto:gmshastri@gmail.com] 
> Sent: Monday, April 28, 2014 11:45 AM
> To: Richard Leitner - SKIDATA
> Subject: Re: [yocto] Binary {deb,rpm} package install without repackaging
>
> Dear Richard,
> 
> Do you want to copy some of the RPM to final ROOTFS image before ROOTFS image is created  or you want to install some of the RPM package before ROOTFS image is created ??
> 
> ROOTFS_POSTPROCESS_COMMAND or ROOTFS_POSTINSTALL_COMMAND is the way to go.
> 
> I did however run into a problem when running my script. Using variable ${D} in my ROOTFS_POSTINSTALL_COMMAND gives the “wrong” path - it points to …/image and I’d expect it to contain the path to …/rootfs.
> It seem the variable isreplaced before my function is executed.
> 
> I solved this by using variable ${IMAGE_ROOTFS} instead.
> 
> //Gaurang Shastri
> 
> 
> 
> On Mon, Apr 28, 2014 at 1:29 PM, Richard Leitner - SKIDATA <Richard.Leitner@skidata.com> wrote:
> > Hi everybody,
> > I've got a question regarding the binary deb/rpm packages in yocto.
> > 
> > Is there any possibility to install a binary deb/rpm package in the rootfs build without repackaging it?
> > Naively I'm for example thinking of an option in the image recipe like:
> > ADDITIONAL_PACKAGES += "/path/to/package.{deb,rpm}"
> > 
> > The point is that all possible solutions I found using recipes are extracting and then repackaging the package.
> > Due to the fact that during the repackaging all meta data and {pre,post}{rm,inst} scripts of the original package are lost this is a "no-go" for me.
> > 
> > I'd appreciate any help and hints!
> > 
> > Thanks!
> > 
> > best regards,
> > Richard
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


      parent reply	other threads:[~2014-04-29  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  7:59 Binary {deb,rpm} package install without repackaging Richard Leitner - SKIDATA
     [not found] ` <CAE_REAsfRB2=NUcb8dMPj8+=S-FYELU-x8=19+0+XE6XXgNAUQ@mail.gmail.com>
2014-04-29  7:51   ` Richard Leitner - SKIDATA [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=F7680723A1CA6840825A59020FA77064010C8577@sdexmbx1srv.skidata.net \
    --to=richard.leitner@skidata.com \
    --cc=yocto@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.