{"id":36,"date":"2010-02-02T03:16:52","date_gmt":"2010-02-02T11:16:52","guid":{"rendered":"http:\/\/porkrind.org\/missives2\/?p=36"},"modified":"2013-05-30T01:46:15","modified_gmt":"2013-05-30T08:46:15","slug":"centos-rhel-54-kernel-source","status":"publish","type":"post","link":"https:\/\/porkrind.org\/missives\/centos-rhel-54-kernel-source\/","title":{"rendered":"CentOS (RHEL) 5.4 kernel source"},"content":{"rendered":"<p>My annoying, non-google-able problem of the day: Say you want to build the source tree for a <a href=\"http:\/\/mirror.centos.org\/centos\/5\/updates\/SRPMS\/kernel-2.6.18-164.11.1.el5.src.rpm\">RHEL\/CentOS 5.4 kernel (2.6.18-164.11.1.el5 in my case)<\/a> and you are running a recent Debian or Fedora system. You might get patch failure errors that look like this:<br \/>\n<tt><\/p>\n<pre>\nPatch #212 (linux-2.6-x86-support-rdtscp-for-gtod.patch):\n+ + \/bin\/cat \/Users\/david\/rpmbuild\/SOURCES\/linux-2.6-x86-support-rdtscp-for-gtod.patch\n\/usr\/bin\/patch -s -p1 --fuzz=0\n1 out of 7 hunks FAILED -- saving rejects to file arch\/x86_64\/kernel\/time.c.rej\nerror: Bad exit status from \/var\/tmp\/rpm-tmp.5n4IVi (%prep)\n<\/pre>\n<p><\/tt><br \/>\nThis is caused by newer versions of <tt>rpmbuild<\/tt> passing <tt>--fuzz=0<\/tt> to patch. You can fix it by putting this line in the kernel-2.6.spec file:<br \/>\n<tt><\/p>\n<pre>\n%define _default_patch_fuzz 2\n<\/pre>\n<p><\/tt><\/p>\n<p>That&#8217;s it. I just saved you 8 hours of screwing around and looking for pre-patched kernels sources. <img src='http:\/\/porkrind.org\/missives2\/wordpress\/wp-includes\/images\/smilies\/icon_wink.gif' alt=';-)' class='wp-smiley' \/> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Say you want to build the source tree for a <a href=\"http:\/\/mirror.centos.org\/centos\/5\/updates\/SRPMS\/kernel-2.6.18-164.11.1.el5.src.rpm\">RHEL\/CentOS 5.4 kernel (2.6.18-164.11.1.el5 in my case)<\/a> and you are running a recent Debian or Fedora system. You might get patch failure errors.<br \/>\n&#8230; Just add this to fix it:<br \/>\n<tt>%define _default_patch_fuzz 2<\/tt><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-software"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":2,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":394,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/36\/revisions\/394"}],"wp:attachment":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}