Skip to content

Commit 825386a

Browse files
CI: netbsd: enable xattrs on /tmp
1 parent 1373b30 commit 825386a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,28 @@ jobs:
444444
sudo -E ln -sf /usr/pkg/bin/virtualenv-3.11 /usr/pkg/bin/virtualenv3
445445
sudo -E ln -sf /usr/pkg/bin/tox-3.11 /usr/pkg/bin/tox3
446446
447+
# Ensure base system admin tools are on PATH for the non-root shell
448+
export PATH="/sbin:/usr/sbin:$PATH"
449+
450+
echo "--- Preparing an extattr-enabled filesystem for /tmp (NetBSD) ---"
451+
# On many NetBSD setups /tmp is tmpfs without extended attributes.
452+
# Create a FFS image with extended attributes enabled and overlay it on /tmp
453+
# so that xattr tests have a supporting filesystem.
454+
VNDDEV="vnd0"
455+
IMGFILE="/tmp/xattr.img"
456+
sudo -E dd if=/dev/zero of=${IMGFILE} bs=1m count=1024
457+
sudo -E vndconfig -c "${VNDDEV}" "${IMGFILE}"
458+
sudo -E newfs -O 2ea /dev/r${VNDDEV}a
459+
MNT="/mnt/xattrfs"
460+
sudo -E mkdir -p ${MNT}
461+
sudo -E mount -t ffs -o extattr /dev/${VNDDEV}a $MNT
462+
export TMPDIR="${MNT}/tmp"
463+
sudo -E mkdir -p ${TMPDIR}
464+
sudo -E chmod 1777 ${TMPDIR}
465+
466+
touch ${TMPDIR}/testfile
467+
lsextattr user ${TMPDIR}/testfile && echo "[xattr] *** xattrs SUPPORTED on ${TMPDIR}! ***"
468+
447469
tox3 -e py311-none
448470
;;
449471

0 commit comments

Comments
 (0)