Skip to content

Commit

Permalink
library_packager.py needs to be fixed: yugabyte/yugabyte-db#18260
Browse files Browse the repository at this point in the history
  • Loading branch information
radekg committed Jul 16, 2023
1 parent 919a4e2 commit ac8da73
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions .docker/build-infrastructure-gcc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ FROM almalinux:8.8
ARG GCC_VERSION=11
ARG PYTHON_VERSION=39

COPY patches/ /patches
COPY usr/local/bin/patch_postgres_h.sh /usr/local/bin/patch_postgres_h.sh
COPY usr/local/bin/yb-first-pass-build.sh /usr/local/bin/yb-first-pass-build.sh
COPY usr/local/bin/yb-rebuild-extensions.sh /usr/local/bin/yb-rebuild-extensions.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/python/yugabyte/library_packager.py b/python/yugabyte/library_packager.py
index 0bf9b386b7..f37ed19d8c 100644
--- a/python/yugabyte/library_packager.py
+++ b/python/yugabyte/library_packager.py
@@ -281,6 +281,7 @@ class LibraryPackager:

if using_linuxbrew():
# In Linuxbrew mode, we will set the rp
+ subprocess.check_call(['chmod', 'u+w', file_path])
remove_rpath(file_path)
return

@@ -288,6 +289,7 @@ class LibraryPackager:
new_rpath = ':'.join(LibraryPackager.get_relative_rpath_items(
dest_root_dir, os.path.dirname(file_abs_path)))
logging.info("Setting rpath on file %s to %s", file_path, new_rpath)
+ subprocess.check_call(['chmod', 'u+w', file_path])
set_rpath(file_path, new_rpath)

def install_dyn_linked_binary(self, src_path: str, dest_dir: str) -> str:
13 changes: 11 additions & 2 deletions .docker/build-infrastructure-gcc/usr/local/bin/yb-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ set -eu
cd /yb-source
# remove old build, if exists...
rm -rf /yb-source/build/yugabyte-*.tar.gz

# patches:

# https://github.com/yugabyte/yugabyte-db/issues/18260
git checkout -- python/yugabyte/library_packager.py
git apply /patches/python/yugabyte/library_packager.py.diff

# create the release archive
yes | ./yb_release
./yb_release --build_archive --build=release --force --keep_tmp_dir

# move to a well known location
mv /yb-source/build/yugabyte-*.tar.gz /yb-source/build/yugabyte-${YB_RELEASE_VERSION}.tar.gz

# done
echo "Your build is available in /yb-source/build/yugabyte-${YB_RELEASE_VERSION}.tar.gz"
echo "Your build is available in /yb-source/build/yugabyte-${YB_RELEASE_VERSION}.tar.gz"

0 comments on commit ac8da73

Please sign in to comment.