I’ve created a fuse-filesystem that layers trash collection over an existing directory hierarchy. It’s a bit like local-history in the eclipse development environment.
I developed it using OpenSUSE, so I thought I’d mention it here first:Collectfs is intended as a light weight way to preserve changes made throughout the working day. It is not intended as a replacement for revision control or backups. The intention is to protect you during the between-times, when you’re not covered by these other tools: those moments where you misstep with rm, mv, or cat; or those times when you wish you could revert or compare your source to as it was an hour ago.
I’ve used collectfs to help develop collectfs. I haven’t encountered any nasty bugs or stability problems, but testing has been fairly limited - so be careful with it.
At the moment you have to build it from source, but that’s pretty easy (the source includes an RPM spec for OpenSUSE which works fine on OpenSUSE 11.4, but I’m only supporting source at the moment):
I had to patch the Makefile a bit (need the opportunity to pass additional compile options). I added the install target as well. That way I do not have to install from the spec file. Having uninstall too would be nice. Would you like to fix that upstream with your next release? If yes, here is my new Makefile:
Could anyone install and test the openSUSE package of collectfs and check that it’s working as expected? Thanks.
Collectfs does not build for SLE_11_SP1. The message I get is:
+ /usr/bin/make 'OPTFLAGS=-march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
gcc -O2 -g -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c collectfs.c
collectfs.c: In function 'fop_init':
collectfs.c:894: error: 'struct fuse_conn_info' has no member named 'capable'
collectfs.c:894: error: 'FUSE_CAP_ATOMIC_O_TRUNC' undeclared (first use in this function)
collectfs.c:894: error: (Each undeclared identifier is reported only once
collectfs.c:894: error: for each function it appears in.)
collectfs.c:898: error: 'struct fuse_conn_info' has no member named 'want'
make: *** [collectfs.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.80813 (%build)
Thanks for the Makefile improvements, I’ve checked them into svn.
I’ve also amended collectfs.c to check for the definition of FUSE_CAP_ATOMIC_O_TRUNC. This will probably fix the build issue on SLE_11_SP1. Collectfs cannot detect open-truncate on systems that lack that capability. While rm, mv, ln, unlink would still be covered, operations such as cat>myExistingFile may not be on SLE_11_SP1.
The build service package installs and uninstalls on my system.