All of lore.kernel.org
 help / color / mirror / Atom feed
* How to Install Third party rpm packages
@ 2019-02-22 15:17 chaitanya cherukuri
  2019-02-22 15:47 ` Stephen Lawrence
  0 siblings, 1 reply; 8+ messages in thread
From: chaitanya cherukuri @ 2019-02-22 15:17 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Hello All,

I 'm new to YOCTO. I am using YOCTO version 2.5.
I would like to install third party rpm package to my image. Currently I'm
installing rpm package on my target machine using rpm command
  rpm -ivh --prefix=/opt/ example.rpm

Is there any way that I can do this in a recipe, so that my final image has
the rpm installed.

Any help would be appreciated.

Thank you,
Chaithu

[-- Attachment #2: Type: text/html, Size: 1643 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-22 15:17 How to Install Third party rpm packages chaitanya cherukuri
@ 2019-02-22 15:47 ` Stephen Lawrence
  2019-02-22 22:10   ` chaitanya cherukuri
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Lawrence @ 2019-02-22 15:47 UTC (permalink / raw)
  To: chaitanya cherukuri; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

Hi,

Take a look at the section 3.2 “Customizing Images” in the Development Tasks Manual. You can find it and the other manuals here:
https://www.yoctoproject.org/docs/

If you are building the package in Yocto as well the simplest is to add it to the image with IMAGE_INSTALL, but the manual also discusses other methods such as runtime package management.

Select Yocto Project 2.5.x from the drop down at the top of the page to get the manuals for that version.

Regards

Steve

From: yocto-bounces@yoctoproject.org <yocto-bounces@yoctoproject.org> On Behalf Of chaitanya cherukuri
Sent: 22 February 2019 15:17
To: yocto@yoctoproject.org
Subject: [yocto] How to Install Third party rpm packages

Hello All,

I 'm new to YOCTO. I am using YOCTO version 2.5.
I would like to install third party rpm package to my image. Currently I'm installing rpm package on my target machine using rpm command
  rpm -ivh --prefix=/opt/ example.rpm

Is there any way that I can do this in a recipe, so that my final image has the rpm installed.

Any help would be appreciated.

Thank you,
Chaithu



[-- Attachment #2: Type: text/html, Size: 6717 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-22 15:47 ` Stephen Lawrence
@ 2019-02-22 22:10   ` chaitanya cherukuri
  2019-02-22 22:57     ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: chaitanya cherukuri @ 2019-02-22 22:10 UTC (permalink / raw)
  To: Stephen Lawrence; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

Hi Stephen,

Thank you for pointing the documentation.
In custom image recipe I will add IMAGE_INSTALL += "custom-package.rpm" but
how do I add this "custom-package.rpm" to my YOCTO build system.
Do I need to write a recipe where I fetch this package?

I apologize for the dumb questions.

Thanks,
Chaitanya


On Fri, Feb 22, 2019 at 10:47 AM Stephen Lawrence <
stephen.lawrence@renesas.com> wrote:

> Hi,
>
>
>
> Take a look at the section 3.2 “Customizing Images” in the Development
> Tasks Manual. You can find it and the other manuals here:
>
> https://www.yoctoproject.org/docs/
>
>
>
> If you are building the package in Yocto as well the simplest is to add it
> to the image with IMAGE_INSTALL, but the manual also discusses other
> methods such as runtime package management.
>
>
>
> Select Yocto Project 2.5.x from the drop down at the top of the page to
> get the manuals for that version.
>
>
>
> Regards
>
>
>
> Steve
>
>
>
> *From:* yocto-bounces@yoctoproject.org <yocto-bounces@yoctoproject.org> *On
> Behalf Of *chaitanya cherukuri
> *Sent:* 22 February 2019 15:17
> *To:* yocto@yoctoproject.org
> *Subject:* [yocto] How to Install Third party rpm packages
>
>
>
> Hello All,
>
>
>
> I 'm new to YOCTO. I am using YOCTO version 2.5.
>
> I would like to install third party rpm package to my image. Currently I'm
> installing rpm package on my target machine using rpm command
>
>   rpm -ivh --prefix=/opt/ example.rpm
>
>
>
> Is there any way that I can do this in a recipe, so that my final image
> has the rpm installed.
>
>
>
> Any help would be appreciated.
>
>
>
> Thank you,
>
> Chaithu
>
>
>
>
>


-- 
--
Chaitanya

[-- Attachment #2: Type: text/html, Size: 6457 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-22 22:10   ` chaitanya cherukuri
@ 2019-02-22 22:57     ` Burton, Ross
  2019-02-25  0:45       ` chaitanya cherukuri
  0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2019-02-22 22:57 UTC (permalink / raw)
  To: chaitanya cherukuri; +Cc: yocto

On Fri, 22 Feb 2019 at 22:16, chaitanya cherukuri
<ccvk.chaitanya@gmail.com> wrote:
> Do I need to write a recipe where I fetch this package?

Yes, write a recipe that has SRC_URI as the original RPM, then you can
write a do_install() to put the files in the right place, package it
correctly, and so on.

Just using the RPM as-is most likely won't work because the chances
are your Yocto distribution isn't binary-compatible at the packaging
level with whatever distribution the RPM was built for.

Ross


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-22 22:57     ` Burton, Ross
@ 2019-02-25  0:45       ` chaitanya cherukuri
  2019-02-25 10:09         ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: chaitanya cherukuri @ 2019-02-25  0:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

Hi,

