Repository: opensearch-project/opensearch-build

Issue:
[Bug]: src/system/os.py does not correctly return architecture for bsd platform
### Describe the bug


Run `uname -m` will return follow in the freebsd:
```
amd64
```

The code here does not support `amd64` as input:
https://github.com/opensearch-project/opensearch-build/blob/main/src/system/os.py#L12-L19
```
def current_architecture() -> str:
    architecture = subprocess.check_output(["uname", "-m"]).decode().strip()
    if architecture == "x86_64":
        return "x64"
    elif architecture == "aarch64" or architecture == "arm64":
        return "arm64"
    else:
        raise ValueError(f"Unsupported architecture: {architecture}")
```



Thanks.


### To reproduce

Run the build process on a freebsd server and see output:
```
$ ./build.sh manifests/2.4.0/opensearch-2.4.0.yml --component OpenSearch
Installing dependencies in . ...
Installing dependencies from Pipfile.lock (b36c9c)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Running ./src/run_build.py manifests/2.4.0/opensearch-2.4.0.yml --component OpenSearch ...
2023-02-23 23:15:47 INFO     Building in /tmp/tmpllimwxjs
2023-02-23 23:15:47 INFO     Removing /tmp/tmpllimwxjs
Traceback (most recent call last):
  File "./src/run_build.py", line 81, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 55, in main
    architecture=args.architecture or manifest.build.architecture,
  File "/usr/share/opensearch/opensearch-build/src/build_workflow/build_target.py", line 45, in __init__
    self.architecture = architecture or current_architecture()
  File "/usr/share/opensearch/opensearch-build/src/system/os.py", line 20, in current_architecture
    raise ValueError(f"Unsupported architecture: {architecture}")
ValueError: Unsupported architecture: amd64

```

### Expected behavior

The bsd x64 hosts can run the code without specifying --architecture x64.

### Screenshots

If applicable, add screenshots to help explain your problem.

### Host / Environment

_No response_

### Additional context

_No response_

### Relevant log output

_No response_


Discussion:

Resolving patch:
diff --git a/src/system/os.py b/src/system/os.py
--- a/src/system/os.py
+++ b/src/system/os.py
@@ -11,7 +11,7 @@
 
 def current_architecture() -> str:
     architecture = subprocess.check_output(["uname", "-m"]).decode().strip()
-    if architecture == "x86_64":
+    if architecture == "x86_64" or architecture == "amd64":
         return "x64"
     elif architecture == "aarch64" or architecture == "arm64":
         return "arm64"


Test patch:
diff --git a/tests/tests_system/test_os.py b/tests/tests_system/test_os.py
--- a/tests/tests_system/test_os.py
+++ b/tests/tests_system/test_os.py
@@ -20,6 +20,10 @@ def test_current_architecture(self) -> None:
     def test_x86_64_return_x64_architecture(self, mock_subprocess: MagicMock) -> None:
         self.assertTrue(current_architecture() == "x64")
 
+    @patch("subprocess.check_output", return_value="amd64".encode())
+    def test_amd64_return_x64_architecture(self, mock_subprocess: MagicMock) -> None:
+        self.assertTrue(current_architecture() == "x64")
+
     @patch("subprocess.check_output", return_value="aarch64".encode())
     def test_aarch64_return_arm64_architecture(self, mock_subprocess: MagicMock) -> None:
         self.assertTrue(current_architecture() == "arm64")