Blame SOURCES/0016-o-kubevirt-Replace-PCRE-anchored-with.patch

b85204
From 628ee708464ee3d266609167c48e92f883849e4d Mon Sep 17 00:00:00 2001
b85204
From: "Richard W.M. Jones" <rjones@redhat.com>
b85204
Date: Mon, 30 Jan 2023 09:01:38 +0000
b85204
Subject: [PATCH] -o kubevirt: Replace PCRE ~anchored with ^...$
b85204
b85204
Because this regexp was not anchored at both ends it would still
b85204
report a match for incorrect names.
b85204
b85204
Fixes: commit 8a9c914544a49bed13eb5baf42290f835bdee7b5
b85204
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2162332
b85204
Reported-by: Ming Xie
b85204
b85204
Cherry picked from commit 050a0ba714ddf2a5d81515c886032016aa75342c.
b85204
I did not include the update to the common module since picking that
b85204
would pull in the large changes made to the virtio driver code.
b85204
---
b85204
 output/output_kubevirt.ml | 4 ++--
b85204
 1 file changed, 2 insertions(+), 2 deletions(-)
b85204
b85204
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
b85204
index ee89fdbf..fdf0f279 100644
b85204
--- a/output/output_kubevirt.ml
b85204
+++ b/output/output_kubevirt.ml
b85204
@@ -31,8 +31,8 @@ open Create_kubevirt_yaml
b85204
 
b85204
 (* Valid output names for Kubevirt (RHBZ#2162332). *)
b85204
 let rfc1123_re =
b85204
-  PCRE.compile ~anchored:true
b85204
-    "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
b85204
+  PCRE.compile
b85204
+    "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
b85204
 
b85204
 module Kubevirt = struct
b85204
   type poptions = bool * output_allocation * string * string * string