core: Add generic "commit filter" API, use it to implement statoverride

The builder wants the ability to mark a given file as e.g. setuid.  To
implement this, the repo now has a callback-based API when importing a
directory to modify or remove items.

The commit tool accepts a "statoverride" file as input which looks like:

+mode /path/to/file
This commit is contained in:
Colin Walters committed 2012-01-22 13:27:38 -05:00
1 parent a322ecacba
commit e8dbaa3c07
4 files changed
+303 -101

No files matched your search

+9 -1
View File
@@ -19,7 +19,7 @@
set -e
echo "1..23"
echo "1..24"
. libtest.sh
@@ -173,3 +173,11 @@ echo "ok metadata commit with strings"
cd ${test_tmpdir}/checkout-test2-4
$OSTREE commit -b test2 -s "no xattrs" --no-xattrs
echo "ok commit with no xattrs"
cd ${test_tmpdir}
cat > test-statoverride.txt <<EOF
+2048 /a/nested/3
EOF
cd ${test_tmpdir}/checkout-test2-4
$OSTREE commit -b test2 -s "with statoverride" --statoverride=../test-statoverride.txt
echo "ok commit statoverridde"