Created
May 29, 2014 23:02
-
-
Save ArthurN/6ac227eb21e6f0627f18 to your computer and use it in GitHub Desktop.
Getting Source of a Package on CentOS, Applying Patch, & Rebuilding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://blog.foppiano.org/2007/12/11/installing-source-package-with-yum/ | |
# http://wiki.centos.org/HowTos/RebuildSRPM | |
cd /tmp | |
sudo yumdownloader --source zbar | |
sudo yum-builddep zbar-blah-blah.rpm | |
rpm -ivh packagename-version.src.rpm | |
cd ~/rpmbuild | |
copy patch to SOURCES | |
cd SPECS | |
modify the .spec to include the patch: | |
Patch4: zbar_fix_jpeg.patch | |
... | |
%prep | |
%setup -q | |
%patch0 -p1 | |
%patch1 -p1 | |
%patch2 -p1 | |
%patch3 -p1 | |
%patch4 -p1 | |
... | |
%build | |
Finally: | |
rpmbuild -ba packagename.spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment