"fix" script
Here's a quick hack that fixed extension permissions in my tce dir. eg, "fix gnumeric"
Finds extension in tce_dir and sets tce.menu, tce.installed. tce.icons to root:staff/775.
Rebuilds and copies to tce_dir. Deletes old md5 file.
Rerunning audit creates new md5
#!/bin/ash
TCEDIR="$(cat /opt/.tce_dir)"
[ -d /tmp/extract ] || sudo mkdir /tmp/extract
[ -d /tmp/work ] || sudo mkdir /tmp/work
cd ${TCEDIR}
APP="$(busybox find ${1}* | busybox grep -v .dep | busybox grep -v .txt | busybox grep -v .list )"
if [ -z ${APP} ]; then
echo "no match in tce dir"
exit 1
fi
sudo mount ${APP} /tmp/extract -o loop,ro
sudo cp -Rp /tmp/extract/* /tmp/work
cd /tmp/work/usr/local
if [ -d tce.installed ]; then
sudo chown -R root:staff tce.installed
sudo chmod 775 tce.installed
sudo chmod 644 tce.installed/*
fi
if [ -d tce.menu ]; then
sudo chown -R root:staff tce.menu
sudo chmod 775 tce.menu
sudo chmod 644 tce.menu/*
fi
if [ -d tce.icons ]; then
sudo chown -R root:staff tce.icons
sudo chmod 775 tce.icons
sudo chmod 644 tce.icons/*
fi
cd /tmp/work
sudo mksquashfs ./ /tmp/${APP}
sudo cp -p /tmp/${APP} ${TCEDIR}
sudo rm ${TCEDIR}/${APP}.md5.txt
###### cleanup
sudo umount /tmp/extract
sudo rmdir /tmp/extract
sudo rm -R /tmp/work
sudo rm /tmp/${APP}
exit 0