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:
HttpExceptionRequest Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-8.0.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
Interestingly, the file actually exists in the mirror directory: 
"mirror/https_raw.githubusercontent.com_fpco_lts-haskell_master__lts-8.0.yaml". 

"stack new" fails in both cases with:
HttpExceptionRequest Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = 
[("If-None-Match","\"8ef96691e15d68bb890626821e8624b1b19e0b6c\"")]
  path                 = 
"/commercialhaskell/stack-templates/master/new-template.hsfiles"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
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?

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 <dpsi...@gmail.com> 
> 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 haskell-stac...@googlegroups.com. 
> >>> To post to this group, send email to haskel...@googlegroups.com. 
> >>> 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 haskell-stac...@googlegroups.com <javascript:>. 
> > To post to this group, send email to haskel...@googlegroups.com 
> <javascript:>. 
> > 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 haskell-stack+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-stack@googlegroups.com.
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.

Reply via email to