Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Patrick van der Velde
Woot! You're right. I have a build. 

Thanks heaps

On Monday, 20 March 2017 22:46:41 UTC+13, Rickard von Essen wrote:
>
> Sorry that's expected behaviour, it actually work but our dev target tries 
> to copy the binary from pkg/linux_amd64 to $GOPATH/bin/ to put it on the 
> path, but it doesn't adheres to XC_ARCH and XC_OS. So you can just ignore 
> that error. You should have the windows binary, pkg/windows_amd64/packer.exe
>
> On 20 March 2017 at 10:34, Patrick van der Velde  > wrote:
>
>> Ok that got me nearly there.
>>
>> If I cd to my packer directory
>>
>> cd e:\documents\Petrik\documents\software\go\src\github.com
>> \mitchellh\packer
>>
>> and then call the following command line
>>
>> docker run -v %cd%:/go/src/github.com/mitchellh/packer -w /go/src/
>> github.com/mitchellh/packer golang:1.8 bash -c "GOPATH=/go XC_ARCH=amd64 
>> XC_OS=windows make dev"
>>
>> Then it compiles and I get
>>
>> go get github.com/mitchellh/gox
>> go get golang.org/x/tools/cmd/stringer
>> go get github.com/kardianos/govendor
>> govendor sync
>> ==> Removing old directory...
>> ==> Building...
>> Number of parallel builds: 1
>>
>> -->   windows/amd64: github.com/mitchellh/packer
>> ==> Copying binaries for this platform...
>> find: `./pkg/linux_amd64': No such file or directory
>>
>> ==> Results:
>> total 0
>>
>> Which I think means it failed to copy the binary in the end? There's 
>> nothing in the $GOPATH/bin folder and nothing in the packer/bin folder 
>> either
>>
>>
>> On Monday, 20 March 2017 22:19:14 UTC+13, Rickard von Essen wrote:
>>>
>>> We vendor our deps so you don't need your full go path tree, $GOPATH/src/
>>> github.com/mitchellh/packer is enough. (Unless you want to modify deps)
>>>
>>> On 20 March 2017 at 10:13, Patrick van der Velde  
>>> wrote:
>>>
 So based on your command line I tried the following:

 Go to the GOPATH directory
 cd e:\documents\Petrik\documents\src\go

 Then run
  docker run -v %cd%:/usr/src/go -w /usr/src/go/src/
 github.com/mitchellh/packer golang:1.8 bash -c "GOPATH=/usr/src/go 
 XC_ARCH=amd64 XC_OS=windows make dev"

 That gets me

 go get github.com/mitchellh/gox
 go get golang.org/x/tools/cmd/stringer
 go get github.com/kardianos/govendor
 govendor sync
 make: govendor: Command not found
 Makefile:31: recipe for target 'deps' failed
 make: *** [deps] Error 127

 Which is progress! So now I need to figure out why govendor isn't a 
 command.

 On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:
>
> I tested my docker command and it's not completely accurate. This 
> works on my Mac:
>
> docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
> github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64 
> XC_OS=windows make dev"
>
> It produces a windows binary in pkg/windows_amd64
>
> I guess you need to adjust the variable ref ($PWD).
>
> On 20 March 2017 at 09:42, Patrick van der Velde <
> petrikva...@gmail.com> wrote:
>
>> Yeah I guess my environment is not correctly configured. I got docker 
>> for windows to work by the way but while it doesn't fail, it doesn't 
>> seem 
>> to produce a package either.
>>
>>
>> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>>>
>>> It should work to build on Windows, unfortunately I can't really 
>>> help with that. We build each commit in appveyor and that is green so I 
>>> expect there is something with you setup. 
>>>
>>> On 20 March 2017 at 02:05, Patrick van der Velde <
>>> petrikva...@gmail.com> wrote:
>>>
 I was really hoping to avoid having to create a Linux machine to 
 build Packer on, but if that's the only way then I guess I'll have to 
 make 
 one.

 On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
 rickard@gmail.com> wrote:

> If you have Docker for Windows the simplest way might be cross 
> compile in a container. 
>
> Go to the directory where you have packer checked out and run 
> something like:
>
> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 
> bash -c XC_ARCH=amd64 XC_OS=windows make dev
>
> This should give you a Windows binary somewhere under pkg. 
>
> I don't have access to a computer so I haven't tested the above 
> but it should be close to correct. 
>
> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
> petrikva...@gmail.com> wrote:
>
>> Hi
>>
>> I'm trying to build a version of Packer from source code on 
>> windows 10 for windows x64. I've followed the instructions on the 
>> github 
>> page but I'm having 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Rickard von Essen
Sorry that's expected behaviour, it actually work but our dev target tries
to copy the binary from pkg/linux_amd64 to $GOPATH/bin/ to put it on the
path, but it doesn't adheres to XC_ARCH and XC_OS. So you can just ignore
that error. You should have the windows binary, pkg/windows_amd64/packer.exe

On 20 March 2017 at 10:34, Patrick van der Velde <
petrikvanderve...@gmail.com> wrote:

> Ok that got me nearly there.
>
> If I cd to my packer directory
>
> cd e:\documents\Petrik\documents\software\go\src\github.com\
> mitchellh\packer
>
> and then call the following command line
>
> docker run -v %cd%:/go/src/github.com/mitchellh/packer -w /go/src/
> github.com/mitchellh/packer golang:1.8 bash -c "GOPATH=/go XC_ARCH=amd64
> XC_OS=windows make dev"
>
> Then it compiles and I get
>
> go get github.com/mitchellh/gox
> go get golang.org/x/tools/cmd/stringer
> go get github.com/kardianos/govendor
> govendor sync
> ==> Removing old directory...
> ==> Building...
> Number of parallel builds: 1
>
> -->   windows/amd64: github.com/mitchellh/packer
> ==> Copying binaries for this platform...
> find: `./pkg/linux_amd64': No such file or directory
>
> ==> Results:
> total 0
>
> Which I think means it failed to copy the binary in the end? There's
> nothing in the $GOPATH/bin folder and nothing in the packer/bin folder
> either
>
>
> On Monday, 20 March 2017 22:19:14 UTC+13, Rickard von Essen wrote:
>>
>> We vendor our deps so you don't need your full go path tree, $GOPATH/src/
>> github.com/mitchellh/packer is enough. (Unless you want to modify deps)
>>
>> On 20 March 2017 at 10:13, Patrick van der Velde 
>> wrote:
>>
>>> So based on your command line I tried the following:
>>>
>>> Go to the GOPATH directory
>>> cd e:\documents\Petrik\documents\src\go
>>>
>>> Then run
>>>  docker run -v %cd%:/usr/src/go -w /usr/src/go/src/github.com/mit
>>> chellh/packer golang:1.8 bash -c "GOPATH=/usr/src/go XC_ARCH=amd64
>>> XC_OS=windows make dev"
>>>
>>> That gets me
>>>
>>> go get github.com/mitchellh/gox
>>> go get golang.org/x/tools/cmd/stringer
>>> go get github.com/kardianos/govendor
>>> govendor sync
>>> make: govendor: Command not found
>>> Makefile:31: recipe for target 'deps' failed
>>> make: *** [deps] Error 127
>>>
>>> Which is progress! So now I need to figure out why govendor isn't a
>>> command.
>>>
>>> On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:

 I tested my docker command and it's not completely accurate. This works
 on my Mac:

 docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
 github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64
 XC_OS=windows make dev"

 It produces a windows binary in pkg/windows_amd64

 I guess you need to adjust the variable ref ($PWD).

 On 20 March 2017 at 09:42, Patrick van der Velde  wrote:

