diff options
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq.inc')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq.inc | 266 |
1 files changed, 0 insertions, 266 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq.inc b/recipes-connectivity/openssl/openssl-qoriq.inc deleted file mode 100644 index c28941ac..00000000 --- a/recipes-connectivity/openssl/openssl-qoriq.inc +++ /dev/null | |||
@@ -1,266 +0,0 @@ | |||
1 | SUMMARY = "Secure Socket Layer" | ||
2 | DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." | ||
3 | HOMEPAGE = "http://www.openssl.org/" | ||
4 | BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" | ||
5 | SECTION = "libs/network" | ||
6 | |||
7 | # "openssl | SSLeay" dual license | ||
8 | LICENSE = "openssl" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8" | ||
10 | |||
11 | DEPENDS = "makedepend-native hostperl-runtime-native" | ||
12 | DEPENDS_append_class-target = " openssl-native" | ||
13 | |||
14 | PROVIDES = "openssl" | ||
15 | |||
16 | python() { | ||
17 | pkgs = d.getVar('PACKAGES', True).split() | ||
18 | for p in pkgs: | ||
19 | if 'openssl-qoriq' in p: | ||
20 | d.appendVar("RPROVIDES_%s" % p, p.replace('openssl-qoriq', 'openssl')) | ||
21 | d.appendVar("RCONFLICTS_%s" % p, p.replace('openssl-qoriq', 'openssl')) | ||
22 | d.appendVar("RREPLACES_%s" % p, p.replace('openssl-qoriq', 'openssl')) | ||
23 | } | ||
24 | |||
25 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/openssl;nobranch=1" | ||
26 | |||
27 | S = "${WORKDIR}/git" | ||
28 | |||
29 | PACKAGECONFIG[perl] = ",,," | ||
30 | |||
31 | TERMIO_libc-musl = "-DTERMIOS" | ||
32 | TERMIO ?= "-DTERMIO" | ||
33 | # Avoid binaries being marked as requiring an executable stack since it | ||
34 | # doesn't(which causes and this causes issues with SELinux | ||
35 | CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ | ||
36 | ${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack" | ||
37 | |||
38 | export DIRS = "crypto ssl apps" | ||
39 | export EX_LIBS = "-lgcc -ldl" | ||
40 | export AS = "${CC} -c" | ||
41 | |||
42 | inherit pkgconfig siteinfo multilib_header ptest relative_symlinks | ||
43 | |||
44 | PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf" | ||
45 | FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" | ||
46 | FILES_libssl = "${libdir}/libssl${SOLIBS}" | ||
47 | FILES_${PN} =+ " ${libdir}/ssl/*" | ||
48 | FILES_${PN}-misc = "${libdir}/ssl/misc" | ||
49 | RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" | ||
50 | |||
51 | PROVIDES += "openssl10" | ||
52 | |||
53 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | ||
54 | # package RRECOMMENDS on this package. This will enable the configuration | ||
55 | # file to be installed for both the base openssl package and the libcrypto | ||
56 | # package since the base openssl package depends on the libcrypto package. | ||
57 | FILES_${PN}-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
58 | CONFFILES_${PN}-conf = "${sysconfdir}/ssl/openssl.cnf" | ||
59 | RRECOMMENDS_libcrypto += "${PN}-conf" | ||
60 | RDEPENDS_${PN}-ptest += "${PN}-misc make perl perl-module-filehandle bc" | ||
61 | |||
62 | # Remove this to enable SSLv3. SSLv3 is defaulted to disabled due to the POODLE | ||
63 | # vulnerability | ||
64 | EXTRA_OECONF = " -no-ssl3" | ||
65 | |||
66 | do_configure_prepend_darwin () { | ||
67 | sed -i -e '/version-script=openssl\.ld/d' Configure | ||
68 | } | ||
69 | |||
70 | do_configure () { | ||
71 | cd util | ||
72 | perl perlpath.pl ${STAGING_BINDIR_NATIVE} | ||
73 | cd .. | ||
74 | ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/ | ||
75 | |||
76 | os=${HOST_OS} | ||
77 | case $os in | ||
78 | linux-uclibc |\ | ||
79 | linux-uclibceabi |\ | ||
80 | linux-gnueabi |\ | ||
81 | linux-uclibcspe |\ | ||
82 | linux-gnuspe |\ | ||
83 | linux-musl*) | ||
84 | os=linux | ||
85 | ;; | ||
86 | *) | ||
87 | ;; | ||
88 | esac | ||
89 | target="$os-${HOST_ARCH}" | ||
90 | case $target in | ||
91 | linux-arm) | ||
92 | target=linux-armv4 | ||
93 | ;; | ||
94 | linux-armeb) | ||
95 | target=linux-elf-armeb | ||
96 | ;; | ||
97 | linux-aarch64*) | ||
98 | target=linux-aarch64 | ||
99 | ;; | ||
100 | linux-sh3) | ||
101 | target=debian-sh3 | ||
102 | ;; | ||
103 | linux-sh4) | ||
104 | target=debian-sh4 | ||
105 | ;; | ||
106 | linux-i486) | ||
107 | target=debian-i386-i486 | ||
108 | ;; | ||
109 | linux-i586 | linux-viac3) | ||
110 | target=debian-i386-i586 | ||
111 | ;; | ||
112 | linux-i686) | ||
113 | target=debian-i386-i686/cmov | ||
114 | ;; | ||
115 | linux-gnux32-x86_64) | ||
116 | target=linux-x32 | ||
117 | ;; | ||
118 | linux-gnu64-x86_64) | ||
119 | target=linux-x86_64 | ||
120 | ;; | ||
121 | linux-gnun32-mips*el) | ||
122 | target=debian-mipsn32el | ||
123 | ;; | ||
124 | linux-gnun32-mips*) | ||
125 | target=debian-mipsn32 | ||
126 | ;; | ||
127 | linux-mips*64*el) | ||
128 | target=debian-mips64el | ||
129 | ;; | ||
130 | linux-mips*64*) | ||
131 | target=debian-mips64 | ||
132 | ;; | ||
133 | linux-mips*el) | ||
134 | target=debian-mipsel | ||
135 | ;; | ||
136 | linux-mips*) | ||
137 | target=debian-mips | ||
138 | ;; | ||
139 | linux-microblaze*|linux-nios2*) | ||
140 | target=linux-generic32 | ||
141 | ;; | ||
142 | linux-powerpc) | ||
143 | target=linux-ppc | ||
144 | ;; | ||
145 | linux-powerpc64) | ||
146 | target=linux-ppc64 | ||
147 | ;; | ||
148 | linux-supersparc) | ||
149 | target=linux-sparcv8 | ||
150 | ;; | ||
151 | linux-sparc) | ||
152 | target=linux-sparcv8 | ||
153 | ;; | ||
154 | darwin-i386) | ||
155 | target=darwin-i386-cc | ||
156 | ;; | ||
157 | esac | ||
158 | # inject machine-specific flags | ||
159 | sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure | ||
160 | useprefix=${prefix} | ||
161 | if [ "x$useprefix" = "x" ]; then | ||
162 | useprefix=/ | ||
163 | fi | ||
164 | perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target | ||
165 | } | ||
166 | |||
167 | do_compile_prepend_class-target () { | ||
168 | sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile | ||
169 | } | ||
170 | |||
171 | do_compile () { | ||
172 | oe_runmake depend | ||
173 | oe_runmake | ||
174 | } | ||
175 | |||
176 | do_compile_ptest () { | ||
177 | # build dependencies for test directory too | ||
178 | rm -rf test/ssltest_old | ||
179 | rm -rf test/x509aux | ||
180 | rm -rf test/v3ext | ||
181 | export DIRS="$DIRS test" | ||
182 | oe_runmake depend | ||
183 | oe_runmake buildtest | ||
184 | } | ||
185 | |||
186 | do_install () { | ||
187 | # Create ${D}/${prefix} to fix parallel issues | ||
188 | mkdir -p ${D}/${prefix}/ | ||
189 | |||
190 | oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install | ||
191 | |||
192 | oe_libinstall -so libcrypto ${D}${libdir} | ||
193 | oe_libinstall -so libssl ${D}${libdir} | ||
194 | |||
195 | install -d ${D}${includedir} | ||
196 | cp --dereference -R include/openssl ${D}${includedir} | ||
197 | cp --dereference -R crypto ${D}${includedir} | ||
198 | |||
199 | install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash | ||
200 | sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash | ||
201 | |||
202 | oe_multilib_header openssl/opensslconf.h | ||
203 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" ]; then | ||
204 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl | ||
205 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget | ||
206 | else | ||
207 | rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget | ||
208 | fi | ||
209 | |||
210 | # Create SSL structure | ||
211 | install -d ${D}${sysconfdir}/ssl/ | ||
212 | mv ${D}${libdir}/ssl/openssl.cnf \ | ||
213 | ${D}${libdir}/ssl/certs \ | ||
214 | ${D}${libdir}/ssl/private \ | ||
215 | \ | ||
216 | ${D}${sysconfdir}/ssl/ | ||
217 | ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs | ||
218 | ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private | ||
219 | ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl/openssl.cnf | ||
220 | } | ||
221 | |||
222 | do_install_ptest () { | ||
223 | cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH} | ||
224 | |||
225 | # Replace the path to native perl with the path to target perl | ||
226 | sed -i 's,^PERL=.*,PERL=${bindir}/perl,' ${D}${PTEST_PATH}/Makefile | ||
227 | |||
228 | cp Configure config e_os.h ${D}${PTEST_PATH} | ||
229 | cp -r -L include ${D}${PTEST_PATH} | ||
230 | ln -sf ${libdir}/libcrypto.a ${D}${PTEST_PATH} | ||
231 | ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH} | ||
232 | mkdir -p ${D}${PTEST_PATH}/crypto | ||
233 | cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto | ||
234 | cp -r certs ${D}${PTEST_PATH} | ||
235 | mkdir -p ${D}${PTEST_PATH}/apps | ||
236 | ln -sf ${libdir}/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps | ||
237 | ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps | ||
238 | ln -sf ${bindir}/openssl ${D}${PTEST_PATH}/apps | ||
239 | cp apps/server.pem ${D}${PTEST_PATH}/apps | ||
240 | cp apps/server2.pem ${D}${PTEST_PATH}/apps | ||
241 | mkdir -p ${D}${PTEST_PATH}/util | ||
242 | install util/opensslwrap.sh ${D}${PTEST_PATH}/util | ||
243 | install util/shlib_wrap.sh ${D}${PTEST_PATH}/util | ||
244 | # Time stamps are relevant for "make alltests", otherwise | ||
245 | # make may try to recompile binaries. Not only must the | ||
246 | # binary files be newer than the sources, they also must | ||
247 | # be more recent than the header files in /usr/include. | ||
248 | # | ||
249 | # Using "cp -a" is not sufficient, because do_install | ||
250 | # does not preserve the original time stamps. | ||
251 | # | ||
252 | # So instead of using the original file stamps, we set | ||
253 | # the current time for all files. Binaries will get | ||
254 | # modified again later when stripping them, but that's okay. | ||
255 | touch ${D}${PTEST_PATH} | ||
256 | find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH} | ||
257 | } | ||
258 | |||
259 | do_install_append_class-native() { | ||
260 | create_wrapper ${D}${bindir}/openssl \ | ||
261 | OPENSSL_CONF=${libdir}/ssl/openssl.cnf \ | ||
262 | SSL_CERT_DIR=${libdir}/ssl/certs \ | ||
263 | SSL_CERT_FILE=${libdir}/ssl/cert.pem \ | ||
264 | OPENSSL_ENGINES=${libdir}/ssl/engines | ||
265 | } | ||
266 | |||