Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
etc/ | H | - | - | 745 | 551 | |
libexec/tftp-proxy/ | H | - | - | 1,005 | 780 | |
sbin/ | H | - | - | 18,292 | 15,567 | |
share/ | H | - | - | 5,158 | 4,981 | |
usr.sbin/ | H | - | - | 4,165 | 3,236 | |
README.NetBSD | H A D | 02-Dec-2009 | 9.8 KiB | 302 | 254 | |
pf2netbsd | H A D | 02-Dec-2009 | 6 KiB | 264 | 189 |
README.NetBSD
1# 2# $NetBSD: README.NetBSD,v 1.1 2009/12/02 15:07:09 martti Exp $ 3# 4# Author: Martti Kuparinen <martti@NetBSD.org> 5# 6# This file contains copy-pastable commands to import a new PF release 7# into the NetBSD repository. Before importing the code into the official 8# NetBSD repository, you'll import the code into your own local test 9# repository, resolve the conflicts and make sure everything works as expected. 10# 11# Steps in this document: 12# 1) Get the PF dist files and a copy of the CVS repository 13# 2) Create a local test repository for the test imports 14# 3) Import the new PF release into the test repository 15# 4) Resolve conflicts and make other adjustments 16# 5) Save the required modifications 17# 6) Re-create a local test repository for the final test import 18# 7) Import the new PF release into the test repository 19# 8) Apply the fixes 20# 9) Compile everything and make sure the new version really works 21# 10) Update your /usr/src (cd /usr/src && cvs update -dPA) 22# 11) Import the new PF release into the NetBSD repository 23# 12) Apply the fixes 24# 13) Update your /usr/src one more time (cd /usr/src && cvs update -dPA) 25# 14) Compile and install everything 26# 15) Update src/doc/3RDPARTY and src/doc/CHANGES 27# 16) Send an announcement to current-users 28# 29 30############################################################################### 31############################################################################### 32# COMMON SETTINGS FOR EVERYTHING BELOW 33############################################################################### 34############################################################################### 35 36export NETBSDUSERNAME="fixthis" 37export VERSION="4.6" 38export VERTAG="`echo ${VERSION} | sed 's+\.+_+g'`" 39export VEROLD="v4_2" 40export VERNEW="v4_6" 41export ORIG="${HOME}/netbsd/orig" 42export WORK="${HOME}/netbsd/work" 43export FIXES="${HOME}/netbsd/fixes/${VERSION}" 44export RSYNC_RSH="ssh -4" 45export RSYNC="rsync -avzr --delete" 46 47############################################################################### 48############################################################################### 49# Fetch the official PF sources 50############################################################################### 51############################################################################### 52 53mkdir -p ${ORIG}/openbsd-${VERSION} 54cd ${ORIG}/openbsd-${VERSION} 55if [ ! -f src.tar.gz ]; then 56 ftp ftp://ftp.df.lth.se/pub/OpenBSD/${VERSION}/src.tar.gz 57fi 58if [ ! -f sys.tar.gz ]; then 59 ftp ftp://ftp.df.lth.se/pub/OpenBSD/${VERSION}/sys.tar.gz 60fi 61 62############################################################################### 63############################################################################### 64# GET COPY OF THE CVS REPOSITORY FOR LOCAL TEST IMPORTS 65############################################################################### 66############################################################################### 67 68RSYNC_RSH="ssh -4" 69RSYNC="rsync -avzr --delete -e ssh" 70S="${NETBSDUSERNAME}@cvs.netbsd.org::cvsroot" 71D="${ORIG}/cvsroot" 72 73if [ "${NETBSDUSERNAME}" = "fixthis" ]; then 74 echo "You MUST use your real NetBSD user name..." 75 sleep 86400 76fi 77${RSYNC} ${S}/src/ ${D}/src 78${RSYNC} --exclude 'commitlog*' --exclude 'history*' ${S}/CVSROOT/ ${D}/CVSROOT 79 80############################################################################### 81############################################################################### 82# TEST IMPORT 1 83############################################################################### 84############################################################################### 85 86# Get a new repository 87mkdir -p ${WORK} 88${RSYNC} ${ORIG}/cvsroot ${WORK} 89rm -f ${WORK}/cvsroot/CVSROOT/commitinfo* 90rm -f ${WORK}/cvsroot/CVSROOT/loginfo* 91touch ${WORK}/cvsroot/CVSROOT/commitinfo 92touch ${WORK}/cvsroot/CVSROOT/loginfo 93chmod 644 ${WORK}/cvsroot/CVSROOT/config 94sed 's+/cvslock+/tmp/cvslock+' < ${WORK}/cvsroot/CVSROOT/config \ 95 > ${WORK}/cvsroot/CVSROOT/config.1 96grep -v -e tag= -e AdminGroup= -e AdminOptions= \ 97 < ${WORK}/cvsroot/CVSROOT/config.1 > ${WORK}/cvsroot/CVSROOT/config 98chmod 444 ${WORK}/cvsroot/CVSROOT/config 99rm -f ${WORK}/cvsroot/CVSROOT/config.1 100mkdir -p /tmp/cvslock 101export CVSROOT="${WORK}/cvsroot" 102 103# Checkout a working copy 104cd ${WORK} 105rm -rf src 106cvs co -P src 107 108or 109 110cd ${WORK}/src 111rm -rf dist/pf sys/dist/pf 112cvs update -dPA 113 114or 115 116cd ${WORK}/src 117rm -rf dist/pf sys/dist/pf 118cvs update -dPA dist/pf sys/dist/pf 119 120# cvs tag 121cd ${WORK}/src 122cvs tag BEFORE-PF-${VERTAG} dist/pf sys/dist/pf 123 124# Prepare the files for import 125rm -rf /tmp/openbsd-${VERSION} 126mkdir -p /tmp/openbsd-${VERSION} 127cd /tmp/openbsd-${VERSION} 128tar -xzf ${ORIG}/openbsd-${VERSION}/src.tar.gz 129tar -xzf ${ORIG}/openbsd-${VERSION}/sys.tar.gz 130rm -rf /tmp/netbsd-${VERSION} 131${WORK}/src/dist/pf/pf2netbsd /tmp/openbsd-${VERSION} /tmp/netbsd-${VERSION} 132cd /tmp/netbsd-${VERSION} 133 134# Import the new version 135cd /tmp/netbsd-${VERSION} 136cvs import -I ! -I CVS -m "Import PF from OpenBSD ${VERSION}" \ 137 src OPENBSD ${VERNEW} 138 139# src/dist/pf 140cd ${WORK}/src/dist/pf 141cvs update -kk -j${VEROLD} -j${VERNEW} -d 142A=`cvs update | grep ^C | awk '{ print $2 }'` 143cvs update | grep ^C 144 145##vim $A 146##for i in $A; do mkdir -p ${FIXES}/1/src/dist/pf/`dirname $i`; done 147##for i in $A; do cp $i ${FIXES}/1/src/dist/pf/$i; done 148cvs diff -u -kk -rOPENBSD $A | less 149cvs diff -u -kk -rOPENBSD | less 150cvs update -dPA 151 152# src/sys/dist/pf 153cd ${WORK}/src/sys/dist/pf 154cvs update -kk -j${VEROLD} -j${VERNEW} -d 155B=`cvs update | grep ^C | awk '{ print $2 }'` 156cvs update | grep ^C 157 158##vim $B 159##for i in $B; do mkdir -p ${FIXES}/1/src/sys/dist/pf/`dirname $i`; done 160##for i in $B; do cp $i ${FIXES}/1/src/sys/dist/pf/$i; done 161cvs diff -u -kk -rOPENBSD $B | less 162cvs diff -u -kk -rOPENBSD | less 163 164# Commit changes 165cd ${WORK}/src 166cvs ci -m "Upgraded PF to ${VERSION}" dist/pf sys/dist/pf 167 168# See the changes 169cd ${WORK}/src 170cvs diff -u -kk -rOPENBSD dist/pf sys/dist/pf | less 171 172############################################################################### 173############################################################################### 174# TEST IMPORT 2 175############################################################################### 176############################################################################### 177 178# Get a new repository 179mkdir -p ${WORK} 180${RSYNC} ${ORIG}/cvsroot ${WORK} 181rm -f ${WORK}/cvsroot/CVSROOT/commitinfo* 182rm -f ${WORK}/cvsroot/CVSROOT/loginfo* 183touch ${WORK}/cvsroot/CVSROOT/commitinfo 184touch ${WORK}/cvsroot/CVSROOT/loginfo 185chmod 644 ${WORK}/cvsroot/CVSROOT/config 186sed 's+/cvslock+/tmp/cvslock+' < ${WORK}/cvsroot/CVSROOT/config \ 187 > ${WORK}/cvsroot/CVSROOT/config.1 188grep -v -e tag= -e AdminGroup= -e AdminOptions= \ 189 < ${WORK}/cvsroot/CVSROOT/config.1 > ${WORK}/cvsroot/CVSROOT/config 190chmod 444 ${WORK}/cvsroot/CVSROOT/config 191rm -f ${WORK}/cvsroot/CVSROOT/config.1 192mkdir -p /tmp/cvslock 193export CVSROOT="${WORK}/cvsroot" 194 195# Checkout a working copy 196cd ${WORK}/src 197rm -rf dist/pf sys/dist/pf 198cvs update -dPA dist/pf sys/dist/pf 199 200# cvs tag 201cd ${WORK}/src 202cvs tag BEFORE-PF-${VERTAG} dist/pf sys/dist/pf 203 204# Prepare the files for import 205rm -rf /tmp/openbsd-${VERSION} 206mkdir -p /tmp/openbsd-${VERSION} 207cd /tmp/openbsd-${VERSION} 208tar -xzf ${ORIG}/openbsd-${VERSION}/src.tar.gz 209tar -xzf ${ORIG}/openbsd-${VERSION}/sys.tar.gz 210rm -rf /tmp/netbsd-${VERSION} 211${WORK}/src/dist/pf/pf2netbsd /tmp/openbsd-${VERSION} /tmp/netbsd-${VERSION} 212cd /tmp/netbsd-${VERSION} 213 214# Import the new version 215cd /tmp/netbsd-${VERSION} 216cvs import -I ! -I CVS -m "Import PF from OpenBSD ${VERSION}" \ 217 src OPENBSD ${VERNEW} 218 219# Merge and fix conflicts 220cd ${WORK}/src/dist/pf 221cvs update -kk -j${VEROLD} -j${VERNEW} -d 222cvs update | grep ^C 223 224cd ${WORK}/src/sys/dist/pf 225cvs update -kk -j${VEROLD} -j${VERNEW} -d 226cvs update | grep ^C 227 228cd ${FIXES}/1 && tar cf - * | tar xvf - -C ${WORK} 229cd ${WORK}/src 230cvs ci -m "Upgraded PF to ${VERSION}" dist/pf sys/dist/pf 231 232cd ${FIXES}/2 && tar cf - * | tar xvf - -C ${WORK} 233cd ${WORK}/src 234cvs ci -m "Sync with official PF" dist/pf sys/dist/pf 235 236############################################################################### 237############################################################################### 238# FINAL IMPORT IN TO NETBSD REPOSITORY 239############################################################################### 240############################################################################### 241 242# Settings 243if [ "${NETBSDUSERNAME}" = "fixthis" ]; then 244 echo "You MUST use your real NetBSD user name..." 245 sleep 86400 246fi 247export WORK="/usr" 248export CVSROOT="${NETBSDUSERNAME}@cvs.netbsd.org:/cvsroot" 249 250# Update the local copy first 251cd ${WORK}/src 252cvs update -dPA dist/pf sys/dist/pf 253 254# cvs tag 255cvs tag BEFORE-PF-${VERTAG} dist/pf sys/dist/pf 256 257# Prepare the files for import 258rm -rf /tmp/openbsd-${VERSION} 259mkdir -p /tmp/openbsd-${VERSION} 260cd /tmp/openbsd-${VERSION} 261tar -xzf ${ORIG}/openbsd-${VERSION}/src.tar.gz 262tar -xzf ${ORIG}/openbsd-${VERSION}/sys.tar.gz 263rm -rf /tmp/netbsd-${VERSION} 264${WORK}/src/dist/pf/pf2netbsd /tmp/openbsd-${VERSION} /tmp/netbsd-${VERSION} 265cd /tmp/netbsd-${VERSION} 266 267# Import the new version 268cd /tmp/netbsd-${VERSION} 269cvs import -I ! -I CVS -m "Import PF from OpenBSD ${VERSION}" \ 270 src OPENBSD ${VERNEW} 271 272# Merge and fix conflicts 273cd ${WORK}/src/dist/pf 274cvs update -kk -j${VEROLD} -j${VERNEW} -d 275cvs update | grep ^C 276 277cd ${WORK}/src/sys/dist/pf 278cvs update -kk -j${VEROLD} -j${VERNEW} -d 279cvs update | grep ^C 280 281cd ${FIXES}/1 && tar cf - * | tar xvf - -C ${WORK} 282cd ${WORK}/src 283cvs ci -m "Upgraded PF to ${VERSION}" dist/pf sys/dist/pf 284 285cd ${FIXES}/2 && tar cf - * | tar xvf - -C ${WORK} 286cd ${WORK}/src 287cvs ci -m "Sync with official PF" dist/pf sys/dist/pf 288 289# fix doc/3RDPARTY and doc/CHANGES 290# send mail to current-users@ 291 292HEADSUP 293======= 294Hi! 295 296I have just upgraded PF to the latest version on NetBSD -current. I've 297tested this by building i386 and amd64 release and installed the sets 298on my test hosts. 299 300If you detect any errors (or have improvements), please send a problem 301report with the send-pr tool. 302