IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
489 stars 73 forks source link

./configure fails on deb install (with tmpfs noexec) #64

Closed itoffshore closed 12 years ago

itoffshore commented 12 years ago

I run /tmp as a tmpfs noexec which causes the following error on 0.7.5 deb install:

 Setting up spacefm (0.7.5-1) ...
 spacefm-postinst configure
 spacefm-build: Extracting source...
 spacefm-build: Running configure...
 bash: ./configure: Permission denied
 spacefm-build: ERROR: Unable to complete installation
 dpkg: error processing spacefm (--configure):

Perhaps execute the build in /var/tmp as tmpfs will eventually be the default for /tmp - or alternatively pickup this setting from /etc/spacefm/spacefm.conf

Temporarily remounting /tmp without noexec allows the installation to successfully complete.

IgnorantGuru commented 12 years ago

Thanks - I'll take a look at what tmp dir is preferred for this. Also, just because they use tmpfs for /tmp doesn't imply noexec - I think they would have problems with that. But if you have other references on why /var/tmp is preferred I'd like to see them.

This issue will affect anyone who has /tmp mounted noexec who tries to install via the provided deb packages. Using tmpfs for /tmp isn't a problem.

As a workaround, you can build your own deb package or build from source per the README.

IgnorantGuru commented 12 years ago

The only current resolution for this issue is that it will be documented that $TMPDIR must not be noexec for the provided deb packages. These packages use mktemp to create the temporary directory for building, and mktemp in turn honors $TMPDIR.

Using /var/tmp won't be of much help because usually when /tmp is noexec, so is /var/tmp. The other ways of getting around this, such as a chroot jail or a bind mount, would violate the user's desire not to have temporary files executed, so I'm not inclined to take that approach. This issue will be closed but further comments are welcome.

IgnorantGuru commented 12 years ago

or alternatively pickup this setting from /etc/spacefm/spacefm.conf

Also on that note, SpaceFM no longer requires non-noexec /tmp (when running), so most users won't have it set in /etc/spacefm/spacefm.conf, and even if so, it's no longer guaranteed to be non-noexec.

itoffshore commented 12 years ago

Removing /etc/apt/apt.conf.d/50extracttemplates & setting the following in /etc/apt/apt.conf fixes it for me:

DPkg::Pre-Invoke{"mount -o remount,exec /tmp";};
DPkg::Post-Invoke {"mount -o remount /tmp";};

The upgrade to 0.7.6 today completed successfully.