8a0815ff |
1 | #!/bin/sh |
e24cd4a7 |
2 | # LTTng patch creation core |
8a0815ff |
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 | |
2d5f02cf |
14 | PRENAME=patch |
e24cd4a7 |
15 | NAME=-2.6.18-lttng-core-$1 |
2d5f02cf |
16 | ALL_NAME=${PRENAME}${NAME}-all.diff |
17 | VALUE=1 |
18 | printf -v COUNT "%02d" ${VALUE} |
8a0815ff |
19 | |
20 | rm -fr tmppatch |
21 | mkdir tmppatch |
8a0815ff |
22 | |
23 | cd tmppatch |
24 | |
25 | cp ../$ALL_NAME . |
26 | |
27 | splitdiff -a -d $ALL_NAME |
28 | |
1a6c4b55 |
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 | |
2d5f02cf |
37 | FILE=../${PRENAME}${COUNT}${NAME}-debugfs.diff |
38 | VALUE=$(( ${VALUE} + 1 )) |
39 | printf -v COUNT "%02d" ${VALUE} |
11df8cd5 |
40 | |
41 | IN="?_fs_debugfs_inode.c" |
42 | |
43 | for a in $IN; do wr $a $FILE; done |
44 | |
2d5f02cf |
45 | #for hotplug |
46 | FILE=../${PRENAME}${COUNT}${NAME}-relay.diff |
47 | VALUE=$(( ${VALUE} + 1 )) |
48 | printf -v COUNT "%02d" ${VALUE} |
11df8cd5 |
49 | |
2d5f02cf |
50 | IN="?_include_linux_relay.h |
51 | ?_kernel_relay.c |
52 | ?_block_blktrace.c" |
11df8cd5 |
53 | |
2d5f02cf |
54 | for a in $IN; do wr $a $FILE; done |
8a0815ff |
55 | |
2d5f02cf |
56 | FILE=../${PRENAME}${COUNT}${NAME}-markers.diff |
57 | VALUE=$(( ${VALUE} + 1 )) |
58 | printf -v COUNT "%02d" ${VALUE} |
59 | |
60 | IN="?_include_asm-generic_vmlinux.lds.h |
61 | ?_kernel_Kconfig.marker |
62 | ?_include_linux_module.h |
63 | ?_include_linux_marker.h |
64 | ?_include_asm-arm_marker.h |
65 | ?_include_asm-cris_marker.h |
66 | ?_include_asm-frv_marker.h |
67 | ?_include_asm-generic_marker.h |
68 | ?_include_asm-h8300_marker.h |
69 | ?_include_asm-i386_marker.h |
70 | ?_include_asm-ia64_marker.h |
71 | ?_include_asm-m32r_marker.h |
72 | ?_include_asm-m68k_marker.h |
73 | ?_include_asm-m68knommu_marker.h |
74 | ?_include_asm-mips_marker.h |
75 | ?_include_asm-parisc_marker.h |
76 | ?_include_asm-powerpc_marker.h |
77 | ?_include_asm-ppc64_marker.h |
78 | ?_include_asm-ppc_marker.h |
79 | ?_include_asm-s390_marker.h |
80 | ?_include_asm-sh64_marker.h |
81 | ?_include_asm-sh_marker.h |
82 | ?_include_asm-sparc64_marker.h |
83 | ?_include_asm-sparc_marker.h |
84 | ?_include_asm-um_marker.h |
85 | ?_include_asm-v850_marker.h |
86 | ?_include_asm-x86_64_marker.h |
87 | ?_include_asm-xtensa_marker.h" |
8a0815ff |
88 | |
89 | for a in $IN; do wr $a $FILE; done |
90 | |
2d5f02cf |
91 | FILE=../${PRENAME}${COUNT}${NAME}-atomic_up.diff |
92 | VALUE=$(( ${VALUE} + 1 )) |
93 | printf -v COUNT "%02d" ${VALUE} |
8a0815ff |
94 | |
2d5f02cf |
95 | IN="?_include_asm-i386_atomic-up.h |
96 | ?_include_asm-i386_system.h |
97 | ?_include_asm-x86_64_atomic-up.h |
98 | ?_include_asm-x86_64_system.h |
99 | ?_include_asm-powerpc_atomic-up.h |
100 | ?_include_asm-powerpc_system.h |
101 | ?_include_asm-arm_atomic-up.h |
102 | ?_include_asm-mips_atomic-up.h |
103 | ?_include_asm-generic_atomic-up.h" |
8a0815ff |
104 | |
2d5f02cf |
105 | for a in $IN; do wr $a $FILE; done |
106 | |
107 | FILE=../${PRENAME}${COUNT}${NAME}-facility-core-headers.diff |
108 | VALUE=$(( ${VALUE} + 1 )) |
109 | printf -v COUNT "%02d" ${VALUE} |
110 | |
111 | IN="?_include_ltt_ltt-facility-core.h |
112 | ?_include_ltt_ltt-facility-id-core.h" |
8a0815ff |
113 | |
8a0815ff |
114 | for a in $IN; do wr $a $FILE; done |
115 | |
8a0815ff |
116 | |
2d5f02cf |
117 | FILE=../${PRENAME}${COUNT}${NAME}-facility-loader-core.diff |
118 | VALUE=$(( ${VALUE} + 1 )) |
119 | printf -v COUNT "%02d" ${VALUE} |
120 | |
121 | IN="?_ltt_facilities_ltt-facility-loader-core.c |
122 | ?_ltt_facilities_ltt-facility-loader-core.h |
123 | ?_ltt_facilities_Makefile" |
8a0815ff |
124 | |
125 | for a in $IN; do wr $a $FILE; done |
126 | |
2d5f02cf |
127 | FILE=../${PRENAME}${COUNT}${NAME}-facilities.diff |
128 | VALUE=$(( ${VALUE} + 1 )) |
129 | printf -v COUNT "%02d" ${VALUE} |
130 | |
131 | IN="?_include_linux_ltt-facilities.h |
132 | ?_ltt_ltt-facilities.c" |
1a6c4b55 |
133 | |
2d5f02cf |
134 | for a in $IN; do wr $a $FILE; done |
1a6c4b55 |
135 | |
8a0815ff |
136 | |
2d5f02cf |
137 | FILE=../${PRENAME}${COUNT}${NAME}-timestamp.diff |
138 | VALUE=$(( ${VALUE} + 1 )) |
139 | printf -v COUNT "%02d" ${VALUE} |
8a0815ff |
140 | |
1a6c4b55 |
141 | IN="?_include_asm-alpha_ltt.h |
8a0815ff |
142 | ?_include_asm-arm26_ltt.h |
143 | ?_include_asm-arm_ltt.h |
144 | ?_include_asm-cris_ltt.h |
145 | ?_include_asm-frv_ltt.h |
146 | ?_include_asm-generic_ltt.h |
147 | ?_include_asm-h8300_ltt.h |
148 | ?_include_asm-i386_ltt.h |
149 | ?_include_asm-ia64_ltt.h |
150 | ?_include_asm-m32r_ltt.h |
151 | ?_include_asm-m68k_ltt.h |
152 | ?_include_asm-m68knommu_ltt.h |
153 | ?_include_asm-mips_ltt.h |
154 | ?_include_asm-mips_mipsregs.h |
155 | ?_include_asm-mips_timex.h |
156 | ?_arch_mips_kernel_time.c |
157 | ?_include_asm-parisc_ltt.h |
158 | ?_include_asm-powerpc_ltt.h |
159 | ?_include_asm-ppc_ltt.h |
160 | ?_include_asm-s390_ltt.h |
161 | ?_include_asm-sh64_ltt.h |
162 | ?_include_asm-sh_ltt.h |
163 | ?_include_asm-sparc64_ltt.h |
164 | ?_include_asm-sparc_ltt.h |
165 | ?_include_asm-um_ltt.h |
166 | ?_include_asm-v850_ltt.h |
2d5f02cf |
167 | ?_include_asm-x86_64_ltt.h |
168 | ?_include_asm-xtensa_ltt.h" |
1a6c4b55 |
169 | |
170 | for a in $IN; do wr $a $FILE; done |
171 | |
172 | |
2d5f02cf |
173 | FILE=../${PRENAME}${COUNT}${NAME}-core-header.diff |
174 | VALUE=$(( ${VALUE} + 1 )) |
175 | printf -v COUNT "%02d" ${VALUE} |
1a6c4b55 |
176 | |
177 | IN="?_include_linux_ltt-core.h" |
178 | |
179 | for a in $IN; do wr $a $FILE; done |
180 | |
181 | |
2d5f02cf |
182 | FILE=../${PRENAME}${COUNT}${NAME}-core.diff |
183 | VALUE=$(( ${VALUE} + 1 )) |
184 | printf -v COUNT "%02d" ${VALUE} |
1a6c4b55 |
185 | |
186 | IN="?_MAINTAINERS |
8a0815ff |
187 | ?_ltt_ltt-core.c |
2d5f02cf |
188 | ?_ltt_ltt-heartbeat.c" |
1a6c4b55 |
189 | |
190 | for a in $IN; do wr $a $FILE; done |
191 | |
2d5f02cf |
192 | FILE=../${PRENAME}${COUNT}${NAME}-tracer-header.diff |
193 | VALUE=$(( ${VALUE} + 1 )) |
194 | printf -v COUNT "%02d" ${VALUE} |
195 | |
196 | IN="?_include_ltt_ltt-tracer.h" |
1a6c4b55 |
197 | |
2d5f02cf |
198 | for a in $IN; do wr $a $FILE; done |
1a6c4b55 |
199 | |
2d5f02cf |
200 | |
201 | FILE=../${PRENAME}${COUNT}${NAME}-tracer.diff |
202 | VALUE=$(( ${VALUE} + 1 )) |
203 | printf -v COUNT "%02d" ${VALUE} |
204 | |
205 | IN="?_ltt_ltt-tracer.c" |
206 | |
207 | for a in $IN; do wr $a $FILE; done |
208 | |
209 | |
210 | |
211 | FILE=../${PRENAME}${COUNT}${NAME}-transport.diff |
212 | VALUE=$(( ${VALUE} + 1 )) |
213 | printf -v COUNT "%02d" ${VALUE} |
1a6c4b55 |
214 | |
11df8cd5 |
215 | IN="?_ltt_ltt-relay.c |
216 | ?_Documentation_ioctl-number.txt" |
217 | |
218 | for a in $IN; do wr $a $FILE; done |
219 | |
220 | |
221 | |
2d5f02cf |
222 | FILE=../${PRENAME}${COUNT}${NAME}-netlink-control.diff |
223 | VALUE=$(( ${VALUE} + 1 )) |
224 | printf -v COUNT "%02d" ${VALUE} |
11df8cd5 |
225 | |
226 | IN="?_ltt_ltt-control.c |
227 | ?_ltt_ltt-control.h |
228 | ?_include_linux_netlink.h" |
229 | |
230 | for a in $IN; do wr $a $FILE; done |
231 | |
232 | |
2d5f02cf |
233 | FILE=../${PRENAME}${COUNT}${NAME}-userspace-tracing.diff |
234 | VALUE=$(( ${VALUE} + 1 )) |
235 | printf -v COUNT "%02d" ${VALUE} |
11df8cd5 |
236 | |
237 | IN="?_include_linux_sched.h |
238 | ?_kernel_sys_ni.c |
2d5f02cf |
239 | ?_ltt_ltt-syscall.c |
11df8cd5 |
240 | ?_kernel_exit.c |
241 | ?_kernel_fork.c |
2d5f02cf |
242 | ?_include_asm-arm_unistd.h |
11df8cd5 |
243 | ?_include_asm-i386_unistd.h |
2d5f02cf |
244 | ?_include_asm-mips_unistd.h |
11df8cd5 |
245 | ?_include_asm-powerpc_unistd.h |
2d5f02cf |
246 | ?_include_asm-powerpc_systbl.h |
11df8cd5 |
247 | ?_include_asm-x86_64_unistd.h" |
1a6c4b55 |
248 | |
249 | for a in $IN; do wr $a $FILE; done |
250 | |
2d5f02cf |
251 | FILE=../${PRENAME}${COUNT}${NAME}-build.diff |
252 | VALUE=$(( ${VALUE} + 1 )) |
253 | printf -v COUNT "%02d" ${VALUE} |
1a6c4b55 |
254 | |
255 | IN="?_Makefile |
1a6c4b55 |
256 | ?_ltt_Kconfig |
257 | ?_ltt_Makefile |
2d5f02cf |
258 | ?_arch_alpha_Kconfig |
259 | ?_arch_cris_Kconfig |
260 | ?_arch_frv_Kconfig |
261 | ?_arch_h8300_Kconfig |
8a0815ff |
262 | ?_arch_i386_Kconfig |
2d5f02cf |
263 | ?_arch_ia64_Kconfig |
264 | ?_arch_m32r_Kconfig |
265 | ?_arch_m68k_Kconfig |
266 | ?_arch_m68knommu_Kconfig |
8a0815ff |
267 | ?_arch_ppc_Kconfig |
268 | ?_arch_powerpc_Kconfig |
2d5f02cf |
269 | ?_arch_parisc_Kconfig |
8a0815ff |
270 | ?_arch_arm_Kconfig |
2d5f02cf |
271 | ?_arch_arm26_Kconfig |
8a0815ff |
272 | ?_arch_mips_Kconfig |
2d5f02cf |
273 | ?_arch_s390_Kconfig |
274 | ?_arch_sh64_Kconfig |
275 | ?_arch_sh_Kconfig |
276 | ?_arch_sparc64_Kconfig |
277 | ?_arch_sparc_Kconfig |
278 | ?_arch_um_Kconfig |
279 | ?_arch_v850_Kconfig |
280 | ?_arch_xtensa_Kconfig |
1a6c4b55 |
281 | ?_arch_x86_64_Kconfig" |
8a0815ff |
282 | |
283 | for a in $IN; do wr $a $FILE; done |
284 | |
1a6c4b55 |
285 | |
286 | |
8a0815ff |
287 | cd .. |
288 | |
289 | rm $ALL_NAME |
2d5f02cf |
290 | tar cvfj ${PRENAME}${NAME}.tar.bz2 ${PRENAME}*${NAME}-* |
8a0815ff |
291 | |