Thank you for the clarification.
In do_install(), I used rpm2cpio.sh to extract the rpm and then copied the
rpm contents in the right place.
        $rpm2cpio.sh *.rpm | cpio -idmv
I hope this is the right way to handle RPM packages.

RPM has a post-installation script that I need to handle. This script
executes after the installation of RPM. Could I know what is the efficient
way to run the script?

Thank you,
Chaitanya




On Fri, Feb 22, 2019 at 5:57 PM Burton, Ross <ross.burton@intel.com> wrote:

> On Fri, 22 Feb 2019 at 22:16, chaitanya cherukuri
> <ccvk.chaitanya@gmail.com> wrote:
> > Do I need to write a recipe where I fetch this package?
>
> Yes, write a recipe that has SRC_URI as the original RPM, then you can
> write a do_install() to put the files in the right place, package it
> correctly, and so on.
>
> Just using the RPM as-is most likely won't work because the chances
> are your Yocto distribution isn't binary-compatible at the packaging
> level with whatever distribution the RPM was built for.
>
> Ross
>


-- 
--
Chaitanya

[-- Attachment #2: Type: text/html, Size: 3394 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-25  0:45       ` chaitanya cherukuri
@ 2019-02-25 10:09         ` Burton, Ross
  2019-02-25 12:13           ` chaitanya cherukuri
  0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2019-02-25 10:09 UTC (permalink / raw)
  To: chaitanya cherukuri; +Cc: yocto

On Mon, 25 Feb 2019 at 00:45, chaitanya cherukuri
<ccvk.chaitanya@gmail.com> wrote:
> Thank you for the clarification.
> In do_install(), I used rpm2cpio.sh to extract the rpm and then copied the rpm contents in the right place.
>         $rpm2cpio.sh *.rpm | cpio -idmv
> I hope this is the right way to handle RPM packages.

Put the RPM in SRC_URI and bitbake will unpack it for you.

> RPM has a post-installation script that I need to handle. This script executes after the installation of RPM. Could I know what is the efficient way to run the script?

Easiest way is to just copy what it does into the recipe.  Assuming
that a postinst script for Fedora will work on your Yocto distribution
is a risky move, just like you wouldn't expect the script to run
without errors on Debian.

Ross


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-25 10:09         ` Burton, Ross
@ 2019-02-25 12:13           ` chaitanya cherukuri
  2019-02-25 12:15             ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: chaitanya cherukuri @ 2019-02-25 12:13 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

On Mon, Feb 25, 2019 at 5:09 AM Burton, Ross <ross.burton@intel.com> wrote:

> On Mon, 25 Feb 2019 at 00:45, chaitanya cherukuri
> <ccvk.chaitanya@gmail.com> wrote:
> > Thank you for the clarification.
> > In do_install(), I used rpm2cpio.sh to extract the rpm and then copied
> the rpm contents in the right place.
> >         $rpm2cpio.sh *.rpm | cpio -idmv
> > I hope this is the right way to handle RPM packages.
>
> Put the RPM in SRC_URI and bitbake will unpack it for you.
> Thank you this was helpful..
> > RPM has a post-installation script that I need to handle. This script
> executes after the installation of RPM. Could I know what is the efficient
> way to run the script?
>
> Easiest way is to just copy what it does into the recipe.  Assuming
> that a postinst script for Fedora will work on your Yocto distribution
> is a risky move, just like you wouldn't expect the script to run
> without errors on Debian.
> If I understand correctly, you want to me copy what script is doing in
> do_install(). I was thinking to  add the script has startup to a YOCTO
> Image, so that I don't need to copy anything manually and let the script to
> its job. This is how I am doing it in do_install()

         install -m 0755 ${S}/startup-script ${D}${sysconfdir}/init.d/
ln -sf ../init.d/startup-script ${D}${sysconfdir}/rcS.d/S90startup-script

> I don't know if there are any downfall by doing this way. If I add this
> script as startup script does this get executed on device reset?

Ross
>

Chaitanya

-- 
--
Chaitanya

[-- Attachment #2: Type: text/html, Size: 3564 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Install Third party rpm packages
  2019-02-25 12:13           ` chaitanya cherukuri
@ 2019-02-25 12:15             ` Burton, Ross
  0 siblings, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2019-02-25 12:15 UTC (permalink / raw)
  To: chaitanya cherukuri; +Cc: yocto

On Mon, 25 Feb 2019 at 12:14, chaitanya cherukuri
<ccvk.chaitanya@gmail.com> wrote:
>> If I understand correctly, you want to me copy what script is doing in do_install(). I was thinking to  add the script has startup to a YOCTO Image, so that I don't need to copy anything manually and let the script to its job. This is how I am doing it in do_install()
>
>          install -m 0755 ${S}/startup-script ${D}${sysconfdir}/init.d/
> ln -sf ../init.d/startup-script ${D}${sysconfdir}/rcS.d/S90startup-script

You'll need to do the install yourself, but the symlink generation
should be done with the update-rcd class.

Ross


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-02-25 12:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 15:17 How to Install Third party rpm packages chaitanya cherukuri
2019-02-22 15:47 ` Stephen Lawrence
2019-02-22 22:10   ` chaitanya cherukuri
2019-02-22 22:57     ` Burton, Ross
2019-02-25  0:45       ` chaitanya cherukuri
2019-02-25 10:09         ` Burton, Ross
2019-02-25 12:13           ` chaitanya cherukuri
2019-02-25 12:15             ` Burton, Ross

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.