diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2015-09-16 13:05:20 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2015-09-16 13:05:20 +0200 |
commit | bfb27c87ae2bc2cc607578d26da31a04d51e9e9c (patch) | |
tree | 12c9a3eaaa667fcacf683dea718cd0f4b7ed52c4 /main | |
parent | bdba0a68e347116484e777c57b9970635bc5b295 (diff) | |
download | aports-bfb27c87ae2bc2cc607578d26da31a04d51e9e9c.tar.bz2 aports-bfb27c87ae2bc2cc607578d26da31a04d51e9e9c.tar.xz |
main/abuild: try to validate maintainer address
Diffstat (limited to 'main')
-rw-r--r-- | main/abuild/0001-abuild-try-to-validate-maintainer-address.patch | 60 | ||||
-rw-r--r-- | main/abuild/APKBUILD | 12 |
2 files changed, 68 insertions, 4 deletions
diff --git a/main/abuild/0001-abuild-try-to-validate-maintainer-address.patch b/main/abuild/0001-abuild-try-to-validate-maintainer-address.patch new file mode 100644 index 0000000000..9198661356 --- /dev/null +++ b/main/abuild/0001-abuild-try-to-validate-maintainer-address.patch @@ -0,0 +1,60 @@ +From aa32ec14e67bc003697625a1a4ca7cad69480c20 Mon Sep 17 00:00:00 2001 +From: Carlo Landmeter <clandmeter@gmail.com> +Date: Wed, 16 Sep 2015 11:00:10 +0200 +Subject: [PATCH] abuild: try to validate maintainer address + +abuild will error when the maintainer is set but is not a RFC822 address +--- + abuild.in | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/abuild.in b/abuild.in +index f2b322d..557775e 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -210,7 +210,7 @@ default_sanitycheck() { + [ -n "$pkggroup" ] && spell_error pkggroup pkggroups + [ -n "$subpackage" ] && spell_error subpackage subpackages + +- grep '^# Maintainer:' $APKBUILD >/dev/null || warning "No maintainer" ++ get_maintainer || die "Provide a valid RFC822 maintainer address" + + makedepends_has 'g++' && warning "g++ should not be in makedepends" + return 0 +@@ -721,9 +721,25 @@ git_last_commit() { + git log --format=oneline -n 1 "$startdir" | awk '{print $1}' + } + ++# this will try to check for a valid rfc822 address ++check_rfc822() { ++ local address="$1" ++ case "$address" in ++ *[A-Za-z0-9]*\ \<*@*.*\>) ;; ++ *) return 1 ;; ++ esac ++} ++ + get_maintainer() { + if [ -z "$maintainer" ]; then + maintainer=$(awk -F': ' '/\# *Maintainer/ {print $2}' "$APKBUILD") ++ # remove surrounding whitespace ++ maintainer=$(echo "$maintainer" | xargs) ++ if ! [ -z "$maintainer" ]; then ++ check_rfc822 "$maintainer" || return 1 ++ else ++ warning "No maintainer" ++ fi + fi + } + +@@ -789,7 +805,6 @@ EOF + fi + echo "commit = $last_commit" >> "$pkginfo" + +- get_maintainer + if [ -n "$maintainer" ]; then + echo "maintainer = $maintainer" >> "$pkginfo" + fi +-- +2.5.2 + diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD index 2a57fedb97..bf311109a2 100644 --- a/main/abuild/APKBUILD +++ b/main/abuild/APKBUILD @@ -2,7 +2,7 @@ pkgname=abuild pkgver=2.24.0 _ver=${pkgver%_git*} -pkgrel=3 +pkgrel=4 pkgdesc="Script to build Alpine Packages" url="http://git.alpinelinux.org/cgit/abuild/" arch="all" @@ -21,6 +21,7 @@ options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-abuild-fix-fetch-lock-file-on-nfs.patch + 0001-abuild-try-to-validate-maintainer-address.patch " _builddir="$srcdir/$pkgname-$_ver" @@ -66,8 +67,11 @@ gems() { } md5sums="7821eea872e86a768d881fecce95e934 abuild-2.24.0.tar.xz -3acc92254dbab1799f724394e1d49264 0001-abuild-fix-fetch-lock-file-on-nfs.patch" +3acc92254dbab1799f724394e1d49264 0001-abuild-fix-fetch-lock-file-on-nfs.patch +8b647dd06b617d70250bbb3680aa9f82 0001-abuild-try-to-validate-maintainer-address.patch" sha256sums="0e0c0c7579c3b8d6668fad9d93a42f3ea18da88679e1a12a178f2676c79e94d6 abuild-2.24.0.tar.xz -3f6d6f315c0531f900d7465abaf5f4bd0bbd59d884b2af363bc0105b0f2b3a95 0001-abuild-fix-fetch-lock-file-on-nfs.patch" +3f6d6f315c0531f900d7465abaf5f4bd0bbd59d884b2af363bc0105b0f2b3a95 0001-abuild-fix-fetch-lock-file-on-nfs.patch +fcbdae9a224ed4705614e6c5f220e304e405e92d0a33c5dacca0d82fcf386aec 0001-abuild-try-to-validate-maintainer-address.patch" sha512sums="360d0164afed9c61576618d113d738327151c60f1bc1e6246fcf74f97db087ca2effb11a4ae045f1f288063d5311c6dddbe7721b3cbe65d11472b3d2b0f03ef6 abuild-2.24.0.tar.xz -620fbf17f48f2732b7e7fd10f4c02bedae6d0c5c7988cefc8e1f2f233efd49514d08b72a367203c977b11272397e713e7551029f85b0dfc79c55587551600ced 0001-abuild-fix-fetch-lock-file-on-nfs.patch" +620fbf17f48f2732b7e7fd10f4c02bedae6d0c5c7988cefc8e1f2f233efd49514d08b72a367203c977b11272397e713e7551029f85b0dfc79c55587551600ced 0001-abuild-fix-fetch-lock-file-on-nfs.patch +cf14d49d9ac2d4dadca9687c96ae2fc9ef43c7f86e31706c942cefa508b9c075506194e87b0189970e59261072e8cd523e0ced6d4d932936adb1c2c747b14663 0001-abuild-try-to-validate-maintainer-address.patch" |