Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnks committed Nov 18, 2024
1 parent 7cdc854 commit 4ab6fc0
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/mktree.oci
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@ rpmtests()
fi

source ./snapshot
rm -rf $PWD/blah-img
mkdir -p $PWD/blah-img
chcon -Rt container_file_t $PWD
( cd $PWD/blah-img; podman create --name foo rpm; podman export foo | tar x; podman rm foo )
chmod -Rf u+rwX $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 "$@"
Expand All @@ -71,19 +67,14 @@ unshared()

case $CMD in
build) unshared
# Build base image
$PODMAN build --target base -t $IMAGE/base $ARGS

# Add RPM install on top
# [ -n "$($PODMAN images -q $IMAGE)" ] && $PODMAN rmi $IMAGE
if [ $NATIVE == yes ]; then
# Native build
id=$($PODMAN create $IMAGE/base)
trap "$PODMAN rm $id >/dev/null" EXIT
$PODMAN build --target base -o $PWD/blah-img $ARGS
chmod -Rf u+rwX $PWD/blah-img
make_install $PWD/blah-rpm
$PODMAN commit -q $id $IMAGE
else
# Standalone build
[ -n "$($PODMAN images -q $IMAGE)" ] && $PODMAN rmi $IMAGE
$PODMAN build --target full -t $IMAGE $ARGS
fi
;;
Expand Down

0 comments on commit 4ab6fc0

Please sign in to comment.