@@ -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
0 commit comments