I am using a homegrown customized Linux that is a derivative of Oracle Linux 6 but I need to pickup all the patches from the lksctp-tools-1.0.17-2.el7.src.rpm and patch in my lksctp-tools-1.0.11-1 rpm package.
I found there are two new patches in 1.0.17-2.el7 version:
lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patchlksctp-tools-1.0.6-libdir.patch
I copied the above patches in the patches directory where I built a build environment and during building the new RPM I face hunk failed for the last patch:
Patch #5 (lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patch):+ /bin/cat /workdirs/BuildUser/build/RPM/SOURCES/lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patch+ /usr/bin/patch -p1 --fuzz=0patching file src/apps/sctp_status.c+ echo 'Patch #6 (lksctp-tools-1.0.6-libdir.patch):'Patch #6 (lksctp-tools-1.0.6-libdir.patch):+ /bin/cat /workdirs/BuildUser/build/RPM/SOURCES/lksctp-tools-1.0.6-libdir.patch+ /usr/bin/patch -p1 --fuzz=0patching file src/withsctp/withsctp.inHunk #1 FAILED at 1.1 out of 1 hunk FAILED -- saving rejects to file src/withsctp/withsctp.in.rejerror: Bad exit status from /workdirs/BuildUser/tmp/rpm-tmp.nJHnek (%prep)
I have mentioned the patches in my specfile:
Name: lksctp-toolsVersion: %{pack_version}Release: ~RELEASE~License: LGPLGroup: System Environment/LibrariesURL: http://lksctp.sourceforge.netSource0: %{name}-%{file_version}.tar.gzPatch0: lksctp-tools-linux-3.4.38-sctp.patchPatch1: lksctp-tools-sctp-per-association-stats.patchPatch2: lksctp-tools-fix-deprecated-SO_RCVBUF-SO_SNDBUF-testcase.patchPatch3: lksctp-tools-Avoid-using-file-descriptor-0-to-get-ENOTSOCK.patchPatch4: lksctp-tools-test_fragments-increase-message-size-since-it-succeeds.patchPatch5: lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patchPatch6: lksctp-tools-1.0.6-libdir.patchBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootBuildRequires: gccBuildRequires: libtool, automake, autoconf%prep%setup -q -n %{name}-%{file_version}%patch0 -p1%patch1 -p1%patch2 -p1%patch3 -p1%patch4 -p1%patch5 -p1%patch6 -p1