|
1 | 1 | ---
|
2 |
| -################### |
3 |
| -# OpenSSL v1.1.1 # |
4 |
| -################### |
5 |
| -# Required by OpenJ9 for out-of-process JIT compilation (aka JITaaS) |
6 |
| -# Currently only used by the alternate openj9 branch at https://github.com/eclipse/openj9/tree/jitaas |
7 |
| - |
8 |
| -# Note: some systems have already OpenSSL 1.1.1 instaled (as system) |
9 |
| -# do not install 1.1.1b on them |
| 2 | +########################## |
| 3 | +# Install capstone 4.0.2 # |
| 4 | +########################## |
| 5 | +# Required to build with hsdis disassembler support. |
| 6 | +# Note that at present this is only supported in the openjdk codebase |
| 7 | +# on x64 and aarch64, but this installs on all archs except RISC-V |
10 | 8 |
|
11 | 9 | - name: Set capstone version
|
12 | 10 | set_fact:
|
|
18 | 16 | - name: Test if capstone 4 is installed
|
19 | 17 | shell: test -f /usr/local/lib/libcapstone.so.4 || test -f /usr/lib/libcapstone.so.4
|
20 | 18 | when:
|
21 |
| - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "SLES") |
22 |
| - - capstone_installed.rc != 0 |
| 19 | + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Ubuntu" or ansible_distribution == "SLES") |
23 | 20 | register: capstone_installed
|
24 | 21 | changed_when: false
|
25 | 22 | failed_when: false
|
|
33 | 30 | mode: 0440
|
34 | 31 | checksum: sha512:7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e
|
35 | 32 | when:
|
36 |
| - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "SLES") |
| 33 | + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Ubuntu" or ansible_distribution == "SLES") |
37 | 34 | - capstone_installed.rc != 0
|
| 35 | + - (ansible_architecture != "riscv64") |
38 | 36 | tags: capstone_source
|
39 | 37 |
|
40 | 38 | - name: Extract capstone {{ capstone_version }}
|
|
43 | 41 | dest: /tmp
|
44 | 42 | copy: False
|
45 | 43 | when:
|
46 |
| - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "SLES") |
| 44 | + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Ubuntu" or ansible_distribution == "SLES") |
47 | 45 | - capstone_installed.rc != 0
|
| 46 | + - (ansible_architecture != "riscv64") |
48 | 47 | tags: capstone_source
|
49 | 48 |
|
| 49 | +- name: Set architecture variable for x64 |
| 50 | + set_fact: capstone_architecture=x86 |
| 51 | + when: ansible_architecture == "x86_64" |
| 52 | + |
| 53 | +- name: Set architecture variable for arm32 |
| 54 | + set_fact: capstone_architecture=arm |
| 55 | + when: ansible_architecture == "armv7l" |
| 56 | + |
| 57 | +- name: Set architecture variable for aarch64 |
| 58 | + set_fact: capstone_architecture=aarch64 |
| 59 | + when: ansible_architecture == "aarch64" |
| 60 | + |
| 61 | +- name: Set architecture variable for ppc64le |
| 62 | + set_fact: capstone_architecture=powerpc |
| 63 | + when: ansible_architecture == "ppc64le" |
| 64 | + |
| 65 | +- name: Set architecture variable for s390x |
| 66 | + set_fact: capstone_architecture=systemz |
| 67 | + when: ansible_architecture == "s390x" |
| 68 | + |
50 | 69 | - name: Build and install capstone {{ capstone_version }}
|
51 |
| - shell: cd /tmp/capstone-{{ capstone_version }}} && ./make.sh && PREFIX=/usr/local ./make.sh install |
| 70 | + shell: shell: cd /tmp/capstone-{{ capstone_version }} && export CAPSTONE_ARCHS={{ capstone_architecture }} && ./make.sh && PREFIX=/usr/local ./make.sh install |
52 | 71 | when:
|
53 | 72 | - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Ubuntu" or ansible_distribution == "SLES")
|
54 | 73 | - capstone_installed.rc != 0
|
| 74 | + - (ansible_architecture != "riscv64") |
55 | 75 | tags: capstone_source
|
56 | 76 |
|
57 | 77 | - name: Remove downloaded packages for capstone {{ capstone_version }}
|
|
0 commit comments