nmeum / android-tools

Unoffical CMake-based build system for android command line utilities
Apache License 2.0
176 stars 51 forks source link

Don't use absolute dir for mkbootimg symlink #137

Closed Thaodan closed 1 month ago

Thaodan commented 5 months ago

I noticed that the absolute symlink did not work on my system. While investigating I noticed that on SUSE the symlink gets relinked to be relative to be relative to the install location of the symlink after which the link works. Using a relative link seems safer to me.

anatol commented 5 months ago

Your change contains 2 set of modifications - cmake file cleanup, and the relative symlink change itself.

I noticed that the absolute symlink did not work on my system.

Once you apply the cmake cleanup part, what is the target's absolute path for that symlink? I wonder if your cleanup part is enough to fix the issue.

Thaodan commented 5 months ago

Your change contains 2 set of modifications - cmake file cleanup, and the relative symlink change itself.

I can separate those changes.

I noticed that the absolute symlink did not work on my system.

Once you apply the cmake cleanup part, what is the target's absolute path for that symlink? I wonder if your cleanup part is enough to fix the issue.

RPM does like not like relative symlinks as they relative to the host environment and not to the builder which breaks for example the execution inside the built process.

To check if the script still works we start it once which doesn't work with an absolute link.

https://github.com/rpm-software-management/rpm/issues/668

fredldotme commented 2 months ago

Something like this would be welcomed for the Snap release. Right now I'm replacing the symlink in a post-installation step during packaging.

anatol commented 2 months ago

@Thaodan could you please split your change into multiple commit per its functionality: one commit for the symlink change, and another commit for the cleanup?

anatol commented 1 month ago

@Biswa96 the PR is ready for merge. Could you please take a look?