Browse code

openssl update

Hanno Böck authored on 09/07/2015 15:00:06
Showing 8 changed files
... ...
@@ -13,12 +13,18 @@ AUX openssl-1.0.2-CVE-2015-0291.patch 16069 SHA256 be4f9fa463a027e7c77396a8d3ddc
13 13
 AUX openssl-1.0.2-ipv6.patch 18811 SHA256 9ff3150c75f3f3e6a9773ffe54d90994cbf68cc919134aea68e09e7ed921763d SHA512 58e293f8f19a3fad08729b842dd977b73fedb0c49208d87a056bfea857c0e2b79a310d7d098c04429b65564fce64defeda6d1dcc3068ad5a80ef276db6421e54 WHIRLPOOL 36a0fffc7238011b93077bed94c9507f2ffc1cf199e6c06e94d01589cdc84a6568b9122e1a120b8262bd0a1c43f25169a29796c92a78338dd9f03b4cc2cdf0b8
14 14
 AUX openssl-1.0.2-parallel-build.patch 10661 SHA256 bc5622150a964dc2d9909f41557140b696ce1bdfa4e2b12cc3e0e51029ead32b SHA512 a4957304a4424016cd8a1c6552c422cd042d737e12f96235ec54d1e601ccbe8cb79d931ac8777d1a599bd4a70eac4e6700a24362f14fb04eb273df82f2de0d01 WHIRLPOOL 5b34e45dcb0db6649e26d275925ca008f5201afbc22184e15c5324513bc0ed40ee271a70686e10a20bb219b3c4bd2148323b317ead97cdc27a3c897c0a07d228
15 15
 AUX openssl-1.0.2-s_client-verify.patch 648 SHA256 b6ca2278dd9833f87a1d0037cb3cac8aee0f8326ff13ece1f08a536b8545eb77 SHA512 78b09ae700096205582785584a268776af46fc5bc94a0faa1ce6087ffcc945649e69269ff7fa88dedd5df1a5cdecc53e885de1e39506470f23b02028ca962104 WHIRLPOOL 8e7c90d37c1736b4b2f2c38d1c12dcfee4996a50a2a7dd07645a0c0b6616006d11232dd0f88ab735833e1c46aa171ceb5e1288c3d57296010bdda59295de7599
16
-AUX openssl-1.0.2a-parallel-build.patch 11315 SHA256 eb5bd4e1eefb386b2fa60f39d08d9190a645bf09131140499db5bfc07e1ae539 SHA512 62fcde74c57b45047d43d8b24bfeae131bbca61c927eb7450811e9672ba2409575fe0e39ae25963609e38c5cd6a823eb11e2cec329a9a78b6a906209cf39ccd4 WHIRLPOOL 992a5b209415459084312019ee65bc22352592eeda4e5419abc64d5bbb07cd7eef49e3135bfaa38595133c5b5e4574ae87104b422c0fabe8507486289153fee0
16
+AUX openssl-1.0.2a-malloc-typo.patch 1440 SHA256 f911737f715f8af87786cc46a196b78c7d9af0fbb4af77bff178dc817ee9d9c6 SHA512 5b4c9bcd24a80bcb17e21ffdd88b1a58f1794ae6069e773483ed1595022d212ace521aef3faa90df489b549fc60c0e871d5d711859a599b6373dc67af29a0c4b WHIRLPOOL 18d3e7b1df3b15b08aaa260081d54125c9f0cdc65c77ccc0ae5c642c5752fcb58e31e905bb1fb6c73736d1dee3f22dd1a7c399df8b3f6baeb47e9dbae5d26937
17
+AUX openssl-1.0.2a-parallel-build.patch 9573 SHA256 db2dcdb27062923d2818f988787bb802c292053d1d8a5bf032800e658c7bd196 SHA512 eef70d7662fe1c84ea8a998b1b394900805a91ae371a99e45ea07725ac218ffd6be5b75add647724e1a6b5556884bcb4a5be31b97254fd62b63aeead7ff701e3 WHIRLPOOL cbd5822db1da8e59b604f502856586c7251aa31594eefb3cfb4c0aa6bc33587df6298a245b8f733486d7a3f053bb33ff29066725dd4430dc9f9b2c54bb5464dc
18
+AUX openssl-1.0.2a-parallel-install-dirs.patch 2013 SHA256 eddd8a5123748052c598214487ac178e4bfa4e31ba2ec520c70d59c8c5bfa2e9 SHA512 c3b97fa318b9627bcaf4f39d1615c46322c1081cded135af5b5115beb2be74ead46084119fce5643b12c54b6851c33bfb624694ccf6f3d32060b6d56239d3674 WHIRLPOOL 59228ad2796e28edf7508a3b3bbdab36f7b678922566a1ed43a86727371c7b6b8c362431f49812e7c60a9aa72134d7fffaeb7be0efb6b5ca0f10e1c716b6a557
19
+AUX openssl-1.0.2a-parallel-obj-headers.patch 1359 SHA256 147c3eeaad614c044749ea527cb433eae5e2d5cad34a78c6ba61cd967bfbe01f SHA512 ac8224bc088099d72e7e6761303b8653766372bd027536951c458bd22fd0526163de22bf27675e0292a12ae7257a5c1edf26a92747e00cc139e13e1b624b4072 WHIRLPOOL 58b1de7c90ed96a077065ff6abfdeaffd98ce68cc9a2551dab7ff3d04e9b38be8d4bb94a6830f4e6c3d997747345c43f76c31f4c7b825f56fd488e85b9c6179e
20
+AUX openssl-1.0.2a-parallel-symlinking.patch 1967 SHA256 5be3c20d64cadaed7bc4e8e500e8a67faafded7fb326779620fdb29397c44d87 SHA512 ee6c057134b31a96af5ffc3558011f8f4ffda4a2ceb2967f32cd01b6ee0ce7b386fd195c19936923404da46c33eee38a2bab335da1a16b835ac9f9d02157bdf6 WHIRLPOOL daf64bf9d14b0516b4e9dd75d3b806b1e389defe604de9e0d19860ef10436b9a534d14cfec6422c85e9134998dfe9917d257730036daf813fce0ae7d1f6be284
21
+AUX openssl-1.0.2a-x32-asm.patch 1561 SHA256 8bcff04217c5ad82448e27d14f3559a157c2cad89b5fb2b6af701fff1664f86d SHA512 fbb23393e68776e9d34953f85ba3cbb285421d50f06bd297b485c7cffc8d89ca8caff6783f21038ae668b5c75056c89dc652217ac8609b5328e2c28e70ac294c WHIRLPOOL 70163beaed966de948562c3a633828846d12eda7b04526c7e33746c67af5a20ecf47e9e9e5cce33abf7444676f4b15b770204e95db75d0b91a9db13c46ff92bb
17 22
 DIST openssl-1.0.1i.tar.gz 4422117 SHA256 3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7 SHA512 6cbcdcec8568236e8f20f0461f93df8a193a0ad88102ff548443e6ec87e2a7f649e314beee1e6bafda693934b4fb142244b61d14bf736828dda09e277b941d93 WHIRLPOOL 4baefe8a203243d08c2ca4dc9e1019a539135604a8ddfb09b9a7f2711108ad6ebd45eef1cfa09331f19fe57defbe7e1390f9ac2de086437a484c5819cabb5a4a
