Alex Rivera | Logout

How to "repackage" a RPM file for example cpio2rpm without installing the RPM?

Asked 2012-05-14T09:36:53.597
11
  1. I'm able to extract files from a RPM file, but how do I "rebuild" it, for example cpio2rpm?
  2. I have extracted RPM file using following command. rpm2cpio theFileName.rpm | cpio –idmv
  3. I have to modify the few web application files like *.php, *.html or .js. These files don’t require any source recompilation. So I would like to replaces or change these files with modification without rebuilding rpm. Since, I need to do this for multiple platforms like Redhat Linux and SUSE, and multiple architecture like 32 and 64 bit OS.
  4. I am expecting to do these changes on only on system and without rebuild rpm and there would not be have target system architecture dependency (like i386, 64).
  5. I am not looking like command rpmbuild –rebuild the.src.rpm since, I don’t have source. I need to be rebuild binary .RPM file(not source .rpm)
  6. I want to do this without source and platform or architecture independent and without using spec file if possible.

    Any buddy, could you please suggest any solution or any free tools.

    Thank you to all whoever spends time to read and reply to my thread.

Edit
Report

1 Answer

1

You can repackage an installed RPM (including modified files) using rpmrebuild. http://rpmrebuild.sourceforge.net/

Obviously your binaries (if any) would have to be platform/architecture independent to work on all the OS flavors you're hoping for, but it sounds like if they're just web files that shouldn't be a problem.

answered 2012-05-24T22:00:48.290

Your Answer