]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - FREEBSD-upgrade
Import OpenSSL 1.0.2p.
[FreeBSD/FreeBSD.git] / FREEBSD-upgrade
1
2 This contains various notes used to import a new OpenSSL version into
3 the FreeBSD base system.  It is not expected to be complete but just to
4 contain some hints for imports.  Note that this doesn't actually deal
5 with getting OpenSSL to compile...
6
7 XXX This file currently partly contain CVS and SVN instructions.
8
9 First, read http://wiki.freebsd.org/SubversionPrimer/VendorImports
10
11 # Xlist
12 setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist
13 setenv FSVN "svn+ssh://repo.freebsd.org/base"
14 setenv OSSLVER 1.0.2p
15 # OSSLTAG format: v1_0_2p
16
17 ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _`
18
19 cd /FreeBSD/work/openssl/merge
20 fetch http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz \
21     http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz.asc
22 gpg --verify openssl-${OSSLVER}.tar.gz.asc openssl-${OSSLVER}.tar.gz
23
24 svn co $FSVN/vendor-crypto/openssl/dist-1.0.2 dist-1.0.2
25 tar -x -X $XLIST -f openssl-${OSSLVER}.tar.gz
26
27 cd dist-1.0.2
28 svn list -R | egrep -v -e '/$' -e '^FREEBSD-(Xlist|upgrade)$' | sort >../old
29 cd ../openssl-${OSSLVER}
30 find . -type f -or -type l | cut -c 3- | sort >../new
31 cd ..
32
33 # See that files to remove makes sense
34 comm -23 old new
35 # See that files to add makes sense
36 comm -13 old new
37
38 tar -cf - -C openssl-${OSSLVER} . | tar -xf - -C dist-1.0.2
39 cd dist-1.0.2
40 comm -23 ../old ../new | xargs svn rm
41 # Make sure to remove empty directories
42 comm -13 ../old ../new | xargs svn --parents add
43
44 svn stat
45 svn ci
46 svn cp ^/vendor-crypto/openssl/dist-1.0.2 ^/vendor-crypto/openssl/$OSSLVER
47
48 # Merge to head
49 mkdir ../head
50 cd ../head
51 svn co $FSVN/head/crypto/openssl crypto/openssl
52 svn merge ^/vendor-crypto/openssl/dist-1.0.2 crypto/openssl
53
54 # Resolve conflicts manually
55
56 svn co $FSVN/head/secure/lib/libcrypto secure/lib/libcrypto
57 svn co $FSVN/head/secure/lib/libssl secure/lib/libssl
58 svn co $FSVN/head/secure/usr.bin/openssl secure/usr.bin/openssl
59
60 cd secure/lib/libcrypto
61
62 # Update version number and release date in Makefile.inc
63 # Update all opensslconf-${MACHINE_CPUARCH}.h
64
65 # Regen assembly files if necessary
66 make -f Makefile.asm all
67 mv *.[Ss] ${MACHINE_CPUARCH}
68 make -f Makefile.asm clean
69
70 # Regen manual pages
71 make man-makefile-update && make man-update
72 cd ../libssl
73 make man-makefile-update && make man-update
74 cd ../../usr.bin/openssl
75 make man-makefile-update && make man-update
76 cd ../../..
77
78 # Commit!
79 svn ci crypto/openssl secure/lib/libcrypto secure/lib/libssl secure/usr.bin/openssl
80
81                                         -- simon@, jkim@
82
83 $FreeBSD$