LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rpmbuild force to use cpio.gz on RHEL 5.3 (https://www.linuxquestions.org/questions/linux-newbie-8/rpmbuild-force-to-use-cpio-gz-on-rhel-5-3-a-838973/)

Andrey0 10-19-2010 01:26 AM

rpmbuild force to use cpio.gz on RHEL 5.3
 
Hi,

I have RHEL 5.3.

I am trying to build a e1000 network card driver rpm with particular requirement to have cpio.gz inside rpm.

But after i build my rpm driver it has cpio.lzma inside.
I simply build using command from the readme: rpmbuild -tb *.tar.gz.

I have googled and found that from around 5.0 RHEL includes lzma and uses it as a default setting. Is there any way to force to use cpio.gz or somehow repackage my rpm correctly?

I have searched through makefile and other files but was not able to find a clue.

Thank you,
Andrey

unSpawn 10-19-2010 10:01 AM

Quote:

Originally Posted by Andrey0 (Post 4132130)
I have googled and found that from around 5.0 RHEL includes lzma and uses it as a default setting.

Where does it say that? AFAIK using XZ / LZMA started with Fedora 11 or 12. Don't you mean RHEL6? AFAIK RHEL5 still uses gzip compression if I look at /usr/lib/rpm/brp-compress (which is called at the end of the rpmbuild process) and even though a patch was applied (http://rpm.org/ticket/84)?

Andrey0 10-19-2010 06:11 PM

Quote:

Originally Posted by unSpawn (Post 4132550)
Where does it say that? AFAIK using XZ / LZMA started with Fedora 11 or 12. Don't you mean RHEL6? AFAIK RHEL5 still uses gzip compression if I look at /usr/lib/rpm/brp-compress (which is called at the end of the rpmbuild process) and even though a patch was applied (http://rpm.org/ticket/84)?

Thank you, I had a look at my brp-compress and I have no patch applied, hence as you mentioned it should use cpio.gz.

The way i originally discovered this is I extracted the rpm using 7-zip on Windows after building it. I guess it's not best way to check, but still when I extract rpm's from RHEL media with same 7-zip they come up as cpio.gz, however when I extract this particular rpm it shows up as cpio.lzma.

So rpm I built is still seems to be different in some way from the normal ones which come on media...

unSpawn 10-19-2010 06:24 PM

Quote:

Originally Posted by Andrey0 (Post 4132936)
I guess it's not best way to check

No, it isn't.


Quote:

Originally Posted by Andrey0 (Post 4132936)
when I extract this particular rpm it shows up as cpio.lzma.

Where did you get that specific package from? SuSE? Fedora? Vendor? Got a download link?

Andrey0 10-19-2010 07:49 PM

Quote:

Originally Posted by unSpawn (Post 4132949)
No, it isn't.



Where did you get that specific package from? SuSE? Fedora? Vendor? Got a download link?

its this network adapter driver:
http://downloadcenter.intel.com/Deta...15817&lang=eng

trying to slipstream into esx installer...

thank you again!

unSpawn 10-20-2010 11:21 AM

Here is the end of me doing 'rpmbuild -tb e1000e-1.2.10.tar.gz':
Code:

Provides: e1000e
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
(..)

on Centos5.5 which has the following "rpmlib" capabilities:
Code:

Features supported by rpmlib:
    rpmlib(VersionedDependencies) = 3.0.3-1
    rpmlib(CompressedFileNames) = 3.0.4-1
    rpmlib(PayloadIsBzip2) = 3.0.5-1
    rpmlib(PayloadFilesHavePrefix) = 4.0-1
    rpmlib(ExplicitPackageProvide) = 4.0-1
    rpmlib(HeaderLoadSortsTags) = 4.0.1-1
    rpmlib(ScriptletInterpreterArgs) = 4.0.3-1
    rpmlib(PartialHardlinkSets) = 4.0.4-1
    rpmlib(ConcurrentAccess) = 4.1-1
    rpmlib(BuiltinLuaScripts) = 4.2.2-1

You'll notice there are NO lines stating:
Code:

    rpmlib(PayloadIsLzma) = 4.4.2-1
    rpmlib(PayloadIsXz) = 5.2-1

You can check these capabilities with 'rpm --showrc | grep rpmlib'.

Andrey0 10-20-2010 06:01 PM

thank you, see exactly same on my box.

i think I found what the issue actually is, when I do
rpm2cpio *.rmp | cpio -imv

on the driver file which comes with the media i'm trying to slipstream, i get different folder structure and different types of files...

i get:
1 mf file (simply cp file to right place)
1 xml file (with details of the driver, vendor ID's and names)
and 1 o file which i guess is actual driver file...

so as I understand I will have to create exact folder/file structure for my driver, specfile, then get it into tar.gz and do rpmbuild again :)
p.s. maybe there is some very simple way to create rpm of 3 files?

unSpawn 10-21-2010 01:19 PM

Quote:

Originally Posted by Andrey0 (Post 4134073)
so as I understand I will have to create exact folder/file structure for my driver, specfile, then get it into tar.gz and do rpmbuild again :)

