summarylogtreecommitdiffstats
path: root/for-arch.patch
blob: c20696c723ffdfde486891a44483a3b7596068db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
--- vmware-install.pl.orig	2016-10-05 16:22:21.214845710 +0100
+++ bin/vmware-uninstall-vSphere-CLI.pl	2016-10-10 14:40:27.453829269 +0100
@@ -766,7 +766,7 @@
 # Constants
 my $cInstallerFileName = 'vmware-install.pl';
 my $cModuleUpdaterFileName = 'install.pl';
-my $cRegistryDir = '/etc/vmware';
+my $cRegistryDir = '../../pkg/vmware-vcli/etc/vmware';
 my $cInstallerMainDB = $cRegistryDir . '/locations';
 my $cInstallerObject = $cRegistryDir . '/installer.sh';
 my $cConfFlag = $cRegistryDir . '/not_configured';
@@ -1662,7 +1662,7 @@
 sub initialize_globals {
   my $dirname = shift;
 
-  $gRegistryDir = '/etc/vmware-vcli';
+  $gRegistryDir = '../../pkg/vmware-vcli/etc/vmware-vcli';
   @gOldUninstallers = qw( /etc/vmware-vicli/installer.sh /etc/vmware-rcli/installer.sh);
   $gUninstallerFileName = 'vmware-uninstall-vSphere-CLI.pl';
 
@@ -1865,7 +1865,7 @@
   
   foreach $file (internal_ls($src_dir)) {
     my $src = $src_dir . '/' . $file;
-    my $src_loc = '/usr/bin/' . $file;
+    my $src_loc = '../../pkg/vmware-vcli/usr/bin/' . $file;
     my $dst_loc = $dst_dir . '/' . $file;
     if (-l $dst_loc) {
       install_symlink(readlink($dst_loc), $src_loc);
@@ -2198,35 +2198,31 @@
 sub install_content_vicli_perl {
    my %patch;
    my $shipped_ssl_version = '0.9.8';
-   my $installed_ssl_version = '0';
+   my $installed_ssl_version = '1.0.2';
    my $minimum_ssl_version = '0.9.7';
-   my $ssleay_installed = 0;
+   my $ssleay_installed = 1;
    my $link_ssleay = 0;
    my $linker_installed = `which ld`;
    my $minimum_libxml_version = '2.6.26';
    my $installed_libxml_version = '0';
 
-   my $OpenSSL_installed = 0;
-   my $LibXML2_installed = 0;
-   my $OpenSSL_dev_installed = 0;
+   my $OpenSSL_installed = 1;
+   my $LibXML2_installed = 1;
+   my $OpenSSL_dev_installed = 1;
    my $libxml_perl_installed = 1;
 
-   my $e2fsprogs_installed = 0;
-   my $e2fsprogs_version = '0';
+   my $e2fsprogs_installed = 1;
+   my $e2fsprogs_version = '1.43';
    my $minimum_e2fsprogs_version = '1.38';
    my $e2fsprogs_devel_installed = 0;
    my $internet_available = 0;
-   my $install_rhel55_local = 0;
+   my $install_rhel55_local = 1;
 
    my $vicliName = vmware_product_name();
    if ($] < 5.008) {
       error($vicliName . " requires Perl version 5.8 or later.\n\n");
    }
 
-   unless(direct_command("perldoc -V 2> /dev/null")) {
-      print wrap("warning: " . $vicliName . " requires Perldoc.\n Please install perldoc.\n\n");
-   }
-
    if ( file_name_exist("/etc/redhat-release")) {
       my $msg = "This " . vmware_product_name() . " installer includes precompiled Perl modules for RHEL.\n"
                 . "Answering yes will install the precompiled modules, and answering no will install from CPAN.\n"
@@ -2704,16 +2700,16 @@
 
       undef %patch;
       if ($] >= 5.010 && ( -e "./lib/5.10/$module->{'path'}/lib" ) )  {
-         install_dir("./lib/5.10/$module->{'path'}/lib", "$lib_dir", \%patch, 0x1);
+         install_dir("./lib/5.10/$module->{'path'}/lib", "../../pkg/vmware-vcli$lib_dir", \%patch, 0x1);
       } elsif (-e "./lib/$module->{'path'}/lib") {
-         install_dir("./lib/$module->{'path'}/lib", "$lib_dir", \%patch, 0x1);
+         install_dir("./lib/$module->{'path'}/lib", "../../pkg/vmware-vcli$lib_dir", \%patch, 0x1);
       }
 
       undef %patch;
       if ($] >= 5.010 && ( -e "./lib/5.10/$module->{'path'}/share" ) )  {
-         install_dir("./lib/5.10/$module->{'path'}/share", "$share_dir", \%patch, 0x1);
+         install_dir("./lib/5.10/$module->{'path'}/share", "../../pkg/vmware-vcli$share_dir", \%patch, 0x1);
       } elsif (-e "./lib/$module->{'path'}/share") {
-         install_dir("./lib/$module->{'path'}/share", "$share_dir", \%patch, 0x1);
+         install_dir("./lib/$module->{'path'}/share", "../../pkg/vmware-vcli$share_dir", \%patch, 0x1);
       }
 
       if ($] < 5.010) {
@@ -2776,7 +2772,7 @@
 
   my $previous = $gOption{'default'};
   $gOption{'default'} = 0;
-  show_EULA();
+  #show_EULA();
   $gOption{'default'} = $previous;
 
   if ((check_disk_space('.', '/usr/lib')) < 0) {
@@ -2846,29 +2842,25 @@
   db_add_answer('LIBDIR', $libdir);
 
   # Install a symlink for ESXCLI, which is in the library
-  install_symlink("$libdir/bin/esxcli/esxcli", "$bindir/esxcli");
+  install_symlink("/usr/lib/vmware-vcli/bin/esxcli/esxcli", "$bindir/esxcli");
   # Install a symlink for DCLI, which is in the library
-  install_symlink("$libdir/bin/vmware-dcli/dcli", "$bindir/dcli");
-  safe_chmod(755, "$bindir/esxcli");
-  safe_chmod(755, "$bindir/dcli");
+  install_symlink("/usr/lib/vmware-vcli/bin/vmware-dcli/dcli", "$bindir/dcli");
 
   # Install a symlink for VCLI
-  if ( "$rootdir/bin" ne "/usr/bin") {
-     install_bin_symlink('./bin', "$rootdir/bin");
-     install_symlink("$libdir/bin/esxcli/esxcli", "/usr/bin/esxcli");
-     install_symlink("$libdir/bin/vmware-dcli/dcli", "/usr/bin/dcli");
+  if ( "$rootdir/bin" ne "../../pkg/vmware-vcli/usr/bin") {
+     install_bin_symlink('./bin', "/bin");
+     install_symlink("/usr/lib/vmware-vcli/bin/esxcli/esxcli", "esxcli");
+     install_symlink("/usr/lib/vmware-vcli/bin/vmware-dcli/dcli", "dcli");
      # Making esxcli and dcli executable
-	 safe_chmod(755, "/usr/bin/esxcli");
-     safe_chmod(755, "/usr/bin/dcli");
   }
 
   # Install a symlink to make /lib point to the correct library
   # based on the architecture of our system
   if (is64BitUserLand()) {
-     install_symlink("$libdir/lib64", "$libdir/lib");
+     install_symlink("/usr/lib/vmware-vcli/lib64", "$libdir/lib");
   }
   else {
-     install_symlink("$libdir/lib32", "$libdir/lib");
+     install_symlink("/usr/lib/vmware-vcli/lib32", "$libdir/lib");
   }
 
   # Make sure that, in particular, libvmacore.so's exec text permission needs
@@ -2879,12 +2871,12 @@
   }
 
   # Install vSphere SDK for Perl content excluding "apps"
-  $docdir = $rootdir . '/share/doc/vmware-vcli';
+  $docdir = $rootdir . '/usr/share/doc/vmware-vcli';
   install_dir('./doc', $docdir, \%patch, 0x1);
   db_add_answer('DOCDIR', $docdir);
 
   # Install resxtop man files
-  $mandir = "$rootdir/share/man/man1";
+  $mandir = "$rootdir/usr/share/man/man1";
   undef %patch;
   install_dir('./man', $mandir, \%patch, 0x1);
 
@@ -3860,9 +3852,9 @@
      error($chk_msg);
    }
 
-   if (!is_root()) {
-     error('Please re-run this program as the super user.' . "\n\n");
-   }
+   #if (!is_root()) {
+   #  error('Please re-run this program as the super user.' . "\n\n");
+   #}
 
    # Force the path to reduce the risk of using "modified" external helpers
    # If the user has a special system setup, he will will prompted for the