> Yeah I guess my environment is not correctly configured. I got docker
> for windows to work by the way but while it doesn't fail, it doesn't seem
> to produce a package either.
>
>
> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>>
>> It should work to build on Windows, unfortunately I can't really help
>> with that. We build each commit in appveyor and that is green so I expect
>> there is something with you setup.
>>
>> On 20 March 2017 at 02:05, Patrick van der Velde <
>> petrikva...@gmail.com> wrote:
>>
>>> I was really hoping to avoid having to create a Linux machine to
>>> build Packer on, but if that's the only way then I guess I'll have to 
>>> make
>>> one.
>>>
>>> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
>>> rickard@gmail.com> wrote:
>>>
 If you have Docker for Windows the simplest way might be cross
 compile in a container.

 Go to the directory where you have packer checked out and run
 something like:

 docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8
 bash -c XC_ARCH=amd64 XC_OS=windows make dev

 This should give you a Windows binary somewhere under pkg.

 I don't have access to a computer so I haven't tested the above but
 it should be close to correct.

 On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
 petrikva...@gmail.com> wrote:

> Hi
>
> I'm trying to build a version of Packer from source code on
> windows 10 for windows x64. I've followed the instructions on the 
> github
> page but I'm having issues getting the build to work. So far I have:
>
> * Installed Go and set the GOPATH to the directory in which I want
> all my go code to appear
>
> echo %GOPATH% returns E:\documents\Petrik\documents\
> software\go)
>
> * 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Patrick van der Velde
Ok that got me nearly there.

