Running Secure Provisioning Tool Installer V9 in Github Workflow Fails During Post Install Script

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running Secure Provisioning Tool Installer V9 in Github Workflow Fails During Post Install Script

1,499 Views
mjpovi
Contributor III

Hi,

I am attempting to run the MCUXpresso Secure Provisioning Tool V9 in order to build a downloadable/bootable and signed F/W image inside a private github repository workflow.  In order to do this, I need to install the Secure Provisioning Tool (V9.0.1) in my workflow. 

During the post installation script, the installer always fails copying mime type files, and the specific mime file that fails always is different but the same "failure to copy" error happens.  The Secure Provision tool then runs okay from the cached installation afterwards.

Is there anything I can do about this ?  The installer works okay in a linux desktop.  This is the resulting output from the workflow log of the MCUXpresso Secure Provisioning Tool installer in github:

##[debug]Loading env

30Run cd nxp-mcuxpresso-secure-provisioning-tool-v9

31  cd nxp-mcuxpresso-secure-provisioning-tool-v9

32  # Install nxp-mcuxpresso secure provisioning tool

33  sudo dpkg --install ./mcuxpresso-secure-provisioning-v9.0.1-1_amd64.deb

34  shell: /usr/bin/bash -e {0}

35  env:

36    TERM: xterm-256color

37    CACHE_KEY: 2d6abb4ec673a5a26a325ad3883cf487

38##[debug]/usr/bin/bash -e /home/runner/work/_temp/4e417ae2-db01-4d92-a9fc-37c53df89bc2.sh

39Selecting previously unselected package mcuxpresso-secure-provisioning-v9.

40(Reading database ... 267222 files and directories currently installed.)

41Preparing to unpack .../mcuxpresso-secure-provisioning-v9.0.1-1_amd64.deb ...

42Unpacking mcuxpresso-secure-provisioning-v9 (9.0.1) ...

43Setting up mcuxpresso-secure-provisioning-v9 (9.0.1) ...

44

45Post-installation scripts:

46Processing triggers for shared-mime-info (2.1-2) ...

47Failed to rename /usr/share/mime/application/x-nintendo-ds-rom.xml.new as /usr/share/mime/application/x-nintendo-ds-rom.xml: No such file or directory

48dpkg: error processing package shared-mime-info (--install):

49 installed shared-mime-info package post-installation script subprocess returned error exit status 1

50Processing triggers for mailcap (3.70+nmu1ubuntu1) ...

51Errors were encountered while processing:

52 shared-mime-info

53Error: Process completed with exit code 1.

  

0 Kudos
Reply
6 Replies

1,436 Views
mjpovi
Contributor III

My solution ended up being to install the MCUXpresso Secure Provisioning tool using different dpkg commands in order to skip running the dpkg post-installation script(s), as follows:

sudo dpkg --unpack mcuxpresso-secure-provisioning-v9.0.1-1_amd64.deb

This works so far [for building an unsigned image], assuming that strictly unpacking the tool itself is all that's necessary, and that the post-installation scripts aren't needed if the tool is used command-line only.  The MCUXpresso Secure Provisioning Tool's .postinst script appears to setup up MUCXpresso mime types and associations.  

0 Kudos
Reply

1,487 Views
mjpovi
Contributor III

 think we may have solved this in that we were missing some dependencies that were not installed beforehand...

0 Kudos
Reply

1,473 Views
liborukropec
NXP Employee
NXP Employee

Hello,

the issue with the mime errors in the console are IMHO caused by previous state of the VM/PC.

SEC just installs its own mime definition and it triggers OS to re-create the cache of all mime XML files. If there are some issues, they are reported, but not caused by SEC. It also does not have any impact on SEC installation or execution.

 

BTW, does your CLI use case work in GitHub?

 

Regards,

Libor

1,463 Views
mjpovi
Contributor III

Hi and thank you very much for the response.  Yes, I am able to run the tool command line to create an unsigned bootable image.  I have yet to test signed F/W.  I use command-line arguments mostly, pointing to a workspace folder, while minimizing bd file usage.

0 Kudos
Reply

1,493 Views
mjpovi
Contributor III
Please note that I am attempting to run the command-line mode of the Secure Provisioning tool to create a bootable image, not trying to use the GUI version of the tool in this instance.
0 Kudos
Reply

1,491 Views
mjpovi
Contributor III
Also, the following are installed as 'pre-requisite' libraries:

# Install nxp-mcuxpresso secure provisioning tool dependencies
sudo apt-get -y install --reinstall shared-mime-info
sudo update-mime-database /usr/share/mime
sudo apt install libhidapi-dev
sudo apt install libsdl2-2.0-0
0 Kudos
Reply