blob: 140eee067db70d1db7ddf4d2ff815601e42c91df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
#
# $NetBSD: README.NetBSD,v 1.3 2009/08/19 09:35:01 martti Exp $
#
# Author: Martti Kuparinen <martti@NetBSD.org>
#
# This file contains copy-pastable commands to import a new IPFilter release
# into the NetBSD repository. Before importing the code into the official
# NetBSD repository, you'll import the code into your own local test
# repository, resolve the conflicts and make sure everything works as expected.
#
# Steps in this document:
# 1) Get the IPFilter dist file and a copy of the CVS repository
# 2) Create a local test repository for the test imports
# 3) Import the new IPFilter release into the test repository
# 4) Resolve conflicts and make other adjustments
# 5) Save the required modifications
# 6) Re-create a local test repository for the final test import
# 7) Import the new IPFilter release into the test repository
# 8) Apply the fixes
# 9) Compile everything and make sure the new version really works
# 10) Update your /usr/src (cd /usr/src && cvs update -dPA)
# 11) Import the new IPFilter release into the NetBSD repository
# 12) Apply the fixes
# 13) Update your /usr/src one more time (cd /usr/src && cvs update -dPA)
# 14) Compile and install everything
# 15) Update src/doc/3RDPARTY and src/doc/CHANGES
# 16) Send an announcement to current-users
#
###############################################################################
###############################################################################
# COMMON SETTINGS FOR EVERYTHING BELOW
###############################################################################
###############################################################################
export NETBSDUSERNAME="fixthis"
export VERSION="4.1.34"
export VEROLD="v4-1-33"
export VERNEW="v4-1-34"
export VERTAG="`echo ${VERSION} | sed 's+\.+_+g'`"
export ORIG="${HOME}/netbsd/orig"
export WORK="${HOME}/netbsd/work"
export FIXES="${HOME}/netbsd/fixes/${VERSION}"
export EXTRACTED="/tmp/destdir"
export TGZ="${ORIG}/ip_fil${VERSION}.tar.gz"
export IPF="/tmp/ip_fil${VERSION}"
export RSYNC_RSH="ssh -4"
export RSYNC="rsync -avzr --delete"
###############################################################################
###############################################################################
# Fetch the official IPF distfile
###############################################################################
###############################################################################
cd ${ORIG}
ftp http://coombs.anu.edu.au/~avalon/ip_fil${VERSION}.tar.gz
###############################################################################
###############################################################################
# GET COPY OF THE CVS REPOSITORY FOR LOCAL TEST IMPORTS
###############################################################################
###############################################################################
RSYNC_RSH="ssh -4"
RSYNC="rsync -avzr --delete -e ssh"
S="${NETBSDUSERNAME}@cvs.netbsd.org::cvsroot"
D="${ORIG}/cvsroot"
${RSYNC} ${S}/src/ ${D}/src
${RSYNC} --exclude 'commitlog*' --exclude 'history*' ${S}/CVSROOT/ ${D}/CVSROOT
###############################################################################
###############################################################################
# TEST IMPORT 1
###############################################################################
###############################################################################
# Get a new repository
mkdir -p ${WORK}
${RSYNC} ${ORIG}/cvsroot ${WORK}
rm -f ${WORK}/cvsroot/CVSROOT/commitinfo*
rm -f ${WORK}/cvsroot/CVSROOT/loginfo*
touch ${WORK}/cvsroot/CVSROOT/commitinfo
touch ${WORK}/cvsroot/CVSROOT/loginfo
sed 's+/cvslock+/tmp/cvslock+' < ${WORK}/cvsroot/CVSROOT/config \
> ${WORK}/cvsroot/CVSROOT/config.1
mv -f ${WORK}/cvsroot/CVSROOT/config.1 ${WORK}/cvsroot/CVSROOT/config
mkdir -p /tmp/cvslock
export CVSROOT="${WORK}/cvsroot"
# Checkout a working copy
cd ${WORK}
rm -rf src
cvs co -P src
or
cd ${WORK}/src
rm -rf dist/ipf regress/sys/kern sys/lkm sys/dist/ipf sys/netinet usr.sbin/ipf
cvs update -dPA
or
cd ${WORK}/src
rm -rf dist/ipf regress/sys/kern sys/lkm sys/dist/ipf sys/netinet usr.sbin/ipf
cvs update -dPA dist/ipf regress/sys/kern sys/lkm sys/dist/ipf \
sys/netinet usr.sbin/ipf
# Prepare the files for import
rm -rf ${IPF}
tar xpzf ${TGZ} -C `dirname ${IPF}`
cd ${IPF}
rm -rf ${EXTRACTED}
mkdir -p ${EXTRACTED}
cd ${EXTRACTED}
/usr/src/dist/ipf/ipf2netbsd ${IPF} ${EXTRACTED}
# cvs tag
cd ${WORK}/src
for i in dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf usr.sbin/ipf
do
(cd $i && cvs tag BEFORE-IPF-${VERTAG})
done
# Import the new version
cd ${EXTRACTED}/src
cvs import -I ! -I CVS -m "Import IPFilter ${VERSION}" src DARRENR ${VERNEW}
# src/dist/ipf
cd ${WORK}/src/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
A=`cvs update | grep ^C | awk '{ print $2 }'`
cvs update | grep ^C
##vim $A
##for i in $A; do mkdir -p ${FIXES}/1/src/dist/ipf/`dirname $i`; done
##for i in $A; do cp $i ${FIXES}/1/src/dist/ipf/$i; done
cvs diff -u -kk -rDARRENR $A | less
cvs diff -u -kk -rDARRENR | less
# src/sys/dist/ipf
cd ${WORK}/src/sys/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
B=`cvs update | grep ^C | awk '{ print $2 }'`
cvs update | grep ^C
##vim $B
##for i in $B; do mkdir -p ${FIXES}/1/src/sys/dist/ipf/`dirname $i`; done
##for i in $B; do cp $i ${FIXES}/1/src/sys/dist/ipf/$i; done
cvs diff -u -rDARRENR $B | less
cvs diff -u -rDARRENR | less
# src/sys/lkm/netinet/if_ipl
cd ${WORK}/src/sys/lkm/netinet/if_ipl
cvs update -kk -j${VEROLD} -j${VERNEW} -d
C=`cvs update | grep ^C | awk '{ print $2 }'`
cvs update | grep ^C
##vim $C
##for i in $C; do mkdir -p ${FIXES}/1/src/sys/lkm/netinet/if_ipl/`dirname $i`; done
##for i in $C; do cp $i ${FIXES}/1/src/sys/lkm/netinet/if_ipl/$i; done
cvs diff -u -rDARRENR | less
# src/regress/sys/kern/ipf
cd ${WORK}/src/regress/sys/kern/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
D=`cvs update | grep ^C | awk '{ print $2 }'`
cvs update | grep ^C
##vim $D
##for i in $D; do mkdir -p ${FIXES}/1/src/regress/sys/kern/ipf/`dirname $i`; done
##for i in $D; do cp $i ${FIXES}/1/src/regress/sys/kern/ipf/$i; done
cvs diff -u -rDARRENR | less
# Commit changes
cd ${WORK}/src
cvs ci -m "Upgraded IPFilter to ${VERSION}" \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf
cvs update -dPA dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf
# See the changes
cd ${WORK}/src
cvs diff -u -kk -rDARRENR \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf \
usr.sbin/ipf | less
###############################################################################
###############################################################################
# TEST IMPORT 2
###############################################################################
###############################################################################
# Settings
export WORK="${HOME}/netbsd/work"
export CVSROOT="${WORK}/cvsroot"
# Get a new repository
mkdir -p ${WORK}
${RSYNC} ${ORIG}/cvsroot ${WORK}
rm -f ${WORK}/cvsroot/CVSROOT/commitinfo*
rm -f ${WORK}/cvsroot/CVSROOT/loginfo*
touch ${WORK}/cvsroot/CVSROOT/commitinfo
touch ${WORK}/cvsroot/CVSROOT/loginfo
sed 's+/cvslock+/tmp/cvslock+' < ${WORK}/cvsroot/CVSROOT/config \
> ${WORK}/cvsroot/CVSROOT/config.1
mv -f ${WORK}/cvsroot/CVSROOT/config.1 ${WORK}/cvsroot/CVSROOT/config
mkdir -p /tmp/cvslock
export CVSROOT="${WORK}/cvsroot"
cd ${WORK}/src
rm -rf dist/ipf regress/sys/kern sys/lkm sys/dist/ipf sys/netinet usr.sbin/ipf
cvs update -dPA dist/ipf regress/sys/kern sys/lkm sys/dist/ipf \
sys/netinet usr.sbin/ipf
# cvs tag
cd ${WORK}/src
for i in dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf usr.sbin/ipf
do
(cd $i && cvs tag BEFORE-IPF-${VERTAG})
done
# Prepare the files for import
rm -rf ${IPF}
tar xpzf ${TGZ} -C `dirname ${IPF}`
cd ${IPF}
rm -rf ${EXTRACTED}
mkdir -p ${EXTRACTED}
cd ${EXTRACTED}
/usr/src/dist/ipf/ipf2netbsd ${IPF} ${EXTRACTED}
# Import the new version
cd ${EXTRACTED}/src
cvs import -I ! -I CVS -m "Import IPFilter ${VERSION}" src DARRENR ${VERNEW}
# Merge and fix conflicts
cd ${WORK}/src/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/sys/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/sys/lkm/netinet/if_ipl
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/regress/sys/kern/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${FIXES}/1 && tar cf - * | tar xvf - -C ${WORK}
cd ${WORK}/src
cvs ci -m "Upgraded IPFilter to ${VERSION}" \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf
cvs update -dPA dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf
cd ${FIXES}/2 && tar cf - * | tar xvf - -C ${WORK}
cd ${WORK}/src
cvs ci -m "Sync with official IPFilter" \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf
# Now build and verify everything before doing the real import...
###############################################################################
###############################################################################
# FINAL IMPORT INTO THE NETBSD REPOSITORY
###############################################################################
###############################################################################
# Settings
export WORK="/usr"
export CVSROOT="${NETBSDUSERNAME}@cvs.netbsd.org:/cvsroot"
# Update the local copy first
cd ${WORK}/src
cvs update -dPA dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf
# cvs tag
cd ${WORK}/src
for i in dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf usr.sbin/ipf
do
(cd $i && cvs tag BEFORE-IPF-${VERTAG})
done
# Prepare the files for import
rm -rf ${IPF}
tar xpzf ${TGZ} -C `dirname ${IPF}`
cd ${IPF}
rm -rf ${EXTRACTED}
mkdir -p ${EXTRACTED}
cd ${EXTRACTED}
/usr/src/dist/ipf/ipf2netbsd ${IPF} ${EXTRACTED}
# Import the new version
cd ${EXTRACTED}/src
cvs import -I ! -I CVS -m "Import IPFilter ${VERSION}" src DARRENR ${VERNEW}
# Merge and fix conflicts
cd ${WORK}/src/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/sys/dist/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/sys/lkm/netinet/if_ipl
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${WORK}/src/regress/sys/kern/ipf
cvs update -kk -j${VEROLD} -j${VERNEW} -d
cvs update | grep ^C
cd ${FIXES}/1 && tar cf - * | tar xvf - -C ${WORK}
cd ${WORK}/src
cvs ci -m "Upgraded IPFilter to ${VERSION}" \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf
cvs update -dPA dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl \
regress/sys/kern/ipf
cd ${FIXES}/2 && tar cf - * | tar xvf - -C ${WORK}
cd ${WORK}/src
cvs ci -m "Sync with official IPFilter" \
dist/ipf sys/dist/ipf sys/lkm/netinet/if_ipl regress/sys/kern/ipf
# fix doc/3RDPARTY and doc/CHANGES
# send mail to current-users@
HEADSUP
=======
Hi!
I have just upgraded IPFilter to the latest version (4.1.31) on
NetBSD -current. You must recompile kernel and the ipf tools to
use the new version:
cd /usr/src
./build.sh tools kernel=GENERIC
./build.sh releasekernel=GENERIC
(cd share/mk && make install)
(cd sys && make includes)
(cd usr.sbin/ipf && make dependall install)
After reboot you may want to check the version number and run the
regression tests:
ipf -V
(cd regress/sys/kern/ipf && make && make clean)
If you detect errors (or have improvements), please send a problem
report with the send-pr tool.
Changes since 4.1.29
====================
<TBD>
|