18 23
 DIST openssl-1.0.1j.tar.gz 4432964 SHA256 1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3 SHA512 a786bb99b68d88c1de79d3c5372767f091ebeefb5abc1d4883253fd3ab5a86af53389f5ff36fdd8faa27c5fb78be8bbff406392c373358697da80d250eadebb8 WHIRLPOOL 467aa3b02d04837e3281670401985e492d15b561c03b97246e3c8e61b0d3b1927332e3a226de4ed5bd02265a04fb31ce84c3501f4af9685633d00a9b43c56978
19 24
 DIST openssl-1.0.1k.tar.gz 4434910 SHA256 8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c SHA512 8b000fbd1bf919d9913a314f99aedd48a69f6caa4ccf43237889e73e08cbe0d82bfc27e9c7c4cade09fc459f91d6c4a831a9b3fc8bca0344fb864eadd7d1e8e8 WHIRLPOOL 5236a966d610c971e473cfc30e5412a72eef116fd259ada9c50da08bcd4ca967f80bb19babf530b4e5b9f1f24e9275e00391eb2e12a26d4544f593e2b4ba20b8
20 25
 DIST openssl-1.0.2.tar.gz 5265809 SHA256 8c48baf3babe0d505d16cfc0cf272589c66d3624264098213db0fb00034728e9 SHA512 dea46225a5445edc4986b02b99fbc90153819374b9a9bfdd892b60cd18ac7fefaf21a7e9d2bb05d0e3bfa4d2704e0ee24b06cc8e7081a542d7598cc9e73c67c5 WHIRLPOOL fe628a38125390deb75728b31427c308efbf65637a569fd1f139f6313fea533514ef05bf3d01bbdc793f77eb259400c95c53074a294d32d73576939d16f22e25
21 26
 DIST openssl-1.0.2a.tar.gz 5262089 SHA256 15b6393c20030aab02c8e2fe0243cb1d1d18062f6c095d67bca91871dc7f324a SHA512 02d228578824add52b73433d64697706e6503c2334933fe8dd6b477f59c430977012c3c34da207096229a425e1dcb6f3ae806043894b5ac98c27bbcddb794dd4 WHIRLPOOL a590c71794f5d29b80afa28b18621b7535e96b714b3690d793c1422a90b09a89cbcb912841d400c5982a8197bb02c13051190e96ba0e4d530509b48b43067cd7
27
+DIST openssl-1.0.2d.tar.gz 5295447 SHA256 671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8 SHA512 68a051e92aaed0e7a8b218c185427c534c32f30f50c45f5d2c1f5b7a26d1416e83863d2953c77486acde3b636a148f39faf48246d28a207607ec069f62b13d75 WHIRLPOOL e3d8f0784903c8d6aa05ada7b8b410517c99157a3c2f4ac34c8a9d80c77408bd6ff9e820ded47f6223ccac4a77413174aa625303166ec28fdbf8374a7d4659ec
22 28
 DIST openssl-c_rehash.sh.1.7 4167 SHA256 4999ee79892f52bd6a4a7baba9fac62262454d573bbffd72685d3aae9e48cee0 SHA512 55e8c2e827750a4f375cb83c86bfe2d166c01ffa5d7e9b16657b72b38b747c8985dd2c98f854c911dfbbee2ff3e92aff39fdf089d979b2e3534b7685ee8b80da WHIRLPOOL c88f06a3b8651f76b6289552cccceb64e13f6697c5f0ce3ff114c781ce1c218912b8ee308af9d087cd76a9600fdacda1953175bff07d7d3eb21b0c0b7f4f1ce1
