Extracting an rpm to a local directory
Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 731
Deprecated: ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead in /project/www/devpit.org/mediawiki-1.23.8/includes/cache/MessageCache.php on line 739
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /project/www/devpit.org/mediawiki-1.23.8/includes/parser/Preprocessor_DOM.php on line 754
Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /project/www/devpit.org/mediawiki-1.23.8/includes/GlobalFunctions.php on line 2409
From Devpit
Use rpm2cpio
rpm2cpio <rpm-name> | cpio -ivd
Use rpm unpack an srpm to a local directory
- If you want an rpm to be built in a hierarchy other than /usr/src/ add the following to your .rpmmacros file:
«user@host»: vim ~/.rpmmacros %_topdir /home/$USER/packages
- Then create the appropriate directory structure:
«user@host»: mkdir -p /home/$USER/packages/BUILD «user@host»: mkdir -p /home/$USER/packages/RPMS «user@host»: mkdir -p /home/$USER/packages/SRPMS «user@host»: mkdir -p /home/$USER/packages/SOURCES «user@host»: mkdir -p /home/$USER/packages/SPECS
- Then run rpmbuild to unpack the source rpm and apply the patches:
«user@host»: cd /home/$USER/packages «user@host»: rpmbuild -bp SPECS/<package>.spec --nodeps > <package>.log
Note: --nodeps tells rpm to ignore the package dependencies. Package dependencies aren't necessary for simply applying patches.
- Now /home/$USER/packages/BUILD/<package> should have the unpacked sources with the patches applied.