From bd3fb71dfc359267677c639972dc839444a33f21 Mon Sep 17 00:00:00 2001 From: wangcichen Date: Tue, 11 Oct 2022 19:58:17 +0800 Subject: [PATCH] fix subprocess.check_output method for backup service configuration --- ...hod-for-backup-service-configuration.patch | 27 +++++++++++++++++++ leapp-repository.spec | 1 + 2 files changed, 28 insertions(+) create mode 100644 0030-fix-subprocess-check_output-method-for-backup-service-configuration.patch diff --git a/0030-fix-subprocess-check_output-method-for-backup-service-configuration.patch b/0030-fix-subprocess-check_output-method-for-backup-service-configuration.patch new file mode 100644 index 0000000..4e15031 --- /dev/null +++ b/0030-fix-subprocess-check_output-method-for-backup-service-configuration.patch @@ -0,0 +1,27 @@ +From 719baceb14cb08659fee61249b0be6b9f96f4b65 Mon Sep 17 00:00:00 2001 +From: wangcichen +Date: Tue, 11 Oct 2022 08:34:37 +0800 +Subject: [PATCH] + 0030-fix-subprocess-check_output-method-for-backup-service-configuration + +Signed-off-by: wangcichen +--- + .../el7toel8/actors/serviceconfigurationsynchronizer/actor.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/repos/system_upgrade/el7toel8/actors/serviceconfigurationsynchronizer/actor.py b/repos/system_upgrade/el7toel8/actors/serviceconfigurationsynchronizer/actor.py +index 7856bea..9b45d31 100644 +--- a/repos/system_upgrade/el7toel8/actors/serviceconfigurationsynchronizer/actor.py ++++ b/repos/system_upgrade/el7toel8/actors/serviceconfigurationsynchronizer/actor.py +@@ -19,7 +19,7 @@ class ServiceConfigurationSynchronizer(Actor): + def service_configuration_backup(self): + try: + self.log.info("backing up service configurations after migration.") +- services_config_raw = str(subprocess.check_output("systemctl list-unit-files | egrep 'enabled |disabled ' | awk '{print $1,$2}'")).strip() ++ services_config_raw = str(subprocess.check_output("systemctl list-unit-files | egrep 'enabled |disabled ' | awk '{print $1,$2}'", shell=True)).strip() + services_config = { + line.strip().split()[0]: line.strip().split()[1][:-1] + for line in services_config_raw.split('\n') +-- +2.22.0 + diff --git a/leapp-repository.spec b/leapp-repository.spec index a1cbe4b..b0e5898 100644 --- a/leapp-repository.spec +++ b/leapp-repository.spec @@ -55,6 +55,7 @@ Patch26: 0026-Add-checkbaota-actor.patch Patch27: 0027-upgrade-write-efi-vars-for-ecs-firmware.patch Patch28: 0028-add-disablerepo-option-to-upgrade-kernel-to-RHCK.patch Patch29: 0029-Service-configuration-remains-after-migration.patch +Patch30: 0030-fix-subprocess-check_output-method-for-backup-service-configuration.patch BuildArch: noarch BuildRequires: python-devel -- Gitee