Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ArthurN
Created May 29, 2014 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArthurN/6ac227eb21e6f0627f18 to your computer and use it in GitHub Desktop.
Save ArthurN/6ac227eb21e6f0627f18 to your computer and use it in GitHub Desktop.
Getting Source of a Package on CentOS, Applying Patch, & Rebuilding
# 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