]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - FREEBSD-upgrade
Import OpenSSL 1.1.1g.
[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.1.1g
15
16 ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _`
17
18 cd /FreeBSD/work/openssl/merge
19 fetch http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz \
20     http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz.asc
21 gpg --verify openssl-${OSSLVER}.tar.gz.asc openssl-${OSSLVER}.tar.gz
22
23 svn co $FSVN/vendor-crypto/openssl/dist dist
24 tar -x -X $XLIST -f openssl-${OSSLVER}.tar.gz
25
26 cd dist
27 svn list -R | egrep -v -e '/$' -e '^FREEBSD-(Xlist|upgrade)$' | sort >../old
28 cd ../openssl-${OSSLVER}
29 find . -type f -or -type l | cut -c 3- | sort >../new
30 cd ..
31
32 # See that files to remove makes sense
33 comm -23 old new
34 # See that files to add makes sense
35 comm -13 old new
36
37 tar -cf - -C openssl-${OSSLVER} . | tar -xf - -C dist
38 cd dist
39 comm -23 ../old ../new | xargs svn rm
40 # Make sure to remove empty directories
41 comm -13 ../old ../new | xargs svn --parents add
42
43 svn stat
44 svn ci
45 svn cp ^/vendor-crypto/openssl/dist ^/vendor-crypto/openssl/$OSSLVER
46
47 # Merge to head
48 mkdir ../head
49 cd ../head
50 svn co $FSVN/head/crypto/openssl crypto/openssl
51 svn merge ^/vendor-crypto/openssl/dist crypto/openssl
52
53 # Resolve conflicts manually
54
55 svn co $FSVN/head/secure/lib/libcrypto secure/lib/libcrypto
56 svn co $FSVN/head/secure/lib/libssl secure/lib/libssl
57 svn co $FSVN/head/secure/usr.bin/openssl secure/usr.bin/openssl
58
59 cd secure/lib/libcrypto
60
61 # Update version number and release date in Makefile.inc
62 # Update all opensslconf-${MACHINE_CPUARCH}.h
63 # Update Version.map
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$