From fd70c1c7bb0cb0681ab8a46d5f0494e0f9d992c6 Mon Sep 17 00:00:00 2001 From: Jonas Witschel Date: Wed, 2 Oct 2019 16:40:56 +0200 Subject: libmakepkg: check if PACKAGER has the expected format for WKD lookup pacman should be able to extract an email address from PACKAGER for WKD lookup, so issue a warning if it is not of the form "Example Name ". Neither the name nor the email address must contain additional angle brackets. Signed-off-by: Jonas Witschel Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_config/variable.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/libmakepkg') diff --git a/scripts/libmakepkg/lint_config/variable.sh.in b/scripts/libmakepkg/lint_config/variable.sh.in index 55ed6d6d..b0b731dd 100644 --- a/scripts/libmakepkg/lint_config/variable.sh.in +++ b/scripts/libmakepkg/lint_config/variable.sh.in @@ -60,5 +60,11 @@ lint_config_variables() { fi done + # pacman should be able to extract an email address from PACKAGER for WKD key lookup + local match='^([^<>]+ )?<[^<>]*>$' + if ! [[ $PACKAGER =~ $match ]]; then + warning "$(gettext "PACKAGER should have the format 'Example Name '")" + fi + return $ret } -- cgit v1.2.3-24-g4f1b