Skip to content

[geotrans] upgrade to version 3.8#13243

Closed
StarGate-One wants to merge 6 commits intomicrosoft:masterfrom
StarGate-One:geotrans
Closed

[geotrans] upgrade to version 3.8#13243
StarGate-One wants to merge 6 commits intomicrosoft:masterfrom
StarGate-One:geotrans

Conversation

@StarGate-One
Copy link
Copy Markdown
Contributor

Describe the pull request

  1. Upgrade port geotrans to version 3.8
  2. Delete old style CONTROL file
  3. Add new style vcpkg.json file
  4. Update CI to reflect platforms not supported
  • What does your PR fix? Fixes [geotrans] update to 3.8 #13241 Upgrade geotrans to version 3.8

  • Which triplets are supported/not supported?
    geotrans:arm-uwp=fail
    geotrans:arm64-uwp=fail
    geotrans:arm64-windows=fail
    geotrans:x64-osx=fail
    geotrans:x64-uwp=fail
    geotrans:x64-windows-static=fail

Have you updated the CI baseline? Yes

**Describe the pull request**

1. Upgrade port geotrans to version 3.8
2. Delete old style CONTROL file
3. Add new style vcpkg.json file
4. Update CI to reflect platforms not supported
   geotrans:arm-uwp=fail
   geotrans:arm64-uwp=fail
   geotrans:arm64-windows=fail
   geotrans:x64-osx=fail
   geotrans:x64-uwp=fail
   geotrans:x64-windows-static=fail
@StarGate-One
Copy link
Copy Markdown
Contributor Author

@JackBoosY @strega-nil

  • The CI runs (x86-windows, x64-windows and x64-linux) failed because of downloading the file, as geotrans is located on a US government server and they are not known for speed...
  • The URL is: ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/linux_dev.tgz
  • The file average about and hour give/take a few minutes depending on server traffic, so I do not know what to do from here.
  • The port builds fine on my x86-windows, x64-windows and x64-linux instances (Windows 10 and OpenSUSE Leap 15.2 both in WSL2 and Hyper-V).
  • I do not know how to:
    a. add a message notifying the user the download will take a while 60+- minutes depending on network traffic
    b. change the timeout period for vcpkg_download_distfile() function

@NancyLi1013 NancyLi1013 self-assigned this Aug 31, 2020
@JackBoosY JackBoosY self-assigned this Aug 31, 2020
@NancyLi1013 NancyLi1013 added the category:port-update The issue is with a library, which is requesting update new revision label Aug 31, 2020
@JackBoosY JackBoosY added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Aug 31, 2020
@cenit
Copy link
Copy Markdown
Contributor

cenit commented Aug 31, 2020

@StarGate-One what about using the master file? ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz

It's described as identical between linux and windows.
It might ease the load for people having to build both in an automated way (sharing the download folders between multiple vcpkg instances is very common).
Is it possible, in your opinion? Or is it a different beast?

1. Add message to portfile.cmake about long download times
2. Remove port-version from vcpkg.json
3. Remove the following exceptions from ci.baseline.txt
   geotrans:arm-uwp=fail
   geotrans:arm64-uwp=fail
   geotrans:arm64-windows=fail
   geotrans:x64-osx=fail
   geotrans:x64-uwp=fail
@StarGate-One
Copy link
Copy Markdown
Contributor Author

@StarGate-One what about using the master file? ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz

It's described as identical between linux and windows.
It might ease the load for people having to build both in an automated way (sharing the download folders between multiple vcpkg instances is very common).
Is it possible, in your opinion? Or is it a different beast?

