Ah, also forgot to clarify that the nightly-2017-02-02.yaml file was already previously retrieved by the http-redirect server and actually exists in it's mirror directory (with filename renamed according to server's conventions).
*Server side* $ stat mirror/https_raw.githubusercontent.com_fpco_lts-haskell_master__lts-8.0.yaml File: mirror/https_raw.githubusercontent.com_fpco_lts-haskell_master__lts-8.0.yaml Size: 5377585 Blocks: 10504 IO Block: 4096 regular file Device: 2dh/45d Inode: 5819 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1004/ alex) Gid: ( 100/ users) Access: 2017-02-17 05:02:18.946927356 +0300 Modify: 2017-02-17 05:02:18.936927354 +0300 Change: 2017-02-19 03:30:53.923441888 +0300 Birth: - On Sunday, February 19, 2017 at 4:29:49 AM UTC+3, Alexander T wrote: > > Yes I did. > > *Server side* > $ env | grep STACK_ROOT > STACK_ROOT=/data/srv/stack_root > $ pwd > /data/srv > $ ls > http-redirect mirror stack_root > $ stack path | grep config > config-location: /data/srv/stack_root/global-project/stack.yaml > $ cat /data/srv/stack_root/config.yaml > urls: > latest-snapshot: > http://localhost:3000/https/www.stackage.org/download/snapshots.json > lts-build-plans: > http://localhost:3000/https/raw.githubusercontent.com/fpco/lts-haskell/master/ > nightly-build-plans: > http://localhost:3000/https/raw.githubusercontent.com/fpco/stackage-nightly/master/ > > package-indices: > - name: Hackage > download-prefix: > http://localhost:3000/https/s3.amazonaws.com/hackage.fpcomplete.com/package/ > http: > http://localhost:3000/https/s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz > > > *Client side* > $ env | grep STACK_ROOT > $ cat ~/.stack/config.yaml > urls: > latest-snapshot: > http://localhost:3000/https/www.stackage.org/download/snapshots.json > lts-build-plans: > http://localhost:3000/https/raw.githubusercontent.com/fpco/lts-haskell/master/ > nightly-build-plans: > http://localhost:3000/https/raw.githubusercontent.com/fpco/stackage-nightly/master/ > > package-indices: > - name: Hackage > download-prefix: > http://localhost:3000/https/s3.amazonaws.com/hackage.fpcomplete.com/package/ > http: > http://localhost:3000/https/s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz > > *When I try to run "stack path" on client side without internet connection > on both sides* > $ stack path > Downloading nightly-2017-02-02 build plan ...RedownloadFailed Request { > host = "localhost" > port = 3000 > secure = False > requestHeaders = [] > path = "/https/ > raw.githubusercontent.com/fpco/stackage-nightly/master//nightly-2017-02-02.yaml > " > queryString = "" > method = "GET" > proxy = Nothing > rawBody = False > redirectCount = 10 > responseTimeout = ResponseTimeoutDefault > requestVersion = HTTP/1.1 > } > "/home/alex/.stack/build-plan/nightly-2017-02-02.yaml" (Response > {responseStatus = Status {statusCode = 500, statusMessage = "Internal > Server Error"}, responseVersion = HTTP/1.0, responseHeaders = > [("Date","Sun, 19 Feb 2017 01:23:48 > GMT"),("Server","Warp/3.2.11"),("Content-Type","text/plain; > charset=utf-8")], responseBody = (), responseCookieJar = CJ {expose = []}, > responseClose' = ResponseClose}) > > *At the same time http-redirect server throws:* > HttpExceptionRequest Request { > host = "raw.githubusercontent.com" > port = 443 > secure = True > requestHeaders = [] > path = > "/fpco/stackage-nightly/master//nightly-2017-02-02.yaml" > queryString = "" > method = "GET" > proxy = Nothing > rawBody = False > redirectCount = 10 > responseTimeout = ResponseTimeoutDefault > requestVersion = HTTP/1.1 > } > (ConnectionFailure getAddrInfo: does not exist (Name or service not > known)) > > On Friday, February 17, 2017 at 9:48:46 AM UTC+3, Neil Mitchell wrote: >> >> > Thank you. I tried this, http-redirect server builds fine and runs. >> This is >> > what I figured out. >> >> > Once I did "stack setup", "stack build" through the proxy (with >> > corresponding config.yaml), I can reproduce it on the same system >> without >> > internet connection. >> > But if I take a fresh system with empty global stack root (e.g. >> ~/.stack on >> > GNU/Linux) except solely config.yaml, it immediately fails. >> http-redirect >> > throws this: >> >> Did you copy the config.yaml from the offline-stack repo into >> STACK_ROOT? Is your STACK_ROOT actually where you think it is? (use >> "stack path" to see). >> >> > "stack new" fails in both cases with: >> > Here I can see that this request is not processed by the http-redirect, >> it >> > keeps silent when stack throws this exception. >> > >> > Maybe I missed something? >> >> stack new isn't supported - I imagine you have to have another >> redirect in config.yaml. Pull requests welcome! I've also raised a >> ticket at https://github.com/ndmitchell/offline-stack/issues/1. >> >> Thanks, Neil >> >> > >> > On Wednesday, February 15, 2017 at 11:04:36 PM UTC+3, Neil Mitchell >> wrote: >> >> >> >> > Please, can you describe all operations in detail. >> >> >> >> Describing is fragile. I've created a github project that describes >> >> it. See the README at >> >> https://github.com/ndmitchell/offline-stack#readme, plus the code >> >> which executes it at >> >> https://github.com/ndmitchell/offline-stack/blob/master/appveyor.yml. >> >> I test those steps on Appveyor, so it's guaranteed to work/ >> >> >> >> > The whole idea of using haskell with stack/cabal offline is crucial >> for >> >> > work >> >> > at many companies. >> >> > First of all it's not clear how to obtain all the data needed for >> stack >> >> > and >> >> > cabal to serve locally. >> >> >> >> Agreed! Hopefully everything is now 100% clear. >> >> >> >> > >> >> > On Friday, February 10, 2017 at 10:39:51 AM UTC+3, Neil Mitchell >> wrote: >> >> >> >> >> >> Hi David, >> >> >> >> >> >> Its not that bad, now the steps are known, so go ahead and email me >> if >> >> >> you >> >> >> get stuck. Steps are: >> >> >> >> >> >> * create stack root >> >> >> >> >> >> * copy config.yaml to the root >> >> >> >> >> >> * run stack setup with the setup yaml flag >> >> >> >> >> >> Figuring our these steps took weeks :) >> >> >> >> >> >> Thanks, Neil >> >> >> >> >> >> >> >> >> >> >> >> On Thu, 9 Feb 2017 at 11:47 pm, David Sicilia <[email protected]> >> >> >> wrote: >> >> >>> >> >> >>> Hi Neil, >> >> >>> >> >> >>> Thank you for raising the ticket, I just gave it a +1, if that >> helps >> >> >>> :-) >> >> >>> >> >> >>> So would you recommend that I go ahead and try it right now, >> >> >>> or is it complicated enough that I should just wait for that >> change >> >> >>> to be implemented? I guess what I mean is, after you realized >> >> >>> which config files to change, was it straightforward from there? >> >> >>> >> >> >>> David >> >> >>> >> >> >>> On Saturday, January 21, 2017 at 11:27:22 AM UTC-5, David Sicilia >> >> >>> wrote: >> >> >>>> >> >> >>>> Hi there, >> >> >>>> >> >> >>>> >> >> >>>> I am behind a firewall with strict rules about downloading >> software >> >> >>>> from >> >> >>>> the internet, >> >> >>>> >> >> >>>> so I would like to know if it is possible to download an entire >> >> >>>> stackage >> >> >>>> LTS snapshot >> >> >>>> >> >> >>>> in one go and then serve it on a local server, to which we could >> then >> >> >>>> point the stack tool. >> >> >>>> >> >> >>>> >> >> >>>> By "snapshot" I would be referring to the source code for all >> >> >>>> packages >> >> >>>> because >> >> >>>> >> >> >>>> we'd need to draw from that local server to build on both Linux >> and >> >> >>>> Windows. >> >> >>>> >> >> >>>> >> >> >>>> For example, perhaps we'd be able to go to a server within the >> >> >>>> firewall >> >> >>>> and run >> >> >>>> >> >> >>>> "stack new", then edit the yaml file to point it to a local >> stackage >> >> >>>> server with given >> >> >>>> >> >> >>>> resolver number, then it would just behave normally from then on, >> >> >>>> except >> >> >>>> always >> >> >>>> >> >> >>>> downloading packages from the local server. >> >> >>>> >> >> >>>> >> >> >>>> What about compilers? I know that stack also downloads the >> compilers, >> >> >>>> so >> >> >>>> I guess >> >> >>>> >> >> >>>> those would have to be included in the downloaded >> snapshot-package >> >> >>>> for >> >> >>>> various >> >> >>>> >> >> >>>> platforms? >> >> >>>> >> >> >>>> >> >> >>>> Any guidance would be appreciated, because we will not be able to >> >> >>>> make >> >> >>>> use of >> >> >>>> >> >> >>>> stack/stackage without something like this! >> >> >>>> >> >> >>>> >> >> >>>> Thank you >> >> >>>> >> >> >>>> David >> >> >>> >> >> >>> -- >> >> >>> You received this message because you are subscribed to the Google >> >> >>> Groups >> >> >>> "haskell-stack" group. >> >> >>> To unsubscribe from this group and stop receiving emails from it, >> send >> >> >>> an >> >> >>> email to [email protected]. >> >> >>> To post to this group, send email to [email protected]. >> >> >>> To view this discussion on the web visit >> >> >>> >> >> >>> >> https://groups.google.com/d/msgid/haskell-stack/35616520-204d-41f6-b1c9-e37ee1570473%40googlegroups.com. >> >> >> >> >>> For more options, visit https://groups.google.com/d/optout. >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "haskell-stack" group. >> >> > To unsubscribe from this group and stop receiving emails from it, >> send >> >> > an >> >> > email to [email protected]. >> >> > To post to this group, send email to [email protected]. >> >> > To view this discussion on the web visit >> >> > >> >> > >> https://groups.google.com/d/msgid/haskell-stack/094da0e4-6eab-4c10-8842-4d3c37b3ad78%40googlegroups.com. >> >> >> >> > >> >> > For more options, visit https://groups.google.com/d/optout. >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "haskell-stack" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to [email protected]. >> > To post to this group, send email to [email protected]. >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/haskell-stack/674862b8-2d46-4c6e-ac93-0b1cdfde0ec5%40googlegroups.com. >> >> >> > >> > For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "haskell-stack" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/17cc8023-090c-4cf8-982e-c8e743df65ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
