From 42fd5373f71e3d03cb9b0135fd8a8d82501da2d7 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Thu, 27 Jun 2024 19:39:52 +0300 Subject: [PATCH] Architecture aware symlinks --- rockcraft.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rockcraft.yaml b/rockcraft.yaml index 3882e1c..f892ad1 100644 --- a/rockcraft.yaml +++ b/rockcraft.yaml @@ -34,25 +34,25 @@ parts: stage-snaps: - charmed-mysql/8.0/edge override-stage: | - LIB_DIR=$CRAFT_STAGE/usr/lib/x86_64-linux-gnu + LIB_DIR=$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR craftctl default mkdir -p $CRAFT_STAGE/var/lib/mysql ln -sf $LIB_DIR/libnuma.so.1 \ - /usr/lib/x86_64-linux-gnu/libnuma.so.1 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libnuma.so.1 ln -sf $LIB_DIR/libaio.so.1 \ - /usr/lib/x86_64-linux-gnu/libaio.so.1 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libaio.so.1 ln -sf $LIB_DIR/libicuuc.so.70 \ - /usr/lib/x86_64-linux-gnu/libicuuc.so.70 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libicuuc.so.70 ln -sf $LIB_DIR/libicui18n.so.70 \ - /usr/lib/x86_64-linux-gnu/libicui18n.so.70 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libicui18n.so.70 ln -sf $LIB_DIR/libevent_core-2.1.so.7 \ - /usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libevent_core-2.1.so.7 ln -sf $LIB_DIR/libevent_pthreads-2.1.so.7 \ - /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.7 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libevent_pthreads-2.1.so.7 ln -sf $LIB_DIR/libprotobuf-lite.so.23 \ - /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libprotobuf-lite.so.23 ln -sf $LIB_DIR/libicudata.so.70 \ - /usr/lib/x86_64-linux-gnu/libicudata.so.70 + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libicudata.so.70 rm -rf /var/lib/mysql/ mysqld --initialize cp -r /var/lib/mysql $CRAFT_STAGE/var/lib