ROFS is the Read-Only File System for FUSE. You can mount it over any filesystem that Linux can mount.
Copyright 2005,2006,2008 Matthew Keller. email@example.com and others.
Mount any filesytem, or folder tree read-only, anywhere else. No warranties. No guarantees. No lawyers.
I read (and borrowed) a lot of other FUSE code to write this. Similarities possibly exist- Wholesale reuse as well of other GPL code. Special mention to Rémi Flament and his loggedfs.
Consider this code GPLv2.
gcc -o rofs -Wall -ansi -W -std=c99 -g -ggdb -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -lfuse rofs.c
rofs readwrite_filesystem mount_point