summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/cracklib/APKBUILD19
-rw-r--r--user/cracklib/nls.patch48
2 files changed, 62 insertions, 5 deletions
diff --git a/user/cracklib/APKBUILD b/user/cracklib/APKBUILD
index ebc721a79..708c0e427 100644
--- a/user/cracklib/APKBUILD
+++ b/user/cracklib/APKBUILD
@@ -1,24 +1,31 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=cracklib
-pkgver=2.9.7
+pkgver=2.9.8
pkgrel=0
pkgdesc="Library for checking passwords against dictionary words"
url=" "
arch="all"
license="LGPL-2.0+"
depends=""
-makedepends=""
+makedepends="autoconf automake"
subpackages="$pkgname-dev $pkgname-lang"
triggers="$pkgname.trigger=/usr/share/dict"
source="https://github.com/cracklib/cracklib/releases/download/v$pkgver/cracklib-$pkgver.tar.bz2
$pkgname.trigger
+ nls.patch
"
# secfixes:
# 2.9.7-r0:
# - CVE-2016-6318
+prepare() {
+ default_prepare
+ # autogen.sh is not included in the dist tarball, but only calls:
+ autoreconf -f -i
+}
+
build() {
./configure \
--build=$CBUILD \
@@ -26,7 +33,8 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --localstatedir=/var
+ --localstatedir=/var \
+ --without-python
make
}
@@ -39,5 +47,6 @@ package() {
install -D -m644 dicts/cracklib-small "$pkgdir"/usr/share/dict/cracklib-small
}
-sha512sums="f6bf65ac092ba46ff78ddbc115692260fb76dc71219cd679d2ea935ebfb9e709fbb30259a7406743ed00dbdc415335b3ac9d9fcba1d204ea36d5eb96bf1333a2 cracklib-2.9.7.tar.bz2
-deef4710a3bf78348adfe699ff995acc21a7671ab03c4dd28da7f38f4a83008af4c97c9c1d4e1e98a47c0148c84146b36477f41f98fb0ee028cc0fadebb85ab9 cracklib.trigger"
+sha512sums="bba1b82067156f44095b282c70c06a05e58572cde7ad2430dd24c4b42ae98be86708ea86ba8b7104aa5887e16ac90d7cf3ae613b84ab9c0f7602307d78b75371 cracklib-2.9.8.tar.bz2
+deef4710a3bf78348adfe699ff995acc21a7671ab03c4dd28da7f38f4a83008af4c97c9c1d4e1e98a47c0148c84146b36477f41f98fb0ee028cc0fadebb85ab9 cracklib.trigger
+100edacf91a4c251d4b05c0f550164fefc3fdaae4b715b24b9c42ec8cc17916b0929f96881982441dddf0fc7b8b91c9423bf0518cb571864f302d054c24a0770 nls.patch"
diff --git a/user/cracklib/nls.patch b/user/cracklib/nls.patch
new file mode 100644
index 000000000..20d695fc0
--- /dev/null
+++ b/user/cracklib/nls.patch
@@ -0,0 +1,48 @@
+From f0610dec6dafa550c87809d39ea1c43701af4f31 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Sat, 26 Nov 2022 19:55:12 -0600
+Subject: [PATCH] util: Call bindtextdomain to initialise gettext
+
+This fixes localised message output in the following cases:
+
+* non-standard PREFIX on GNU systems
+
+ GNU systems wouldn't be able to find the message catalog files.
+
+* musl systems
+
+ musl relies on bindtextdomain being called; it has no default catalog
+ path.
+---
+ util/Makefile.am | 2 +-
+ util/check.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/util/Makefile.am b/util/Makefile.am
+index 4649416..409dc29 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -6,7 +6,7 @@ dist_sbin_SCRIPTS = create-cracklib-dict cracklib-format
+
+ LDADD = ../lib/libcrack.la
+
+-AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"' -Wall
++AM_CPPFLAGS = -I. -I.. -I$(top_srcdir)/lib '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"' '-DLOCALEDIR="$(localedir)"' -Wall
+
+ cracklib_check_SOURCES = check.c
+ cracklib_check_LDADD = $(LDADD) $(LTLIBINTL)
+diff --git a/util/check.c b/util/check.c
+index 7db0c88..bb8fff5 100644
+--- a/util/check.c
++++ b/util/check.c
+@@ -24,6 +24,7 @@ main(int argc, char **argv)
+ setlocale(LC_ALL, "");
+
+ #ifdef ENABLE_NLS
++ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+ #endif
+
+--
+2.36.0
+