From 48aa148bd633aa4e27b28239d98cd809e0e45f22 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Mon, 20 Mar 2023 03:14:14 -0400
Subject: [PATCH] TagsCheck: restore space exclusion to license_exception_regex

In 7d707f7f (TagsCheck: handle license exception in grouping,
2023-03-03), the regex lost the exclusion of space characters.  This
isn't immediately noticeable because we strip the strings generated by
the regex before use, but it's better to keep the regex more precise.

Suggested-by: Daniel Garcia Moreno <daniel.garcia@suse.com>
---
 rpmlint/checks/TagsCheck.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rpmlint/checks/TagsCheck.py b/rpmlint/checks/TagsCheck.py
index 923538ba..65c75c92 100644
--- a/rpmlint/checks/TagsCheck.py
+++ b/rpmlint/checks/TagsCheck.py
@@ -21,7 +21,7 @@
 leading_space_regex = re.compile(r'^\s+')
 pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
 license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
-license_exception_regex = re.compile(r'(\S+)\s(?:WITH|with)\s([^)]+)')
+license_exception_regex = re.compile(r'(\S+)\s(?:WITH|with)\s([^)\s]+)')
 invalid_version_regex = re.compile(r'([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
 # () are here for grouping purpose in the regexp
 tag_regex = re.compile(r'^((?:Auto(?:Req|Prov|ReqProv)|Build(?:Arch(?:itectures)?|Root)|(?:Build)?Conflicts|(?:Build)?(?:Pre)?Requires|Copyright|(?:CVS|SVN)Id|Dist(?:ribution|Tag|URL)|DocDir|(?:Build)?Enhances|Epoch|Exclu(?:de|sive)(?:Arch|OS)|Group|Icon|License|Name|No(?:Patch|Source)|Obsoletes|Packager|Patch\d*|Prefix(?:es)?|Provides|(?:Build)?Recommends|Release|RHNPlatform|Serial|Source\d*|(?:Build)?Suggests|Summary|(?:Build)?Supplements|(?:Bug)?URL|Vendor|Version)(?:\([^)]+\))?:)\s*\S', re.IGNORECASE)
