Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/PKGBUILD.5.txt5
-rw-r--r--scripts/makepkg.sh.in5
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index fad93e5c..ffbb69bd 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -40,8 +40,9 @@ similar to `$_basekernver`.
*pkgname (array)*::
Either the name of the package or an array of names for split packages.
- Because it will be used in the package filename, this has to be unix-friendly.
- Members of the array are not allowed to start with hyphens.
+ Valid characters for members of this array are alphanumerics, and any of
+ the following characters: ```@ . _ + -`''. Additionally, names are not
+ allowed to start with hyphens.
*pkgver*::
The version of the software as released from the author (e.g., '2.7.1').
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index eeb7ede1..6990572b 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1454,6 +1454,11 @@ check_sanity() {
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
ret=1
fi
+ if [[ $i = *[^[:alnum:]+_.@-]* ]]; then
+ error "$(gettext "%s contains invalid characters: '%s'")" \
+ 'pkgname' "${pkgname//[[:alnum:]+_.@-]}"
+ ret=1
+ fi
done
if [[ ${pkgbase:0:1} = "-" ]]; then