Fix the patch to default to doing preexec_fn (duh)

This commit is contained in:
Adam Williamson 2023-07-04 20:16:27 -07:00
parent a159c366f0
commit 0395f59e60
2 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
From f8311b7b9fdb0fa374ad4f63ea346d124a2c16cc Mon Sep 17 00:00:00 2001
From 6f14a16befcdf277cfc22d889716ddad2e83abc1 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 4 Jul 2023 18:51:46 -0700
Subject: [PATCH] Handle subprocess disallowing preexec during shutdown
@ -43,7 +43,7 @@ index e49ed5a677..b2df895be6 100755
def parse_arguments(argv=None, boot_cmdline=None):
diff --git a/pyanaconda/core/util.py b/pyanaconda/core/util.py
index 930ceb4a28..4204f153b3 100644
index 930ceb4a28..62fcfe4cdc 100644
--- a/pyanaconda/core/util.py
+++ b/pyanaconda/core/util.py
@@ -76,7 +76,8 @@ def augmentEnv():
@ -52,7 +52,7 @@ index 930ceb4a28..4204f153b3 100644
def startProgram(argv, root='/', stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
- env_prune=None, env_add=None, reset_handlers=True, reset_lang=True, **kwargs):
+ env_prune=None, env_add=None, reset_handlers=True, reset_lang=True,
+ do_preexec=False, **kwargs):
+ do_preexec=True, **kwargs):
""" Start an external program and return the Popen object.
The root and reset_handlers arguments are handled by passing a
@ -148,7 +148,7 @@ index 930ceb4a28..4204f153b3 100644
def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_output=True,
- binary_output=False, filter_stderr=False):
+ binary_output=False, filter_stderr=False, do_preexec=False):
+ binary_output=False, filter_stderr=False, do_preexec=True):
""" Run an external program, log the output and return it to the caller
NOTE/WARNING: UnicodeDecodeError will be raised if the output of the of the
@ -176,7 +176,7 @@ index 930ceb4a28..4204f153b3 100644
-def execWithRedirect(command, argv, stdin=None, stdout=None,
- root='/', env_prune=None, log_output=True, binary_output=False):
+def execWithRedirect(command, argv, stdin=None, stdout=None, root='/', env_prune=None,
+ log_output=True, binary_output=False, do_preexec=False):
+ log_output=True, binary_output=False, do_preexec=True):
""" Run an external program and redirect the output to a file.
:param command: The command to run

View File

@ -1,7 +1,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 39.23
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -474,6 +474,9 @@ rm -rf \
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Tue Jul 04 2023 Adam Williamson <awilliam@redhat.com> - 39.23-3
- Fix the patch to default to doing preexec_fn (duh)
* Tue Jul 04 2023 Adam Williamson <awilliam@redhat.com> - 39.23-2
- Backport PR #4879 to fix shutdown with Python 3.12