Re: Facing problem while patching LTTng 0.9.5 with linux kernel 2.6.21

Mathieu Desnoyers <[email protected]> Thu, 26 Jul 2007 08:53:03 -0400
Newsgroups gmane.linux.kernel.tracing
Message-ID <20070726125303.GA28556@Krystal>
In /scratch/sreddy/linux-2.6.21-kernel, do:

for a in `cat /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v "^#"`; do patch -p1 < lttng-0.9.5/$a; done

Or install quilt.

Mathieu


* Srinivasa Reddy ([email protected]) wrote:
> Hi Daniel,
> This time I have given the command correctly. But why it's saying "No
> such file or directory" message for each and every file..
> 
> All the files are there in that lttng-0.9.5 directory.
> 
> Please see the below meesages:
> 
> 
> [sreddy@l-blr-sddeg03 linux-2.6.21]$ for a in `cat
> /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v "^#"`;
> do patch -p1 < $a; done
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-alpha.patch:
> No such file or directory
> bash: atomich-complete-atomic_long-operations-in-asm-generic.patch: No
> such file or directory
> bash: atomich-i386-type-safety-fix.patch: No such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-ia64.patch: No
> such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-mips.patch: No
> such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-parisc.patch:
> No such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-powerpc.patch:
> No such file or directory
> bash:
> atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-powerpc-fix.patch:
> No such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-sparc64.patch:
> No such file or directory
> bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-x86_64.patch:
> No such file or directory
> bash:
> atomich-atomic_add_unless-as-inline-remove-systemh-atomich-circular-depe
> ndency.patch: No such file or directory
> bash: local_t-architecture-independant-extension.patch: No such file or
> directory
> bash: local_t-alpha-extension.patch: No such file or directory
> bash: local_t-i386-extension.patch: No such file or directory
> bash: local_t-ia64-extension.patch: No such file or directory
> bash: local_t-mips-extension.patch: No such file or directory
> bash: local_t-parisc-cleanup.patch: No such file or directory
> bash: local_t-powerpc-extension.patch: No such file or directory
> bash: local_t-sparc64-cleanup.patch: No such file or directory
> bash: local_t-x86_64-extension.patch: No such file or directory
> bash: linux-kernel-markers-kconfig-menus.patch: No such file or
> directory
> bash: linux-kernel-markers-architecture-independant-code.patch: No such
> file or directory
> bash:
> linux-kernel-markers-architecture-independant-code-markers-document-the-
> linux-markerh-header.patch: No such file or directory
> bash:
> linux-kernel-markers-architecture-independant-code-markers-add-documenta
> tion-to-the-modulec-marker-functions.patch: No such file or directory
> bash: linux-kernel-markers-powerpc-optimization.patch: No such file or
> directory
> bash:
> linux-kernel-markers-powerpc-optimization-markers-changes-to-the-powerpc
> -marker-header.patch: No such file or directory
> bash: linux-kernel-markers-i386-optimization.patch: No such file or
> directory
> bash: linux-kernel-markers-i386-optimization-fix.patch: No such file or
> directory
> bash:
> linux-kernel-markers-i386-optimization-markers-document-the-i386-marker-
> header.patch: No such file or directory
> bash: markers-add-instrumentation-markers-menus-to-avr32.patch: No such
> file or directory
> bash: linux-kernel-markers-non-optimized-architectures.patch: No such
> file or directory
> bash:
> markers-alpha-and-avr32-supportadd-alpha-markerh-add-arm26-markerh.patch
> : No such file or directory
> bash: linux-kernel-markers-documentation.patch: No such file or
> directory
> bash:
> linux-kernel-markers-documentation-markers-update-documentation.patch:
> No such file or directory
> bash:
> linux-kernel-markers-documentation-fix-typo-and-use-array_size.patch: No
> such file or directory
> bash: markers-define-the-linker-macro-extra_rwdata.patch: No such file
> or directory
> bash: markers-use-extra_rwdata-in-architectures.patch: No such file or
> directory
> bash: markers-instrument-kernelh.patch: No such file or directory
> bash: patch01-lttng-hotfix.diff: No such file or directory
> bash: patch36-lttng-atomic-avr32.diff: No such file or directory
> bash: patch59-lttng-facilities.diff: No such file or directory
> bash: patch60-lttng-timestamp.diff: No such file or directory
> bash: patch61-lttng-core-header.diff: No such file or directory
> bash: patch62-lttng-core.diff: No such file or directory
> bash: patch63-lttng-tracer-header.diff: No such file or directory
> bash: patch64-lttng-tracer.diff: No such file or directory
> bash: patch65-lttng-transport.diff: No such file or directory
> bash: patch66-lttng-netlink-control.diff: No such file or directory
> bash: patch67-lttng-userspace-tracing.diff: No such file or directory
> bash: patch68-lttng-serialize.diff: No such file or directory
> bash: patch69-lttng-test-tsc.diff: No such file or directory
> bash: patch70-lttng-instrumentation-arm.diff: No such file or directory
> bash: patch71-lttng-instrumentation-i386.diff: No such file or directory
> bash: patch72-lttng-instrumentation-mips.diff: No such file or directory
> bash: patch73-lttng-instrumentation-powerpc.diff: No such file or
> directory
> bash: patch74-lttng-instrumentation-ppc.diff: No such file or directory
> bash: patch75-lttng-instrumentation-x86_64.diff: No such file or
> directory
> bash: patch76-lttng-instrumentation-m68k.diff: No such file or directory
> bash: patch77-lttng-instrumentation-m68knommu.diff: No such file or
> directory
> bash: patch78-lttng-instrumentation-sparc.diff: No such file or
> directory
> bash: patch79-lttng-instrumentation-s390.diff: No such file or directory
> bash: patch80-lttng-instrumentation-sh.diff: No such file or directory
> bash: patch81-lttng-instrumentation-sh64.diff: No such file or directory
> bash: patch82-lttng-instrumentation-alpha.diff: No such file or
> directory
> bash: patch83-lttng-instrumentation.diff: No such file or directory
> bash: patch84-lttng-instrumentation-markers.splitok.diff: No such file
> or directory
> bash: patch85-lttng-probes.diff: No such file or directory
> bash: patch86-lttng-statedump.diff: No such file or directory
> bash: patch87-lttng-build.tosplit.diff: No such file or directory
> 
> 
> Regards,
> Srinivas.
> 
> -----Original Message-----
> From: Daniel Zinn [mailto:[email protected]] 
> Sent: Thursday, July 26, 2007 12:28 PM
> To: [email protected]
> Cc: Srinivasa Reddy; Mathieu Desnoyers; [email protected]
> Subject: Re: [Ltt-dev] Facing problem while patching LTTng 0.9.5 with
> linux kernel 2.6.21
> 
> Hi Srinivas,
> 
> the error you see is coming from the bash. You missed the for loop. Try
> the 
> following (still all in one line).
> 
> [sreddy@l-blr-sddeg03 linux-2.6.21]$ 
>   for a in `cat /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series |
> 
>   grep -v "^#"`; do patch -p1 < $a; done
> 
> Best,
>   Daniel
> 
> you wrote:
> > Hi Mathieu,
> >
> > Still I am not able to execute that command.
> >
> > Please see below messages...
> >
> > [sreddy@l-blr-sddeg03 linux-2.6.21]$ `cat
> > /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v
> "^#"`;
> > do patch -p1 < $a; done
> > bash: syntax error near unexpected token `do'
> >
> > [sreddy@l-blr-sddeg03 linux-2.6.21]$ `cat
> > /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v
> "^#"`;
> > patch -p1 < $a; done
> > bash: syntax error near unexpected token `done'
> >
> > [sreddy@l-blr-sddeg03 linux-2.6.21]$ `cat
> > /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v
> "^#"`;
> > patch -p1 < $a;
> > bash: atomich-add-atomic64-cmpxchg-xchg-and-add_unless-to-alpha.patch:
> > command not found
> > bash: $a: ambiguous redirect
> > [sreddy@l-blr-sddeg03 linux-2.6.21]$
> >
> >
> > I tried by removing "do" and "done" also.. But still some problem is
> > there with that command.
> >
> > Please let me know about this.
> >
> > Regards,
> > Srinivas.
> >
> > -----Original Message-----
> > From: Mathieu Desnoyers [mailto:[email protected]]
> > Sent: Wednesday, July 25, 2007 9:06 PM
> > To: Srinivasa Reddy
> > Cc: [email protected]
> > Subject: Re: Facing problem while patching LTTng 0.9.5 with linux
> kernel
> > 2.6.21
> >
> > * Srinivasa Reddy ([email protected]) wrote:
> > > Hi Mathieu,
> > >
> > > [Mathieu]You should either use quilt, or issue something like:
> > >
> > > for a in `cat /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series
> |
> > > grep -v "^#"`; do patch -p1 < $a; done
> >
> > All in one line, with the backquotes (` `)
> >
> > for a in `cat /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series |
> > grep -v "^#"`; do patch -p1 < $a; done
> >
> > > [Srinivas]  I have used that command and see below for the response.
> > >
> > > When I press the "Enter" key after entering that command, it's
> giving
> > > ">" symbol. I think it's still expecting some input.
> > >
> > >
> > > [sreddy@l-blr-sddeg03 linux-2.6.21]$ cat
> > > /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series | grep -v
> >
> > "^#"';
> >
> > > do patch -p1 < $a; done
> > >
> > >
> > >
> > >
> > >
> > > Is there anything in the command what I have entered?
> > >
> > > Please let me know.
> > >
> > > -Srinivas.
> > >
> > > -----Original Message-----
> > > From: Mathieu Desnoyers [mailto:[email protected]]
> > > Sent: Wednesday, July 25, 2007 6:25 PM
> > > To: Srinivasa Reddy
> > > Cc: [email protected]
> > > Subject: Re: Facing problem while patching LTTng 0.9.5 with linux
> >
> > kernel
> >
> > > 2.6.21
> > >
> > > * Srinivasa Reddy ([email protected]) wrote:
> > > > Hi Mathieu,
> > > >
> > > >
> > > >
> > > > I am facing some problems while patching the LTTng version 0.9.5
> >
> > with
> >
> > > > Linux kernel 2.6.21 version.
> > > >
> > > >
> > > >
> > > > That LTTng patch contains some files with ".diff" extension and
> some
> > > > files with ".patch" extension. That's why I have given * in that
> >
> > below
> >
> > > > command.
> > > >
> > > >
> > > >
> > > > Please have a look at the below message:
> > >
> > > You should either use quilt, or issue something like:
> > >
> > > for a in `cat /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/series
> |
> > > grep -v "^#"`; do patch -p1 < $a; done
> > >
> > > So the patches are applies in the series file order.
> > >
> > > Mathieu
> >
> >
> ************************************************************************
> >
> > > > ****************************************************
> > > >
> > > > [sreddy@l-blr-sddeg03 linux-2.6.21-kernel]$ cat
> > > > /scratch/sreddy/linux-2.6.21-kernel/lttng-0.9.5/* | patch -p1
> > > >
> > > > can't find file to patch at input line 27
> > > >
> > > > Perhaps you used the wrong -p or --strip option?
> > > >
> > > > The text leading up to this was:
> > > >
> > > > --------------------------
> > > >
> > > > |From: Mathieu Desnoyers <[email protected]>
> > > > |
> > > > |
> > > > |
> > > > |This series mainly adds support for missing 64 bits cmpxchg and
> 64
> > >
> > > bits
> > >
> > > > atomic
> > > >
> > > > |add unless.  Therefore, principally 64 bits architectures are
> > >
> > > targeted
> > >
> > > > by
> > > >
> > > > |these patches.  It also adds the complete list of atomic
> operations
> > >
> > > on
> > >
> > > > the
> > > >
> > > > |atomic_long type.
> > > > |
> > > > |
> > > > |
> > > > |
> > > > |
> > > > |
> > > > |
> > > > |This patch:
> > > > |
> > > > |
> > > > |
> > > > |atomic.h: add atomic64 cmpxchg, xchg and add_unless to alpha
> > > > |
> > > > |
> > > > |
> > > > |Signed-off-by: Mathieu Desnoyers <[email protected]>
> > > > |
> > > > |Cc: Richard Henderson <[email protected]>
> > > > |
> > > > |Cc: Ivan Kokshaysky <[email protected]>
> > > > |
> > > > |Signed-off-by: Andrew Morton <[email protected]>
> > > > |
> > > > |---
> > > > |
> > > > |
> > > > |
> > > > | include/asm-alpha/atomic.h |   49
> > >
> > > ++++++++++++++++++++++++++++++++---
> > >
> > > > | 1 file changed, 46 insertions(+), 3 deletions(-)
> > > > |
> > > > |
> > > > |
> > > > |Index: linux-2.6-lttng/include/asm-alpha/atomic.h
> > > > |
> > > >
> |===================================================================
> > > > |
> > > > |--- linux-2.6-lttng.orig/include/asm-alpha/atomic.h    2007-05-08
> > > >
> > > > 00:30:46.000000000 -0400
> > > >
> > > > |+++ linux-2.6-lttng/include/asm-alpha/atomic.h 2007-05-08
> > > >
> > > > 00:31:17.000000000 -0400
> > > >
> > > > --------------------------
> > > >
> > > > File to patch:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > What I have to give there?? It's asking for lot of files like
> that.
> > > > Please help me on this.
> > > >
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Srinivas.
> > >
> > > --
> > > Mathieu Desnoyers
> > > Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
> > > OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE
> 3BAE
> > > 9A68
> 
> -- 
> "The acquisition of wealth is no longer the driving force in our
>  lives ... we work to better ourselves and the rest of humanity."
> 
> reach me at:    Jabber:[email protected]  ICQ:79511325
>                 AIM:QN303 Skype:DanielZinn IRC:[email protected]
> 

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68