Building it from the extracted contents of your package is not how RPM works. The best way would be to build the package from source. But maybe I don't understand what directory structure you exactly need.


Quote:

Originally Posted by Andrey0 (Post 4134073)
maybe there is some very simple way to create rpm of 3 files?

Can you run 'rpm -qpl' on your RPM package and post it here?

Andrey0 10-21-2010 06:44 PM

Quote:

Originally Posted by unSpawn (Post 4135056)
Building it from the extracted contents of your package is not how RPM works. The best way would be to build the package from source. But maybe I don't understand what directory structure you exactly need.

Can you run 'rpm -qpl' on your RPM package and post it here?

i see...

rpm -qpl vmware-esx-drivers-net-igb-400.1.3.19.12-1.0.4.164009.x86_64.rpm
/etc/vmware/init/manifests/vmware-igb.mf
/etc/vmware/pciid/igb.xml
/usr/lib/vmware/vmkmod/igb.o

I also downloaded another ISO package from the website for another NIC, looks exactly same,

rpm -qpl vmware-esx-drivers-net-ixgbe-400.2.0.62.4.8-1.0.4.164009.x86_64
/etc/vmware/init/manifests/vmware-ixgbe.mf
/etc/vmware/pciid/ixgbe.xml
/usr/lib/vmware/vmkmod/ixgbe.o

but I found there is a source folder with makefile and xml file
can be downloaded from here:
http://downloads.vmware.com/d/detail...RqKipiZHdlZQ==

So if I will create the xml file then modify makefile from the driver I want to build to the makefile contained on CD i might have some luck?

unSpawn 10-22-2010 12:51 AM

If you read in the ISO the /vmware-esx-drivers-net-ixgbe_400.2.0.62.4.8-1.0.4.164009.265875.iso/ISO9660/doc/README it explains how to add drivers to ESX?

Andrey0 10-22-2010 07:18 AM

Quote:

Originally Posted by unSpawn (Post 4135520)
If you read in the ISO the /vmware-esx-drivers-net-ixgbe_400.2.0.62.4.8-1.0.4.164009.265875.iso/ISO9660/doc/README it explains how to add drivers to ESX?

correct, the problem is these drivers are not for the hardware I do have (need drivers from Intel site) and I can't install ESX unless I prep required drivers in rpm of same format as in these ISO's...

VMware made it this way, so people don't install ESX on non supported hardware (NIC is one of primary requirements). Unfortunately even though I did order a supported hardware I received something very different with no choice of swap, so have to make it to work or throw it away...:)

but you set me on right track, so hopefully will figure it out....

unSpawn 10-25-2010 04:51 PM

Quote:

Originally Posted by Andrey0 (Post 4135800)
correct, the problem is these drivers are not for the hardware I do have (need drivers from Intel site) and I can't install ESX unless I prep required drivers in rpm of same format as in these ISO's...

So it's a chicken and egg thing unless you have a spare host you can temporarily install ESX on for the sole purpose of addring drivers it seems...


All times are GMT -5. The time now is 07:37 AM.