From 34ef9de98f901cee5f23e3ddecac8073ba9c887e Mon Sep 17 00:00:00 2001
From: Sertonix <sertonix@posteo.net>
Date: Tue, 8 Oct 2024 15:05:15 +0200
Subject: [PATCH] Prefer maintainer field instead of Maintainer comment

Fixes #10147
---
 abuild.conf.in                                |  2 +-
 abuild.in                                     |  8 ++--
 apkbuild-cpan.in                              | 16 +++++--
 apkbuild-pypi.in                              | 15 ++++--
 newapkbuild.in                                |  2 +-
 sample.APKBUILD                               |  2 +-
 tests/abuild_test                             | 48 +++++++++----------
 tests/abump_test                              |  4 +-
 tests/testrepo/dbgpkg/APKBUILD                |  2 +-
 tests/testrepo/invalid-filename/APKBUILD      |  2 +-
 tests/testrepo/large-doc-subpkg/APKBUILD      |  2 +-
 tests/testrepo/lib64test/APKBUILD             |  2 +-
 tests/testrepo/pkg path with spaces/APKBUILD  |  2 +-
 tests/testrepo/pkg1/APKBUILD                  |  2 +-
 tests/testrepo/py3 foo and bar/APKBUILD       |  2 +-
 .../py3-conflicting-python-versions/APKBUILD  |  2 +-
 tests/testrepo/setcap/APKBUILD                |  2 +-
 tests/testrepo/subpackage-arch/APKBUILD       |  2 +-
 tests/testrepo/test-licenses/APKBUILD         |  2 +-
 tests/testrepo/test-pkgname/APKBUILD          |  2 +-
 20 files changed, 65 insertions(+), 56 deletions(-)

diff --git a/abuild.conf.in b/abuild.conf.in
index 5db5a6ca..9d03acf5 100644
--- a/abuild.conf.in
+++ b/abuild.conf.in
@@ -15,7 +15,7 @@
 #REPODEST=$HOME/packages/
 
 # PACKAGER and MAINTAINER are used by newapkbuild when creating new aports for
-# the APKBUILD's "Contributor:" and "Maintainer:" comments, respectively.
+# the APKBUILD's "Contributor:" comment and "maintainer" field, respectively.
 #PACKAGER="Your Name <your@email.address>"
 #MAINTAINER="$PACKAGER"
 
