928c38 Allow to update kexec-tools using virt-customize for cloud base image

Authored and Committed by Coiby Xu 2 years ago
    Allow to update kexec-tools using virt-customize for cloud base image
    
    Resolves: bz2089871
    Upstream: Fedora
    Conflict: None
    
    commit da0ca0d205e7ac64426ad43540dae3d03cd4447a
    Author: Coiby Xu <coxu@redhat.com>
    Date:   Tue Jun 28 14:38:28 2022 +0800
    
        Allow to update kexec-tools using virt-customize for cloud base image
    
        Resolves: bz2089871
    
        Currently, kexec-tools can't be updated using virt-customize because
        older version of kdumpctl can't acquire instance lock for the
        get-default-crashkernel subcommand. The reason is /var/lock is linked to
        /run/lock which however doesn't exist in the case of virt-customize.
    
        This patch fixes this problem by using /tmp/kdump.lock as the lock
        file if /run/lock doesn't exist.
    
        Note
        1. The lock file is now created in /run/lock instead of /var/run/lock since
           Fedora has adopted adopted /run [2] since F15.
        2. %pre scriptlet now always return success since package update won't
           be blocked
    
        [1] https://fedoraproject.org/wiki/Features/var-run-tmpfs
    
        Fixes: 0adb0f4 ("try to reset kernel crashkernel when kexec-tools updates the default crashkernel value")
    
        Reported-by: Nicolas Hicher <nhicher@redhat.com>
        Suggested-by: Laszlo Ersek <lersek@redhat.com>
        Suggested-by: Philipp Rudo <prudo@redhat.com>
        Signed-off-by: Coiby Xu <coxu@redhat.com>
        Reviewed-by: Philipp Rudo <prudo@redhat.com>
    
    Signed-off-by: Coiby Xu <coxu@redhat.com>
    
        
file modified
+9 -2
file modified
+2 -0