update compat
[lttv.git] / scripts / lttng-6-split-script.sh
1 #!/bin/sh
2 # LTTng patch creation
3 # Creates a -all patch, and split it.
4 # Mathieu Desnoyers, october 2005
5 #$1 is the version
6
7 function wr () {
8
9 cat $1 >> $2
10
11 }
12
13
14 PRENAME=patch
15 NAME=-2.6.18-lttng-$1
16 ALL_NAME=${PRENAME}${NAME}-all.diff
17 VALUE=1
18 printf -v COUNT "%02d" ${VALUE}
19
20 rm -fr tmppatch
21 mkdir tmppatch
22
23 cd tmppatch
24
25 cp ../$ALL_NAME .
26
27 splitdiff -a -d $ALL_NAME
28
29 rm $ALL_NAME
30
31 for a in *; do
32 cp $a $a.tmp;
33 grep -v -e "^diff --git " -e "^new file mode " -e "^index " $a.tmp > $a
34 rm $a.tmp;
35 done
36
37 FILE=../${PRENAME}${COUNT}${NAME}-debugfs.diff
38 VALUE=$(( ${VALUE} + 1 ))
39 printf -v COUNT "%02d" ${VALUE}
40
41 IN="?_fs_debugfs_inode.c"
42
43 for a in $IN; do wr $a $FILE; done
44
45 FILE=../${PRENAME}${COUNT}${NAME}-markers.diff
46 VALUE=$(( ${VALUE} + 1 ))
47 printf -v COUNT "%02d" ${VALUE}
48
49 IN="?_include_asm-generic_vmlinux.lds.h
50 ?_kernel_Kconfig.marker
51 ?_include_linux_module.h
52 ?_include_linux_marker.h
53 ?_include_asm-arm_marker.h
54 ?_include_asm-cris_marker.h
55 ?_include_asm-frv_marker.h
56 ?_include_asm-generic_marker.h
57 ?_include_asm-h8300_marker.h
58 ?_include_asm-i386_marker.h
59 ?_include_asm-ia64_marker.h
60 ?_include_asm-m32r_marker.h
61 ?_include_asm-m68k_marker.h
62 ?_include_asm-m68knommu_marker.h
63 ?_include_asm-mips_marker.h
64 ?_include_asm-parisc_marker.h
65 ?_include_asm-powerpc_marker.h
66 ?_include_asm-ppc64_marker.h
67 ?_include_asm-ppc_marker.h
68 ?_include_asm-s390_marker.h
69 ?_include_asm-sh64_marker.h
70 ?_include_asm-sh_marker.h
71 ?_include_asm-sparc64_marker.h
72 ?_include_asm-sparc_marker.h
73 ?_include_asm-um_marker.h
74 ?_include_asm-v850_marker.h
75 ?_include_asm-x86_64_marker.h
76 ?_include_asm-xtensa_marker.h"
77
78 for a in $IN; do wr $a $FILE; done
79
80
81 FILE=../${PRENAME}${COUNT}${NAME}-facility-core-headers.diff
82 VALUE=$(( ${VALUE} + 1 ))
83 printf -v COUNT "%02d" ${VALUE}
84
85 IN="?_include_ltt_ltt-facility-core.h
86 ?_include_ltt_ltt-facility-id-core.h"
87
88 for a in $IN; do wr $a $FILE; done
89
90
91 FILE=../${PRENAME}${COUNT}${NAME}-facility-loader-core.diff
92 VALUE=$(( ${VALUE} + 1 ))
93 printf -v COUNT "%02d" ${VALUE}
94
95 IN="?_ltt_facilities_ltt-facility-loader-core.c
96 ?_ltt_facilities_ltt-facility-loader-core.h
97 ?_ltt_facilities_Makefile"
98
99 for a in $IN; do wr $a $FILE; done
100
101 FILE=../${PRENAME}${COUNT}${NAME}-facilities.diff
102 VALUE=$(( ${VALUE} + 1 ))
103 printf -v COUNT "%02d" ${VALUE}
104
105 IN="?_include_linux_ltt-facilities.h
106 ?_ltt_ltt-facilities.c"
107
108 for a in $IN; do wr $a $FILE; done
109
110
111 FILE=../${PRENAME}${COUNT}${NAME}-timestamp.diff
112 VALUE=$(( ${VALUE} + 1 ))
113 printf -v COUNT "%02d" ${VALUE}
114
115 IN="?_include_asm-alpha_ltt.h
116 ?_include_asm-arm26_ltt.h
117 ?_include_asm-arm_ltt.h
118 ?_include_asm-cris_ltt.h
119 ?_include_asm-frv_ltt.h
120 ?_include_asm-generic_ltt.h
121 ?_include_asm-h8300_ltt.h
122 ?_include_asm-i386_ltt.h
123 ?_include_asm-ia64_ltt.h
124 ?_include_asm-m32r_ltt.h
125 ?_include_asm-m68k_ltt.h
126 ?_include_asm-m68knommu_ltt.h
127 ?_include_asm-mips_ltt.h
128 ?_include_asm-mips_mipsregs.h
129 ?_include_asm-mips_timex.h
130 ?_arch_mips_kernel_time.c
131 ?_include_asm-parisc_ltt.h
132 ?_include_asm-powerpc_ltt.h
133 ?_include_asm-ppc_ltt.h
134 ?_include_asm-s390_ltt.h
135 ?_include_asm-sh64_ltt.h
136 ?_include_asm-sh_ltt.h
137 ?_include_asm-sparc64_ltt.h
138 ?_include_asm-sparc_ltt.h
139 ?_include_asm-um_ltt.h
140 ?_include_asm-v850_ltt.h
141 ?_include_asm-x86_64_ltt.h
142 ?_include_asm-xtensa_ltt.h"
143
144 for a in $IN; do wr $a $FILE; done
145
146
147 FILE=../${PRENAME}${COUNT}${NAME}-core-header.diff
148 VALUE=$(( ${VALUE} + 1 ))
149 printf -v COUNT "%02d" ${VALUE}
150
151 IN="?_include_linux_ltt-core.h"
152
153 for a in $IN; do wr $a $FILE; done
154
155
156 FILE=../${PRENAME}${COUNT}${NAME}-core.diff
157 VALUE=$(( ${VALUE} + 1 ))
158 printf -v COUNT "%02d" ${VALUE}
159
160 IN="?_MAINTAINERS
161 ?_ltt_ltt-core.c
162 ?_ltt_ltt-heartbeat.c"
163
164 for a in $IN; do wr $a $FILE; done
165
166 FILE=../${PRENAME}${COUNT}${NAME}-tracer-header.diff
167 VALUE=$(( ${VALUE} + 1 ))
168 printf -v COUNT "%02d" ${VALUE}
169
170 IN="?_include_ltt_ltt-tracer.h"
171
172 for a in $IN; do wr $a $FILE; done
173
174
175 FILE=../${PRENAME}${COUNT}${NAME}-tracer.diff
176 VALUE=$(( ${VALUE} + 1 ))
177 printf -v COUNT "%02d" ${VALUE}
178
179 IN="?_ltt_ltt-tracer.c"
180
181 for a in $IN; do wr $a $FILE; done
182
183
184
185 FILE=../${PRENAME}${COUNT}${NAME}-transport.diff
186 VALUE=$(( ${VALUE} + 1 ))
187 printf -v COUNT "%02d" ${VALUE}
188
189 IN="?_ltt_ltt-relay.c
190 ?_Documentation_ioctl-number.txt"
191
192 for a in $IN; do wr $a $FILE; done
193
194
195
196 FILE=../${PRENAME}${COUNT}${NAME}-netlink-control.diff
197 VALUE=$(( ${VALUE} + 1 ))
198 printf -v COUNT "%02d" ${VALUE}
199
200 IN="?_ltt_ltt-control.c
201 ?_ltt_ltt-control.h
202 ?_include_linux_netlink.h"
203
204 for a in $IN; do wr $a $FILE; done
205
206
207 FILE=../${PRENAME}${COUNT}${NAME}-userspace-tracing.diff
208 VALUE=$(( ${VALUE} + 1 ))
209 printf -v COUNT "%02d" ${VALUE}
210
211 IN="?_include_linux_sched.h
212 ?_kernel_sys_ni.c
213 ?_ltt_ltt-syscall.c
214 ?_kernel_exit.c
215 ?_kernel_fork.c
216 ?_include_asm-i386_unistd.h
217 ?_include_asm-powerpc_unistd.h
218 ?_include_asm-x86_64_ia32_unistd.h
219 ?_include_asm-x86_64_unistd.h"
220
221 for a in $IN; do wr $a $FILE; done
222
223 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-arm.diff
224 VALUE=$(( ${VALUE} + 1 ))
225 printf -v COUNT "%02d" ${VALUE}
226
227 IN="?_arch_arm_kernel_calls.S
228 ?_arch_arm_kernel_entry-common.S
229 ?_arch_arm_kernel_process.c
230 ?_arch_arm_kernel_ptrace.c
231 ?_arch_arm_kernel_sys_arm.c
232 ?_arch_arm_kernel_time.c
233 ?_arch_arm_kernel_traps.c
234 ?_include_asm-arm_thread_info.h"
235
236 for a in $IN; do wr $a $FILE; done
237
238 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-i386.diff
239 VALUE=$(( ${VALUE} + 1 ))
240 printf -v COUNT "%02d" ${VALUE}
241
242 IN="?_arch_i386_kernel_process.c
243 ?_arch_i386_kernel_ptrace.c
244 ?_arch_i386_kernel_syscall_table.S
245 ?_arch_i386_kernel_sys_i386.c
246 ?_arch_i386_kernel_time.c
247 ?_arch_i386_kernel_traps.c"
248
249 for a in $IN; do wr $a $FILE; done
250
251 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-mips.diff
252 VALUE=$(( ${VALUE} + 1 ))
253 printf -v COUNT "%02d" ${VALUE}
254
255 IN="?_arch_mips_kernel_irq.c
256 ?_arch_mips_kernel_process.c
257 ?_arch_mips_kernel_ptrace.c
258 ?_arch_mips_kernel_scall32-o32.S
259 ?_arch_mips_kernel_scall64-64.S
260 ?_arch_mips_kernel_scall64-n32.S
261 ?_arch_mips_kernel_scall64-o32.S
262 ?_arch_mips_kernel_syscall.c
263 ?_arch_mips_kernel_time.c
264 ?_arch_mips_kernel_traps.c
265 ?_arch_mips_kernel_unaligned.c
266 ?_arch_mips_mm_fault.c
267 ?_include_asm-mips_mipsregs.h"
268
269 for a in $IN; do wr $a $FILE; done
270
271
272
273 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-powerpc.diff
274 VALUE=$(( ${VALUE} + 1 ))
275 printf -v COUNT "%02d" ${VALUE}
276
277 IN="?_arch_powerpc_kernel_entry_32.S
278 ?_arch_powerpc_kernel_irq.c
279 ?_arch_powerpc_kernel_misc_32.S
280 ?_arch_powerpc_kernel_misc_64.S
281 ?_arch_powerpc_kernel_ppc_ksyms.c
282 ?_arch_powerpc_kernel_process.c
283 ?_arch_powerpc_kernel_prom.c
284 ?_arch_powerpc_kernel_ptrace.c
285 ?_arch_powerpc_kernel_syscalls.c
286 ?_arch_powerpc_kernel_systbl.S
287 ?_arch_powerpc_kernel_time.c
288 ?_arch_powerpc_kernel_traps.c
289 ?_arch_powerpc_mm_fault.c"
290
291 for a in $IN; do wr $a $FILE; done
292
293
294 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-ppc.diff
295 VALUE=$(( ${VALUE} + 1 ))
296 printf -v COUNT "%02d" ${VALUE}
297
298 IN="?_arch_ppc_Kconfig
299 ?_arch_ppc_kernel_misc.S
300 ?_arch_ppc_kernel_time.c
301 ?_arch_ppc_kernel_traps.c
302 ?_arch_ppc_mm_fault.c"
303
304
305 for a in $IN; do wr $a $FILE; done
306
307
308 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation-x86_64.diff
309 VALUE=$(( ${VALUE} + 1 ))
310 printf -v COUNT "%02d" ${VALUE}
311
312 IN="?_arch_x86_64_ia32_ia32entry.S
313 ?_arch_x86_64_ia32_ipc32.c
314 ?_arch_x86_64_kernel_entry.S
315 ?_arch_x86_64_kernel_ptrace.c
316 ?_arch_x86_64_kernel_time.c
317 ?_arch_x86_64_kernel_traps.c
318 ?_arch_x86_64_mm_fault.c"
319
320 for a in $IN; do wr $a $FILE; done
321
322 FILE=../${PRENAME}${COUNT}${NAME}-instrumentation.diff
323 VALUE=$(( ${VALUE} + 1 ))
324 printf -v COUNT "%02d" ${VALUE}
325
326 IN="?_fs_buffer.c
327 ?_fs_compat.c
328 ?_fs_exec.c
329 ?_fs_ioctl.c
330 ?_fs_open.c
331 ?_fs_read_write.c
332 ?_fs_select.c
333 ?_ipc_msg.c
334 ?_ipc_sem.c
335 ?_ipc_shm.c
336 ?_kernel_irq_handle.c
337 ?_kernel_itimer.c
338 ?_kernel_kthread.c
339 ?_kernel_Makefile
340 ?_kernel_lockdep.c
341 ?_kernel_module.c
342 ?_kernel_printk.c
343 ?_kernel_sched.c
344 ?_kernel_signal.c
345 ?_kernel_softirq.c
346 ?_kernel_timer.c
347 ?_mm_filemap.c
348 ?_mm_memory.c
349 ?_mm_page_alloc.c
350 ?_mm_page_io.c
351 ?_net_core_dev.c
352 ?_net_ipv4_devinet.c
353 ?_net_socket.c"
354
355 for a in $IN; do wr $a $FILE; done
356
357 FILE=../${PRENAME}${COUNT}${NAME}-facilities-probes-headers.diff
358 VALUE=$(( ${VALUE} + 1 ))
359 printf -v COUNT "%02d" ${VALUE}
360
361 IN="?_include_ltt_ltt-facility-custom-fs_data.h
362 ?_include_ltt_ltt-facility-custom-stack_arch_i386.h
363 ?_include_ltt_ltt-facility-custom-stack_arch_x86_64.h
364 ?_include_ltt_ltt-facility-custom-stack.h
365 ?_include_ltt_ltt-facility-fs_data.h
366 ?_include_ltt_ltt-facility-fs.h
367 ?_include_ltt_ltt-facility-id-fs_data.h
368 ?_include_ltt_ltt-facility-id-fs.h
369 ?_include_ltt_ltt-facility-id-ipc.h
370 ?_include_ltt_ltt-facility-id-kernel_arch_arm.h
371 ?_include_ltt_ltt-facility-id-kernel_arch_i386.h
372 ?_include_ltt_ltt-facility-id-kernel_arch_mips.h
373 ?_include_ltt_ltt-facility-id-kernel_arch_powerpc.h
374 ?_include_ltt_ltt-facility-id-kernel_arch_ppc.h
375 ?_include_ltt_ltt-facility-id-kernel_arch_x86_64.h
376 ?_include_ltt_ltt-facility-id-kernel.h
377 ?_include_ltt_ltt-facility-id-locking.h
378 ?_include_ltt_ltt-facility-id-memory.h
379 ?_include_ltt_ltt-facility-id-network.h
380 ?_include_ltt_ltt-facility-id-network_ip_interface.h
381 ?_include_ltt_ltt-facility-id-process.h
382 ?_include_ltt_ltt-facility-id-socket.h
383 ?_include_ltt_ltt-facility-id-stack_arch_i386.h
384 ?_include_ltt_ltt-facility-id-stack.h
385 ?_include_ltt_ltt-facility-id-statedump.h
386 ?_include_ltt_ltt-facility-id-timer.h
387 ?_include_ltt_ltt-facility-ipc.h
388 ?_include_ltt_ltt-facility-kernel_arch_arm.h
389 ?_include_ltt_ltt-facility-kernel_arch_i386.h
390 ?_include_ltt_ltt-facility-kernel_arch_mips.h
391 ?_include_ltt_ltt-facility-kernel_arch_powerpc.h
392 ?_include_ltt_ltt-facility-kernel_arch_ppc.h
393 ?_include_ltt_ltt-facility-kernel_arch_x86_64.h
394 ?_include_ltt_ltt-facility-kernel.h
395 ?_include_ltt_ltt-facility-locking.h
396 ?_include_ltt_ltt-facility-memory.h
397 ?_include_ltt_ltt-facility-network.h
398 ?_include_ltt_ltt-facility-network_ip_interface.h
399 ?_include_ltt_ltt-facility-process.h
400 ?_include_ltt_ltt-facility-select-core.h
401 ?_include_ltt_ltt-facility-select-default.h
402 ?_include_ltt_ltt-facility-select-kernel.h
403 ?_include_ltt_ltt-facility-select-network_ip_interface.h
404 ?_include_ltt_ltt-facility-select-process.h
405 ?_include_ltt_ltt-facility-select-statedump.h
406 ?_include_ltt_ltt-facility-socket.h
407 ?_include_ltt_ltt-facility-stack.h
408 ?_include_ltt_ltt-facility-statedump.h
409 ?_include_ltt_ltt-facility-timer.h"
410
411 for a in $IN; do wr $a $FILE; done
412
413
414 FILE=../${PRENAME}${COUNT}${NAME}-facilities-probes.diff
415 VALUE=$(( ${VALUE} + 1 ))
416 printf -v COUNT "%02d" ${VALUE}
417
418 IN="?_ltt_facilities_ltt-facility-loader-fs.c
419 ?_ltt_facilities_ltt-facility-loader-fs_data.c
420 ?_ltt_facilities_ltt-facility-loader-fs_data.h
421 ?_ltt_facilities_ltt-facility-loader-fs.h
422 ?_ltt_facilities_ltt-facility-loader-ipc.c
423 ?_ltt_facilities_ltt-facility-loader-ipc.h
424 ?_ltt_facilities_ltt-facility-loader-kernel_arch_arm.c
425 ?_ltt_facilities_ltt-facility-loader-kernel_arch_arm.h
426 ?_ltt_facilities_ltt-facility-loader-kernel_arch_i386.c
427 ?_ltt_facilities_ltt-facility-loader-kernel_arch_i386.h
428 ?_ltt_facilities_ltt-facility-loader-kernel_arch_mips.c
429 ?_ltt_facilities_ltt-facility-loader-kernel_arch_mips.h
430 ?_ltt_facilities_ltt-facility-loader-kernel_arch_powerpc.c
431 ?_ltt_facilities_ltt-facility-loader-kernel_arch_powerpc.h
432 ?_ltt_facilities_ltt-facility-loader-kernel_arch_ppc.c
433 ?_ltt_facilities_ltt-facility-loader-kernel_arch_ppc.h
434 ?_ltt_facilities_ltt-facility-loader-kernel_arch_x86_64.c
435 ?_ltt_facilities_ltt-facility-loader-kernel_arch_x86_64.h
436 ?_ltt_facilities_ltt-facility-loader-kernel.c
437 ?_ltt_facilities_ltt-facility-loader-kernel.h
438 ?_ltt_facilities_ltt-facility-loader-locking.c
439 ?_ltt_facilities_ltt-facility-loader-locking.h
440 ?_ltt_facilities_ltt-facility-loader-memory.c
441 ?_ltt_facilities_ltt-facility-loader-memory.h
442 ?_ltt_facilities_ltt-facility-loader-network.c
443 ?_ltt_facilities_ltt-facility-loader-network.h
444 ?_ltt_facilities_ltt-facility-loader-network_ip_interface.c
445 ?_ltt_facilities_ltt-facility-loader-network_ip_interface.h
446 ?_ltt_facilities_ltt-facility-loader-process.c
447 ?_ltt_facilities_ltt-facility-loader-process.h
448 ?_ltt_facilities_ltt-facility-loader-socket.c
449 ?_ltt_facilities_ltt-facility-loader-socket.h
450 ?_ltt_facilities_ltt-facility-loader-stack_arch_i386.c
451 ?_ltt_facilities_ltt-facility-loader-stack_arch_i386.h
452 ?_ltt_facilities_ltt-facility-loader-stack.c
453 ?_ltt_facilities_ltt-facility-loader-stack.h
454 ?_ltt_facilities_ltt-facility-loader-statedump.c
455 ?_ltt_facilities_ltt-facility-loader-statedump.h
456 ?_ltt_facilities_ltt-facility-loader-timer.c
457 ?_ltt_facilities_ltt-facility-loader-timer.h"
458
459
460 for a in $IN; do wr $a $FILE; done
461
462
463 FILE=../${PRENAME}${COUNT}${NAME}-probes.diff
464 VALUE=$(( ${VALUE} + 1 ))
465 printf -v COUNT "%02d" ${VALUE}
466
467 IN="?_ltt_probes_ltt-probe-arm.c
468 ?_ltt_probes_ltt-probe-fs.c
469 ?_ltt_probes_ltt-probe-i386.c
470 ?_ltt_probes_ltt-probe-ipc.c
471 ?_ltt_probes_ltt-probe-kernel.c
472 ?_ltt_probes_ltt-probe-list.c
473 ?_ltt_probes_ltt-probe-locking.c
474 ?_ltt_probes_ltt-probe-mips.c
475 ?_ltt_probes_ltt-probe-mm.c
476 ?_ltt_probes_ltt-probe-net.c
477 ?_ltt_probes_ltt-probe-powerpc.c
478 ?_ltt_probes_ltt-probe-ppc.c
479 ?_ltt_probes_ltt-probe-x86_64.c
480 ?_ltt_probes_Makefile"
481
482 for a in $IN; do wr $a $FILE; done
483
484 FILE=../${PRENAME}${COUNT}${NAME}-statedump.diff
485 VALUE=$(( ${VALUE} + 1 ))
486 printf -v COUNT "%02d" ${VALUE}
487
488 IN="?_ltt_ltt-statedump.c"
489
490 for a in $IN; do wr $a $FILE; done
491
492
493 FILE=../${PRENAME}${COUNT}${NAME}-build.diff
494 VALUE=$(( ${VALUE} + 1 ))
495 printf -v COUNT "%02d" ${VALUE}
496
497 IN="?_Makefile
498 ?_kernel_Makefile
499 ?_ltt_Kconfig
500 ?_ltt_Makefile
501 ?_arch_alpha_Kconfig
502 ?_arch_cris_Kconfig
503 ?_arch_frv_Kconfig
504 ?_arch_h8300_Kconfig
505 ?_arch_i386_Kconfig
506 ?_arch_ia64_Kconfig
507 ?_arch_m32r_Kconfig
508 ?_arch_m68k_Kconfig
509 ?_arch_m68knommu_Kconfig
510 ?_arch_ppc_Kconfig
511 ?_arch_powerpc_Kconfig
512 ?_arch_parisc_Kconfig
513 ?_arch_arm_Kconfig
514 ?_arch_arm26_Kconfig
515 ?_arch_mips_Kconfig
516 ?_arch_s390_Kconfig
517 ?_arch_sh64_Kconfig
518 ?_arch_sh_Kconfig
519 ?_arch_sparc64_Kconfig
520 ?_arch_sparc_Kconfig
521 ?_arch_um_Kconfig
522 ?_arch_v850_Kconfig
523 ?_arch_xtensa_Kconfig
524 ?_arch_x86_64_Kconfig"
525
526 for a in $IN; do wr $a $FILE; done
527
528
529
530 cd ..
531
532 rm $ALL_NAME
533 tar cvfj ${PRENAME}${NAME}.tar.bz2 ${PRENAME}*${NAME}-*
534
This page took 0.040618 seconds and 4 git commands to generate.