Skip to content

Commit

Permalink
Change file type in debian builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrothal committed Mar 10, 2017
1 parent 97cd54e commit c4d057d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions woof-code/3builddistro-Z
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ mkdir -p sandbox3

export DISTRO_NAME
export DISTRO_VERSION
export DISTRO_FILE_PREFIX

echo

Expand Down Expand Up @@ -1714,6 +1715,27 @@ fi

sync

# Debian builds have executables as shared libraries. ROX gets confused
if [ "$DISTRO_FILE_PREFIX" = "stretch" -o "$DISTRO_FILE_PREFIX" = "ascii" ]; then
if [ "$(which elfedit)" ];then
/usr/lib/gtkdialog/box_splash -close never -text \
"$(gettext 'Fixing file types. please wait...')" &
SPID=$!
for f in $(find rootfs-complete/ -type f -executable -exec file {} \;| grep -i 'shared object' | cut -f1 -d ':' | grep -E '/bin/|/sbin/')
do
elfedit --input-type=dyn --output-type=exec $f
done
sync
kill -9 $SPID
/usr/lib/gtkdialog/box_splash -timeout 5 -bg green -text \
"$(gettext 'Done! Please check if ROX recognises files correctly.')"
else
/usr/lib/gtkdialog/box_splash -timeout 10 -bg red -text\
"$(gettext 'Please install elfedit and try latter.')"
fi
fi


if [ "$BUILD_SFS" = 'yes' ]; then
###########
#build the rootfs-complete sfs...
Expand Down Expand Up @@ -2206,6 +2228,26 @@ sync
echo -e "\ncleaning out whiteouts"
find sandbox3/devx -name '.wh*' -delete

# Debian builds have executables as shared libraries. ROX gets confused
if [ "$DISTRO_FILE_PREFIX" = "stretch" -o "$DISTRO_FILE_PREFIX" = "ascii" ]; then
if [ "$(which elfedit)" ];then
/usr/lib/gtkdialog/box_splash -close never -text \
"$(gettext 'Fixing file types. please wait...')" &
SPID=$!
for f in $(find sandbox3/devx -type f -executable -exec file {} \;| grep -i 'shared object' | cut -f1 -d ':' | grep -E '/bin/|/sbin/')
do
elfedit --input-type=dyn --output-type=exec $f
done
sync
kill -9 $SPID
/usr/lib/gtkdialog/box_splash -timeout 5 -bg green -text \
"$(gettext 'Done! Please check if ROX recognises files correctly.')"
else
/usr/lib/gtkdialog/box_splash -timeout 10 -bg red -text\
"$(gettext 'Please install elfedit and try latter.')"
fi
fi

echo "Now creating ${DEVXSFS} ..."
${MKSQUASHFS} sandbox3/devx ./${WOOF_OUTPUT}/${DEVXSFS} ${SFSCOMP} #100911 110713
sync
Expand Down

0 comments on commit c4d057d

Please sign in to comment.