23 29
 EBUILD openssl-1.0.1i.ebuild 8776 SHA256 99e7d64748e9448cd1f3d8738e1a97b5daab3c56b3e5f0168186f6644d83bbd8 SHA512 e1b922da0678ac59ed09f4cffd714b45ba8e028aa844e089a4385391fcb4e02b7fc731f855e2537acf10e817710e06aa61fac91233db78a053416212e83a9bf2 WHIRLPOOL 3537527dde49f7fd39c73c7a4053c5bf44fdf3e2544fd7148019729abd01120c7f3fe85e83a38b89630ff0bb38b7d044e42234cfaf4cf68612b630900e5b209a
24 30
 EBUILD openssl-1.0.1j.ebuild 8848 SHA256 823be5d97748b5b7e6f134746f13850b5a97cbf4ad0639c7238367d741386cb6 SHA512 f426b8bcd82113fc27eb001491e2c5ff03f276fd449f3ab763b58e1e5366f75d77eb5bb26648130ed1775e418181cc9d4cc744e507185cb12855b117bd86096c WHIRLPOOL 690246218ae96ec269249c23b65f6ec5f59e3e19388cb2bcd2f1e125fc75ba43124e9f63dc5ea4b0af62fd8aee024a9cff5fddf9ddd123e6fe9dc3a164860c48
... ...
@@ -26,3 +32,4 @@ EBUILD openssl-1.0.1k.ebuild 8848 SHA256 654fb54cb45c343adea6b81d0850a2f9a62c43b
26 32
 EBUILD openssl-1.0.2-r1.ebuild 8829 SHA256 b07881d45227d608973c699e146081b2d3d164b741cc127995d2537cc8bb5c95 SHA512 0dbaae39454349726633993ffb71596344b0898cfe420fcc315b07fa0d314e780e9b61a978881b2c091b113523fd0ab37410a771c831b58f8bcd2c67e5c84234 WHIRLPOOL 1b167afb27753e66aa474e23ca2df504e8e3d70d67428af8179e88b238350e988014d8d33f5fe683d4fb345c847b0d954a558b5b69d22836b154c4bc6c15738a
27 33
 EBUILD openssl-1.0.2-r3.ebuild 8996 SHA256 e28bc2726e4b8d1c7e779348d9c27412b3a37dea7009f3399a202b57f4aa8c58 SHA512 8e1a8bd531ee2eefb5f2e6b80f038528c51f05e474de5a8bf1191f438509ef195ee0decd4866e0bce12351100d88a2c1d9320795fcd001826b9b8241093e255b WHIRLPOOL f5f38405792f046187cd45ecf37d3f1cf4b19b87c605d4482c2d5fb4fc22c5d3f0736ef712f78255fe0efcb545a0eecec709b043aabe06c0c242a735d2bc062a
28 34
 EBUILD openssl-1.0.2a.ebuild 8859 SHA256 de3ad5517d6f57eafcc90212c24a8d9cd5e1a82016314d191457435bc03c5234 SHA512 4e3cf7f7dceece20731789b5ea4f8673cae4ad215ce907e5c438d65568e60de9a3d0443785ff77addb1a573c652d0b082df3b908486adec7e3afd006f765d386 WHIRLPOOL 6fd1cfc850ba18661c79be97adccdfc956d365f0d72b4bdc71a547875c85ba46416ff10d2ba7326ad01d9c2611bcff1fd178c0f5eb6cf7b6b8b7024acbab98ab
35
+EBUILD openssl-1.0.2d.ebuild 9059 SHA256 61840d633417b8871577a92b5998e0e574c75265da9cf0cac8a6858a745229b7 SHA512 0b0015df74de8256b0984f93c42f33ff17347dfdd516aded82f1420784c8bd621f6710b54d0fd4b377bab27be9204333675093df34eceb73acf62edf575c4165 WHIRLPOOL 5345cb60390bb5a728de93c7aaf0d7102f90fdb9d88a39b944c941ff47512bec3afce94b4ae57d392710f0b31ff26d3de109adbde50851a7c1daaf282aa91a5c
29 36
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+https://rt.openssl.org/Ticket/Display.html?id=3758
2
+
3
+From 7b4152089fe39c3495508076ab81ed4aca3d65ba Mon Sep 17 00:00:00 2001
4
+From: Mike Frysinger <vapier@gentoo.org>
5
+Date: Sat, 21 Mar 2015 05:08:41 -0400
6
+Subject: [PATCH] fix malloc define typo
7
+
8
+Reported-by: Conrad Kostecki <ck+gentoobugzilla@bl4ckb0x.de>
9
+URL: https://bugs.gentoo.org/543828
10
+---
11
+ crypto/bio/bss_dgram.c | 4 ++--
12
+ 1 file changed, 2 insertions(+), 2 deletions(-)
13
+
14
+diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
15
+index aef8149..ed275d1 100644
16
+--- a/crypto/bio/bss_dgram.c
17
+@@ -1338,7 +1338,7 @@ static int dgram_sctp_read(BIO *b, char *out, int outl)
18
+                 (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
19
+             authchunks = OPENSSL_malloc(optlen);
20
+             if (!authchunks) {
21
+-                BIOerr(BIO_F_DGRAM_SCTP_READ, ERR_R_MALLOC_ERROR);
22
++                BIOerr(BIO_F_DGRAM_SCTP_READ, ERR_R_MALLOC_FAILURE);
23
+                 return -1;
24
+             }
25
+             memset(authchunks, 0, optlen);
26
+@@ -1410,7 +1410,7 @@ static int dgram_sctp_write(BIO *b, const char *in, int inl)
27
+         char *tmp;
28
+         data->saved_message.bio = b;
29
+         if(!(tmp = OPENSSL_malloc(inl))) {
30
+-            BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_ERROR);
31
++            BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);
32
+             return -1;
33
+         }
34
+         if (data->saved_message.data)
35
+-- 
36
+2.3.3
37
+
... ...
@@ -1,4 +1,5 @@
1
-http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
1
+https://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
2
+https://rt.openssl.org/Ticket/Display.html?id=3738&user=guest&pass=guest
2 3
 
