Nerves system artifact checksum mismatch

Hello,

I am creating a custom nerves system artifact and when I try to use the artifact, the checksum on the file is failing.

Checking for prebuilt Nerves artifacts...
  Checking nerves_system_c2...
  [GitHub] nerves_system_c2-portable-2.15.1+XXX-8-5052D84.tar.gz
     No artifact with valid checksum

     Found:
       * nerves_system_c2-portable-2.15.1+XXXX-8-20CD3FF.tar.gz

  => Prebuilt nerves_system_c2 not found (no_result)
  Found nerves_toolchain_armv7_nerves_linux_gnueabihf in cache

The name of my generated file is nerves_system_c2-portable-2.15.1+XXXX-8-20CD3FF.tar.gz. I am not sure where the checksum 5052D84 in nerves_system_c2-portable-2.15.1+XXX-8-5052D84.tar.gz is coming from.

I am reading this section
https://hexdocs.pm/nerves/updating-projects.html#artifact-checksums

Is the checksum performed on the files listed in package_files(). In the list there are source files like “mix.exs”, “nerves_defconfig” etc. I am wondering what is the purpose of including source files. There are not even there in the generated artifact nerves_system_XXX.tar.gz file.

Thanks,
Venkat

The system mix.exs includes the configuration pieces needed to fetch the system artifact. Since that is a requirement for fetching, it is included in the checksum to prevent someone from altering those crucial configuration pieces when fetching. That said, if this is your own system, the package_files() is what is used to calculate and you can adjust as needed