Merge tier-1 to the toplevel
Now we just have a minimal base, and what was tier-1 is now just the default content. We still do capture the previous conception of "tier-x" in `packages-recommended-minimal.txt` so that people starting from scratch can install using that. Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
1 parent
d6f376b36e
commit
8a6332e491
12 files changed
+99
-124
No files matched your search
@@ -0,0 +1 @@
|
||||
add_dracutmodules+=" lvm crypt fips "
|
||||
@@ -0,0 +1,7 @@
|
||||
# Our fallback
|
||||
enable bootc-generic-growpart.service
|
||||
|
||||
# We enable this by default just so we can say we have automatic
|
||||
# updates on by default, like CoreOS. It's very much intended
|
||||
# to be tweaked or replaced outside of trivial scenarios though.
|
||||
enable bootc-fetch-apply-updates.timer
|
||||
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Bootc Fallback Root Filesystem Grow
|
||||
Documentation=https://gitlab.com/fedora/bootc/docs
|
||||
# For now we skip bare metal cases, and we also have nothing to do
|
||||
# for containers.
|
||||
ConditionVirtualization=vm
|
||||
# This helps verify that we're running in a bootc/ostree based target.
|
||||
ConditionPathIsMountPoint=/sysroot
|
||||
# For someone making a smaller image, assume they have this handled.
|
||||
ConditionPathExists=/usr/bin/growpart
|
||||
# We want to run before any e.g. large container images might be pulled.
|
||||
DefaultDependencies=no
|
||||
Requires=sysinit.target
|
||||
After=sysinit.target
|
||||
Before=basic.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/libexec/bootc-generic-growpart
|
||||
# So we can temporarily remount the sysroot writable
|
||||
MountFlags=slave
|
||||
# Just to auto-cleanup our temporary files
|
||||
PrivateTmp=yes
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
backing_device=$(findmnt -vno SOURCE /sysroot)
|
||||
echo "Backing device: ${backing_device}"
|
||||
|
||||
# Handling devicemapper targets is a whole other thing
|
||||
case $backing_device in
|
||||
/dev/mapper/*) echo "Not growing $backing_device"; exit 0 ;;
|
||||
esac
|
||||
|
||||
syspath=/sys/class/block/$(basename "${backing_device}")
|
||||
if ! test -d "${syspath}"; then
|
||||
echo "failed to find backing device ${syspath}"; exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Note that we expect that the rootfs is on a partition
|
||||
partition=$(cat "${syspath}"/partition)
|
||||
|
||||
# Walk up to find the parent blockdev
|
||||
parentpath=$(dirname "$(realpath "${syspath}")")
|
||||
devmajmin=$(cat "${parentpath}"/dev)
|
||||
parent="/dev/block/${devmajmin}"
|
||||
|
||||
# Grow the partition
|
||||
tmpf=$(mktemp)
|
||||
# Ignore errors because growpart exits 1 if nothing changed;
|
||||
# we need to check the output for NOCHANGE:
|
||||
if ! /usr/bin/growpart "${parent}" "${partition}" > "${tmpf}"; then
|
||||
cat "${tmpf}"
|
||||
if grep -qEe '^NOCHANGE: ' "${tmpf}"; then
|
||||
exit 0
|
||||
fi
|
||||
echo "growpart failed"
|
||||
exit 1
|
||||
fi
|
||||
cat "${tmpf}"
|
||||
# Now, temporarily remount the sysroot writable in our mount namespace
|
||||
mount -o remount,rw /sysroot
|
||||
# And defer to systemd's growfs wrapper which handles dispatching on
|
||||
# the target filesystem type.
|
||||
/usr/lib/systemd/systemd-growfs /sysroot
|
||||
Reference in new issue
Block a user