mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
builder: fedora: ensure images are up-to-date
Update the system at the end of the installation, so the generated image is up-to-date. This also removes the need to manually update dnf on i686 and x86_64.
This commit is contained in:
@@ -64,6 +64,9 @@ poweroff
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ poweroff
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ popd
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
@@ -97,10 +100,4 @@ virt-install \
|
||||
--nographics \
|
||||
--noreboot
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1280029
|
||||
# (Only for Fedora 23)
|
||||
if [ "$version" = "23" ]; then
|
||||
virt-customize -a $output --install "https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-conf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-yum-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/python3-dnf-1.1.4-2.fc23.noarch.rpm"
|
||||
fi
|
||||
|
||||
source $(dirname "$0")/compress.sh $output
|
||||
|
||||
@@ -64,6 +64,9 @@ poweroff
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ poweroff
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ popd
|
||||
# Rerun dracut for the installed kernel (not the running kernel):
|
||||
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
|
||||
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
||||
|
||||
# Ensure the installation is up-to-date:
|
||||
dnf -y --best upgrade
|
||||
%end
|
||||
EOF
|
||||
|
||||
@@ -97,10 +100,4 @@ virt-install \
|
||||
--nographics \
|
||||
--noreboot
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1280029
|
||||
# (Only for Fedora 23)
|
||||
if [ "$version" = "23" ]; then
|
||||
virt-customize -a $output --install "https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-conf-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/dnf-yum-1.1.4-2.fc23.noarch.rpm,https://kojipkgs.fedoraproject.org//packages/dnf/1.1.4/2.fc23/noarch/python3-dnf-1.1.4-2.fc23.noarch.rpm"
|
||||
fi
|
||||
|
||||
source $(dirname "$0")/compress.sh $output
|
||||
|
||||
Reference in New Issue
Block a user