Hi @cenit

  • The source in all 3 developer files are the same, it is just the compiled binaries included in each file that makes the difference:
  1. The windows version windows binaries included with the source
  2. The linux version has linux binaries included with the source
  3. The master contains both windows and linux binaries with the source (slightly larger than the each of the files above).
  • I also looked at the MGRS Versions (windows/linux) but they are only a sub-system of the complete GEOTRANS package, missing some of the source.

  • The problem is not really the size of the binaries even though we really do not care about those as we are recompiling them - they take up relatively little space in the compressed packages.

  • The issue is this is a .mil website (I think US army mirror - but it points to the same fie/ftp file) and is most likely an old fashion ftp server - I think they are running either Windows 2000 or 2003, with very slow network cards, I think, at least act like 10 or 100 kps cards on the ftp server.

  • There is a file in buildtrees\geotrans\src\geotrans-3-1821303982\data\Und_min2.5x2.5_egm2008_WGS84_TideFree_reformatted is 145mb, the bulk of the download, but is needed to use the package after recompiling.

  • Now I was reading the license/copyright buildtrees\geotrans\src\geotrans-3-1821303982\GEOTRANS3\docs\MSP_Geotrans_Terms_Of_Use - attached
    MSP_Geotrans_Terms_Of_Use.txt, it seems it can be distributed as long as the package stays intact and is not modifed (modifed or enhanced versions can not be distributed) and credit is given to National Geospatial-Intelligence Agency (NGA).

  • So I was thinking, if we had somewhere to host the file, on github maybe in its original form, the download of a 150mb file would only take a couple of minutes.

  • I searched for where the file may be hosted somewhere already, but it seems the people over on CONAN are having the same issue [request] geotrans/3.8 conan-io/conan-center-index#1779.

  • I guess this would be something github and/or microsoft legal department would need to weigh in on..

@cenit
Copy link
Copy Markdown
Contributor

cenit commented Aug 31, 2020

The problem is not really the size of the binaries even though we really do not care about those as we are recompiling them - they take up relatively little space in the compressed packages.

exactly for this, the master file was the most interesting, at least for me.
It allowed to install both the Linux and the windows version with only one download, which was especially useful for people that have the buildsystem automated and that share the download folder to cache sources, because in the end the portfile is pointing to the same file and so there is no need to download two :)
Yeah I saw very disappointing speeds when downloading from that website, and that was my first thought when trying to minimize the download (for vcpkg CI and also for geotrans multiplatform users).

@StarGate-One
Copy link
Copy Markdown
Contributor Author

The problem is not really the size of the binaries even though we really do not care about those as we are recompiling them - they take up relatively little space in the compressed packages.

exactly for this, the master file was the most interesting, at least for me.

  • If we could just download source, that would be the way to go as the Windows and Linux source directories are identical. It builds either one. Making such a change would be beyond my technical abilities.

Note: The previous geotrans-3.7 copied then uses the CMakeLists.txt file from the ports\geotrans directory and it determines based on the triplet. All I did was add the additional .h .c files, of source updated the SHA512 and download from location.

It allowed to install both the Linux and the windows version with only one download, which was especially useful for people that have the buildsystem automated and that share the download folder to cache sources, because in the end the portfile is pointing to the same file and so there is no need to download two :)

  • It does not download both files now or before, just the linux source (its a little smaller), the x86-windows, x64-linux and x64-windows all use the same linux file.

Yeah I saw very disappointing speeds when downloading from that website, and that was my first thought when trying to minimize the download (for vcpkg CI and also for geotrans multiplatform users).

  • I was able to download the Windows file a little faster (14 minutes), but I guess it is cheating using aria2c:

aria2c -d C:\Downloads -o geotrans-3.8.zip -j 16 -x 16 -l C:\Downloads\geotrans-3.8.log -t 600 ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/win_dev.zip
Logfile: geotrans-3.8.log.zip

@StarGate-One StarGate-One requested a review from JackBoosY August 31, 2020 18:43
@StarGate-One
Copy link
Copy Markdown
Contributor Author

