diff options
Diffstat (limited to 'sbrun')
| -rwxr-xr-x | sbrun | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -166,7 +166,7 @@ unless the -l option is used. With -l, the exit status is that of sbopkglint. Note: the current directory needs to be writable, since the log and -(with -s/-S) strace output are written there. +(with -s) strace output are written there. ====================================================================== The rest of this help message is a long-winded discussion that doesn't @@ -472,11 +472,6 @@ fi # harm done (it was already killed by SIGINT), just irritating. trap signal_handler INT TERM - -if [ "$STRACE" != "" ]; then - PRECMD="strace $STRACE" -fi - # Used to do this, but it doesn't allow for cases where the directory # has been renamed (foo.SlackBuild in a dir called foo.testing or foo.old). #SCRIPT="./$( pwd | sed 's,.*/,,' ).SlackBuild" @@ -526,6 +521,10 @@ FAKEROOT=$PRIVDIR/fake_root mkdir -p $UPPERDIR $WORKDIR $FAKEROOT echo "Private dir for overlay FS: $PRIVDIR" | tee -a $BUILDLOG +if [ "$STRACE" != "" ]; then + PRECMD="strace -o $PRIVDIR/strace.out $STRACE" +fi + # Force-load the module modprobe overlay &> /dev/null mount -t overlay overlay \ @@ -553,6 +552,10 @@ echo "$SCRIPT exit status: $RET" | tee -a $BUILDLOG cleanup_nonet +# This file contains a list of files that were written during +# the build (and are left over in the upperdir). +TURDS=$TMP/sbrun.turds.$$ + ### 20260923 bkw: # Anything in $UPPERDIR after umount was written there by the # SlackBuild. Not everything there is worth bitching about. @@ -583,17 +586,21 @@ cleanup_nonet \! -path dev/shm \ \! -path $TMP \ \! -path $OUTPUT \ - -print0 | xargs -r0 ls -bld > $TMP/sbrun.turds.$$ + -print0 | xargs -r0 ls -bld > $TURDS ) 2>/dev/null +if [ -f $PRIVDIR/strace.out ]; then + mv $PRIVDIR/strace.out . + chown --reference=$SCRIPT strace.out +fi + cleanup_privdir -if [ -s $TMP/sbrun.turds.$$ ]; then +if [ -s $TURDS ]; then warn "WARNING: files altered outside the sandbox:" - cat $TMP/sbrun.turds.$$ 1>&2 - cat $TMP/sbrun.turds.$$ >> $BUILDLOG + tee -a $BUILDLOG < $TURDS fi -rm -f $TMP/sbrun.turds.$$ +rm -f $TURDS # If linting + installation were both requested, don't install # the package if it fails to lint. |
