diff options
author | Brent Cook <bcook@openbsd.org> | 2014-07-21 04:21:59 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-07-21 19:53:28 -0500 |
commit | 8a44ab84f00ca5c71fe4f2ec0b91443d52680124 (patch) | |
tree | 08b8233a17e26564172ade6c99e29b453e9d0aef | |
parent | f4d98ff1b2d1e86221639fd7cd8fbca35efded63 (diff) | |
download | portable-8a44ab84f00ca5c71fe4f2ec0b91443d52680124.tar.gz portable-8a44ab84f00ca5c71fe4f2ec0b91443d52680124.tar.bz2 portable-8a44ab84f00ca5c71fe4f2ec0b91443d52680124.zip |
preserve timestamps on copy from upstream checkout
this saves time on rebuilds when testing tarballs
ok beck@ guenther@
-rwxr-xr-x | update.sh | 58 |
1 files changed, 30 insertions, 28 deletions
@@ -34,17 +34,19 @@ echo libcrypto version $libcrypto_version | |||
34 | 34 | ||
35 | sed -e "s/VERSION/${libressl_version}/" configure.ac.tpl > configure.ac | 35 | sed -e "s/VERSION/${libressl_version}/" configure.ac.tpl > configure.ac |
36 | 36 | ||
37 | CP='cp -p' | ||
38 | |||
37 | copy_src() { | 39 | copy_src() { |
38 | mkdir -p $1 | 40 | mkdir -p $1 |
39 | rm -f $1/*.c | 41 | rm -f $1/*.c |
40 | for file in $2; do | 42 | for file in $2; do |
41 | cp $libssl_src/src/$1/$file $1 | 43 | $CP $libssl_src/src/$1/$file $1 |
42 | done | 44 | done |
43 | } | 45 | } |
44 | 46 | ||
45 | copy_hdrs() { | 47 | copy_hdrs() { |
46 | for file in $2; do | 48 | for file in $2; do |
47 | cp $libssl_src/src/$1/$file include/openssl | 49 | $CP $libssl_src/src/$1/$file include/openssl |
48 | done | 50 | done |
49 | } | 51 | } |
50 | 52 | ||
@@ -53,22 +55,22 @@ copy_crypto() { | |||
53 | crypto_subdirs="$crypto_subdirs $1" | 55 | crypto_subdirs="$crypto_subdirs $1" |
54 | } | 56 | } |
55 | 57 | ||
56 | cp $libssl_src/src/LICENSE COPYING | 58 | $CP $libssl_src/src/LICENSE COPYING |
57 | echo "Please see OpenBSD CVS logs" > ChangeLog | 59 | echo "Please see OpenBSD CVS logs" > ChangeLog |
58 | 60 | ||
59 | cp $libcrypto_src/crypto/arch/amd64/opensslconf.h include/openssl | 61 | $CP $libcrypto_src/crypto/arch/amd64/opensslconf.h include/openssl |
60 | cp $libssl_src/src/crypto/opensslfeatures.h include/openssl | 62 | $CP $libssl_src/src/crypto/opensslfeatures.h include/openssl |
61 | cp $libssl_src/src/e_os2.h include/openssl | 63 | $CP $libssl_src/src/e_os2.h include/openssl |
62 | cp $libssl_src/src/ssl/pqueue.h include | 64 | $CP $libssl_src/src/ssl/pqueue.h include |
63 | 65 | ||
64 | for i in explicit_bzero.c strlcpy.c strlcat.c timingsafe_bcmp.c timingsafe_memcmp.c; do | 66 | for i in explicit_bzero.c strlcpy.c strlcat.c timingsafe_bcmp.c timingsafe_memcmp.c; do |
65 | cp $libc_src/string/$i crypto/compat | 67 | $CP $libc_src/string/$i crypto/compat |
66 | done | 68 | done |
67 | cp $libc_src/stdlib/reallocarray.c crypto/compat | 69 | $CP $libc_src/stdlib/reallocarray.c crypto/compat |
68 | cp $libc_src/crypt/arc4random.c crypto/compat | 70 | $CP $libc_src/crypt/arc4random.c crypto/compat |
69 | cp $libc_src/crypt/chacha_private.h crypto/compat | 71 | $CP $libc_src/crypt/chacha_private.h crypto/compat |
70 | cp $libcrypto_src/crypto/getentropy_*.c crypto/compat | 72 | $CP $libcrypto_src/crypto/getentropy_*.c crypto/compat |
71 | cp $libcrypto_src/crypto/arc4random_*.h crypto/compat | 73 | $CP $libcrypto_src/crypto/arc4random_*.h crypto/compat |
72 | 74 | ||
73 | (cd ./$libssl_src/src/crypto/objects/; | 75 | (cd ./$libssl_src/src/crypto/objects/; |
74 | perl objects.pl objects.txt obj_mac.num obj_mac.h; | 76 | perl objects.pl objects.txt obj_mac.num obj_mac.h; |
@@ -94,7 +96,7 @@ copy_hdrs ssl "srtp.h ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h" | |||
94 | 96 | ||
95 | for i in ssl/srtp.h \ | 97 | for i in ssl/srtp.h \ |
96 | ssl/ssl_locl.h; do | 98 | ssl/ssl_locl.h; do |
97 | cp $libssl_src/src/$i ssl | 99 | $CP $libssl_src/src/$i ssl |
98 | done | 100 | done |
99 | 101 | ||
100 | copy_src ssl "s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c | 102 | copy_src ssl "s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c |
@@ -285,20 +287,20 @@ for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ | |||
285 | pkcs7/pkcs7test.c pqueue/pq_test.c rand/randtest.c rc2/rc2test.c \ | 287 | pkcs7/pkcs7test.c pqueue/pq_test.c rand/randtest.c rc2/rc2test.c \ |
286 | rc4/rc4test.c rmd/rmdtest.c sha/shatest.c sha1/sha1test.c \ | 288 | rc4/rc4test.c rmd/rmdtest.c sha/shatest.c sha1/sha1test.c \ |
287 | sha256/sha256test.c sha512/sha512test.c utf8/utf8test.c; do | 289 | sha256/sha256test.c sha512/sha512test.c utf8/utf8test.c; do |
288 | cp $libcrypto_regress/$i tests | 290 | $CP $libcrypto_regress/$i tests |
289 | done | 291 | done |
290 | cp $libc_regress/arc4random-fork/arc4random-fork.c tests/arc4randomforktest.c | 292 | $CP $libc_regress/arc4random-fork/arc4random-fork.c tests/arc4randomforktest.c |
291 | cp $libc_regress/explicit_bzero/explicit_bzero.c tests | 293 | $CP $libc_regress/explicit_bzero/explicit_bzero.c tests |
292 | cp $libc_regress/timingsafe/timingsafe.c tests | 294 | $CP $libc_regress/timingsafe/timingsafe.c tests |
293 | 295 | ||
294 | for i in asn1/asn1test.c ssl/ssltest.c ssl/testssl certs/ca.pem certs/server.pem; do | 296 | for i in asn1/asn1test.c ssl/ssltest.c ssl/testssl certs/ca.pem certs/server.pem; do |
295 | cp $libssl_regress/$i tests | 297 | $CP $libssl_regress/$i tests |
296 | done | 298 | done |
297 | 299 | ||
298 | # do not directly run all test programs | 300 | # do not directly run all test programs |
299 | test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest fork_rand) | 301 | test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest fork_rand) |
300 | (cd tests | 302 | (cd tests |
301 | cp Makefile.am.tpl Makefile.am | 303 | $CP Makefile.am.tpl Makefile.am |
302 | 304 | ||
303 | for i in `ls -1 *.c|sort`; do | 305 | for i in `ls -1 *.c|sort`; do |
304 | TEST=`echo $i|sed -e "s/\.c//"` | 306 | TEST=`echo $i|sed -e "s/\.c//"` |
@@ -311,9 +313,9 @@ test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest fork_ | |||
311 | echo "${TEST}_LDADD += \$(top_builddir)/ssl/libssl.la" >> Makefile.am | 313 | echo "${TEST}_LDADD += \$(top_builddir)/ssl/libssl.la" >> Makefile.am |
312 | done | 314 | done |
313 | ) | 315 | ) |
314 | cp $libcrypto_regress/evp/evptests.txt tests | 316 | $CP $libcrypto_regress/evp/evptests.txt tests |
315 | cp $libcrypto_regress/aead/aeadtests.txt tests | 317 | $CP $libcrypto_regress/aead/aeadtests.txt tests |
316 | cp $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt | 318 | $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt |
317 | chmod 755 tests/testssl | 319 | chmod 755 tests/testssl |
318 | for i in "${test_excludes[@]}"; do | 320 | for i in "${test_excludes[@]}"; do |
319 | if [ -e tests/${i}.sh ]; then | 321 | if [ -e tests/${i}.sh ]; then |
@@ -327,7 +329,7 @@ echo "EXTRA_DIST += pq_expected.txt" >> tests/Makefile.am | |||
327 | echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am | 329 | echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am |
328 | 330 | ||
329 | (cd include/openssl | 331 | (cd include/openssl |
330 | cp Makefile.am.tpl Makefile.am | 332 | $CP Makefile.am.tpl Makefile.am |
331 | for i in `ls -1 *.h|sort`; do | 333 | for i in `ls -1 *.h|sort`; do |
332 | echo "opensslinclude_HEADERS += $i" >> Makefile.am | 334 | echo "opensslinclude_HEADERS += $i" >> Makefile.am |
333 | done | 335 | done |
@@ -376,12 +378,12 @@ crypto_excludes=( | |||
376 | ) | 378 | ) |
377 | 379 | ||
378 | # conditional compiles | 380 | # conditional compiles |
379 | cp $libc_src/stdlib/strtonum.c apps/ | 381 | $CP $libc_src/stdlib/strtonum.c apps/ |
380 | apps_excludes=( | 382 | apps_excludes=( |
381 | strtonum.c | 383 | strtonum.c |
382 | ) | 384 | ) |
383 | (cd apps | 385 | (cd apps |
384 | cp Makefile.am.tpl Makefile.am | 386 | $CP Makefile.am.tpl Makefile.am |
385 | for i in `ls -1 *.c|sort`; do | 387 | for i in `ls -1 *.c|sort`; do |
386 | if ! [[ ${apps_excludes[*]} =~ $i ]]; then | 388 | if ! [[ ${apps_excludes[*]} =~ $i ]]; then |
387 | echo "openssl_SOURCES += $i" >> Makefile.am | 389 | echo "openssl_SOURCES += $i" >> Makefile.am |
@@ -393,7 +395,7 @@ apps_excludes=( | |||
393 | ) | 395 | ) |
394 | 396 | ||
395 | (cd man | 397 | (cd man |
396 | cp Makefile.am.tpl Makefile.am | 398 | $CP Makefile.am.tpl Makefile.am |
397 | for i in crypto,3 ssl,3 apps,1; do | 399 | for i in crypto,3 ssl,3 apps,1; do |
398 | IFS=","; set $i; unset IFS | 400 | IFS=","; set $i; unset IFS |
399 | for i in `ls -1 ../$libssl_src/src/doc/$1/*.pod | sort`; do | 401 | for i in `ls -1 ../$libssl_src/src/doc/$1/*.pod | sort`; do |
@@ -409,7 +411,7 @@ apps_excludes=( | |||
409 | done | 411 | done |
410 | done | 412 | done |
411 | 413 | ||
412 | cp ../$openssl_cmd_src/openssl.1 . | 414 | $CP ../$openssl_cmd_src/openssl.1 . |
413 | echo "dist_man_MANS += openssl.1" >> Makefile.am | 415 | echo "dist_man_MANS += openssl.1" >> Makefile.am |
414 | 416 | ||
415 | echo "install-data-hook:" >> Makefile.am | 417 | echo "install-data-hook:" >> Makefile.am |