Skip to content

Commit 3408ccd

Browse files
committed
fix(assembler, search_libs): set executable permissions for shared libraries after copying
1 parent 643c56b commit 3408ccd

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

automation-tools/assembler.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,13 @@ manage_flatpak_id() {
525525
cp -rL "$found_path" "$component/artifacts/" || {
526526
log e "Failed to copy $target from $found_path" "$logfile"
527527
exit 1
528-
local need_to_ls="true"
529528
}
529+
# Set executable permissions for shared libraries if we copied lib directory
530+
if [[ "$target" == "lib" ]]; then
531+
log i "Setting executable permissions for shared libraries..." "$logfile"
532+
find "$component/artifacts/lib" -name "*.so*" -type f -exec chmod +x {} \;
533+
fi
534+
local need_to_ls="true"
530535
else
531536
log w "No top-level '$target' found in $WORK_DIR" "$logfile"
532537
local need_to_ls="true"
@@ -623,6 +628,9 @@ manage_flatpak_artifacts() {
623628
if [[ -d "$WORK_DIR/files/lib" ]]; then
624629
mkdir -p "$component/artifacts/lib"
625630
cp -rL "$WORK_DIR/files/lib/"* "$component/artifacts/lib/" 2>/dev/null || true
631+
# Set executable permissions for shared libraries
632+
log i "Setting executable permissions for shared libraries..." "$logfile"
633+
find "$component/artifacts/lib" -name "*.so*" -type f -exec chmod +x {} \;
626634
log i "Copied lib directory contents to artifacts" "$logfile"
627635
fi
628636

@@ -935,7 +943,9 @@ process_libraries_manual() {
935943
local found_lib=$(find "$search_path" -name "$lib_name" -type f 2>/dev/null | head -n 1)
936944
if [[ -n "$found_lib" ]]; then
937945
cp -L "$found_lib" "$lib_dir/"
938-
log i "✅ Copied $lib_name from $found_lib" "$logfile"
946+
# Set executable permissions for shared libraries
947+
chmod +x "$lib_dir/$(basename "$found_lib")"
948+
log i "✅ Copied $lib_name from $found_lib (with executable permissions)" "$logfile"
939949
found=true
940950
break
941951
fi

automation-tools/search_libs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ search_libs() {
5555
dest="${FLATPAK_DEST}/lib/$(basename "$path")"
5656
if [ "$path" != "$dest" ]; then
5757
cp -fL "$path" "${FLATPAK_DEST}/lib/"
58+
# Set executable permissions for shared libraries
59+
chmod +x "${FLATPAK_DEST}/lib/$(basename "$path")"
5860
actual_name="$(basename "$path")"
59-
echo "✅ Copied $lib to ${FLATPAK_DEST}/lib/$actual_name"
61+
echo "✅ Copied $lib to ${FLATPAK_DEST}/lib/$actual_name (with executable permissions)"
6062
fi
6163
done
6264

0 commit comments

Comments
 (0)