Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768530
D2089.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.diff
View Options
diff --git a/roles/shellserver/userland-software/files/build-openssl-legacy.sh.jinja b/roles/shellserver/userland-software/files/build-openssl-legacy.sh.jinja
new file mode 100755
--- /dev/null
+++ b/roles/shellserver/userland-software/files/build-openssl-legacy.sh.jinja
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+sudo -u {{ builder_username }} ./config --prefix=/opt/openssl-legacy --openssldir={{ openssldir }} shared zlib-dynamic
+sudo -u {{ builder_username }} make depend
+sudo -u {{ builder_username }} 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,16 @@
# -------------------------------------------------------------
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.jinja
+ - template: jinja
+ - context:
+ openssldir: {{ dirs.etc }}/ssl-legacy
+ builder_username: builder
- 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
Sun, Nov 24, 08:33 (12 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259853
Default Alt Text
D2089.diff (2 KB)
Attached To
Mode
D2089: Improve OpenSSL legacy build process
Attached
Detach File
Event Timeline
Log In to Comment