3 4
 --- openssl-1.0.2a/crypto/Makefile
4 5
 +++ openssl-1.0.2a/crypto/Makefile
... ...
@@ -43,23 +44,6 @@ http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
43 44
  
44 45
  lint:
45 46
  	@target=lint; $(RECURSIVE_MAKE)
46
-+++ openssl-1.0.2a/crypto/objects/Makefile
47
-@@ -44,11 +44,11 @@
48
- # objects.pl both reads and writes obj_mac.num
49
- obj_mac.h: objects.pl objects.txt obj_mac.num
50
- 	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
51
--	@sleep 1; touch obj_mac.h; sleep 1
52
- 
53
--obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
54
-+# This doesn't really need obj_mac.h, but since that rule reads & writes
55
-+# obj_mac.num, we can't run in parallel with it.
56
-+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
57
- 	$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
58
--	@sleep 1; touch obj_xref.h; sleep 1
59
- 
60
- files:
61
- 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
62 47
 --- openssl-1.0.2a/engines/Makefile
63 48
 +++ openssl-1.0.2a/engines/Makefile
64 49
 @@ -72,7 +72,7 @@
... ...
@@ -96,55 +80,31 @@ http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
96 80
  
97 81
  build_crypto:
98 82
 -	@dir=crypto; target=all; $(BUILD_ONE_CMD)
99
--build_ssl:
100
--	@dir=ssl; target=all; $(BUILD_ONE_CMD)
101
--build_engines:
102
--	@dir=engines; target=all; $(BUILD_ONE_CMD)
103
--build_apps:
104
--	@dir=apps; target=all; $(BUILD_ONE_CMD)
105
--build_tests:
106
--	@dir=test; target=all; $(BUILD_ONE_CMD)
107
--build_tools:
108
--	@dir=tools; target=all; $(BUILD_ONE_CMD)
109 83
 +	+@dir=crypto; target=all; $(BUILD_ONE_CMD)
84
+-build_ssl:
110 85
 +build_ssl: build_crypto
86
+-	@dir=ssl; target=all; $(BUILD_ONE_CMD)
111 87
 +	+@dir=ssl; target=all; $(BUILD_ONE_CMD)
88
+-build_engines:
112 89
 +build_engines: build_crypto
90
+-	@dir=engines; target=all; $(BUILD_ONE_CMD)
113 91
 +	+@dir=engines; target=all; $(BUILD_ONE_CMD)
92
+-build_apps:
114 93
 +build_apps: build_libs
94
+-	@dir=apps; target=all; $(BUILD_ONE_CMD)
115 95
 +	+@dir=apps; target=all; $(BUILD_ONE_CMD)
96
+-build_tests:
116 97
 +build_tests: build_libs
98
+-	@dir=test; target=all; $(BUILD_ONE_CMD)
117 99
 +	+@dir=test; target=all; $(BUILD_ONE_CMD)
100
+-build_tools:
118 101
 +build_tools: build_libs
102
+-	@dir=tools; target=all; $(BUILD_ONE_CMD)
119 103
 +	+@dir=tools; target=all; $(BUILD_ONE_CMD)
120 104
  
121 105
  all_testapps: build_libs build_testapps
122 106
  build_testapps:
