From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/377 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts makefiles Date: Wed, 10 Aug 2011 07:06:34 +0400 Message-ID: <20110810030634.GC28119@openwall.com> References: <20110809113045.GA12614@albatros> <4E4156DA.1060107@gmail.com> <20110809161142.GA2409@albatros> <4E419688.5030005@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312945604 13374 80.91.229.12 (10 Aug 2011 03:06:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2011 03:06:44 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-378-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 10 05:06:40 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qqz7t-0000Tt-K6 for gllmg-musl@lo.gmane.org; Wed, 10 Aug 2011 05:06:37 +0200 Original-Received: (qmail 11734 invoked by uid 550); 10 Aug 2011 03:06:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11726 invoked from network); 10 Aug 2011 03:06:37 -0000 Content-Disposition: inline In-Reply-To: <4E419688.5030005@gmail.com> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:377 Archived-At: Luka - On Tue, Aug 09, 2011 at 10:20:24PM +0200, Luka Mar??eti?? wrote: > On 08/09/2011 06:11 PM, Vasiliy Kulikov wrote: > >>Hunk #1 FAILED at 7. > >>1 out of 1 hunk FAILED -- saving rejects to file a/Makefile.rej > >You should use "-p1". With -p0 patch doesn't remove any prefix > >directories and tries to change files b/defines.mk and similar. > > Where should this be run? I tried root where a/ and b/ are, and also in > the b/ itself. In both cases, the same thing happens. Maybe it is me who > messed up line 7 now, I don't know. :-/ To apply a patch, you do not need two trees, and you do not need to match the top-level directory names to those seen in the patch file. Rather, you may do something like: cp -a cluts cluts-to-patch cd cluts-to-patch patch -p1 < ../patch-file or just: cd cluts patch -p1 < ../patch-file but the first approach may be preferable if you haven't yet made the determination to fully apply the patch to your tree (so you want to experiment on a copy first). Here are some instructions/examples on how to generate patches and how to apply them: http://openwall.info/wiki/how-to-make-patches http://openwall.info/wiki/john/how-to-extract-tarballs-and-apply-patches You may want to experiment with this for your own changes to cluts - just so that you know how it works - before you apply a patch provided to you by someone else. Alexander