Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3772131
D2089.id5277.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D2089.id5277.diff
View Options
diff --git a/roles/shellserver/userland-software/files/build-openssl-legacy.sh b/roles/shellserver/userland-software/files/build-openssl-legacy.sh
new file mode 100755
--- /dev/null
+++ b/roles/shellserver/userland-software/files/build-openssl-legacy.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+# Secure path to avoid setuid/setgid fatal error
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+
+./config --prefix=/opt/openssl-legacy --openssldir={{ openssldir }} shared zlib-dynamic
+make depend
+make
diff --git a/roles/shellserver/userland-software/openssl-legacy.sls b/roles/shellserver/userland-software/openssl-legacy.sls
--- a/roles/shellserver/userland-software/openssl-legacy.sls
+++ b/roles/shellserver/userland-software/openssl-legacy.sls
@@ -8,6 +8,10 @@
{% from "map.jinja" import dirs with context %}
+{% set openssl_version = "1.0.2k" %}
+{% set openssl_hash = "6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" %}
+{% set openssl_tarball = "openssl-" + openssl_version + ".tar.gz" %}
+
# -------------------------------------------------------------
# Source code
# -------------------------------------------------------------
@@ -16,18 +20,25 @@
file.directory:
- dir_mode: 755
-openssl_src:
+/usr/local/src/openssl-legacy:
file.directory:
- - name: /usr/local/src/openssl-legacy
- user: builder
- group: deployment
- dir_mode: 755
+
+/usr/local/src/{{ openssl_tarball }}:
+ file.managed:
+ - source: https://www.openssl.org/source/{{ openssl_tarball }}
+ - source_hash: {{ openssl_hash }}
+ - user: builder
+
+openssl_extract:
cmd.run:
- - name: curl ftp://openssl.org/source/openssl-1.0.2k.tar.gz | tar xz --strip-components=1
+ - name: tar xfz ../{{ openssl_tarball }} --strip-components=1
- cwd: /usr/local/src/openssl-legacy
- runas: builder
- require:
- - file: openssl_src
+ - file: /usr/local/src/{{ openssl_tarball }}
- creates: /usr/local/src/openssl-legacy/Makefile
# -------------------------------------------------------------
@@ -35,15 +46,14 @@
# -------------------------------------------------------------
openssl_build:
- cmd.run:
- - name: |
- ./config --prefix=/opt/openssl-legacy --openssldir={{ dirs.etc }}/ssl-legacy shared zlib-dynamic
- make depend
- make
+ cmd.script:
+ - source: salt://roles/shellserver/userland-software/files/build-openssl-legacy.sh
+ - context:
+ openssldir: {{ dirs.etc }}/ssl-legacy
- cwd: /usr/local/src/openssl-legacy
- runas: builder
- require:
- - file: openssl_src
+ - cmd: openssl_extract
- creates: /usr/local/src/openssl-legacy/libcrypto.so
# -------------------------------------------------------------
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 02:54 (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261598
Default Alt Text
D2089.id5277.diff (2 KB)
Attached To
Mode
D2089: Improve OpenSSL legacy build process
Attached
Detach File
Event Timeline
Log In to Comment