123
-@@ -536,9 +536,9 @@
124
- dist_pem_h:
125
- 	(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
126
- 
127
--install: all install_docs install_sw
128
-+install: install_docs install_sw
129
- 
130
--install_sw:
131
-+install_dirs:
132
- 	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
133
- 		$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
134
- 		$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
135
-@@ -547,12 +547,19 @@
136
- 		$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
137
- 		$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
138
- 		$(INSTALL_PREFIX)$(OPENSSLDIR)/private
139
-+	@$(PERL) $(TOP)/util/mkdir-p.pl \
140
-+		$(INSTALL_PREFIX)$(MANDIR)/man1 \
141
-+		$(INSTALL_PREFIX)$(MANDIR)/man3 \
142
-+		$(INSTALL_PREFIX)$(MANDIR)/man5 \
143
-+		$(INSTALL_PREFIX)$(MANDIR)/man7
144
-+
145
-+install_sw: install_dirs
146
- 	@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
147
- 	do \
107
+@@ -555,7 +555,7 @@
148 108
  	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
149 109
  	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
150 110
  	done;
... ...
@@ -153,20 +113,6 @@ http://rt.openssl.org/Ticket/Display.html?id=2084&user=guest&pass=guest
153 113
  	@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
154 114
  	do \
155 115
  		if [ -f "$$i" ]; then \
156
-@@ -636,12 +643,7 @@
157
- 		done; \
158
- 	done
159
- 
160
--install_docs:
161
--	@$(PERL) $(TOP)/util/mkdir-p.pl \
162
--		$(INSTALL_PREFIX)$(MANDIR)/man1 \
163
--		$(INSTALL_PREFIX)$(MANDIR)/man3 \
164
--		$(INSTALL_PREFIX)$(MANDIR)/man5 \
165
--		$(INSTALL_PREFIX)$(MANDIR)/man7
166
-+install_docs: install_dirs
167
- 	@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
168
- 	here="`pwd`"; \
169
- 	filecase=; \
170 116
 --- openssl-1.0.2a/Makefile.shared
171 117
 +++ openssl-1.0.2a/Makefile.shared
172 118
 @@ -105,6 +105,7 @@
173 119
new file mode 100644
... ...
@@ -0,0 +1,64 @@
1
+https://rt.openssl.org/Ticket/Display.html?id=3736&user=guest&pass=guest
2
+
3
+From aba899f2eca21e11e5e9797bf8258e7265dea9f5 Mon Sep 17 00:00:00 2001
4
+From: Mike Frysinger <vapier@gentoo.org>
5
+Date: Sun, 8 Mar 2015 01:32:01 -0500
6
+Subject: [PATCH] fix parallel install with dir creation
7
+
8
+The mkdir-p.pl does not handle parallel creation of directories.
9
+This comes up when the install_sw and install_docs rules run and
10
+both call mkdir-p.pl on sibling directory trees.
11
+
12
+Instead, lets create a single install_dirs rule that makes all of
13
+the dirs we need, and have these two install steps depend on that.
14
+---
15
+ Makefile.org | 17 +++++++++--------
16
+ 1 file changed, 9 insertions(+), 8 deletions(-)
17
+
18
+diff --git a/Makefile.org b/Makefile.org
19
+index a6d9471..78e6143 100644
20
+--- a/Makefile.org
21
+@@ -536,9 +536,9 @@
22
+ dist_pem_h:
23
+ 	(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
24
+ 
25
+-install: all install_docs install_sw
26
++install: install_docs install_sw
27
+ 
28
+-install_sw:
29
++install_dirs:
30
+ 	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
31
+ 		$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
32
+ 		$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
33
+@@ -547,6 +547,13 @@
34
+ 		$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
35
+ 		$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
36
+ 		$(INSTALL_PREFIX)$(OPENSSLDIR)/private
37
++	@$(PERL) $(TOP)/util/mkdir-p.pl \
38
++		$(INSTALL_PREFIX)$(MANDIR)/man1 \
39
++		$(INSTALL_PREFIX)$(MANDIR)/man3 \
40
++		$(INSTALL_PREFIX)$(MANDIR)/man5 \
41
++		$(INSTALL_PREFIX)$(MANDIR)/man7
42
++
43
++install_sw: install_dirs
44
+ 	@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
45
+ 	do \
46
+ 	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
47
+@@ -636,12 +643,7 @@
48
+ 		done; \
49
+ 	done
50
+ 
51
+-install_docs:
52
+-	@$(PERL) $(TOP)/util/mkdir-p.pl \
53
+-		$(INSTALL_PREFIX)$(MANDIR)/man1 \
54
+-		$(INSTALL_PREFIX)$(MANDIR)/man3 \
55
+-		$(INSTALL_PREFIX)$(MANDIR)/man5 \
56
+-		$(INSTALL_PREFIX)$(MANDIR)/man7
57
++install_docs: install_dirs
58
+ 	@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
59
+ 	here="`pwd`"; \
60
+ 	filecase=; \
61
+-- 
62
+2.3.4
63
+
0 64
new file mode 100644
... ...
@@ -0,0 +1,37 @@
1
+https://rt.openssl.org/Ticket/Display.html?id=3737&user=guest&pass=guest
2
+
3
+From ce279d4361e07e9af9ceca8a6e326e661758ad53 Mon Sep 17 00:00:00 2001
4
+From: Mike Frysinger <vapier@gentoo.org>
5
+Date: Sun, 8 Mar 2015 01:34:48 -0500
6
+Subject: [PATCH] fix parallel generation of obj headers
7
+
8
+The current code has dummy sleep/touch commands to try and work
9
+around the parallel issue, but that is obviously racy.  Instead
10
+lets force one of the files to depend on the other so we know
11
+they'll never run in parallel.
12
+---
13
+ crypto/objects/Makefile | 6 +++---
14
+ 1 file changed, 3 insertions(+), 3 deletions(-)
15
+
16
+diff --git a/crypto/objects/Makefile b/crypto/objects/Makefile
17
+index ad2db1e..7d32504 100644
18
+--- a/crypto/objects/Makefile
19
+@@ -44,11 +44,11 @@
20
+ # objects.pl both reads and writes obj_mac.num
21
+ obj_mac.h: objects.pl objects.txt obj_mac.num
22
+ 	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
23
+-	@sleep 1; touch obj_mac.h; sleep 1
24
+ 
25
+-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
26
++# This doesn't really need obj_mac.h, but since that rule reads & writes
27
++# obj_mac.num, we can't run in parallel with it.
28
++obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
29
+ 	$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
30
+-	@sleep 1; touch obj_xref.h; sleep 1
31
+ 
32
+ files:
33
+ 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
34
+-- 
35
+2.3.4
36
+
0 37
new file mode 100644
... ...
@@ -0,0 +1,61 @@
1
+From cc81af135bda47eaa6956a0329cbbc55bf993ac1 Mon Sep 17 00:00:00 2001
2
+From: Mike Frysinger <vapier@gentoo.org>
3
+Date: Fri, 3 Apr 2015 01:16:23 -0400
4
+Subject: [PATCH] fix race when symlink shareds libs
5
+
6
+When the crypto/ssl targets attempt to build their shared libs, they run:
7
+	cd ..; make libcrypto.so.1.0.0
8
+The top level Makefile in turn runs the build-shared target for that lib.
9
+
10
+The build-shared target depends on both do_$(SHLIB_TARGET) & link-shared.
11
+When building in parallel, make is allowed to run both of these.  They
12
+both run Makefile.shared for their respective targets:
13
+do_$(SHLIB_TARGET) ->
14
+	link_a.linux-shared ->
15
+	link_a.gnu ->
16
+	...; $(LINK_SO_A) ->
17
+	$(LINK_SO) ->
18
+	$(SYMLINK_SO)
19
+link-shared ->
20
+	symlink.linux-shared ->
21
+	symlink.gnu ->
22
+	...; $(SYMLINK_SO)
23
+
24
+The shell code for SYMLINK_SO attempts to do a [ -e lib ] check, but fails
25
+basic TOCTOU semantics.  Depending on the load, that means two processes
26
+will run the sequence:
27
+	rm -f libcrypto.so
28
+	ln -s libcrypto.so.1.0.0 libcrypto.so
29
+
30
+Which obviously fails:
31
+	ln: failed to create symbolic link 'libcrypto.so': File exists
32
+
33
+Since we know do_$(SHLIB_TARGET) will create the symlink for us, don't
34
+bother depending on link-shared at all in the top level Makefile when
35
+building things.
36
+
37
+Reported-by: Martin von Gagern <Martin.vGagern@gmx.net>
38
+URL: https://bugs.gentoo.org/545028
39
+---
40
+ Makefile.org | 5 ++++-
41
+ 1 file changed, 4 insertions(+), 1 deletion(-)
42
+
43
+diff --git a/Makefile.org b/Makefile.org
44
+index 890bfe4..576c60e 100644
45
+--- a/Makefile.org
46
+@@ -350,7 +350,10 @@ link-shared:
47
+ 		libs="$$libs -l$$i"; \
48
+ 	done
49
+ 
50
+-build-shared: do_$(SHLIB_TARGET) link-shared
51
++# The link target in Makefile.shared will create the symlink for us, so no need
52
++# to call link-shared directly.  Doing so will cause races with two processes
53
++# trying to symlink the lib.
54
++build-shared: do_$(SHLIB_TARGET)
55
+ 
56
+ do_$(SHLIB_TARGET):
57
+ 	@ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
58
+-- 
59
+2.3.4
60
+
0 61
new file mode 100644
... ...
@@ -0,0 +1,43 @@
1
+https://rt.openssl.org/Ticket/Display.html?id=3759&user=guest&pass=guest
2
+
3
+From 6257d59b3a68d2feb9d64317a1c556dc3813ee61 Mon Sep 17 00:00:00 2001
4
+From: Mike Frysinger <vapier@gentoo.org>
5
+Date: Sat, 21 Mar 2015 06:01:25 -0400
6
+Subject: [PATCH] crypto: use bigint in x86-64 perl
7
+
8
+When building on x32 systems where the default type is 32bit, make sure
9
+we can transparently represent 64bit integers.  Otherwise we end up with
10
+build errors like:
11
+/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
12
+Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
13
+...
14
+ghash-x86_64.s: Assembler messages:
15
+ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
16
+
17
+We don't enable this globally as there are some cases where we'd get
18
+32bit values interpreted as unsigned when we need them as signed.
19
+
20
+Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
21
+URL: https://bugs.gentoo.org/542618
22
+---
23
+ crypto/perlasm/x86_64-xlate.pl | 4 ++++
24
+ 1 file changed, 4 insertions(+)
25
+
26
+diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
27
+index aae8288..0bf9774 100755
28
+--- a/crypto/perlasm/x86_64-xlate.pl
29
+@@ -195,6 +195,10 @@ my %globals;
30
+     sub out {
31
+     	my $self = shift;
32
+ 
33
++	# When building on x32 ABIs, the expanded hex value might be too
34
++	# big to fit into 32bits.  Enable transparent 64bit support here
35
++	# so we can safely print it out.
36
++	use bigint;
37
+ 	if ($gas) {
38
+ 	    # Solaris /usr/ccs/bin/as can't handle multiplications
39
+ 	    # in $self->{value}
40
+-- 
41
+2.3.3
42
+
0 43
new file mode 100644
... ...
@@ -0,0 +1,266 @@
1
+# Copyright 1999-2015 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.2c.ebuild,v 1.1 2015/06/12 16:06:03 vapier Exp $
4
+
5
+EAPI="4"
6
+
7
+inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
8
+
9
+REV="1.7"
10
+MY_P=${P/_/-}
11
+DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
12
+HOMEPAGE="http://www.openssl.org/"
13
+SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
14
+	http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/${PN}/${PN}-c_rehash.sh?rev=${REV} -> ${PN}-c_rehash.sh.${REV}"
15
+
16
+LICENSE="openssl"
17
+SLOT="0"
18
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
19
+IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 static-libs test +tls-heartbeat vanilla zlib insecure-ssl2 insecure-ssl3"
20
+RESTRICT="!bindist? ( bindist )"
21
+
22
+# The blocks are temporary just to make sure people upgrade to a
23
+# version that lack runtime version checking.  We'll drop them in
24
+# the future.
25
+RDEPEND="gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
26
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
27
+	kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
28
+	abi_x86_32? (
29
+		!<=app-emulation/emul-linux-x86-baselibs-20140508
30
+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
31
+	)
32
+	!<net-misc/openssh-5.9_p1-r4
33
+	!<net-libs/neon-0.29.6-r1"
34
+DEPEND="${RDEPEND}
35
+	sys-apps/diffutils
36
+	>=dev-lang/perl-5
37
+	sctp? ( >=net-misc/lksctp-tools-1.0.12 )
38
+	test? ( sys-devel/bc )"
39
+PDEPEND="app-misc/ca-certificates"
40
+
41
+S="${WORKDIR}/${MY_P}"
42
+
43
+MULTILIB_WRAPPED_HEADERS=(
44
+	usr/include/openssl/opensslconf.h
45
+)
46
+
47
+src_prepare() {
48
+	SSL_CNF_DIR="/etc/ssl"
49
+	sed \
50
+		-e "/^DIR=/s:=.*:=${EPREFIX}${SSL_CNF_DIR}:" \
51
+		-e "s:SSL_CMD=/usr:SSL_CMD=${EPREFIX}/usr:" \
52
+		"${DISTDIR}"/${PN}-c_rehash.sh.${REV} \
53
+		> "${WORKDIR}"/c_rehash || die #416717
54
+
55
+	# Make sure we only ever touch Makefile.org and avoid patching a file
56
+	# that gets blown away anyways by the Configure script in src_configure
57
+	rm -f Makefile
58
+
59
+	if ! use vanilla ; then
60
+		epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
61
+		epatch "${FILESDIR}"/${PN}-1.0.0d-windres.patch #373743
62
+#		epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-build.patch
63
+		epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-obj-headers.patch
64
+		epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-install-dirs.patch
65
+		epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-symlinking.patch #545028
66
+		epatch "${FILESDIR}"/${PN}-1.0.2-ipv6.patch
67
+		epatch "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618
68
+
69
+		epatch_user #332661
70
+	fi
71
+
72
+	# disable fips in the build
73
+	# make sure the man pages are suffixed #302165
74
+	# don't bother building man pages if they're disabled
75
+	sed -i \
76
+		-e '/DIRS/s: fips : :g' \
77
+		-e '/^MANSUFFIX/s:=.*:=ssl:' \
78
+		-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
79
+		-e $(has noman FEATURES \
80
+			&& echo '/^install:/s:install_docs::' \
81
+			|| echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
82
+		Makefile.org \
83
+		|| die
84
+	# show the actual commands in the log
85
+	sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
86
+
87
+	# since we're forcing $(CC) as makedep anyway, just fix
88
+	# the conditional as always-on
89
+	# helps clang (#417795), and versioned gcc (#499818)
90
+	sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
91
+
92
+	# quiet out unknown driver argument warnings since openssl
93
+	# doesn't have well-split CFLAGS and we're making it even worse
94
+	# and 'make depend' uses -Werror for added fun (#417795 again)
95
+	[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
96
+
97
+	# allow openssl to be cross-compiled
98
+	cp "${FILESDIR}"/gentoo.config-1.0.1 gentoo.config || die
99
+	chmod a+rx gentoo.config
100
+
101
+	append-flags -fno-strict-aliasing
102
+	append-flags $(test-flags-CC -Wa,--noexecstack)
103
+	append-cppflags -DOPENSSL_NO_BUF_FREELISTS
104
+
105
+	sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
106
+	# The config script does stupid stuff to prompt the user.  Kill it.
107
+	sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
108
+	./config --test-sanity || die "I AM NOT SANE"
109
+
110
+	multilib_copy_sources
111
+}
112
+
113
+multilib_src_configure() {
114
+	unset APPS #197996
115
+	unset SCRIPTS #312551
116
+	unset CROSS_COMPILE #311473
117
+
118
+	tc-export CC AR RANLIB RC
119
+
120
+	# Clean out patent-or-otherwise-encumbered code
121
+	# Camellia: Royalty Free            http://en.wikipedia.org/wiki/Camellia_(cipher)
122
+	# IDEA:     Expired                 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
123
+	# EC:       ????????? ??/??/2015    http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
124
+	# MDC2:     Expired                 http://en.wikipedia.org/wiki/MDC-2
125
+	# RC5:      Expired                 http://en.wikipedia.org/wiki/RC5
126
+
127
+	use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
128
+	echoit() { echo "$@" ; "$@" ; }
129
+
130
+	local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
131
+
132
+	# See if our toolchain supports __uint128_t.  If so, it's 64bit
133
+	# friendly and can use the nicely optimized code paths. #460790
134
+	local ec_nistp_64_gcc_128
135
+	# Disable it for now though #469976
136
+	#if ! use bindist ; then
137
+	#	echo "__uint128_t i;" > "${T}"/128.c
138
+	#	if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
139
+	#		ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
140
+	#	fi
141
+	#fi
142
+
143
+	local sslout=$(./gentoo.config)
144
+	einfo "Use configuration ${sslout:-(openssl knows best)}"
145
+	local config="Configure"
146
+	[[ -z ${sslout} ]] && config="config"
147
+
148
+	echoit \
149
+	./${config} \
150
+		${sslout} \
151
+		$(use cpu_flags_x86_sse2 || echo "no-sse2") \
152
+		enable-camellia \
153
+		$(use_ssl !bindist ec) \
154
+		${ec_nistp_64_gcc_128} \
155
+		enable-idea \
156
+		enable-mdc2 \
157
+		enable-rc5 \
158
+		enable-tlsext \
159
+		$(use_ssl asm) \
160
+		$(use_ssl gmp gmp -lgmp) \
161
+		$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
162
+		$(use_ssl rfc3779) \
163
+		$(use_ssl sctp) \
164
+		$(use_ssl tls-heartbeat heartbeats) \
165
+		$(use_ssl zlib) \
166
+		$(use_ssl insecure-ssl2 ssl2) \
167
+		$(use_ssl insecure-ssl3 ssl3) \
168
+		--prefix="${EPREFIX}"/usr \
169
+		--openssldir="${EPREFIX}"${SSL_CNF_DIR} \
170
+		--libdir=$(get_libdir) \
171
+		shared threads \
172
+		|| die
173
+
174
+	# Clean out hardcoded flags that openssl uses
175
+	local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
176
+		-e 's:^CFLAG=::' \
177
+		-e 's:-fomit-frame-pointer ::g' \
178
+		-e 's:-O[0-9] ::g' \
179
+		-e 's:-march=[-a-z0-9]* ::g' \
180
+		-e 's:-mcpu=[-a-z0-9]* ::g' \
181
+		-e 's:-m[a-z0-9]* ::g' \
182
+	)
183
+	sed -i \
184
+		-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
185
+		-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
186
+		Makefile || die
187
+}
188
+
189
+multilib_src_compile() {
190
+	# depend is needed to use $confopts; it also doesn't matter
191
+	# that it's -j1 as the code itself serializes subdirs
192
+	emake -j1 depend
193
+	emake all
194
+	# rehash is needed to prep the certs/ dir; do this
195
+	# separately to avoid parallel build issues.
196
+	emake rehash
197
+}
198
+
199
+multilib_src_test() {
200
+	emake -j1 test
201
+}
202
+
203
+multilib_src_install() {
204
+	emake INSTALL_PREFIX="${D}" install
205
+}
206
+
207
+multilib_src_install_all() {
208
+	dobin "${WORKDIR}"/c_rehash #333117
209
+	dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
210
+	dohtml -r doc/*
211
+	use rfc3779 && dodoc engines/ccgost/README.gost
212
+
213
+	# This is crappy in that the static archives are still built even
214
+	# when USE=static-libs.  But this is due to a failing in the openssl
215
+	# build system: the static archives are built as PIC all the time.
216
+	# Only way around this would be to manually configure+compile openssl
217
+	# twice; once with shared lib support enabled and once without.
218
+	use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
219
+
220
+	# create the certs directory
221
+	dodir ${SSL_CNF_DIR}/certs
222
+	cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die
223
+	rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired}
224
+
225
+	# Namespace openssl programs to prevent conflicts with other man pages
226
+	cd "${ED}"/usr/share/man
227
+	local m d s
228
+	for m in $(find . -type f | xargs grep -L '#include') ; do
229
+		d=${m%/*} ; d=${d#./} ; m=${m##*/}
230
+		[[ ${m} == openssl.1* ]] && continue
231
+		[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
232
+		mv ${d}/{,ssl-}${m}
233
+		# fix up references to renamed man pages
234
+		sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
235
+		ln -s ssl-${m} ${d}/openssl-${m}
236
+		# locate any symlinks that point to this man page ... we assume
237
+		# that any broken links are due to the above renaming
238
+		for s in $(find -L ${d} -type l) ; do
239
+			s=${s##*/}
240
+			rm -f ${d}/${s}
241
+			ln -s ssl-${m} ${d}/ssl-${s}
242
+			ln -s ssl-${s} ${d}/openssl-${s}
243
+		done
244
+	done
245
+	[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
246
+
247
+	dodir /etc/sandbox.d #254521
248
+	echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
249
+
250
+	diropts -m0700
251
+	keepdir ${SSL_CNF_DIR}/private
252
+}
253
+
254
+pkg_preinst() {
255
+	has_version ${CATEGORY}/${PN}:0.9.8 && return 0
256
+	preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
257
+}
258
+
259
+pkg_postinst() {
260
+	ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
261
+	c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null
262
+	eend $?
263
+
264
+	has_version ${CATEGORY}/${PN}:0.9.8 && return 0
265
+	preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
266
+}