Craft and deploy bulletproof embedded software in Elixir
APACHE-2.0 License
Nerves.Artifact.BuildRunners.Docker
was running as root and caused filedeps
directory of the root mix
project.Docker
build runner now executes as the same user id and group id asTo fix docker permissions you will need to pull the latest docker image
docker pull nervesproject/nerves_system_br:latest
This version renames the module Nerves.Artifact.Provider
to
Nerves.Artifact.BuildRunner
. This change should only affect custom systems
and host tools that override the defaults in nerves_package
config.
System.find_executable("command")
instead ofSystem.cmd("which", ["command"])
. This addressed an issue withwhich
resulting in an obscure error.This rc contains documentation cleanup and updates through out.
Enhancements
Support forwarding the ssh-agent through Docker for the Nerves system shell.
Allow headers and query params to be passed to the :prefix
artifact_sites
helper.
Example:
{:prefix, "https://my_server.com/", headers: [{"Authorization", "Basic 1234"}]}
{:prefix, "https://my_server.com/", query_params: %{"id" => "1234"}}
Added github_api
to artifact_sites
for accessing release artifacts on private
github repositories.
Example:
{:github_api, "owner/repo", username: "skroob", token: "1234567", tag: "v0.1.0"}
Bug Fixes
Disable the nerves_package compiler if the NERVES_ENV_DISABLED
is set.
This makes it easier to execute mix
tasks without building the system.
Example:
NERVES_ENV_DISABLED=1 mix docs
Nerves no longer automatically compiles any nerves_package
that is missing its
pre-compiled artifact. This turned out to rarely be desired and caused
unexpectedly long compilation times when things like the Linux kernel or gcc got
compiled.
When a pre-compiled artifact is missing, Nerves will now tell you what your
options are to resolve this. It could be retrying mix deps.get
to download it
again. If you want to force compilation to happen, add a :nerves
option for
the desired package in your top level project:
{:nerves_system_rpi0, "~> 1.0-rc", nerves: [compile: true]}
nerves_package
compilernerves_bootstrap
application has not beenEnhancements
bootstrap/1
on any package that defines a platformportable
to packages with type system
:host_tool
would be able to override the artifact path by settingHOST_TOOL
in the environment.Bug Fixes
nerves artifact
mix deps.compile
Nerves.Env.host_os
can be set from $HOST_OS
for use with canadianNerves.Env.host_arch
can be set from $HOST_ARCH
for use with canadianArtifact.base_dir
before trying to link to build path artifactsStarting in Nerves v0.9.0, artifacts will no longer be fetched during
mix compile
. Artifact archives are intended to be fetched following mix deps.get
.
To handle this, you will need to update your installed version of nerves_bootstrap
by
calling mix local.nerves
. After updating nerves_bootstrap
, you should update
your mix.exs
file to add the new required mix aliases found there. A helper
function is available named Nerves.Bootstrap.add_aliases
that you can pipe your
existing aliases to like this:
defp aliases(_target) do
[
# Add custom mix aliases here
]
|> Nerves.Bootstrap.add_aliases()
end
Also, update your nerves dependency to:
{:nerves, "~> 0.9", runtime: false}
API Changes
Nerves.Package.Providers
to Nerves.Artifact.Providers
Nerves.Package.Providers.HTTP
to Nerves.Artifact.Resolver
Nerves.Artifact.Resolver
no longer implements theNerves.Artifact.Provider
behaviour.Enhancements
Added Mix task nerves.artifact.get
. Use to fetch the artifact archive from an
artifact_url
location. Once downloaded its checksum will be checked against
artifact_checksum
from the nerves_package
config in mix.exs
. The Mix task
nerves.deps.get
will recursively call nerves.artifact.get
to fetch archives.
Added Mix task nerves.artifact.archive
. This task will produce the
artifact archive and artifact checksum file which are used when calling
nerves.artifact.get
.
Nerves packages can override the Provider in the nerves_package
config
in mix.exs
using the keys provider
and provider_opts
. This is
useful to force a package to build using a specific provider like
Nerves.Artifact.Providers.Docker
. See the package configuration docs
for more information.
Added artifact_sites
to the nerves_package
config. Artifact sites
are helpers that are useful for cleanly specifying locations where artifacts
can be fetched. If you are hosting your artifacts using Github relases
you can specify it like this:
artifact_sites: [
{:github_releases, "orginization/project"}
]
You can also specify your own custom server location by using the :prefix
helper by passing a url or file path:
artifact_sites: [
{:prefix, "/path/to/artifacts"},
{:prefix, "https://my_bucket.s3-east.amazonaws.com/artifacts"}
]
Artifact sites will be tried in order until one successfully downloads the
artifact.
Bug Fixes
Nerves.Utils.HTTPResolver
crashing when missing thecontent-disposition
and content-length
headers.Got:
ELF 64-bit LSB relocatable, x86-64, version 1
If binary, expecting:
ELF 32-bit LSB executable, ARM, EABI5 version 1, interpreter /lib/ld-linux.so.3, for GNU/Linux 4.1.39
You can fix this by updating and regenerating the new project.Nerves
Distillery plugin that was causing the following error message:
Plugin failed: no function clause matching in IO.chardata_to_string/1
NERVES_SYSTEM
or NERVES_TOOLCHAIN
are unset.Enhancements
nerves_package
compiler will be chosen by default.NERVES_LOG_DISABLE_PROGRESS_BAR=1
nerves_package
Bug Fixes
Enhancements
Bug Fixes
Published by mobileoverlord about 7 years ago
nerves.system.shell
would hang and load improperly.rootfs_additions
configuration option, to be superseded byrootfs_overlay
option, which matches the convention used by thePublished by mobileoverlord about 7 years ago
nerves.system.shell
Mix task should not do make clean
by default.mix nerves.system.shell
functionality, including a blurb tonerves.system.shell
Mix task. In particular,MIX_TARGET
.nerves.env
Mix task (used internally by Nerves) now checks that yourmix.exs
generated by mix nerves.new