ARM-software / CMSIS-View

Repository of CMSIS Software Pack for software event generation and input/output handling.
https://arm-software.github.io/CMSIS-View/latest/index.html
Apache License 2.0
34 stars 19 forks source link

Ensure that the execute flag 'x' for the `eventlist` utility is set in the archives for Linux systems #48

Closed jkrech closed 11 months ago

jkrech commented 1 year ago

When extracting the eventlist releases on Linux systems, it was observed that the execute permission flag for the eventlist executable was not set. The build and release actions shall ensure that the file permissions are correctly set such that the utility can be executed without any additional file permission changes by the user.

Take for example the latest release 1.1.0: https://github.com/ARM-software/CMSIS-View/releases/download/tools%2Feventlist%2F1.1.0/eventlist-linux-amd64.tar.gz

The x flag is not set:

$ ll ./eventlist -rw-r--r-- 1 user user 3293878 Apr 17 17:09 ./eventlist

spcaipers-arm commented 1 year ago

Interestedly the eventlist Unix permission are correct after enforce it:

`build/linux-amd64: total 3228 drwxr-xr-x 2 runner docker 4096 May 10 08:27 . drwxr-xr-x 8 runner docker 4096 May 10 08:29 .. -rwxr-xr-x 1 runner docker 3295049 May 10 08:27 eventlist

build/linux-arm64: total 3168 drwxr-xr-x 2 runner docker 4096 May 10 08:28 . drwxr-xr-x 8 runner docker 4096 May 10 08:29 .. -rwxr-xr-x 1 runner docker 32309 May 10 08:28 eventlist`

But once the file is archived, it loses its Unix permission: zipinfo eventlist-linux-amd64.zip Archive: eventlist-linux-amd64.zip Zip file size: 1882591 bytes, number of entries: 1 ?rw-r--r-- 2.0 unx 3295049 bl defN 23-May-10 08:29 eventlist 1 file, 3295049 bytes uncompressed, 1882459 bytes compressed: 42.9%

jkrech commented 1 year ago

We must not use zip on linux systems. We should use compressed tar files.

spcaipers-arm commented 1 year ago

OK, now I understood the root cause of this issue. In the CI pipeline, it is stored temporarily the event list package as a zip file (automatically done by actions/upload-artifact@v3), this operation destroys the file permission of the files and directories. Then, we download it later on in the release job and re-package it for tar.gz (without reworking the permissions).

I will push a proper fix.

JonatanAntoni commented 1 year ago

This should be fixed since #50 got merged.