aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/pam-krb5/APKBUILD25
-rw-r--r--testing/pam-krb5/fix-tests_basic-t.patch48
2 files changed, 62 insertions, 11 deletions
diff --git a/testing/pam-krb5/APKBUILD b/testing/pam-krb5/APKBUILD
index 703b4e84c4..14c049a7bf 100644
--- a/testing/pam-krb5/APKBUILD
+++ b/testing/pam-krb5/APKBUILD
@@ -4,29 +4,32 @@ pkgname=pam-krb5
pkgver=4.8
pkgrel=0
pkgdesc="PAM module providing Kerberos v5 support"
-url="http://www.eyrie.org/~eagle/software/pam-krb5"
+url="https://www.eyrie.org/~eagle/software/pam-krb5/"
arch="all"
-license="custom"
-depends=""
+license="BSD-3-Clause OR GPL-1.0-or-later"
makedepends="krb5-dev linux-pam-dev"
-install=""
+checkdepends="perl" # To run all tests a running KDC is required
subpackages="$pkgname-doc"
-source="http://archives.eyrie.org/software/kerberos/$pkgname-$pkgver.tar.gz"
-builddir="$srcdir/${pkgname}-${pkgver}"
+source="https://archives.eyrie.org/software/kerberos/pam-krb5-$pkgver.tar.gz
+ fix-tests_basic-t.patch
+ "
build() {
- cd "$builddir"
./configure \
--prefix=/usr \
--enable-reduced-depends \
- --libdir=/usr/lib || return 1
- make || return 1
+ --libdir=/usr/lib
+ make
+}
+
+check() {
+ make check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-sha512sums="a28dc0e2dd8b44ae4beac6545a8b47c8a937fa793320412a46e7c776dc6034ccae2d3603416fde944f8ae9fda571b621fbe4d2ae022cad3d5c715cc70fb17ee0 pam-krb5-4.8.tar.gz"
+sha512sums="a28dc0e2dd8b44ae4beac6545a8b47c8a937fa793320412a46e7c776dc6034ccae2d3603416fde944f8ae9fda571b621fbe4d2ae022cad3d5c715cc70fb17ee0 pam-krb5-4.8.tar.gz
+045560d2676f2742cf0a4fca4761363fa97da9408157aa82d386848c684f117324260c50de3d9ecc58fe8eabdd3f9f9dd5711e9ae184085ce5773ac7612ac268 fix-tests_basic-t.patch"
diff --git a/testing/pam-krb5/fix-tests_basic-t.patch b/testing/pam-krb5/fix-tests_basic-t.patch
new file mode 100644
index 0000000000..d4b84769ef
--- /dev/null
+++ b/testing/pam-krb5/fix-tests_basic-t.patch
@@ -0,0 +1,48 @@
+Fix pulled from upstream - https://github.com/rra/pam-krb5/commit/265870985e578a78a4112bd3f6c23c171b1097b8
+
+--- a/tests/data/generate-krb5-conf
++++ b/tests/data/generate-krb5-conf
+@@ -67,8 +67,17 @@
+ { if (skip == 0) print }
+ ' "$p" > tmp/krb5.conf.tmp
+ if [ -n "$realm" ] ; then
+- sed -e "s/\\(default_realm.*=\\) .*/\\1 $realm/" \
+- tmp/krb5.conf.tmp > tmp/krb5.conf
++ pattern='^[ ]*default_realm.*='
++ if grep "$pattern" tmp/krb5.conf.tmp >/dev/null 2>/dev/null; then
++ sed -e "s/\\(default_realm.*=\\) .*/\\1 $realm/" \
++ tmp/krb5.conf.tmp >tmp/krb5.conf
++ else
++ (
++ cat tmp/krb5.conf.tmp
++ echo "[libdefaults]"
++ echo " default_realm = $realm"
++ ) >tmp/krb5.conf
++ fi
+ rm tmp/krb5.conf.tmp
+ else
+ mv tmp/krb5.conf.tmp tmp/krb5.conf
+--- a/tests/module/basic-t.c
++++ b/tests/module/basic-t.c
+@@ -16,7 +16,7 @@
+
+ #include <tests/fakepam/script.h>
+ #include <tests/tap/basic.h>
+-
++#include <tests/tap/kerberos.h>
+
+ int
+ main(void)
+@@ -25,6 +25,12 @@
+
+ plan_lazy();
+
++ /*
++ * Generate a testing krb5.conf file with a nonexistent default realm so
++ * that this test will run on any system.
++ */
++ kerberos_generate_conf("bogus.example.com");
++
+ /* Attempt login as the root user to test ignore_root. */
+ memset(&config, 0, sizeof(config));
+ config.user = "root";