Skip to contentSkip to conversation

Installing an rpm without repackaging

DISCUSSION Alexandru Nicolae 2 participants 2 messages Jan 30, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello guys,
I know that this have been discussed before, but I couldn't find a solution that works for me.
I'm trying to install a rpm package, but every approach I've taken seems wrong. In the ideal case I would like a recipe that just copies the rpm somewhere on the rootfs and then execute a post-process command to install that rpm. Something like:
SRC_URI = "file://net-snmp-${PV}.rpm"

FILE_${PN} = "/"ROOTFS_POSTPROCESS_COMMAND += "${STAGING_BINDIR_NATIVE}/rpm -ivh --root=${IMAGE_ROOTFS}/ /*.rpm"

I tried this sollution but I'm not able to copy the rpm as it is on the rootfs.
I have also tried using the bin_package class and I was able to fully bake my image, but it seems that the rpm is just unpacked on the rootfs, not installed as I expected. Can you please help me with a working example of a recipe?
Thank you,Alex

#2 lore raw

So first, You can't put ROOTFS_POSTPROCESS_COMMAND inside a recipe as it needs to be inside an image recipe specifically.

You generally can't take an RPM from somewhere else and inject it into OE to use directly. One good reason is that the package manager used is configurable, so what do you want to happen if you set PACKAGE_CLASSES to package_ipk and rpm isn't available?

Another reason is that any dependencies inside the RPM are most likely based on another distribution, so most likely won't be resolvable. Any postinst scripts will be assuming the target distro, and most likely won't work.

The solution for arbitrary packages from other distribution is to use bin_package to unpack it, then use FILES_ to put it back into a Yocto-native package of your choice.

Ross

Quoted 37 lines · Alexandru Nicolae

Hello guys,

I know that this have been discussed before, but I couldn't find a solution that works for me.

I'm trying to install a rpm package, but every approach I've taken seems wrong. In the ideal case I would like a recipe that just copies the rpm somewhere on the rootfs and then execute a post-process command to install that rpm. Something like:

SRC_URI = "file://net-snmp-${PV}.rpm"

FILE_${PN} = "/"
ROOTFS_POSTPROCESS_COMMAND += "${STAGING_BINDIR_NATIVE}/rpm -ivh --root=${IMAGE_ROOTFS}/ /*.rpm"

I tried this sollution but I'm not able to copy the rpm as it is on the rootfs.

I have also tried using the *bin_package *class and I was able to fully bake my image, but it seems that the rpm is just unpacked on the rootfs, not installed as I expected.

Can you please help me with a working example of a recipe?

Thank you,
Alex

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto