From ced0546d71f6086abcc95f644223f09d81d9ac02 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 24 Jun 2024 00:14:23 -0700 Subject: [PATCH] Change patch directive to maximum compatible form The `%patchN` method of performing patches in `%prep` has long been deprecated and should no longer be used. The form of `%patch -PN` is preferred for maximum compatibility between all current and upcoming EL releases. --- pkg/directives/spec_change.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/directives/spec_change.go b/pkg/directives/spec_change.go index 80e0ed6..82c5271 100644 --- a/pkg/directives/spec_change.go +++ b/pkg/directives/spec_change.go @@ -107,7 +107,7 @@ func sourcePatchOperationAfterLoop(req *sourcePatchOperationAfterLoopRequest) (b *req.newLines = append(*req.newLines, fmt.Sprintf("%s:%s%s", field, spaces, file.Name)) if req.expectedField == "Patch" && file.AddToPrep { - val := fmt.Sprintf("%%patch%d", fieldNum) + val := fmt.Sprintf("%%patch -P%d", fieldNum) if file.NPath > 0 { val = fmt.Sprintf("%s -p%d", val, file.NPath) }