8a0815ff |
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 | NAME=patch-2.6.17-lttng-core-$1 |
15 | ALL_NAME=$NAME-all.diff |
16 | |
17 | rm -fr tmppatch |
18 | mkdir tmppatch |
8a0815ff |
19 | |
20 | cd tmppatch |
21 | |
22 | cp ../$ALL_NAME . |
23 | |
24 | splitdiff -a -d $ALL_NAME |
25 | |
1a6c4b55 |
26 | rm $ALL_NAME |
27 | |
28 | for a in *; do |
29 | cp $a $a.tmp; |
30 | grep -v -e "^diff --git " -e "^new file mode " -e "^index " $a.tmp > $a |
31 | rm $a.tmp; |
32 | done |
33 | |
8a0815ff |
34 | FILE=../$NAME-facilities-headers.diff |
35 | |
36 | IN="?_include_linux_ltt_ltt-facility-core.h |
37 | ?_include_linux_ltt_ltt-facility-id-core.h" |
38 | |
39 | for a in $IN; do wr $a $FILE; done |
40 | |
41 | |
42 | FILE=../$NAME-facilities-loader.diff |
43 | |
1a6c4b55 |
44 | IN="?_ltt_ltt-facility-loader-core.c |
8a0815ff |
45 | ?_ltt_ltt-facility-loader-core.h" |
46 | |
8a0815ff |
47 | for a in $IN; do wr $a $FILE; done |
48 | |
49 | FILE=../$NAME-facilities.diff |
50 | |
51 | IN="?_include_linux_ltt-facilities.h |
52 | ?_kernel_ltt-facilities.c" |
53 | |
54 | for a in $IN; do wr $a $FILE; done |
55 | |
1a6c4b55 |
56 | |
57 | |
8a0815ff |
58 | FILE=../$NAME-relayfs.diff |
59 | |
60 | IN="?_Documentation_ioctl-number.txt |
61 | ?_include_linux_relay.h |
62 | ?_fs_relayfs_Makefile |
63 | ?_fs_relayfs_inode.c |
64 | ?_fs_relayfs_relay.c |
65 | ?_fs_relayfs_buffers.c |
66 | ?_fs_relayfs_buffers.h |
67 | ?_fs_relayfs_relay.h |
68 | ?_fs_Makefile |
69 | ?_block_blktrace.c" |
70 | |
71 | for a in $IN; do wr $a $FILE; done |
72 | |
8a0815ff |
73 | |
8a0815ff |
74 | |
1a6c4b55 |
75 | FILE=../$NAME-core-timestamp.diff |
8a0815ff |
76 | |
1a6c4b55 |
77 | IN="?_include_asm-alpha_ltt.h |
8a0815ff |
78 | ?_include_asm-arm26_ltt.h |
79 | ?_include_asm-arm_ltt.h |
80 | ?_include_asm-cris_ltt.h |
81 | ?_include_asm-frv_ltt.h |
82 | ?_include_asm-generic_ltt.h |
83 | ?_include_asm-h8300_ltt.h |
84 | ?_include_asm-i386_ltt.h |
85 | ?_include_asm-ia64_ltt.h |
86 | ?_include_asm-m32r_ltt.h |
87 | ?_include_asm-m68k_ltt.h |
88 | ?_include_asm-m68knommu_ltt.h |
89 | ?_include_asm-mips_ltt.h |
90 | ?_include_asm-mips_mipsregs.h |
91 | ?_include_asm-mips_timex.h |
92 | ?_arch_mips_kernel_time.c |
93 | ?_include_asm-parisc_ltt.h |
94 | ?_include_asm-powerpc_ltt.h |
95 | ?_include_asm-ppc_ltt.h |
96 | ?_include_asm-s390_ltt.h |
97 | ?_include_asm-sh64_ltt.h |
98 | ?_include_asm-sh_ltt.h |
99 | ?_include_asm-sparc64_ltt.h |
100 | ?_include_asm-sparc_ltt.h |
101 | ?_include_asm-um_ltt.h |
102 | ?_include_asm-v850_ltt.h |
1a6c4b55 |
103 | ?_include_asm-x86_64_ltt.h" |
104 | |
105 | for a in $IN; do wr $a $FILE; done |
106 | |
107 | |
108 | FILE=../$NAME-core-header.diff |
109 | |
110 | IN="?_include_linux_ltt-core.h" |
111 | |
112 | for a in $IN; do wr $a $FILE; done |
113 | |
114 | |
115 | FILE=../$NAME-userspace-tracing.diff |
116 | |
117 | IN="?_include_linux_sched.h |
118 | ?_kernel_sys_ni.c |
119 | ?_kernel_ltt-syscall.c |
120 | ?_kernel_exit.c |
121 | ?_kernel_fork.c |
122 | ?_include_asm-i386_unistd.h |
123 | ?_include_asm-powerpc_unistd.h |
124 | ?_include_asm-x86_64_ia32_unistd.h |
125 | ?_include_asm-x86_64_unistd.h" |
126 | |
127 | for a in $IN; do wr $a $FILE; done |
128 | |
129 | |
130 | FILE=../$NAME-core.diff |
131 | |
132 | IN="?_MAINTAINERS |
8a0815ff |
133 | ?_ltt_ltt-core.c |
1a6c4b55 |
134 | ?_init_main.c |
135 | ?_kernel_ltt-base.c |
136 | ?_kernel_ltt-heartbeat.c" |
137 | |
138 | for a in $IN; do wr $a $FILE; done |
139 | |
140 | |
141 | |
142 | FILE=../$NAME-transport.diff |
143 | |
144 | IN="?_ltt_ltt-relay.c" |
145 | |
146 | for a in $IN; do wr $a $FILE; done |
147 | |
148 | |
149 | |
150 | FILE=../$NAME-build.diff |
151 | |
152 | IN="?_Makefile |
153 | ?_kernel_Makefile |
154 | ?_ltt_Kconfig |
155 | ?_ltt_Makefile |
8a0815ff |
156 | ?_arch_i386_Kconfig |
157 | ?_arch_ppc_Kconfig |
158 | ?_arch_powerpc_Kconfig |
159 | ?_arch_arm_Kconfig |
160 | ?_arch_mips_Kconfig |
1a6c4b55 |
161 | ?_arch_x86_64_Kconfig" |
8a0815ff |
162 | |
163 | for a in $IN; do wr $a $FILE; done |
164 | |
1a6c4b55 |
165 | |
166 | |
167 | FILE=../$NAME-netlink-control.diff |
8a0815ff |
168 | |
169 | IN="?_ltt_ltt-control.c |
1a6c4b55 |
170 | ?_ltt_ltt-control.h |
171 | ?_include_linux_netlink.h" |
8a0815ff |
172 | |
173 | for a in $IN; do wr $a $FILE; done |
174 | |
175 | cd .. |
176 | |
177 | rm $ALL_NAME |
178 | tar cvfj $NAME.tar.bz2 $NAME-* |
179 | |