Skip to content

Commit 181381d

Browse files
author
Marcin Przepiorowski
committed
tools fix
1 parent 6f5acdf commit 181381d

File tree

4 files changed

+45
-26
lines changed

4 files changed

+45
-26
lines changed

tools/compile_template.j2

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ export DXLOC={{ dxout }}
88

99
PP={{ pploc }}
1010

11+
{% if ansible_os_family == "Solaris" %}
12+
export SSLLIBS="-l /opt/csw/lib/libcrypto.so.1.0.0 -l /opt/csw/lib/libssl.so"
13+
{% else %}
14+
export SSLLIBS="-l /usr/lib64/libcrypto.so.10 -l /usr/lib64/libssl.so"
15+
{% endif %}
16+
1117
rm -rf $DXLOC
1218
mkdir $DXLOC
1319

@@ -17,16 +23,16 @@ for i in dx_*.pl ; do
1723
name=${i%.pl}
1824
echo Compiling $name;
1925
{% if openssl is defined %}
20-
$PP -u -l /usr/lib64/libcrypto.so.10 -l /usr/lib64/libssl.so -I {{ dxloc }}/lib/ -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/$name $i
26+
$PP -u $SSLLIBS -I {{ dxloc }}/lib/ -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/$name $i
2127
{% else %}
2228
$PP -u -I {{ dxloc }}/lib/ -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/$name $i
2329
{% endif %}
2430
done
2531

2632
{% if openssl is defined %}
27-
$PP -u -l /usr/lib64/libcrypto.so.10 -l /usr/lib64/libssl.so -I {{dxloc}}/lib/ -M Text::CSV_PP -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_ctl_users dx_ctl_users.pl
28-
$PP -u -l /usr/lib64/libcrypto.so.10 -l /usr/lib64/libssl.so -M List::MoreUtils::PP -I {{dxloc}}/lib -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_get_replication dx_get_replication.pl
29-
$PP -u -l /usr/lib64/libcrypto.so.10 -l /usr/lib64/libssl.so -M List::MoreUtils::PP -I {{dxloc}}/lib -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_ctl_replication dx_ctl_replication.pl
33+
$PP -u $SSLLIBS -I {{dxloc}}/lib/ -M Text::CSV_PP -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_ctl_users dx_ctl_users.pl
34+
$PP -u $SSLLIBS -M List::MoreUtils::PP -I {{dxloc}}/lib -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_get_replication dx_get_replication.pl
35+
$PP -u $SSLLIBS -M List::MoreUtils::PP -I {{dxloc}}/lib -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_ctl_replication dx_ctl_replication.pl
3036
{% else %}
3137
$PP -u -I {{dxloc}}/lib/ -M Text::CSV_PP -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_ctl_users dx_ctl_users.pl
3238
$PP -u -M List::MoreUtils::PP -I {{dxloc}}/lib -M Crypt::Blowfish -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DXLOC/dx_get_replication dx_get_replication.pl
@@ -61,7 +67,7 @@ pwd
6167
rm -rf dxtoolkit2-$1-{{ system }}-*.tar.gz
6268
{% if openssl is defined %}
6369
tar cvf dxtoolkit2-$1-{{ system }}-openssl.tar dxtoolkit2
64-
gzip dxtoolkit2-$1-{{ system }}-openssl.tar
70+
gzip dxtoolkit2-$1-{{ system }}-openssl.tar
6571
{% else %}
6672
tar cvf dxtoolkit2-$1-{{ system }}.tar dxtoolkit2
6773
gzip dxtoolkit2-$1-{{ system }}.tar

tools/dxt.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- hosts: all
33

44
tasks:
5-
- name: Install CPAN
5+
- name: Install CPAN
66
sudo: yes
77
environment:
88
PATH: "/usr/local/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"
@@ -20,7 +20,7 @@
2020
- "LWP::UserAgent"
2121
- "Net::SSLeay"
2222
- "IO::Socket::SSL"
23-
- "LWP::Protocol::https"
23+
- "LWP::Protocol::https"
2424
- "Filter::Crypto::Decrypt"
2525
- "PAR::Packer"
2626
- "Term::ReadKey"
@@ -29,44 +29,46 @@
2929
- name: dxtoolkit dirs
3030
file: name={{ item }} state=directory
3131
with_items:
32-
- "{{ dxout }}"
33-
- "{{ dxloc }}/bin"
32+
- "{{ dxout }}"
33+
- "{{ dxloc }}/bin"
3434

