prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Bundle system - copy opensearch-tar-install script into bundle
  The [opensearch-tar-install](https://github.com/opensearch-project/opensearch-build/blob/main/release/tar/linux/opensearch-tar-install.sh) script needs to be included with assembled bundles similar to [this](https://github.com/opensearch-project/opensearch-build/blob/main/release/tar/linux/opensearch-tar-build.sh#L156) shell script.
  
  
  
  </issue>
  <code>
  [start of bundle-workflow/python/assemble.py]
  1 #!/usr/bin/env python
  2 
  3 # Copyright OpenSearch Contributors.
  4 # SPDX-License-Identifier: Apache-2.0
  5 
  6 import os
  7 import tempfile
  8 import argparse
  9 from assemble_workflow.bundle import Bundle
  10 from assemble_workflow.bundle_recorder import BundleRecorder
  11 from manifests.build_manifest import BuildManifest
  12 
  13 parser = argparse.ArgumentParser(description = "Assemble an OpenSearch Bundle")
  14 parser.add_argument('manifest', type = argparse.FileType('r'), help="Manifest file.")
  15 args = parser.parse_args()
  16 
  17 build_manifest = BuildManifest.from_file(args.manifest)
  18 build = build_manifest.build
  19 artifacts_dir = os.path.dirname(os.path.realpath(args.manifest.name))
  20 output_dir = os.path.join(os.getcwd(), 'bundle')
  21 os.makedirs(output_dir, exist_ok=True)
  22 
  23 with tempfile.TemporaryDirectory() as work_dir:
  24     print(f'Bundling {build.name} ({build.architecture}) into {output_dir} ...')
  25 
  26     os.chdir(work_dir)
  27 
  28     bundle_recorder = BundleRecorder(build, output_dir, artifacts_dir)
  29     bundle = Bundle(build_manifest, artifacts_dir, bundle_recorder)
  30 
  31     bundle.install_plugins()
  32     print(f'Installed plugins: {bundle.installed_plugins}')
  33 
  34     #  Save a copy of the manifest inside of the tar
  35     bundle_recorder.write_manifest(bundle.archive_path)
  36     bundle.build_tar(output_dir)
  37 
  38     bundle_recorder.write_manifest(output_dir)
  39 
  40 print(f'Done.')
  41
  [end of bundle-workflow/python/assemble.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/bundle-workflow/python/assemble.py b/bundle-workflow/python/assemble.py
  --- a/bundle-workflow/python/assemble.py
  +++ b/bundle-workflow/python/assemble.py
  @@ -6,6 +6,7 @@
   import os
   import tempfile
   import argparse
  +import shutil
   from assemble_workflow.bundle import Bundle
   from assemble_workflow.bundle_recorder import BundleRecorder
   from manifests.build_manifest import BuildManifest
  @@ -14,6 +15,12 @@
   parser.add_argument('manifest', type = argparse.FileType('r'), help="Manifest file.")
   args = parser.parse_args()
   
  +tarball_installation_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../release/tar/linux/opensearch-tar-install.sh')
  +
  +if not os.path.isfile(tarball_installation_script):
  +    print(f'No installation script found at path: {tarball_installation_script}')
  +    exit(1)
  +
   build_manifest = BuildManifest.from_file(args.manifest)
   build = build_manifest.build
   artifacts_dir = os.path.dirname(os.path.realpath(args.manifest.name))
  @@ -31,6 +38,9 @@
       bundle.install_plugins()
       print(f'Installed plugins: {bundle.installed_plugins}')
   
  +    # Copy the tar installation script into the bundle
  +    shutil.copyfile(tarball_installation_script, os.path.join(bundle.archive_path, os.path.basename(tarball_installation_script)))
  +
       #  Save a copy of the manifest inside of the tar
       bundle_recorder.write_manifest(bundle.archive_path)
       bundle.build_tar(output_dir)
  
verification_info: {"golden_diff": "diff --git a/bundle-workflow/python/assemble.py b/bundle-workflow/python/assemble.py\n--- a/bundle-workflow/python/assemble.py\n+++ b/bundle-workflow/python/assemble.py\n@@ -6,6 +6,7 @@\n import os\n import tempfile\n import argparse\n+import shutil\n from assemble_workflow.bundle import Bundle\n from assemble_workflow.bundle_recorder import BundleRecorder\n from manifests.build_manifest import BuildManifest\n@@ -14,6 +15,12 @@\n parser.add_argument('manifest', type = argparse.FileType('r'), help=\"Manifest file.\")\n args = parser.parse_args()\n \n+tarball_installation_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../release/tar/linux/opensearch-tar-install.sh')\n+\n+if not os.path.isfile(tarball_installation_script):\n+    print(f'No installation script found at path: {tarball_installation_script}')\n+    exit(1)\n+\n build_manifest = BuildManifest.from_file(args.manifest)\n build = build_manifest.build\n artifacts_dir = os.path.dirname(os.path.realpath(args.manifest.name))\n@@ -31,6 +38,9 @@\n     bundle.install_plugins()\n     print(f'Installed plugins: {bundle.installed_plugins}')\n \n+    # Copy the tar installation script into the bundle\n+    shutil.copyfile(tarball_installation_script, os.path.join(bundle.archive_path, os.path.basename(tarball_installation_script)))\n+\n     #  Save a copy of the manifest inside of the tar\n     bundle_recorder.write_manifest(bundle.archive_path)\n     bundle.build_tar(output_dir)\n", "issue": "Bundle system - copy opensearch-tar-install script into bundle\nThe [opensearch-tar-install](https://github.com/opensearch-project/opensearch-build/blob/main/release/tar/linux/opensearch-tar-install.sh) script needs to be included with assembled bundles similar to [this](https://github.com/opensearch-project/opensearch-build/blob/main/release/tar/linux/opensearch-tar-build.sh#L156) shell script.\r\n\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\n# Copyright OpenSearch Contributors.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport tempfile\nimport argparse\nfrom assemble_workflow.bundle import Bundle\nfrom assemble_workflow.bundle_recorder import BundleRecorder\nfrom manifests.build_manifest import BuildManifest\n\nparser = argparse.ArgumentParser(description = \"Assemble an OpenSearch Bundle\")\nparser.add_argument('manifest', type = argparse.FileType('r'), help=\"Manifest file.\")\nargs = parser.parse_args()\n\nbuild_manifest = BuildManifest.from_file(args.manifest)\nbuild = build_manifest.build\nartifacts_dir = os.path.dirname(os.path.realpath(args.manifest.name))\noutput_dir = os.path.join(os.getcwd(), 'bundle')\nos.makedirs(output_dir, exist_ok=True)\n\nwith tempfile.TemporaryDirectory() as work_dir:\n    print(f'Bundling {build.name} ({build.architecture}) into {output_dir} ...')\n\n    os.chdir(work_dir)\n\n    bundle_recorder = BundleRecorder(build, output_dir, artifacts_dir)\n    bundle = Bundle(build_manifest, artifacts_dir, bundle_recorder)\n\n    bundle.install_plugins()\n    print(f'Installed plugins: {bundle.installed_plugins}')\n\n    #  Save a copy of the manifest inside of the tar\n    bundle_recorder.write_manifest(bundle.archive_path)\n    bundle.build_tar(output_dir)\n\n    bundle_recorder.write_manifest(output_dir)\n\nprint(f'Done.')\n", "path": "bundle-workflow/python/assemble.py"}]}