Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy everything found in mkosi/extra/ to the image #122

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYDIR=$(dirname "$0")

main()
{
cd "$MYDIR"
cd "$MYDIR"/ndctl
rm -rf build
meson setup build
meson configure -Dtest=enabled -Ddestructive=enabled build
Expand Down
8 changes: 4 additions & 4 deletions run_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1008,20 +1008,18 @@ check_ndctl_dir()

prepare_ndctl_build()
{
cp "${script_dir}"/mkosi/extra/root/ndctl/reinstall.sh \
mkosi.extra/root/ndctl/
cat <<- 'EOF' > mkosi.postinst
#!/bin/sh
# v14: 'systemd-nspawn"; v15: "mkosi"
printf 'container=%s\n' "$container"
# .postinst and others moved outside container in mkosi v15, see
# https://github.com/systemd/mkosi/commit/9b626c647037bc8a
if [ -n "$container" ]; then
/root/ndctl/reinstall.sh
/root/reinstall_ndctl.sh
else
# The magic, short-lived $SCRIPT variable is already deprecated
# and we don't need it.
mkosi-chroot /root/ndctl/reinstall.sh
mkosi-chroot /root/reinstall_ndctl.sh
fi
EOF
chmod +x mkosi.postinst
Expand Down Expand Up @@ -1127,6 +1125,8 @@ make_rootfs()
process_mkosi_template "$tmpl" > "$dst"
done

rsync -a "${script_dir}"/mkosi/extra/ mkosi.extra/

# misc rootfs setup
mkdir -p mkosi.extra/root/.ssh
local pubk
Expand Down