From dbbe76b83d2dc1cac6f44c6d46d2f73ce14f01b5 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 12 May 2015 23:51:07 +1000 Subject: makepkg: put further restrictions on pkgbase pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/libmakepkg') diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in index abb40e0c..0d4361cc 100644 --- a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in @@ -34,4 +34,13 @@ lint_pkgbase() { error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname" return 1 fi + if [[ ${pkgbase:0:1} = "." ]]; then + error "$(gettext "%s is not allowed to start with a dot.")" "pkgbase" + ret=1 + fi + if [[ $pkgbase = *[^[:alnum:]+_.@-]* ]]; then + error "$(gettext "%s contains invalid characters: '%s'")" \ + 'pkgbase' "${i//[[:alnum:]+_.@-]}" + ret=1 + fi } -- cgit v1.2.3-24-g4f1b