path: root/FREEBSD-upgrade
blob: 125d79716b4dbe9df6917ab9fa0e9ea92994f644 (plain) (tree)
















This contains various notes used to import a new OpenSSL version into
the FreeBSD base system.  It is not expected to be complete but just to
contain some hints for imports.  Note that this doesn't actually deal
with getting OpenSSL to compile...

XXX This file currently partly contain CVS and SVN instructions.

First, read http://wiki.freebsd.org/SubversionPrimer/VendorImports

# Xlist
setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist
setenv FSVN "svn+ssh://svn.freebsd.org/base"
setenv OSSLVER 1.0.1o
# OSSLTAG format: v1_0_1o

###setenv OSSLTAG v`echo ${OSSLVER} | tr . _`

cd /FreeBSD/work/openssl/merge
fetch http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz \
gpg --verify openssl-${OSSLVER}.tar.gz.asc openssl-${OSSLVER}.tar.gz

svn co $FSVN/vendor-crypto/openssl/dist dist
tar -x -X $XLIST -f openssl-${OSSLVER}.tar.gz

cd dist
svn list -R | egrep -v -e '/$' -e '^FREEBSD-(Xlist|upgrade)$' | sort >../old
cd ../openssl-${OSSLVER}
find . -type f -or -type l | cut -c 3- | sort >../new
cd ..

# See that files to remove makes sense
comm -23 old new
# See that files to add makes sense
comm -13 old new

tar -cf - -C openssl-${OSSLVER} . | tar -xf - -C dist
cd dist
comm -23 ../old ../new | xargs svn rm
# Make sure to remove empty directories
comm -13 ../old ../new | xargs svn --parents add

svn stat
svn ci
svn cp ^/vendor-crypto/openssl/dist ^/vendor-crypto/openssl/$OSSLVER

# Merge to head
mkdir ../head
cd ../head
svn co $FSVN/head/crypto/openssl crypto/openssl
svn merge ^/vendor-crypto/openssl/dist crypto/openssl

# Resolve conflicts manually

svn co $FSVN/head/secure/lib/libcrypto secure/lib/libcrypto
svn co $FSVN/head/secure/lib/libssl secure/lib/libssl
svn co $FSVN/head/secure/usr.bin/openssl secure/usr.bin/openssl

cd secure/lib/libcrypto

# Update version number and release date in Makefile.inc
# Update all opensslconf-${MACHINE_CPUARCH}.h

# Regen assembly files if necessary
make -f Makefile.asm all
make -f Makefile.asm clean

# Regen manual pages
make man-makefile-update && make man-update
cd ../libssl
make man-makefile-update && make man-update
cd ../../usr.bin/openssl
make man-makefile-update && make man-update
cd ../../..

# Commit!
svn ci crypto/openssl secure/lib/libcrypto secure/lib/libssl secure/usr.bin/openssl

					-- simon@, jkim@