Daily Archives: March 13, 2016

RPM and RPM source code

src.rpm contains both patchs and original source code.
rpmbuild and some related rpm command will not be introduced in this article.
some important file such as file.spec in rpm configuration will be ignored as well

It only talk about how to uncompress source code and patch source code and build the final binary.

take ftp-0.17-65.fc20.src.rpm for example.

1. uncompress rpm to source code folder

rpm2cpio ftp-0.17-65.fc20.src.rpm | cpio -idmv --no-absolute-filenames

2. patch patch file

patch -p1 < *.patch

3. build ftp project using ./configure && make.