@JackBoosY It still fails with a timeout downloading the file...
I was able to download the file faster, but I maxed out the number of connections per server and connections per session to accomplish it, although using more than 4 or each is considered inconsiderate to internet norms :(
#13243 (comment)

Download master.tgz containing both Windows/Linux Binaries
@JackBoosY
Copy link
Copy Markdown
Contributor

Elapsed time for package geotrans:x64-windows: 21.74 s
It seems that the pipeline cannot access this url at all.
@BillyONeal Can you take a look?

Thanks.

@StarGate-One
Copy link
Copy Markdown
Contributor Author

@cenit I changed the portfile.cmake to use the master.tgz file, so both the linux/windows is now present - it is only a 5mb difference.
We still need to figure out why the CI can not connect to the download site, hmm...
@JackBoosY cc @BillyONeal - could it be that since the nga.mil site is running some old hardware/operating systems that it could be an SSL/TLS issue? Just throwing that out there...

@BillyONeal
Copy link
Copy Markdown
Member

It can't be TLS because it's an FTP link.

Hmmmm.... it doesn't look like we open the FTP port: https://github.com/microsoft/vcpkg/blob/master/scripts/azure-pipelines/windows/create-vmss.ps1#L51

Is this available on an HTTP(s) endpoint or are we stuck with FTP?

Thanks!

@StarGate-One
Copy link
Copy Markdown
Contributor Author

It can't be TLS because it's an FTP link.

Hmmmm.... it doesn't look like we open the FTP port: https://github.com/microsoft/vcpkg/blob/master/scripts/azure-pipelines/windows/create-vmss.ps1#L51

Is this available on an HTTP(s) endpoint or are we stuck with FTP?

Thanks!

The home web site is https: https://earth-info.nga.mil/GandG/update/index.php?action=home

When you click on any of the file download links it becomes ftp://ftp.nga.mil in our case the file is: ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz

I tried changing the ftp to http https and sftp ://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz but appears port 22, 80 and 443 are closed on their ftp server :(

@BillyONeal BillyONeal added the depends:vm-update PR contains changes to the VM provisioning scripts label Sep 1, 2020
@BillyONeal
Copy link
Copy Markdown
Member

Marking depends:vm-update to open the FTP port.

@JackBoosY
Copy link
Copy Markdown
Contributor

JackBoosY commented Sep 3, 2020

Seems still have many regressions, get log here.
Nope, they are download issue.

@BillyONeal
Copy link
Copy Markdown
Member

BillyONeal commented Sep 3, 2020

@JackBoosY Yes it's failing to download because we don't open the FTP port on the VMS.

@StarGate-One
Copy link
Copy Markdown
Contributor Author

I thought was it the FTP port?

@BillyONeal
Copy link
Copy Markdown
Member

@StarGate-One Yes, brain fart 😅

@StarGate-One
Copy link
Copy Markdown
Contributor Author

LOL no worries, we all have those days.

@NancyLi1013
Copy link
Copy Markdown
Contributor

@StarGate-One
It seems that the repository doesn't exist now.

Could you please help take a look and resolve the conflicts?

@StarGate-One
Copy link
Copy Markdown
Contributor Author

@NancyLi1013 cc: @BillyONeal
The download is still available.
Has the ftp port been opened on the CI VM?
The port has been on hold waiting for the ftp ported to be opened/configured on the CI VM.

@BillyONeal
Copy link
Copy Markdown
Member

BillyONeal commented Oct 26, 2020

I believe FTP is indeed not open:

$allowHttp = New-AzNetworkSecurityRuleConfig `
-Name AllowHTTP `
-Description 'Allow HTTP(S)' `
-Access Allow `
-Protocol Tcp `
-Direction Outbound `
-Priority 1008 `
-SourceAddressPrefix * `
-SourcePortRange * `
-DestinationAddressPrefix * `
-DestinationPortRange @(80, 443)
$allowDns = New-AzNetworkSecurityRuleConfig `
-Name AllowDNS `
-Description 'Allow DNS' `
-Access Allow `
-Protocol * `
-Direction Outbound `
-Priority 1009 `
-SourceAddressPrefix * `
-SourcePortRange * `
-DestinationAddressPrefix * `
-DestinationPortRange 53
$allowGit = New-AzNetworkSecurityRuleConfig `
-Name AllowGit `
-Description 'Allow git' `
-Access Allow `
-Protocol Tcp `
-Direction Outbound `
-Priority 1010 `
-SourceAddressPrefix * `
-SourcePortRange * `
-DestinationAddressPrefix * `
-DestinationPortRange 9418
if (-Not $Unstable) {
$allowStorage = New-AzNetworkSecurityRuleConfig `
-Name AllowStorage `
-Description 'Allow Storage' `
-Access Allow `
-Protocol * `
-Direction Outbound `
-Priority 1011 `
-SourceAddressPrefix VirtualNetwork `
-SourcePortRange * `
-DestinationAddressPrefix Storage `
-DestinationPortRange *
}
$denyEverythingElse = New-AzNetworkSecurityRuleConfig `
-Name DenyElse `
-Description 'Deny everything else' `
-Access Deny `
-Protocol * `
-Direction Outbound `
-Priority 1012 `
-SourceAddressPrefix * `
-SourcePortRange * `
-DestinationAddressPrefix * `
-DestinationPortRange *
$NetworkSecurityGroupName = $ResourceGroupName + 'NetworkSecurity'
$securityRules = @($allowHttp, $allowDns, $allowGit);
if (-Not $Unstable) {
$securityRules += @($allowStorage)
}
$securityRules += @($denyEverythingElse)
$NetworkSecurityGroup = New-AzNetworkSecurityGroup `
-Name $NetworkSecurityGroupName `
-ResourceGroupName $ResourceGroupName `
-Location $Location `
-SecurityRules $securityRules

Is there an https endpoint for these bits?

@StarGate-One
Copy link
Copy Markdown
Contributor Author

No https.
The old version 3.7 is http but the server it is located on is being decommissioned in near the future (at least according to the old web site) in favor of the new nga.mil site.

The new site uses http for web pages access, but uses ftp for all file downloads.

URL is ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz and is very slow, I mean dial-up modem slow :(

It might be a good discussion point to support 3.7 until the old server is shutdown, and then remove the port from vcpkg when it is no longer available?

I have v3.8 as a local port in my vcpkg instances, so it does not impact me either way and I leave the decision up to you all.

Thanks,

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion today the team has no objection to accepting this FTP source location into the tree, although we still massively prefer an HTTP endpoint should it become available, because this port will ignore proxy settings, etc.

Of course, we need to wait to merge it until we actually open that port, next VM update.

The edits to aria2 that were done to attempt to troubleshoot the closed port should be reverted.

URLS "http://earth-info.nga.mil/GandG/geotrans/geotrans3.7/linux_dev.tgz"
FILENAME "geotrans-3.7.tgz"
SHA512 20bdc870026e95154f1d7f9560cbfa2c0b2dc39042aa544f093b502a0609121cb47df5729248e0d79ccf8f9908bf01bbcea8e777ae4f45e25472b7ce2bcb9742
URLS "ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/master_version/master.tgz"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's concerning that this URI is not versioned so it will break whenever they update it.

@BillyONeal
Copy link
Copy Markdown
Member

@StarGate-One It looks like somehow the branch is toast so we can't resolve the merge conflict; can you fix that or let us know that you're no longer interested in pursuing this?

Thanks!

@StarGate-One
Copy link
Copy Markdown
Contributor Author

  • I have it locally on my customized versions of vcpkg
  • Yes, I would prefer an https download, even an sftp would be better plain ftp 😢
  • I will take a look and create a new branch in my local version of the vanilla vcpkg, test to make sure everything is OK, and push to my github fork, then create a PR to merge into microsoft/vcpkg.
  • @JackBoosY made the aria2c changes, but I do not think we need them... Although the ftp server is very slow, it takes about an hour to download the 156mb file 😢
  • I think what happened is I had to rebuild my laptop and I did accidently do a git push --force up to my github fork and the local copy was just a fresh clone of microsoft/vcpkg and it did not have the branch with geotrans in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-update The issue is with a library, which is requesting update new revision category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly depends:vm-update PR contains changes to the VM provisioning scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[geotrans] update to 3.8

5 participants