35-
- name: cleanup dx scripts
35+
- name: cleanup dx scripts
3636
shell: rm -f {{ dxloc }}/bin/dx_*.pl
3737

38-
- name: dxtoolkit sync
38+
- name: dxtoolkit sync
3939
synchronize: src=/mnt/c/Users/pioro/Documents/oss_delphix/dxtoolkit/{{ item }} dest={{ dxloc }}
4040
with_items:
4141
- "bin"
4242
- "lib"
4343

4444
- name: no dx_syslog support
4545
when: no_dx_syslog == True
46-
file:
47-
state: absent
48-
path: "{{ dxloc }}/bin/dx_syslog.pl"
46+
file:
47+
state: absent
48+
path: "{{ dxloc }}/bin/dx_syslog.pl"
4949

5050
- name: put password
5151
synchronize: src=dbutils.pm dest={{ dxloc }}/lib/dbutils.pm
5252

53+
- name: aa
54+
debug:
55+
var: ansible_os_family
56+
5357
- name: create script
54-
template: src=/mnt/c/Users/pioro/Documents/oss_delphix/dxtoolkit/tools/compile_template.j2 dest="{{ dxloc }}/bin/compile.sh" mode=755
58+
template: src=compile_template.j2 dest="{{ dxloc }}/bin/compile.sh" mode=755 force=yes
5559

5660
- name: compile
57-
shell: "{{dxloc}}/bin/compile.sh {{dxversion}}"
61+
shell: "{{dxloc}}/bin/compile.sh {{dxversion}}"
5862
args:
5963
chdir: "{{ dxloc }}/bin/"
6064
register: output
61-
failed_when: "'ERROR' in output.stdout"
62-
63-
- name: get toolkit
65+
failed_when: "'ERROR' in output.stdout"
66+
67+
- name: get toolkit
6468
fetch: src={{ dxtar }}/dxtoolkit2-{{ dxversion }}-{{ system }}.tar.gz dest=/mnt/c/Users/pioro/Documents/oss_delphix/dxtoolkit/tools flat=yes
6569

6670
- name: cleanup temp
6771
shell: rm -rf /u02/tmp/par*
6872

6973
- name: cleanup file
70-
shell: rm -rf "{{ dxtar }}/dxtoolkit2-{{ dxversion }}-{{ system }}.tar.gz"
71-
72-
74+
shell: rm -rf "{{ dxtar }}/dxtoolkit2-{{ dxversion }}-{{ system }}.tar.gz"

tools/dxt_git.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- hosts: all
33

44
vars:
5-
dxloc: "/home/delphix/github"
5+
#dxloc: "/home/delphix/github"
66
temp: "{{ dxversion | default('HEAD') }}"
77
gittag: "{% if temp != 'HEAD' %} v{{ temp }} {% else %} {{ temp }}{% endif %}"
88

tools/dxt_one.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
- debug:
1616
msg: "{{ dxout }}"
1717

18+
- set_fact:
19+
outname: "dxtoolkit2-{{ temp }}-{{ system }}.tar.gz"
20+
when: openssl is not defined
21+
22+
- set_fact:
23+
outname: "dxtoolkit2-{{ temp }}-{{ system }}-openssl.tar.gz"
24+
when: openssl is defined
25+
1826
- name: Find dxtoolkit executable files
1927
find:
2028
paths: "{{ dxloc }}/bin"
@@ -40,14 +48,17 @@
4048

4149
- name: delete a output file
4250
file:
43-
path: "{{ dxtar }}/dxtoolkit2-{{ temp }}-{{ system }}.tar.gz"
51+
path: "{{ dxtar }}/{{ outname }}"
4452
state: absent
4553

4654
- name: create an archive
4755
archive:
48-
dest: "{{ dxtar }}/dxtoolkit2-{{ temp }}-{{ system }}.tar.gz"
56+
dest: "{{ dxtar }}/{{ outname }}"
4957
format: gz
5058
path: "{{ dxout }}"
5159

5260
- name: get toolkit
53-
fetch: src={{ dxtar }}/dxtoolkit2-{{ temp }}-{{ system }}.tar.gz dest=/mnt/c/Users/pioro/Documents/oss_delphix/dxtoolkit/tools/ flat=yes
61+
fetch:
62+
src: "{{ dxtar }}/{{ outname }}"
63+
dest: "/mnt/c/Users/pioro/Documents/oss_delphix/dxtoolkit/tools/"
64+
flat: yes

0 commit comments

Comments
 (0)