d22c793ee9
The feature officially introduces the "engineering passwords" including empty ones which have been around since forever but weren't properly managed (and still are not, at least until there are no stray passwd/chpasswd/usermod calls in both the profile, installer-features and all the other related parts). It is based on an m-p-d init3-users script by stanv@ but was cleaned up and restructured in a pretty severe manner; thanks glebfm@ for additional discussion. This also cleans up the kludge previously stuck into build-vm. Note that vm/icewm sports graphical autologin now as well as the default root password (which can be overridden by passing ROOTPW=... to make but it is a change from the previous state of affairs indeed).
48 lines
1.3 KiB
Makefile
48 lines
1.3 KiB
Makefile
# step 4: build the virtual machine image
|
|
|
|
IMAGE_PACKAGES = $(DOT_BASE) \
|
|
$(SYSTEM_PACKAGES) \
|
|
$(COMMON_PACKAGES) \
|
|
$(BASE_PACKAGES) \
|
|
$(THE_PACKAGES) \
|
|
$(call list,$(BASE_LISTS) $(THE_LISTS))
|
|
|
|
# intermediate chroot archive
|
|
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
|
|
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
|
|
|
|
check-sudo:
|
|
@if ! type -t sudo >&/dev/null; then \
|
|
echo "** error: sudo not available, see doc/vm.txt" >&2; \
|
|
exit 1; \
|
|
fi
|
|
|
|
prepare-image: check-sudo
|
|
@if ! sudo $(TOPDIR)/bin/tar2vm \
|
|
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
|
|
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
|
|
exit 1; \
|
|
fi
|
|
|
|
convert-image: prepare-image
|
|
@case "$(IMAGE_TYPE)" in \
|
|
"img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \
|
|
"vhd") VM_FORMAT="vpc";; \
|
|
*) VM_FORMAT="$(IMAGE_TYPE)"; \
|
|
esac; \
|
|
if ! type -t qemu-img >&/dev/null; then \
|
|
echo "** warning: qemu-img not available" >&2; \
|
|
else \
|
|
qemu-img convert -O "$$VM_FORMAT" \
|
|
"$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \
|
|
rm "$(VM_RAWDISK)"; \
|
|
fi
|
|
|
|
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
|
|
|
|
# override
|
|
pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
|
|
|
|
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
|
|
convert-image postprocess $(GLOBAL_CLEAN_WORKDIR)
|