If I cd to my packer directory

cd 
e:\documents\Petrik\documents\software\go\src\github.com\mitchellh\packer

and then call the following command line

docker run -v %cd%:/go/src/github.com/mitchellh/packer -w 
/go/src/github.com/mitchellh/packer golang:1.8 bash -c "GOPATH=/go 
XC_ARCH=amd64 XC_OS=windows make dev"

Then it compiles and I get

go get github.com/mitchellh/gox
go get golang.org/x/tools/cmd/stringer
go get github.com/kardianos/govendor
govendor sync
==> Removing old directory...
==> Building...
Number of parallel builds: 1

-->   windows/amd64: github.com/mitchellh/packer
==> Copying binaries for this platform...
find: `./pkg/linux_amd64': No such file or directory

==> Results:
total 0

Which I think means it failed to copy the binary in the end? There's 
nothing in the $GOPATH/bin folder and nothing in the packer/bin folder 
either


On Monday, 20 March 2017 22:19:14 UTC+13, Rickard von Essen wrote:
>
> We vendor our deps so you don't need your full go path tree, $GOPATH/src/
> github.com/mitchellh/packer is enough. (Unless you want to modify deps)
>
> On 20 March 2017 at 10:13, Patrick van der Velde  > wrote:
>
>> So based on your command line I tried the following:
>>
>> Go to the GOPATH directory
>> cd e:\documents\Petrik\documents\src\go
>>
>> Then run
>>  docker run -v %cd%:/usr/src/go -w /usr/src/go/src/
>> github.com/mitchellh/packer golang:1.8 bash -c "GOPATH=/usr/src/go 
>> XC_ARCH=amd64 XC_OS=windows make dev"
>>
>> That gets me
>>
>> go get github.com/mitchellh/gox
>> go get golang.org/x/tools/cmd/stringer
>> go get github.com/kardianos/govendor
>> govendor sync
>> make: govendor: Command not found
>> Makefile:31: recipe for target 'deps' failed
>> make: *** [deps] Error 127
>>
>> Which is progress! So now I need to figure out why govendor isn't a 
>> command.
>>
>> On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:
>>>
>>> I tested my docker command and it's not completely accurate. This works 
>>> on my Mac:
>>>
>>> docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
>>> github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64 
>>> XC_OS=windows make dev"
>>>
>>> It produces a windows binary in pkg/windows_amd64
>>>
>>> I guess you need to adjust the variable ref ($PWD).
>>>
>>> On 20 March 2017 at 09:42, Patrick van der Velde  
>>> wrote:
>>>
 Yeah I guess my environment is not correctly configured. I got docker 
 for windows to work by the way but while it doesn't fail, it doesn't seem 
 to produce a package either.


 On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>
> It should work to build on Windows, unfortunately I can't really help 
> with that. We build each commit in appveyor and that is green so I expect 
> there is something with you setup. 
>
> On 20 March 2017 at 02:05, Patrick van der Velde <
> petrikva...@gmail.com> wrote:
>
>> I was really hoping to avoid having to create a Linux machine to 
>> build Packer on, but if that's the only way then I guess I'll have to 
>> make 
>> one.
>>
>> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
>> rickard@gmail.com> wrote:
>>
>>> If you have Docker for Windows the simplest way might be cross 
>>> compile in a container. 
>>>
>>> Go to the directory where you have packer checked out and run 
>>> something like:
>>>
>>> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 
>>> bash -c XC_ARCH=amd64 XC_OS=windows make dev
>>>
>>> This should give you a Windows binary somewhere under pkg. 
>>>
>>> I don't have access to a computer so I haven't tested the above but 
>>> it should be close to correct. 
>>>
>>> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
>>> petrikva...@gmail.com> wrote:
>>>
 Hi

 I'm trying to build a version of Packer from source code on windows 
 10 for windows x64. I've followed the instructions on the github page 
 but 
 I'm having issues getting the build to work. So far I have:

 * Installed Go and set the GOPATH to the directory in which I want 
 all my go code to appear

 echo %GOPATH% returns 
 E:\documents\Petrik\documents\software\go)

 * Got the source code via 

 go get github.com/mitchellh/packer

 * Executing make returns

 go get github.com/mitchellh/gox
 go get golang.org/x/tools/cmd/stringer
 go get github.com/kardianos/govendor
 govendor sync
 process_begin: CreateProcess(NULL, govendor sync, ...) 
 failed.
 make (e=2): The system cannot find the file specified.
 make: *** [deps] 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Rickard von Essen
We vendor our deps so you don't need your full go path tree, $GOPATH/src/
github.com/mitchellh/packer is enough. (Unless you want to modify deps)

On 20 March 2017 at 10:13, Patrick van der Velde <
petrikvanderve...@gmail.com> wrote:

> So based on your command line I tried the following:
>
> Go to the GOPATH directory
> cd e:\documents\Petrik\documents\src\go
>
> Then run
>  docker run -v %cd%:/usr/src/go -w /usr/src/go/src/github.com/
> mitchellh/packer golang:1.8 bash -c "GOPATH=/usr/src/go XC_ARCH=amd64
> XC_OS=windows make dev"
>
> That gets me
>
> go get github.com/mitchellh/gox
> go get golang.org/x/tools/cmd/stringer
> go get github.com/kardianos/govendor
> govendor sync
> make: govendor: Command not found
> Makefile:31: recipe for target 'deps' failed
> make: *** [deps] Error 127
>
> Which is progress! So now I need to figure out why govendor isn't a
> command.
>
> On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:
>>
>> I tested my docker command and it's not completely accurate. This works
>> on my Mac:
>>
>> docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
>> github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64
>> XC_OS=windows make dev"
>>
>> It produces a windows binary in pkg/windows_amd64
>>
>> I guess you need to adjust the variable ref ($PWD).
>>
>> On 20 March 2017 at 09:42, Patrick van der Velde 
>> wrote:
>>
>>> Yeah I guess my environment is not correctly configured. I got docker
>>> for windows to work by the way but while it doesn't fail, it doesn't seem
>>> to produce a package either.
>>>
>>>
>>> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:

 It should work to build on Windows, unfortunately I can't really help
 with that. We build each commit in appveyor and that is green so I expect
 there is something with you setup.

 On 20 March 2017 at 02:05, Patrick van der Velde  wrote:

> I was really hoping to avoid having to create a Linux machine to build
> Packer on, but if that's the only way then I guess I'll have to make one.
>
> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
> rickard@gmail.com> wrote:
>
>> If you have Docker for Windows the simplest way might be cross
>> compile in a container.
>>
>> Go to the directory where you have packer checked out and run
>> something like:
>>
>> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8
>> bash -c XC_ARCH=amd64 XC_OS=windows make dev
>>
>> This should give you a Windows binary somewhere under pkg.
>>
>> I don't have access to a computer so I haven't tested the above but
>> it should be close to correct.
>>
>> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
>> petrikva...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> I'm trying to build a version of Packer from source code on windows
>>> 10 for windows x64. I've followed the instructions on the github page 
>>> but
>>> I'm having issues getting the build to work. So far I have:
>>>
>>> * Installed Go and set the GOPATH to the directory in which I want
>>> all my go code to appear
>>>
>>> echo %GOPATH% returns E:\documents\Petrik\documents\
>>> software\go)
>>>
>>> * Got the source code via
>>>
>>> go get github.com/mitchellh/packer
>>>
>>> * Executing make returns
>>>
>>> go get github.com/mitchellh/gox
>>> go get golang.org/x/tools/cmd/stringer
>>> go get github.com/kardianos/govendor
>>> govendor sync
>>> process_begin: CreateProcess(NULL, govendor sync, ...)
>>> failed.
>>> make (e=2): The system cannot find the file specified.
>>> make: *** [deps] Error 2
>>>
>>> I have tried to use the Linux subsystem but that has a known bug
>>> which makes it not possible to execute go (see
>>> https://github.com/Microsoft/BashOnWindows/issues/349).
>>>
>>> All I'm trying to do is to build an x64 version of Packer so that I
>>> can test a single line change I think I need to make to the Hyper-V
>>> provider.
>>>
>>> Can anybody give me a hand shaving this compilation yak?
>>>
>>> Thanks
>>>
>>> Petrik
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community
>>> Guidelines - https://www.hashicorp.com/community-guidelines.html.
>>> Behavior in violation of those guidelines may result in your removal 
>>> from
>>> this mailing list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Patrick van der Velde
So based on your command line I tried the following:

Go to the GOPATH directory
cd e:\documents\Petrik\documents\src\go

Then run
 docker run -v %cd%:/usr/src/go -w 
/usr/src/go/src/github.com/mitchellh/packer golang:1.8 bash -c 
"GOPATH=/usr/src/go XC_ARCH=amd64 XC_OS=windows make dev"

That gets me

go get github.com/mitchellh/gox
go get golang.org/x/tools/cmd/stringer
go get github.com/kardianos/govendor
govendor sync
make: govendor: Command not found
Makefile:31: recipe for target 'deps' failed
make: *** [deps] Error 127

Which is progress! So now I need to figure out why govendor isn't a command.

On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:
>
> I tested my docker command and it's not completely accurate. This works on 
> my Mac:
>
> docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
> github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64 
> XC_OS=windows make dev"
>
> It produces a windows binary in pkg/windows_amd64
>
> I guess you need to adjust the variable ref ($PWD).
>
> On 20 March 2017 at 09:42, Patrick van der Velde  > wrote:
>
>> Yeah I guess my environment is not correctly configured. I got docker for 
>> windows to work by the way but while it doesn't fail, it doesn't seem to 
>> produce a package either.
>>
>>
>> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>>>
>>> It should work to build on Windows, unfortunately I can't really help 
>>> with that. We build each commit in appveyor and that is green so I expect 
>>> there is something with you setup. 
>>>
>>> On 20 March 2017 at 02:05, Patrick van der Velde  
>>> wrote:
>>>
 I was really hoping to avoid having to create a Linux machine to build 
 Packer on, but if that's the only way then I guess I'll have to make one.

 On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
 rickard@gmail.com> wrote:

> If you have Docker for Windows the simplest way might be cross compile 
> in a container. 
>
> Go to the directory where you have packer checked out and run 
> something like:
>
> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash 
> -c XC_ARCH=amd64 XC_OS=windows make dev
>
> This should give you a Windows binary somewhere under pkg. 
>
> I don't have access to a computer so I haven't tested the above but it 
> should be close to correct. 
>
> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
> petrikva...@gmail.com> wrote:
>
>> Hi
>>
>> I'm trying to build a version of Packer from source code on windows 
>> 10 for windows x64. I've followed the instructions on the github page 
>> but 
>> I'm having issues getting the build to work. So far I have:
>>
>> * Installed Go and set the GOPATH to the directory in which I want 
>> all my go code to appear
>>
>> echo %GOPATH% returns 
>> E:\documents\Petrik\documents\software\go)
>>
>> * Got the source code via 
>>
>> go get github.com/mitchellh/packer
>>
>> * Executing make returns
>>
>> go get github.com/mitchellh/gox
>> go get golang.org/x/tools/cmd/stringer
>> go get github.com/kardianos/govendor
>> govendor sync
>> process_begin: CreateProcess(NULL, govendor sync, ...) failed.
>> make (e=2): The system cannot find the file specified.
>> make: *** [deps] Error 2
>>
>> I have tried to use the Linux subsystem but that has a known bug 
>> which makes it not possible to execute go (see 
>> https://github.com/Microsoft/BashOnWindows/issues/349).
>>
>> All I'm trying to do is to build an x64 version of Packer so that I 
>> can test a single line change I think I need to make to the Hyper-V 
>> provider.
>>
>> Can anybody give me a hand shaving this compilation yak?
>>
>> Thanks
>>
>> Petrik
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community 
>> Guidelines - https://www.hashicorp.com/community-guidelines.html. 
>> Behavior in violation of those guidelines may result in your removal 
>> from 
>> this mailing list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google 
>> Groups "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to packer-tool...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com
>>  
>> 
>> .
>> 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Rickard von Essen
I tested my docker command and it's not completely accurate. This works on
my Mac:

docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64 XC_OS=windows
make dev"

It produces a windows binary in pkg/windows_amd64

I guess you need to adjust the variable ref ($PWD).

On 20 March 2017 at 09:42, Patrick van der Velde <
petrikvanderve...@gmail.com> wrote:

> Yeah I guess my environment is not correctly configured. I got docker for
> windows to work by the way but while it doesn't fail, it doesn't seem to
> produce a package either.
>
>
> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>>
>> It should work to build on Windows, unfortunately I can't really help
>> with that. We build each commit in appveyor and that is green so I expect
>> there is something with you setup.
>>
>> On 20 March 2017 at 02:05, Patrick van der Velde 
>> wrote:
>>
>>> I was really hoping to avoid having to create a Linux machine to build
>>> Packer on, but if that's the only way then I guess I'll have to make one.
>>>
>>> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
>>> rickard@gmail.com> wrote:
>>>
 If you have Docker for Windows the simplest way might be cross compile
 in a container.

 Go to the directory where you have packer checked out and run something
 like:

 docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash
 -c XC_ARCH=amd64 XC_OS=windows make dev

 This should give you a Windows binary somewhere under pkg.

 I don't have access to a computer so I haven't tested the above but it
 should be close to correct.

 On Mar 19, 2017 3:52 AM, "Patrick van der Velde" 
 wrote:

> Hi
>
> I'm trying to build a version of Packer from source code on windows 10
> for windows x64. I've followed the instructions on the github page but I'm
> having issues getting the build to work. So far I have:
>
> * Installed Go and set the GOPATH to the directory in which I want all
> my go code to appear
>
> echo %GOPATH% returns E:\documents\Petrik\documents\
> software\go)
>
> * Got the source code via
>
> go get github.com/mitchellh/packer
>
> * Executing make returns
>
> go get github.com/mitchellh/gox
> go get golang.org/x/tools/cmd/stringer
> go get github.com/kardianos/govendor
> govendor sync
> process_begin: CreateProcess(NULL, govendor sync, ...) failed.
> make (e=2): The system cannot find the file specified.
> make: *** [deps] Error 2
>
> I have tried to use the Linux subsystem but that has a known bug which
> makes it not possible to execute go (see
> https://github.com/Microsoft/BashOnWindows/issues/349).
>
> All I'm trying to do is to build an x64 version of Packer so that I
> can test a single line change I think I need to make to the Hyper-V
> provider.
>
> Can anybody give me a hand shaving this compilation yak?
>
> Thanks
>
> Petrik
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines
> - https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google
> Groups "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to packer-tool...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/8295aec7-c778-
> 4e81-8b9c-bcfb016e2175%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 This mailing list is governed under the HashiCorp Community Guidelines
 - https://www.hashicorp.com/community-guidelines.html. Behavior in
 violation of those guidelines may result in your removal from this mailing
 list.

 GitHub Issues: https://github.com/mitchellh/packer/issues
 IRC: #packer-tool on Freenode
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups "Packer" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/to
 pic/packer-tool/oHAFgPP0QrM/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 packer-tool...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Patrick van der Velde
Yeah I guess my environment is not correctly configured. I got docker for 
windows to work by the way but while it doesn't fail, it doesn't seem to 
produce a package either.


On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>
> It should work to build on Windows, unfortunately I can't really help with 
> that. We build each commit in appveyor and that is green so I expect there 
> is something with you setup. 
>
> On 20 March 2017 at 02:05, Patrick van der Velde  > wrote:
>
>> I was really hoping to avoid having to create a Linux machine to build 
>> Packer on, but if that's the only way then I guess I'll have to make one.
>>
>> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen > > wrote:
>>
>>> If you have Docker for Windows the simplest way might be cross compile 
>>> in a container. 
>>>
>>> Go to the directory where you have packer checked out and run something 
>>> like:
>>>
>>> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash 
>>> -c XC_ARCH=amd64 XC_OS=windows make dev
>>>
>>> This should give you a Windows binary somewhere under pkg. 
>>>
>>> I don't have access to a computer so I haven't tested the above but it 
>>> should be close to correct. 
>>>
>>> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" >> > wrote:
>>>
 Hi

 I'm trying to build a version of Packer from source code on windows 10 
 for windows x64. I've followed the instructions on the github page but I'm 
 having issues getting the build to work. So far I have:

 * Installed Go and set the GOPATH to the directory in which I want all 
 my go code to appear

 echo %GOPATH% returns E:\documents\Petrik\documents\software\go)

 * Got the source code via 

 go get github.com/mitchellh/packer

 * Executing make returns

 go get github.com/mitchellh/gox
 go get golang.org/x/tools/cmd/stringer
 go get github.com/kardianos/govendor
 govendor sync
 process_begin: CreateProcess(NULL, govendor sync, ...) failed.
 make (e=2): The system cannot find the file specified.
 make: *** [deps] Error 2

 I have tried to use the Linux subsystem but that has a known bug which 
 makes it not possible to execute go (see 
 https://github.com/Microsoft/BashOnWindows/issues/349).

 All I'm trying to do is to build an x64 version of Packer so that I can 
 test a single line change I think I need to make to the Hyper-V provider.

 Can anybody give me a hand shaving this compilation yak?

 Thanks

 Petrik

 -- 
 This mailing list is governed under the HashiCorp Community Guidelines 
 - https://www.hashicorp.com/community-guidelines.html. Behavior in 
 violation of those guidelines may result in your removal from this mailing 
 list.
  
 GitHub Issues: https://github.com/mitchellh/packer/issues
 IRC: #packer-tool on Freenode
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Packer" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to packer-tool...@googlegroups.com .
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>>> This mailing list is governed under the HashiCorp Community Guidelines - 
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>>> violation of those guidelines may result in your removal from this mailing 
>>> list.
>>>  
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> --- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Packer" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/packer-tool/oHAFgPP0QrM/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> packer-tool...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQEYZ923A%40mail.gmail.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-20 Thread Rickard von Essen
It should work to build on Windows, unfortunately I can't really help with
that. We build each commit in appveyor and that is green so I expect there
is something with you setup.

On 20 March 2017 at 02:05, Patrick van der Velde <
petrikvanderve...@gmail.com> wrote:

> I was really hoping to avoid having to create a Linux machine to build
> Packer on, but if that's the only way then I guess I'll have to make one.
>
> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
> rickard.von.es...@gmail.com> wrote:
>
>> If you have Docker for Windows the simplest way might be cross compile in
>> a container.
>>
>> Go to the directory where you have packer checked out and run something
>> like:
>>
>> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash -c
>> XC_ARCH=amd64 XC_OS=windows make dev
>>
>> This should give you a Windows binary somewhere under pkg.
>>
>> I don't have access to a computer so I haven't tested the above but it
>> should be close to correct.
>>
>> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
>> petrikvanderve...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> I'm trying to build a version of Packer from source code on windows 10
>>> for windows x64. I've followed the instructions on the github page but I'm
>>> having issues getting the build to work. So far I have:
>>>
>>> * Installed Go and set the GOPATH to the directory in which I want all
>>> my go code to appear
>>>
>>> echo %GOPATH% returns E:\documents\Petrik\documents\software\go)
>>>
>>> * Got the source code via
>>>
>>> go get github.com/mitchellh/packer
>>>
>>> * Executing make returns
>>>
>>> go get github.com/mitchellh/gox
>>> go get golang.org/x/tools/cmd/stringer
>>> go get github.com/kardianos/govendor
>>> govendor sync
>>> process_begin: CreateProcess(NULL, govendor sync, ...) failed.
>>> make (e=2): The system cannot find the file specified.
>>> make: *** [deps] Error 2
>>>
>>> I have tried to use the Linux subsystem but that has a known bug which
>>> makes it not possible to execute go (see https://github.com/Microsoft/B
>>> ashOnWindows/issues/349).
>>>
>>> All I'm trying to do is to build an x64 version of Packer so that I can
>>> test a single line change I think I need to make to the Hyper-V provider.
>>>
>>> Can anybody give me a hand shaving this compilation yak?
>>>
>>> Thanks
>>>
>>> Petrik
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to packer-tool+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Packer" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/packer-tool/oHAFgPP0QrM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> packer-tool+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQ
>> EYZ923A%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this 

Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-19 Thread Patrick van der Velde
I was really hoping to avoid having to create a Linux machine to build
Packer on, but if that's the only way then I guess I'll have to make one.

On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
rickard.von.es...@gmail.com> wrote:

> If you have Docker for Windows the simplest way might be cross compile in
> a container.
>
> Go to the directory where you have packer checked out and run something
> like:
>
> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash -c
> XC_ARCH=amd64 XC_OS=windows make dev
>
> This should give you a Windows binary somewhere under pkg.
>
> I don't have access to a computer so I haven't tested the above but it
> should be close to correct.
>
> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
> petrikvanderve...@gmail.com> wrote:
>
>> Hi
>>
>> I'm trying to build a version of Packer from source code on windows 10
>> for windows x64. I've followed the instructions on the github page but I'm
>> having issues getting the build to work. So far I have:
>>
>> * Installed Go and set the GOPATH to the directory in which I want all my
>> go code to appear
>>
>> echo %GOPATH% returns E:\documents\Petrik\documents\software\go)
>>
>> * Got the source code via
>>
>> go get github.com/mitchellh/packer
>>
>> * Executing make returns
>>
>> go get github.com/mitchellh/gox
>> go get golang.org/x/tools/cmd/stringer
>> go get github.com/kardianos/govendor
>> govendor sync
>> process_begin: CreateProcess(NULL, govendor sync, ...) failed.
>> make (e=2): The system cannot find the file specified.
>> make: *** [deps] Error 2
>>
>> I have tried to use the Linux subsystem but that has a known bug which
>> makes it not possible to execute go (see https://github.com/Microsoft/B
>> ashOnWindows/issues/349).
>>
>> All I'm trying to do is to build an x64 version of Packer so that I can
>> test a single line change I think I need to make to the Hyper-V provider.
>>
>> Can anybody give me a hand shaving this compilation yak?
>>
>> Thanks
>>
>> Petrik
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to packer-tool+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/packer-tool/oHAFgPP0QrM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-
> nAOwVQEYZ923A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHAN2bvjUu5Yav67fQDLqbtmHn5WByBnK5kacKA5x-AobJ383w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [packer] The easiest way to build a windows version of Packer for testing

2017-03-19 Thread Rickard von Essen
If you have Docker for Windows the simplest way might be cross compile in a
container.

Go to the directory where you have packer checked out and run something
like:

docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash -c
XC_ARCH=amd64 XC_OS=windows make dev

This should give you a Windows binary somewhere under pkg.

I don't have access to a computer so I haven't tested the above but it
should be close to correct.

On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <
petrikvanderve...@gmail.com> wrote:

> Hi
>
> I'm trying to build a version of Packer from source code on windows 10 for
> windows x64. I've followed the instructions on the github page but I'm
> having issues getting the build to work. So far I have:
>
> * Installed Go and set the GOPATH to the directory in which I want all my
> go code to appear
>
> echo %GOPATH% returns E:\documents\Petrik\documents\software\go)
>
> * Got the source code via
>
> go get github.com/mitchellh/packer
>
> * Executing make returns
>
> go get github.com/mitchellh/gox
> go get golang.org/x/tools/cmd/stringer
> go get github.com/kardianos/govendor
> govendor sync
> process_begin: CreateProcess(NULL, govendor sync, ...) failed.
> make (e=2): The system cannot find the file specified.
> make: *** [deps] Error 2
>
> I have tried to use the Linux subsystem but that has a known bug which
> makes it not possible to execute go (see https://github.com/Microsoft/B
> ashOnWindows/issues/349).
>
> All I'm trying to do is to build an x64 version of Packer so that I can
> test a single line change I think I need to make to the Hyper-V provider.
>
> Can anybody give me a hand shaving this compilation yak?
>
> Thanks
>
> Petrik
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQEYZ923A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.