adoroszlai opened a new pull request, #10909:
URL: https://github.com/apache/ozone/pull/10909
## What changes were proposed in this pull request?
Fix the error message emitted by `ozone` when built without `-Pdist`:
```bash
$ cd hadoop-ozone/dist/target/ozone-2.3.0-SNAPSHOT
$ bin/ozone debug checknative
bin/../libexec/ozone-functions.sh: line 1384: cd: lib/native: No such file
or directory
Native library checking:
hadoop: false
...
$ ls lib/native
ls: cannot access 'lib/native': No such file or directory
```
Also when built with `-Pdist`, but not executed from `OZONE_HOME` directory:
```
$ cd hadoop-ozone/dist/target/ozone-2.3.0-SNAPSHOT/bin
$ ./ozone debug checknative
bin/../libexec/ozone-functions.sh: line 1384: cd: lib/native: No such file
or directory
Native library checking:
hadoop: true lib/native/libhadoop_linux_x86_64.so
```
Reduce code duplication between Linux and Mac-specific branches.
https://issues.apache.org/jira/browse/HDDS-16032
## How was this patch tested?
Without `-Pdist`:
```bash
$ mvn -DskipRecon -DskipShade -DskipTests clean verify
...
$ cd hadoop-ozone/dist/target/ozone-2.3.0-SNAPSHOT
$ ls lib/native
ls: cannot access 'lib/native': No such file or directory
$ bin/ozone debug checknative
Native library checking:
hadoop: false
...
```
With `-Pdist`:
```
$ mvn -DskipRecon -DskipShade -DskipTests clean verify -Pdist
...
$ cd hadoop-ozone/dist/target/ozone-2.3.0-SNAPSHOT
$ bin/ozone debug checknative
Native library checking:
hadoop: true lib/native/libhadoop_linux_x86_64.so
...
$ ls -1 --file-type lib/native
libhadoop.dylib@
libhadoop_linux_aarch_64.so
libhadoop_linux_x86_64.so
libhadoop_osx_aarch_64.dylib
libhadoop.so@
$ cd bin
$ ./ozone debug checknative
Native library checking:
hadoop: true lib/native/libhadoop_linux_x86_64.so
...
```
https://github.com/adoroszlai/ozone/actions/runs/30548924292
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]