bastibl / instant-gnuradio

Customizable GNU Radio Environment for Live Images and VMs
158 stars 34 forks source link

A more standardized building process #9

Closed jkbecker closed 6 years ago

jkbecker commented 6 years ago

I was inspired by the build process of sommer/instant-veins and adapted this build process to be more standardized as well (including the instructions). What do you think?

jkbecker commented 6 years ago

Just noticed that git diff trips over my changes and doesn't display them very nicely under "Files changed".

Feel free to review the changes to the README file on my branch directly: https://github.com/jkbecker/instant-gnuradio/blob/convenient-installer/README.md

bastibl commented 6 years ago

That's cool. Christoph Sommer was a colleague of mine. We were chatting about packer-based VMs and I already thought about adapting some of his stuff. Great that you looked into this.

I'm currently trying the build. What doesn't work for me is the download of opencl. Looks like the script doesn't block and immediately kills the subshell that is supposed to download opencl. Maybe just do it like normal, i.e., without a subshell?

jkbecker commented 6 years ago

Glad you like the general approach.

Regarding the subshell: If that is more stable, sure... I tested it and it worked just fine for me, i.e. fully downloaded and terminated correctly.

What happens if you just type

(cd assets; wget http://registrationcenter-download.intel.com/akdlm/irc_nas/12556/opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz)

and then

echo $?

For me it correctly terminates with a zero:

jkbecker@lab ~/Code/gnuradio/instant-gnuradio $ (cd assets; wget http://registrationcenter-download.intel.com/akdlm/irc_nas/12556/opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz)
--2018-04-02 16:23:13--  http://registrationcenter-download.intel.com/akdlm/irc_nas/12556/opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
Resolving registrationcenter-download.intel.com (registrationcenter-download.intel.com)... 18.32.193.17, 18.32.193.18
Connecting to registrationcenter-download.intel.com (registrationcenter-download.intel.com)|18.32.193.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 117485559 (112M) [application/x-compressed]
Saving to: ‘opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz.2’

opencl_runtime_16.1. 100%[=====================>] 112.04M   101MB/s    in 1.1s    

2018-04-02 16:23:14 (101 MB/s) - ‘opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz.2’ saved [117485559/117485559]

jkbecker@lab ~/Code/gnuradio/instant-gnuradio $ echo $?
0

if this turns out to be inconsistent on different systems though, feel free to replace it with something that works on your machine.

bastibl commented 6 years ago

Arg, my fault. It was not the download in the subshell. My older version of packer (1.0.2) always returns 1 when doing a packer --version. I pushed a follow-up commit and also added error messages if a command doesn't exist. Let me know if there are problems with the updates.