diff --git a/abuild.in b/abuild.in
index cbd90de0..3dabe658 100644
--- a/abuild.in
+++ b/abuild.in
@@ -306,8 +306,8 @@ default_validate() {
 	[ -n "$conflicts" ] && die "APKBUILD contains \$conflicts. Explicit conflicts should be added as '!pkgname' to depends"
 
 	check_maintainer || die "Provide a valid RFC822 maintainer address"
-	[ $(grep '^# *Maintainer:' "$APKBUILD" | wc -l) -gt 1 ] \
-		&& die "More than one maintainer"
+	grep -q '^# *Maintainer:' "$APKBUILD" \
+		&& warning "Setting the maintainer with a comment is deprecated. Use maintainer=\"$maintainer\" instead"
 	check_license || warning "Please use valid SPDX license identifiers found at: https://spdx.org/licenses"
 
 	check_depends_dev || warning "depends_dev found but no development subpackage found"
@@ -990,9 +990,7 @@ git_last_commit_epoch() {
 }
 
 get_maintainer() {
-	if [ -z "$maintainer" ]; then
-		maintainer=$(awk -F': ' '/# *Maintainer/ {print $2}' "$APKBUILD")
-	fi
+	: "${maintainer:=$(awk -F': ' '/# *Maintainer/ {print $2}' "$APKBUILD")}"
 }
 
 check_maintainer() {
diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in
index 73d091e3..33f17a88 100755
--- a/apkbuild-cpan.in
+++ b/apkbuild-cpan.in
@@ -39,8 +39,9 @@ my $package_mappings = {
 };
 our $packager = "";
 my $template = <<'EOF';
-# Automatically generated by apkbuild-cpan, template 4
+# Automatically generated by apkbuild-cpan, template 5
 [% authors %]
+maintainer=[% maintainer %]
 pkgname=[% pkgname %]
 pkgver=[% pkgver %]
 pkgrel=[% pkgrel %]
@@ -95,11 +96,12 @@ sub read_assignments_from_file {
     my %hash  = ( %sline, %mline );
 
     return \%hash if $filename ne 'APKBUILD';
-    my $authors = join( "\n",
-        $text =~ /^# Contributor: .*$/mg,
-        $text =~ /^# Maintainer: .*$/mg );
+    my $authors = $text =~ /^# Contributor: .*$/mg;
     $hash{'authors'} = $authors if length($authors) > 1;
 
+    my $maintainer = $text =~ /^# Maintainer: .*$/mg;
+    $hash{'maintainer'} = $maintainer if length($maintainer) > 1;
+
     my $options = $text =~ m/^options=\"(.*)\"(.*)$/mg;
     $hash{'options'} = "$1" if length($options) >= 1;
     $hash{'options_comment'} = "$2" if length($options) >= 1;
@@ -153,6 +155,7 @@ sub write_apkbuild {
     my ( $distdata, $apkbuild, $moddata ) = @_;
 
     my $authors  = undef;
+    my $maintainer  = $packager;
     my $replaces = undef;
     my $provides = undef;
     my $pkgrel   = 0;
@@ -161,6 +164,8 @@ sub write_apkbuild {
     my $orig_source = undef;
     if ( defined $apkbuild ) {
         $authors  = $apkbuild->{authors};
+        $maintainer = $apkbuild->{maintainer};
+        $pkgrel   = $apkbuild->{pkgrel};
         $provides = $apkbuild->{provides};
         $replaces = $apkbuild->{replaces};
         $pkgrel   = $apkbuild->{pkgrel};
@@ -190,8 +195,9 @@ sub write_apkbuild {
     my %repl = (
         authors => (
             $authors
-              or "# Contributor: $packager\n# Maintainer: $packager"
+              or "# Contributor: $packager"
         ),
+        maintainer => $maintainer,
         pkgname  => map_cpan_to_apk( $moddata->{distribution} ),
         pkgreal  => $pkgreal,
         pkgver   => $pkgver,
diff --git a/apkbuild-pypi.in b/apkbuild-pypi.in
index 88ee8041..333479bb 100755
--- a/apkbuild-pypi.in
+++ b/apkbuild-pypi.in
@@ -16,8 +16,9 @@ my %pkgmap = ();
 my %licenses = ();
 
 my $template = <<'EOF';
-# Automatically generated by apkbuild-pypi, template 4
+# Automatically generated by apkbuild-pypi, template 5
 [% authors %]
+maintainer=[% maintainer %]
 pkgname=[% pkgname %]
 pkgver=[% pkgver %]
 pkgrel=[% pkgrel %]
@@ -76,11 +77,12 @@ sub read_assignments_from_file {
     my %hash = ( %sline, %mline );
 
     return \%hash if $filename ne 'APKBUILD';
-    my $authors = join( "\n",
-        $text =~ /^# Contributor: .*$/mg,
-        $text =~ /^# Maintainer: .*$/mg );
+    my $authors = $text =~ /^# Contributor: .*$/mg;
     $hash{'authors'} = $authors if length($authors) > 1;
 
+    my $maintainer = $text =~ /^# Maintainer: .*$/mg;
+    $hash{'maintainer'} = $maintainer if length($maintainer) > 1;
+
     if ($text =~ m/^provides=\"(.*)\"(.*)$/m) {
         $hash{'provides'} = $1;
         $hash{'provides_comment'} = $2;
@@ -181,6 +183,7 @@ sub write_apkbuild {
     my $replaces = undef;
     my $provides = undef;
     my $authors = undef;
+    my $maintainer = $packager;
     my $license = undef;
     my $url = undef;
     my $pkgname = undef;
@@ -199,6 +202,7 @@ sub write_apkbuild {
 
     if (defined $apkbuild) {
         $authors = $apkbuild->{authors};
+        $maintainer = $apkbuild->{maintainer};
         $provides = $apkbuild->{provides};
         $replaces = $apkbuild->{replaces};
         $license = $apkbuild->{license};
@@ -220,7 +224,8 @@ sub write_apkbuild {
     my $srcurl = get_source($distdata);
 
     my %repl = (
-	authors  => ($authors or "# Contributor: $packager\n# Maintainer: $packager"),
+	authors  => ($authors or "# Contributor: $packager"),
+        maintainer => $mantainer,
         pkgname  => ($pkgname or map_pypi_to_apk($pkgreal)),
         pkgreal  => $pkgreal,
         pkgver   => $distdata->{info}{version},
diff --git a/newapkbuild.in b/newapkbuild.in
index 855d522b..8b95106f 100644
--- a/newapkbuild.in
+++ b/newapkbuild.in
@@ -304,7 +304,7 @@ newaport() {
 	# Generate header with standard variables
 	cat >APKBUILD<<__EOF__
 # Contributor:${PACKAGER:+" "}${PACKAGER}
-# Maintainer:${MAINTAINER:+" "}${MAINTAINER}
+maintainer="$MAINTAINER"
 pkgname=$pkgname
 pkgver=$pv
 pkgrel=0
diff --git a/sample.APKBUILD b/sample.APKBUILD
index 876e1e03..de6485d9 100644
--- a/sample.APKBUILD
+++ b/sample.APKBUILD
@@ -4,7 +4,7 @@
 # then please put 'unknown'.
 
 # Contributor: Your Name <youremail@domain.com>
-# Maintainer: Your Name <youremail@domain.com>
+maintainer="Your Name <youremail@domain.com>"
 pkgname=NAME
 pkgver=VERSION
 pkgrel=0
diff --git a/tests/abuild_test b/tests/abuild_test
index af99a28d..775cb57d 100755
--- a/tests/abuild_test
+++ b/tests/abuild_test
@@ -96,7 +96,7 @@ abuild_build_fail_body() {
 	init_keys
 	mkdir buildfail
 	cat >buildfail/APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="buildfail"
 		pkgver="1.0"
 		pkgrel=0
@@ -127,7 +127,7 @@ abuild_invalid_filename_body() {
 	mkdir invalid-filename
 	cd invalid-filename
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="invalid-filename"
 		pkgver="1.0"
 		pkgrel=0
@@ -159,7 +159,7 @@ abuild_usr_lib64_body() {
 	mkdir lib64test
 	cd lib64test
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="lib64test"
 		pkgver="1.0"
 		pkgrel=0
@@ -297,7 +297,7 @@ abuild_subpkg_dep_leak_body() {
 	mkdir -p testrepo/subpkg-dep-leak
 	cd testrepo/subpkg-dep-leak
 	cat > APKBUILD <<-EOF
-		# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+		maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 		pkgname="subpkg-dep-leak"
 		pkgver=1.0
 		pkgrel=0
@@ -367,7 +367,7 @@ abuild_reject_init_with_improper_shebang_body() {
 	mkdir invalid-initd
 	cd invalid-initd
 	cat >APKBUILD<<-EOF
-		# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+		maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 		pkgname="invalid-initd"
 		pkgver="1.0"
 		pkgrel=0
@@ -536,7 +536,7 @@ abuild_git_ceiling_body() {
 	mkdir git-pkg
 	cd git-pkg
 	cat >APKBUILD<<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="git-pkg"
 		pkgver="1.0"
 		pkgrel=0
@@ -566,7 +566,7 @@ abuild_package_size_body() {
 
 	cd test-size
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 
 		# test package
 		pkgname="test-size"
@@ -676,7 +676,7 @@ abuild_keepdirs_body() {
 
 	cd test-amove
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 
 		# test package
 		pkgname="test-keepdirs"
@@ -702,7 +702,7 @@ abuild_amove_body() {
 
 	cd test-amove
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 
 		# test package
 		pkgname="test-amove"
@@ -798,7 +798,7 @@ abuild_doc_body() {
 
 	cd foo
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 		# test package
 		pkgname="foo"
 		pkgver="1.0"
@@ -836,7 +836,7 @@ abuild_dev_body() {
 
 	cd foo
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 		# test package
 		pkgname="foo"
 		pkgver="1.0"
@@ -875,7 +875,7 @@ abuild_devhelp_warn_body() {
 
 	cd foo
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 		pkgname="foo"
 		pkgver="1.0"
 		pkgrel=0
@@ -898,7 +898,7 @@ abuild_devhelp_body() {
 
 	cd foo
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test User 123 <123@example.com>
+		maintainer="Test User 123 <123@example.com>"
 		pkgname="foo"
 		pkgver="1.0"
 		pkgrel=0
@@ -926,14 +926,14 @@ abuild_check_maintainer_body() {
 			"Trailing Space <n@example.com> " \
 			"Foo<u@example.com>" \
 			'"Quotes <u@example.com>"'; do
-		printf "# Maintainer: %s\n%s\n" "$m" "pkgname=foo" > APKBUILD
+		printf "maintainer='%s'\npkgname=foo\n" "${m//"'"/"'\\''"}" > APKBUILD
 		atf_check -s not-exit:0 \
 			-e match:"ERROR:" \
 			abuild check_maintainer
 	done
 
 	for m in "Test User <123@example.com>" "Foo O'Brian <n@example.com>" "Łukasz Something <s@example.com>"; do
-		printf "# Maintainer: %s\n%s\n" "$m" "pkgname=foo" > APKBUILD
+		printf "maintainer='%s'\npkgname=foo\n" "${m//"'"/"'\\''"}" > APKBUILD
 		atf_check abuild check_maintainer
 	done
 }
@@ -945,7 +945,7 @@ abuild_cleanoldpkg_body() {
 	for arch in aarch64 x86_64; do
 		for v in 0.9 1.0 1.1; do
 			cat > APKBUILD <<-EOF
-				# Maintainer: Test User 123 <123@example.com>
+				maintainer="Test User 123 <123@example.com>"
 				# test package
 				pkgname="foo"
 				pkgver="$v"
@@ -1008,7 +1008,7 @@ abuild_pyc_warn_body() {
 	mkdir -p pycachetest
 	cd pycachetest
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="pycachetest"
 		pkgver="1.0"
 		pkgrel=0
@@ -1033,7 +1033,7 @@ abuild_pyc_body() {
 	mkdir -p foo
 	cd foo
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="foo"
 		pkgver="1.0"
 		pkgrel=0
@@ -1082,7 +1082,7 @@ abuild_command_provides_body() {
 	mkdir testprovides
 	cd testprovides
 	cat >APKBUILD<<-EOF
-		# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+		maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 		pkgname=testprovides
 		pkgver=1.0
 		pkgrel=0
@@ -1117,7 +1117,7 @@ abuild_gocache_dir_body() {
 	mkdir gocache-dir
 	cd gocache-dir
 	cat >APKBUILD<<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="gocache-dir"
 		pkgver="1.0"
 		pkgrel=0
@@ -1148,7 +1148,7 @@ abuild_cargo_home_dir_body() {
 	mkdir cargo-home-dir
 	cd cargo-home-dir
 	cat >APKBUILD<<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="cargo-home-dir"
 		pkgver="1.0"
 		pkgrel=0
@@ -1179,7 +1179,7 @@ abuild_fish_comp_split_body() {
 	mkdir fish-split-dir
 	cd fish-split-dir
 	cat >APKBUILD<<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="fish-split-dir"
 		pkgver="1.0"
 		pkgrel=0
@@ -1236,7 +1236,7 @@ abuild_deps_body() {
 	mkdir testdeps
 	cd testdeps
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="testdeps"
 		pkgver="1.0"
 		pkgrel=0
@@ -1296,7 +1296,7 @@ abuild_usr_merge_body() {
 	mkdir usrmergetest
 	cd usrmergetest
 	cat >APKBUILD <<-EOF
-		# Maintainer: Joe User <juser@example.com>
+		maintainer="Joe User <juser@example.com>"
 		pkgname="usrmergetest"
 		pkgver="1.0"
 		pkgrel=0
diff --git a/tests/abump_test b/tests/abump_test
index eadf1735..d59dda00 100755
--- a/tests/abump_test
+++ b/tests/abump_test
@@ -40,7 +40,7 @@ abump_simple_bump_body() {
 	cd main/foo
 	echo "first" > foo-1.0.txt
 	cat > APKBUILD <<-EOF
-		# Maintainer: Test user <user@example.com>
+		maintainer="Test user <user@example.com>"
 		pkgname="foo"
 		pkgver=1.0
 		pkgrel=0
@@ -84,7 +84,7 @@ abump_isolates_apkbuild_body() {
 	cd main/bar
 	echo "first" > bar-1.0.txt
 	cat > APKBUILD <<-"EOF"
-		# Maintainer: Test user <user@example.com>
+		maintainer="Test user <user@example.com>"
 		pkgname="bar"
 		pkgver=1.0
 		pkgrel=0
diff --git a/tests/testrepo/dbgpkg/APKBUILD b/tests/testrepo/dbgpkg/APKBUILD
index e090c35f..9782fb7e 100644
--- a/tests/testrepo/dbgpkg/APKBUILD
+++ b/tests/testrepo/dbgpkg/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="dbgpkg"
diff --git a/tests/testrepo/invalid-filename/APKBUILD b/tests/testrepo/invalid-filename/APKBUILD
index 97931884..ecf368da 100644
--- a/tests/testrepo/invalid-filename/APKBUILD
+++ b/tests/testrepo/invalid-filename/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="invalid-filename"
diff --git a/tests/testrepo/large-doc-subpkg/APKBUILD b/tests/testrepo/large-doc-subpkg/APKBUILD
index 631d3757..623c4b2f 100644
--- a/tests/testrepo/large-doc-subpkg/APKBUILD
+++ b/tests/testrepo/large-doc-subpkg/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="large-doc-subpkg"
diff --git a/tests/testrepo/lib64test/APKBUILD b/tests/testrepo/lib64test/APKBUILD
index 7da888f4..0f3c1d7a 100644
--- a/tests/testrepo/lib64test/APKBUILD
+++ b/tests/testrepo/lib64test/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="lib64test"
diff --git a/tests/testrepo/pkg path with spaces/APKBUILD b/tests/testrepo/pkg path with spaces/APKBUILD
index 9a1687ac..70afebc6 100644
--- a/tests/testrepo/pkg path with spaces/APKBUILD	
+++ b/tests/testrepo/pkg path with spaces/APKBUILD	
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="pkg-path-with-spaces"
diff --git a/tests/testrepo/pkg1/APKBUILD b/tests/testrepo/pkg1/APKBUILD
index a87d7d02..60b9efdf 100644
--- a/tests/testrepo/pkg1/APKBUILD
+++ b/tests/testrepo/pkg1/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname="pkg1"
diff --git a/tests/testrepo/py3 foo and bar/APKBUILD b/tests/testrepo/py3 foo and bar/APKBUILD
index 28837a73..1bb38024 100644
--- a/tests/testrepo/py3 foo and bar/APKBUILD	
+++ b/tests/testrepo/py3 foo and bar/APKBUILD	
@@ -1,4 +1,4 @@
-# Maintainer: Test user <user@example.com>
+maintainer="Test user <user@example.com>"
 pkgname=py3-foo-and-bar
 pkgver=1.0.0
 pkgrel=0
diff --git a/tests/testrepo/py3-conflicting-python-versions/APKBUILD b/tests/testrepo/py3-conflicting-python-versions/APKBUILD
index 12190b09..d4f72368 100644
--- a/tests/testrepo/py3-conflicting-python-versions/APKBUILD
+++ b/tests/testrepo/py3-conflicting-python-versions/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Test user <user@example.com>
+maintainer="Test user <user@example.com>"
 pkgname=py3-conflicting-python-versions
 pkgver=1.0.0
 pkgrel=0
diff --git a/tests/testrepo/setcap/APKBUILD b/tests/testrepo/setcap/APKBUILD
index 6d5eb882..d6f9d4b8 100644
--- a/tests/testrepo/setcap/APKBUILD
+++ b/tests/testrepo/setcap/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname=setcap
diff --git a/tests/testrepo/subpackage-arch/APKBUILD b/tests/testrepo/subpackage-arch/APKBUILD
index a4db324d..ace59455 100644
--- a/tests/testrepo/subpackage-arch/APKBUILD
+++ b/tests/testrepo/subpackage-arch/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname=${TESTNAME-test-pkgname}
diff --git a/tests/testrepo/test-licenses/APKBUILD b/tests/testrepo/test-licenses/APKBUILD
index 0d954b7a..947c46ef 100644
--- a/tests/testrepo/test-licenses/APKBUILD
+++ b/tests/testrepo/test-licenses/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
+maintainer="Olliver Schinagl <oliver@schinagl.nl>"
 
 # test package
 pkgname="${TESTNAME-test-licenses}"
diff --git a/tests/testrepo/test-pkgname/APKBUILD b/tests/testrepo/test-pkgname/APKBUILD
index b75ca3e4..c1eee33e 100644
--- a/tests/testrepo/test-pkgname/APKBUILD
+++ b/tests/testrepo/test-pkgname/APKBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+maintainer="Natanael Copa <ncopa@alpinelinux.org>"
 
 # test package
 pkgname=${TESTNAME-test-pkgname}
-- 
GitLab