I have /tmp on a separate partition, and mounted with noexec. I am using Debian.
The installation of some packages fails, because the post-installation scripts of some packages need to run from /tmp.
I was wondering if it would be possible to "hook" a simple script to apt-get, which would be run every time before apt-get, and remount /tmp to exec. And similarly, remount it to noexec after apt-get has finished.