Skip to content

Commit

Permalink
Image mount
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnks committed Nov 18, 2024
1 parent 4ab6fc0 commit 7498bfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/atlocal.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HAVE_UNSHARE=@HAVE_UNSHARE@
PYTHON=@PYTHON@
PGP=@PGP@

RPMTREE=${RPMTREE:-/}
RPMTREE=/srv/blah-rpm:/srv/blah-img
RPMTEST=/
RPMDATA="/data/"

Expand Down
10 changes: 7 additions & 3 deletions tests/mktree.oci
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ rpmtests()
fi

source ./snapshot
mkdir -p $PWD/blah-img
chcon -Rt container_file_t $PWD
mount --bind $(podman image mount rpm/base) $PWD/blah-img
RPMTREE=$PWD/blah-rpm:$PWD/blah-img
RPMTEST=$PWD/blah-mnt
chcon -Rt container_file_t $PWD
snapshot mount
$PODMAN run --privileged -it --read-only --tmpfs /tmp -v $vol \
--workdir /srv $opts --rootfs $RPMTEST rpmtests "$@"
snapshot umount
umount $PWD/blah-img
podman image umount rpm/base
}

unshared()
Expand All @@ -69,8 +73,8 @@ case $CMD in
build) unshared
if [ $NATIVE == yes ]; then
# Native build
$PODMAN build --target base -o $PWD/blah-img $ARGS
chmod -Rf u+rwX $PWD/blah-img
$PODMAN build --target base -t rpm/base $ARGS
# chmod -Rf u+rwX $PWD/blah-img
make_install $PWD/blah-rpm
else
# Standalone build
Expand Down

0 comments on commit 7498bfb

Please sign in to comment.