genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
20 stars 17 forks source link

api archives contain symbolic links #65

Closed trimpim closed 10 months ago

trimpim commented 11 months ago

While building some library and binary archives on different computers we noticed, that the published archives contain symbolic links to absolute file paths from the machine creating the archive.

I see two ways to fix this.

  1. during extract_api_artifacts do not create a symbolic link but copy the files.
    • disadvantage: more disk usage
  2. when creating the tar de-reference the files

If there are no objections, I would create and test a patch that implements the second solution.

jschlatow commented 11 months ago

@trimpim Ouch, that slipped through our fingers. Thanks for providing a patch as well.

@nfeske I'm a bit hesitant w.r.t. modifying the depot tools on the Goa side. What is your opinion? Should we prefer the first solution instead, since api archives tend to be small anyway?

trimpim commented 11 months ago

@jschlatow while doing more tests, we discovered that the same happens also to the src archives. (This was reported by a colleague but when I do export the src archive, it contains files).

After discussing the issue internally we came to the conclusion, that we think, that the content of the depot directory should be the same regardless, if it was created by goa import or by downloading and extracting the published archive. Therefore we would go with copying instead of linking. The additional disk space is not that a big issue these days from our point of view.

nfeske commented 11 months ago

@nfeske I'm a bit hesitant w.r.t. modifying the depot tools on the Goa side. What is your opinion? Should we prefer the first solution instead, since api archives tend to be small anyway?

Depot archives are not supposed to contain any symlinks but the actual content. The content of a published tar file should perfectly correspond to corresponding directory of depot archive. So there is no way around copying files.

jschlatow commented 11 months ago

After discussing the issue internally we came to the conclusion, that we think, that the content of the depot directory should be the same regardless, if it was created by goa import or by downloading and extracting the published archive. Therefore we would go with copying instead of linking. The additional disk space is not that a big issue these days from our point of view.

You make a very good point. I merged a92d49c to staging.